UNPKG

ant-design-x-vue

Version:
123 lines (122 loc) 2.81 kB
import { defineComponent as c, mergeDefaults as f, computed as t, createVNode as l, mergeProps as p } from "vue"; import { c as m, _ as y } from "../../../chunks/helper-chunk.mjs"; import { theme as g } from "ant-design-vue"; import q from "../ActionButton/index.mjs"; import { useActionButtonContextInject as I } from "../ActionButton/context.mjs"; import h from "./RecordingIcon.mjs"; import { o as x, p as b } from "../../../chunks/module-chunk.mjs"; const v = /* @__PURE__ */ c({ name: "AXSenderSpeechButton", __name: "index", props: f({ 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: "text", disabled: void 0, audioIcon: () => l(b, null, null), audioDisabledIcon: () => l(x, null, null), audioRecordingIcon: void 0 }), setup(e, { expose: i }) { i(); const r = m(e, ["type", "disabled", "audioIcon", "audioDisabledIcon", "audioRecordingIcon"]), o = I(), { token: u } = g.useToken(), d = t(() => o.value.speechRecording), a = t(() => o.value.prefixCls), s = t(() => { let n; return d.value ? n = e.audioRecordingIcon ? e.audioRecordingIcon : l(h, { className: `${a.value}-recording-icon` }, null) : o.value.onSpeechDisabled ? n = e.audioDisabledIcon : n = e.audioIcon, n; }); return () => l(q, p({ type: e.type, disabled: e.disabled }, r, { style: { display: "flex", justifyContent: "center", alignItems: "center", color: u.value.colorPrimary }, action: "onSpeech" }), { default: () => [s.value] }); } }), k = /* @__PURE__ */ y(v, [["__file", "/Users/wangzhichao/办公/code/github/ant-design-x-vue-pure/ant-design-x-vue/src/sender/components/SpeechButton/index.vue"]]); export { k as default };