@ued_fpi/data-visual
Version:
<br /> <br /> <div style="text-align:center"> <b style="font-size:30px">@ued_fpi/data-visual</b> <p>基于Vite4+TypeScript的Vue3大屏组件库开发框架</p> <img style="display:inline" src="https://img.shields.io/npm/v/@ued_fpi/data-visual" />
125 lines (120 loc) • 5.46 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const util = require('./util.js');
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("g", null, [
/* @__PURE__ */ vue.createElementVNode("path", {
d: "M0.292786,0.292786C0.480314,0.105315,0.734622,0,0.999786,0C1.26495,0,1.51926,0.105315,1.70679,0.292786C1.70679,0.292786,5.24279,3.82879,5.24279,3.82879C5.24279,3.82879,8.77879,0.292786,8.77879,0.292786C8.96739,0.110628,9.21999,0.00983396,9.48219,0.0121124C9.74438,0.0143908,9.9952,0.11956,10.1806,0.304968C10.366,0.490376,10.4712,0.741189,10.4735,1.00339C10.4757,1.26558,10.3749,1.51818,10.1928,1.70679C10.1928,1.70679,6.65679,5.24279,6.65679,5.24279C6.65679,5.24279,10.1928,8.77879,10.1928,8.77879C10.3749,8.96739,10.4757,9.21999,10.4735,9.48219C10.4712,9.74438,10.366,9.9952,10.1806,10.1806C9.9952,10.366,9.74438,10.4712,9.48219,10.4735C9.21999,10.4757,8.96739,10.3749,8.77879,10.1928C8.77879,10.1928,5.24279,6.65679,5.24279,6.65679C5.24279,6.65679,1.70679,10.1928,1.70679,10.1928C1.51818,10.3749,1.26558,10.4757,1.00339,10.4735C0.741189,10.4712,0.490376,10.366,0.304968,10.1806C0.11956,9.9952,0.0143908,9.74438,0.0121124,9.48219C0.00983396,9.21999,0.110628,8.96739,0.292786,8.77879C0.292786,8.77879,3.82879,5.24279,3.82879,5.24279C3.82879,5.24279,0.292786,1.70679,0.292786,1.70679C0.105315,1.51926,0,1.26495,0,0.999786C0,0.734622,0.105315,0.480314,0.292786,0.292786C0.292786,0.292786,0.292786,0.292786,0.292786,0.292786C0.292786,0.292786,0.292786,0.292786,0.292786,0.292786Z",
"fill-opacity": "1",
fill: "currentColor"
})
], -1);
const _hoisted_2 = [
_hoisted_1
];
const clsfix = "dv-aims-basic-dialog";
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "index",
props: {
// 设置宽度
width: {
type: [Number, String],
default: 800
},
// 设置高度
height: {
type: [Number, String],
default: ""
},
// 设置标题
title: {
type: String,
default: ""
},
// 是否显示弹窗
visible: {
type: Boolean,
default: false
},
// 是否在关闭弹窗后销毁内容区元素
destroyOnClose: {
type: Boolean,
default: false
}
},
emits: ["close"],
setup(__props, { emit: emits }) {
const props = __props;
const zIndex = vue.ref(0);
vue.watch(() => props.visible, () => {
if (props.visible)
zIndex.value = util.default();
}, {
immediate: true
});
const onClickClose = () => {
emits("close");
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
vue.createVNode(vue.Transition, { name: "basicDialogAnimation" }, {
default: vue.withCtx(() => [
vue.withDirectives(vue.createElementVNode("div", {
style: vue.normalizeStyle({
width: typeof __props.width === "number" ? `${__props.width}px` : __props.width,
height: typeof __props.height === "number" ? `${__props.height}px` : __props.height,
zIndex: zIndex.value,
transform: `translateX(-50%) translateY(160px)`
}),
class: vue.normalizeClass(`${clsfix}-container`)
}, [
vue.createElementVNode("header", {
class: vue.normalizeClass(`${clsfix}-header`)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${clsfix}-header-left`)
}, [
vue.createElementVNode("span", {
class: vue.normalizeClass(`${clsfix}-header-title`)
}, vue.toDisplayString(__props.title), 3),
vue.renderSlot(_ctx.$slots, "headerLeft")
], 2),
vue.createElementVNode("div", {
class: vue.normalizeClass(`${clsfix}-header-right`)
}, [
vue.renderSlot(_ctx.$slots, "headerRight"),
(vue.openBlock(), vue.createElementBlock("svg", {
class: vue.normalizeClass(`${clsfix}-close`),
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink",
version: "1.1",
width: "10.473535537719727",
height: "10.473535537719727",
viewBox: "0 0 10.473535537719727 10.473535537719727",
fill: "currentColor",
onClick: onClickClose
}, _hoisted_2, 2))
], 2)
], 2),
__props.destroyOnClose ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(`${clsfix}-content`)
}, [
__props.visible ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("", true)
], 2)) : (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass(`${clsfix}-content`)
}, [
vue.renderSlot(_ctx.$slots, "default")
], 2))
], 6), [
[vue.vShow, __props.visible]
])
]),
_: 3
})
]);
};
}
});
exports.default = _sfc_main;