ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
120 lines (119 loc) • 2.46 kB
JavaScript
import { defineComponent as a, mergeDefaults as i, createVNode as r, mergeProps as s } from "vue";
import { c as u, _ as d } from "../../chunks/helper-chunk.mjs";
import { b as p } from "../../chunks/module-chunk.mjs";
import c from "./ActionButton/index.mjs";
import f from "../StopLoading.mjs";
import { useActionButtonContextInject as m } from "./ActionButton/context.mjs";
import { theme as y } from "ant-design-vue";
const g = /* @__PURE__ */ a({
name: "AXSenderLoadingButton",
__name: "LoadingButton",
props: i({
prefixCls: {
type: null,
required: !1
},
type: {
type: null,
required: !1
},
htmlType: {
type: null,
required: !1
},
shape: {
type: null,
required: !1
},
size: {
type: null,
required: !1
},
loading: {
type: null,
required: !1
},
disabled: {
type: null,
required: !1
},
ghost: {
type: null,
required: !1
},
block: {
type: null,
required: !1
},
danger: {
type: null,
required: !1
},
icon: {
type: null,
required: !1
},
href: {
type: null,
required: !1
},
target: {
type: null,
required: !1
},
title: {
type: null,
required: !1
},
onClick: {
type: null,
required: !1
},
onMousedown: {
type: null,
required: !1
},
audioIcon: {
required: !1
},
audioDisabledIcon: {
required: !1
},
audioRecordingIcon: {
required: !1
}
}, {
type: "primary",
shape: "circle",
icon: void 0,
disabled: void 0
}),
setup(e, {
expose: l
}) {
l();
const t = u(e, ["type", "shape", "icon", "disabled"]), n = m(), {
token: o
} = y.useToken();
return () => r(c, s({
type: e.type,
disabled: e.disabled,
shape: e.shape,
icon: e.icon
}, t, {
style: {
backgroundColor: "transparent",
color: o.value.colorPrimary
},
class: p(`${n.value.prefixCls}-loading-button`),
action: "onCancel"
}), {
default: () => [r(f, {
className: `${n.value.prefixCls}-loading-icon`
}, null)]
});
}
}), k = /* @__PURE__ */ d(g, [["__file", "/Users/wangzhichao/办公/code/github/ant-design-x-vue-pure/ant-design-x-vue/src/sender/components/LoadingButton.vue"]]);
export {
k as default
};