dk-plus
Version:
51 lines (50 loc) • 1.57 kB
JavaScript
import { defineComponent as C, ref as b, toRefs as o, reactive as R } from "vue";
import { getButton as D } from "../../_hooks/get-button/index.js";
import { getGlobal as L } from "../../_hooks/public/get-Global/index.js";
import { getReturn as _ } from "../../_hooks/public/get-return/index.js";
import { getRipples as x } from "../../_hooks/public/get-ripples/index.js";
import "../../_icon/index.js";
import { dkButtonProps as E } from "./index3.js";
const h = C({
name: "DkButton",
props: E,
setup(t) {
const n = b(), { personalityType: i, icon: s, afterIcon: l, circle: r } = o(t), { classList: p, styleList: a, personaClassList: c, personalityStylist: m } = D(t), { getRun: u } = _(), { getType: f } = L(t);
return {
EventClick: (e) => {
const { disabled: d, ripples: g, loading: k } = o(t);
if (d.value || k.value) {
e.preventDefault();
return;
}
if (g.value) {
const { ripplesBgColor: v } = o(t), y = R({
AnimationDuration: 1100,
component: "dk-button",
className: "dk-button_ripples",
ripplesBgColor: v.value,
type: f()
}), { useRipples: B } = x(
e,
n.value,
y
);
B();
}
u(t.onClick, e);
},
dkBoxButton: n,
classList: p,
styleList: a,
personaClassList: c,
personalityStylist: m,
personalityType: i,
icon: s,
afterIcon: l,
circle: r
};
}
});
export {
h as default
};