完全跑通1.0版本
This commit is contained in:
123
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.d.ts
generated
vendored
Normal file
123
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.d.ts
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { Measurable } from "../../popper/src/constants.js";
|
||||
import { PopperEffect } from "../../popper/src/popper.js";
|
||||
import { ElTooltipContentProps } from "../../tooltip/src/content.js";
|
||||
import { ElTooltipTriggerProps } from "../../tooltip/src/trigger.js";
|
||||
import { ButtonType } from "../../button/src/button.js";
|
||||
import _default from "./popconfirm.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/popconfirm/src/popconfirm.d.ts
|
||||
interface PopconfirmProps {
|
||||
/**
|
||||
* @description Title
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* @description Confirm button text
|
||||
*/
|
||||
confirmButtonText?: string;
|
||||
/**
|
||||
* @description Cancel button text
|
||||
*/
|
||||
cancelButtonText?: string;
|
||||
/**
|
||||
* @description Confirm button type
|
||||
*/
|
||||
confirmButtonType?: ButtonType;
|
||||
/**
|
||||
* @description Cancel button type
|
||||
*/
|
||||
cancelButtonType?: ButtonType;
|
||||
/**
|
||||
* @description Icon Component
|
||||
*/
|
||||
icon?: IconPropType;
|
||||
/**
|
||||
* @description Icon color
|
||||
*/
|
||||
iconColor?: string;
|
||||
/**
|
||||
* @description is hide Icon
|
||||
*/
|
||||
hideIcon?: boolean;
|
||||
/**
|
||||
* @description delay of disappear, in millisecond
|
||||
*/
|
||||
hideAfter?: number;
|
||||
/**
|
||||
* @description Tooltip theme, built-in theme: `dark` / `light`
|
||||
*/
|
||||
effect?: ElTooltipContentProps['effect'];
|
||||
/**
|
||||
* @description whether popconfirm is teleported to the body
|
||||
*/
|
||||
teleported?: ElTooltipContentProps['teleported'];
|
||||
/**
|
||||
* @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed
|
||||
*/
|
||||
persistent?: ElTooltipContentProps['persistent'];
|
||||
/**
|
||||
* @description popconfirm width, min width 150px
|
||||
*/
|
||||
width?: string | number;
|
||||
/**
|
||||
* @description Indicates whether virtual triggering is enabled
|
||||
*/
|
||||
virtualTriggering?: ElTooltipTriggerProps['virtualTriggering'];
|
||||
/**
|
||||
* @description Indicates the reference element to which the popper is attached
|
||||
*/
|
||||
virtualRef?: ElTooltipTriggerProps['virtualRef'];
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
|
||||
*/
|
||||
declare const popconfirmProps: {
|
||||
readonly title: StringConstructor;
|
||||
readonly confirmButtonText: StringConstructor;
|
||||
readonly cancelButtonText: StringConstructor;
|
||||
readonly confirmButtonType: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "primary", boolean>;
|
||||
readonly cancelButtonType: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "text", boolean>;
|
||||
readonly icon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly iconColor: EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
|
||||
readonly hideIcon: BooleanConstructor;
|
||||
readonly hideAfter: EpPropFinalized<NumberConstructor, unknown, unknown, 200, boolean>;
|
||||
readonly effect: {
|
||||
readonly default: "light";
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
readonly __epPropKey: true;
|
||||
};
|
||||
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly persistent: BooleanConstructor;
|
||||
readonly width: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
|
||||
readonly virtualTriggering: BooleanConstructor;
|
||||
readonly virtualRef: {
|
||||
readonly type: _$vue.PropType<Measurable>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
};
|
||||
declare const popconfirmEmits: {
|
||||
/**
|
||||
* @description triggers when click confirm button
|
||||
*/
|
||||
confirm: (e: MouseEvent) => boolean;
|
||||
/**
|
||||
* @description triggers when click cancel button
|
||||
*/
|
||||
cancel: (e: MouseEvent) => boolean;
|
||||
};
|
||||
type PopconfirmEmits = typeof popconfirmEmits;
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
|
||||
*/
|
||||
type PopconfirmPropsPublic = ExtractPublicPropTypes<typeof popconfirmProps>;
|
||||
type PopconfirmInstance = InstanceType<typeof _default> & unknown;
|
||||
//#endregion
|
||||
export { PopconfirmEmits, PopconfirmInstance, PopconfirmProps, PopconfirmPropsPublic, popconfirmEmits, popconfirmProps };
|
||||
103
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
generated
vendored
Normal file
103
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { iconPropType } from "../../../utils/vue/icon.mjs";
|
||||
import { useTooltipContentProps } from "../../tooltip/src/content.mjs";
|
||||
import { useTooltipTriggerProps } from "../../tooltip/src/trigger.mjs";
|
||||
import { buttonTypes } from "../../button/src/button.mjs";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
//#region ../../packages/components/popconfirm/src/popconfirm.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
|
||||
*/
|
||||
const popconfirmProps = buildProps({
|
||||
/**
|
||||
* @description Title
|
||||
*/
|
||||
title: String,
|
||||
/**
|
||||
* @description Confirm button text
|
||||
*/
|
||||
confirmButtonText: String,
|
||||
/**
|
||||
* @description Cancel button text
|
||||
*/
|
||||
cancelButtonText: String,
|
||||
/**
|
||||
* @description Confirm button type
|
||||
*/
|
||||
confirmButtonType: {
|
||||
type: String,
|
||||
values: buttonTypes,
|
||||
default: "primary"
|
||||
},
|
||||
/**
|
||||
* @description Cancel button type
|
||||
*/
|
||||
cancelButtonType: {
|
||||
type: String,
|
||||
values: buttonTypes,
|
||||
default: "text"
|
||||
},
|
||||
/**
|
||||
* @description Icon Component
|
||||
*/
|
||||
icon: {
|
||||
type: iconPropType,
|
||||
default: () => QuestionFilled
|
||||
},
|
||||
/**
|
||||
* @description Icon color
|
||||
*/
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: "#f90"
|
||||
},
|
||||
/**
|
||||
* @description is hide Icon
|
||||
*/
|
||||
hideIcon: Boolean,
|
||||
/**
|
||||
* @description delay of disappear, in millisecond
|
||||
*/
|
||||
hideAfter: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
/**
|
||||
* @description Tooltip theme, built-in theme: `dark` / `light`
|
||||
*/
|
||||
effect: {
|
||||
...useTooltipContentProps.effect,
|
||||
default: "light"
|
||||
},
|
||||
/**
|
||||
* @description whether popconfirm is teleported to the body
|
||||
*/
|
||||
teleported: useTooltipContentProps.teleported,
|
||||
/**
|
||||
* @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed
|
||||
*/
|
||||
persistent: useTooltipContentProps.persistent,
|
||||
/**
|
||||
* @description popconfirm width, min width 150px
|
||||
*/
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: 150
|
||||
},
|
||||
virtualTriggering: useTooltipTriggerProps.virtualTriggering,
|
||||
virtualRef: useTooltipTriggerProps.virtualRef
|
||||
});
|
||||
const popconfirmEmits = {
|
||||
/**
|
||||
* @description triggers when click confirm button
|
||||
*/
|
||||
confirm: (e) => e instanceof MouseEvent,
|
||||
/**
|
||||
* @description triggers when click cancel button
|
||||
*/
|
||||
cancel: (e) => e instanceof MouseEvent
|
||||
};
|
||||
//#endregion
|
||||
export { popconfirmEmits, popconfirmProps };
|
||||
|
||||
//# sourceMappingURL=popconfirm.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
44
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue.d.ts
generated
vendored
Normal file
44
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { PopperEffect, PopperInstance } from "../../popper/src/popper.js";
|
||||
import { ButtonType } from "../../button/src/button.js";
|
||||
import { PopconfirmProps } from "./popconfirm.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/popconfirm/src/popconfirm.vue.d.ts
|
||||
declare var __VLS_23: {
|
||||
confirm: (e: MouseEvent) => void;
|
||||
cancel: (e: MouseEvent) => void;
|
||||
}, __VLS_41: {};
|
||||
type __VLS_Slots = {} & {
|
||||
actions?: (props: typeof __VLS_23) => any;
|
||||
} & {
|
||||
reference?: (props: typeof __VLS_41) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<PopconfirmProps, {
|
||||
popperRef: _$vue.ComputedRef<PopperInstance | undefined>;
|
||||
hide: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
confirm: (e: MouseEvent) => void;
|
||||
cancel: (e: MouseEvent) => void;
|
||||
}, string, _$vue.PublicProps, Readonly<PopconfirmProps> & Readonly<{
|
||||
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
||||
onCancel?: ((e: MouseEvent) => any) | undefined;
|
||||
}>, {
|
||||
teleported: boolean;
|
||||
effect: PopperEffect;
|
||||
icon: IconPropType;
|
||||
hideAfter: number;
|
||||
width: string | number;
|
||||
confirmButtonType: ButtonType;
|
||||
cancelButtonType: ButtonType;
|
||||
iconColor: string;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
121
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
121
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
import { addUnit } from "../../../utils/dom/style.mjs";
|
||||
import { useLocale } from "../../../hooks/use-locale/index.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { ElIcon } from "../../icon/index.mjs";
|
||||
import { ElTooltip } from "../../tooltip/index.mjs";
|
||||
import { ElButton } from "../../button/index.mjs";
|
||||
import { popconfirmEmits, popconfirmProps } from "./popconfirm.mjs";
|
||||
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
||||
//#region ../../packages/components/popconfirm/src/popconfirm.vue?vue&type=script&setup=true&lang.ts
|
||||
var popconfirm_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElPopconfirm",
|
||||
__name: "popconfirm",
|
||||
props: popconfirmProps,
|
||||
emits: popconfirmEmits,
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const { t } = useLocale();
|
||||
const ns = useNamespace("popconfirm");
|
||||
const tooltipRef = ref();
|
||||
const rootRef = ref();
|
||||
const popperRef = computed(() => {
|
||||
return unref(tooltipRef)?.popperRef;
|
||||
});
|
||||
const showPopper = () => {
|
||||
rootRef.value?.focus?.();
|
||||
};
|
||||
const hidePopper = () => {
|
||||
tooltipRef.value?.onClose?.();
|
||||
};
|
||||
const style = computed(() => {
|
||||
return { width: addUnit(props.width) };
|
||||
});
|
||||
const confirm = (e) => {
|
||||
emit("confirm", e);
|
||||
hidePopper();
|
||||
};
|
||||
const cancel = (e) => {
|
||||
emit("cancel", e);
|
||||
hidePopper();
|
||||
};
|
||||
const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
|
||||
const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
|
||||
__expose({
|
||||
popperRef,
|
||||
hide: hidePopper
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
|
||||
ref_key: "tooltipRef",
|
||||
ref: tooltipRef,
|
||||
trigger: "click",
|
||||
effect: __props.effect
|
||||
}, _ctx.$attrs, {
|
||||
"virtual-triggering": __props.virtualTriggering,
|
||||
"virtual-ref": __props.virtualRef,
|
||||
"popper-class": `${unref(ns).namespace.value}-popover`,
|
||||
"popper-style": style.value,
|
||||
teleported: __props.teleported,
|
||||
"fallback-placements": [
|
||||
"bottom",
|
||||
"top",
|
||||
"right",
|
||||
"left"
|
||||
],
|
||||
"hide-after": __props.hideAfter,
|
||||
persistent: __props.persistent,
|
||||
loop: "",
|
||||
onShow: showPopper
|
||||
}), {
|
||||
content: withCtx(() => [createElementVNode("div", {
|
||||
ref_key: "rootRef",
|
||||
ref: rootRef,
|
||||
tabindex: "-1",
|
||||
class: normalizeClass(unref(ns).b())
|
||||
}, [createElementVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [!__props.hideIcon && __props.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
||||
key: 0,
|
||||
class: normalizeClass(unref(ns).e("icon")),
|
||||
style: normalizeStyle({ color: __props.iconColor })
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
|
||||
_: 1
|
||||
}, 8, ["class", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.title), 1)], 2), createElementVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [renderSlot(_ctx.$slots, "actions", {
|
||||
confirm,
|
||||
cancel
|
||||
}, () => [createVNode(unref(ElButton), {
|
||||
size: "small",
|
||||
type: __props.cancelButtonType === "text" ? "" : __props.cancelButtonType,
|
||||
text: __props.cancelButtonType === "text",
|
||||
onClick: cancel
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(finalCancelButtonText.value), 1)]),
|
||||
_: 1
|
||||
}, 8, ["type", "text"]), createVNode(unref(ElButton), {
|
||||
size: "small",
|
||||
type: __props.confirmButtonType === "text" ? "" : __props.confirmButtonType,
|
||||
text: __props.confirmButtonType === "text",
|
||||
onClick: confirm
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(finalConfirmButtonText.value), 1)]),
|
||||
_: 1
|
||||
}, 8, ["type", "text"])])], 2)], 2)]),
|
||||
default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
|
||||
_: 3
|
||||
}, 16, [
|
||||
"effect",
|
||||
"virtual-triggering",
|
||||
"virtual-ref",
|
||||
"popper-class",
|
||||
"popper-style",
|
||||
"teleported",
|
||||
"hide-after",
|
||||
"persistent"
|
||||
]);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { popconfirm_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=popconfirm.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import popconfirm_vue_vue_type_script_setup_true_lang_default from "./popconfirm.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/popconfirm/src/popconfirm.vue
|
||||
var popconfirm_default = popconfirm_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { popconfirm_default as default };
|
||||
|
||||
//# sourceMappingURL=popconfirm2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"popconfirm2.mjs","names":[],"sources":["../../../../../../packages/components/popconfirm/src/popconfirm.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n trigger=\"click\"\n :effect=\"effect\"\n v-bind=\"$attrs\"\n :virtual-triggering=\"virtualTriggering\"\n :virtual-ref=\"virtualRef\"\n :popper-class=\"`${ns.namespace.value}-popover`\"\n :popper-style=\"style\"\n :teleported=\"teleported\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :hide-after=\"hideAfter\"\n :persistent=\"persistent\"\n loop\n @show=\"showPopper\"\n >\n <template #content>\n <div ref=\"rootRef\" tabindex=\"-1\" :class=\"ns.b()\">\n <div :class=\"ns.e('main')\">\n <el-icon\n v-if=\"!hideIcon && icon\"\n :class=\"ns.e('icon')\"\n :style=\"{ color: iconColor }\"\n >\n <component :is=\"icon\" />\n </el-icon>\n {{ title }}\n </div>\n <div :class=\"ns.e('action')\">\n <slot name=\"actions\" :confirm=\"confirm\" :cancel=\"cancel\">\n <el-button\n size=\"small\"\n :type=\"cancelButtonType === 'text' ? '' : cancelButtonType\"\n :text=\"cancelButtonType === 'text'\"\n @click=\"cancel\"\n >\n {{ finalCancelButtonText }}\n </el-button>\n <el-button\n size=\"small\"\n :type=\"confirmButtonType === 'text' ? '' : confirmButtonType\"\n :text=\"confirmButtonType === 'text'\"\n @click=\"confirm\"\n >\n {{ finalConfirmButtonText }}\n </el-button>\n </slot>\n </div>\n </div>\n </template>\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, unref } from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElIcon from '@element-plus/components/icon'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { popconfirmEmits } from './popconfirm'\n\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { PopconfirmProps } from './popconfirm'\n\ndefineOptions({\n name: 'ElPopconfirm',\n})\n\nconst props = withDefaults(defineProps<PopconfirmProps>(), {\n confirmButtonType: 'primary',\n cancelButtonType: 'text',\n icon: () => QuestionFilled,\n iconColor: '#f90',\n hideAfter: 200,\n effect: 'light',\n teleported: true,\n width: 150,\n})\nconst emit = defineEmits(popconfirmEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('popconfirm')\nconst tooltipRef = ref<TooltipInstance>()\nconst rootRef = ref<HTMLElement>()\n\nconst popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n})\n\nconst showPopper = () => {\n rootRef.value?.focus?.()\n}\n\nconst hidePopper = () => {\n tooltipRef.value?.onClose?.()\n}\n\nconst style = computed(() => {\n return {\n width: addUnit(props.width),\n }\n})\n\nconst confirm = (e: MouseEvent) => {\n emit('confirm', e)\n hidePopper()\n}\nconst cancel = (e: MouseEvent) => {\n emit('cancel', e)\n hidePopper()\n}\n\nconst finalConfirmButtonText = computed(\n () => props.confirmButtonText || t('el.popconfirm.confirmButtonText')\n)\nconst finalCancelButtonText = computed(\n () => props.cancelButtonText || t('el.popconfirm.cancelButtonText')\n)\n\ndefineExpose({\n popperRef,\n hide: hidePopper,\n})\n</script>\n"],"mappings":""}
|
||||
Reference in New Issue
Block a user