@xdp/button
Version:
button el-button vue3
57 lines (54 loc) • 1.62 kB
JavaScript
import { defineComponent, createVNode, mergeProps } from 'vue';
import { ElPopconfirm } from 'element-plus';
import CipButtonText from '../cip-button-text';
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var index = defineComponent({
name: "CipButtonPop",
props: {
popTitle: String,
popPlacement: String
},
inheritAttrs: false,
setup(props, {
attrs,
slots
}) {
return () => {
const _a = attrs, {
onClick
} = _a, inheritAttrs = __objRest(_a, [
"onClick"
]);
return createVNode(ElPopconfirm, {
"title": props.popTitle || "\u786E\u5B9A\u5220\u9664\u8BE5\u4FE1\u606F",
"cancelButtonType": "default",
"onConfirm": (e) => onClick(e, true)
}, {
reference: () => createVNode(CipButtonText, mergeProps(inheritAttrs, {
"onClick": () => {
}
}), {
default: () => {
var _a2;
return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
}
})
});
};
}
});
export { index as default };