@naturefw/ui-elp
Version:
基于 element-plus 的二次封装。TS 版
1,505 lines (1,430 loc) • 148 kB
JavaScript
import { reactive, ref, watch, resolveDirective, openBlock, createElementBlock, createCommentVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, withDirectives, createBlock, resolveDynamicComponent, Fragment, renderList, defineComponent, resolveComponent, mergeProps, onMounted, createElementVNode, withModifiers, computed, vShow, normalizeStyle, Transition, markRaw, nextTick, createSlots, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
import { ElButton, ElDialog, ElScrollbar, ElMessageBox, ElMessage as ElMessage$1, ElSpace, ElDropdown, ElDropdownMenu, ElIcon, ElDropdownItem, ElDrawer, ElCard, ElSubMenu, ElMenuItem, ElMenu, ElTabs, ElTabPane, ElLoading, ElTable, ElTableColumn, ElFormItem, ElRow, ElCol, ElForm, ElSteps, ElStep } from 'element-plus';
import { mykeydown, itemProps, itemController, loadController, getChildrenOne, shallowToDeep, findKindDict, findProps, findController, useRouter, gridProps, formProps, formController, dialogDrag, formDrag, gridDrag } from '@naturefw/ui-core';
export { createDataList, createModel, createRouter, formController, itemController, itemProps, lifecycle, loadController, service, serviceConfig, useRouter } from '@naturefw/ui-core';
import dayjs from 'dayjs';
var _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _hoisted_1$d = { key: 0 };
const _sfc_main$Q = {
__name: 'button-dialog',
props: {
moduleId: [Number, String],
dataId: [Number, String],
active: Object, // 按钮的meta集合
buttonMeta: Object,
componentKind: {
type: Object,
default: () => {}
}
},
setup(__props) {
const props = __props;
// 属性:模块ID
// 弹窗信息
const dialogInfo = reactive({
isShow: false
});
// 设置按钮是否可用
const btnDisabled = ref(true);
// 单击按钮,显示弹窗
const buttonClick = () => {
// 按钮信息
if (props.buttonMeta.btnKind === 'add') {
dialogInfo.isShow = true; // 是否显示弹窗
} else if (!btnDisabled.value) {
dialogInfo.isShow = true;
} else {
const msgError = {
type: 'info',
message: '请先选择一条记录。'
};
ElMessage(msgError);
}
};
// 按钮快捷键
mykeydown(props.buttonMeta.hotkey, (e, isAlt) => {
if (isAlt && props.active.moduleId === props.moduleId) {
buttonClick();
}
});
// 监听选择的变化,记入状态
watch(() => props.dataId, (id) => {
btnDisabled.value = (props.buttonMeta.btnKind === 'add') ?
false : id === '';
},
{ immediate: true });
return (_ctx, _cache) => {
const _directive_dialog_drag = resolveDirective("dialog-drag");
return (openBlock(), createElementBlock("div", null, [
createCommentVNode("按钮"),
createVNode(unref(ElButton), {
size: "mini",
type: "primary",
disabled: btnDisabled.value,
onClick: _cache[0] || (_cache[0] = $event => (buttonClick()))
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(__props.buttonMeta.btnTitle) + "(" + toDisplayString(__props.buttonMeta.hotkey) + ") ", 1 /* TEXT */)
]),
_: 1 /* STABLE */
}, 8 /* PROPS */, ["disabled"]),
createCommentVNode("弹窗,表单 v-dialogdrag=\"buttonMeta.dialogWidth\""),
(dialogInfo.isShow)
? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$d, [
createVNode(unref(ElDialog), {
draggable: "",
title: __props.buttonMeta.dialogTitle,
modelValue: dialogInfo.isShow,
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((dialogInfo.isShow) = $event)),
modal: true,
width: __props.buttonMeta.dialogWidth,
"close-on-click-modal": true,
"destroy-on-close": true
}, {
default: withCtx(() => [
createVNode(unref(ElScrollbar), { style: {"height":"600px","margin":"2px"} }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(__props.componentKind[__props.buttonMeta.controlKey]), {
moduleId: __props.buttonMeta.openModuleId,
dataId: __props.dataId,
formMetaId: __props.buttonMeta.formMetaId,
actionId: __props.buttonMeta.actionId,
type: __props.buttonMeta.btnKind,
dialogInfo: dialogInfo
}, null, 8 /* PROPS */, ["moduleId", "dataId", "formMetaId", "actionId", "type", "dialogInfo"]))
]),
_: 1 /* STABLE */
})
]),
_: 1 /* STABLE */
}, 8 /* PROPS */, ["title", "modelValue", "width"])
])), [
[_directive_dialog_drag, __props.buttonMeta.dialogWidth]
])
: createCommentVNode("v-if", true)
]))
}
}
};
var nfButtonDialog = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['__file',"D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/button/button-dialog.vue"]]);
const msgBox$2 = {
confirmButtonText: '删除', // + dataListState.choice.dataId,
cancelButtonText: '后悔了',
type: 'warning'
};
const msgSucess = {
type: 'success',
message: '删除成功!'
};
const msgError$2 = {
type: 'info',
message: '已经取消了。'
};
const msgError1 = {
type: 'info',
message: '请先选择一条记录。'
};
const _sfc_main$P = {
__name: 'button-service',
props: {
moduleId: [Number, String],
dataId: [Number, String],
active: Object, // 按钮的meta集合
buttonMeta: Object,
reloadPager: Function,
events: {
type: Object,
default: {
deleteClick: () => {} // 删除按钮的单击事件,已经确实过的
}
}
},
setup(__props) {
const props = __props;
// 属性:模块ID
const deleteClick = props.events.deleteClick;
// 设置按钮是否可用
const btnDisabled = ref(true);
// 单击按钮,执行删除操作
const buttonClick = () => {
// model.delete(moduleId, actionId, dataId).then(() = > {})
if (!btnDisabled.value) {
ElMessageBox.confirm(`此操作将删除该记录(${props.dataId}), 是否继续?`, '温馨提示', msgBox$2)
.then(async () => {
// 调用回调函数
const re = await deleteClick(props.dataId, props.buttonMeta, props.moduleId);
if (re) {
ElMessage$1(msgSucess);
}
})
.catch(() => {
// 取消删除操作
ElMessage$1(msgError$2);
});
} else {
// 没有选择记录的提示
ElMessage$1(msgError1);
}
};
// 按钮快捷键
mykeydown(props.buttonMeta.hotkey, (e, isAlt) => {
if (isAlt && props.active.moduleId === props.moduleId) {
buttonClick();
}
});
// 监听选择的变化,记入状态
watch(() => props.dataId, (id) => {
btnDisabled.value = (props.buttonMeta.btnKind === 'add') ?
false : id === '';
},
{ immediate: true });
return (_ctx, _cache) => {
return (openBlock(), createElementBlock("div", null, [
createCommentVNode("按钮"),
createVNode(unref(ElButton), {
size: "mini",
type: "primary",
disabled: btnDisabled.value,
onClick: _cache[0] || (_cache[0] = $event => (buttonClick()))
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(__props.buttonMeta.btnTitle) + "(" + toDisplayString(__props.buttonMeta.hotkey) + ") ", 1 /* TEXT */)
]),
_: 1 /* STABLE */
}, 8 /* PROPS */, ["disabled"])
]))
}
}
};
var nfButtonService = /*#__PURE__*/_export_sfc(_sfc_main$P, [['__file',"D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/button/button-service.vue"]]);
const _sfc_main$O = {
__name: 'button',
props: {
moduleId: [Number, String], // 模块ID
active: Object, // 按钮的meta集合
dataId: {
type: [String, Number],
default: ''
},
dataIds: {
type: [Array],
default: []
},
btnOrder: Array, // 按钮的排序
itemMeta: Object, // 按钮的meta集合
events: {
type: Object,
default: {
deleteClick: () => {} // 删除按钮的单击事件,已经确实过的
}
},
componentKind: { // 弹窗打开的组件的字典
type: Object,
default: () => {}
}
},
setup(__props) {
// 属性:模块ID
return (_ctx, _cache) => {
return (openBlock(), createElementBlock("div", null, [
createCommentVNode("多个按钮"),
createVNode(unref(ElSpace), { wrap: "" }, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.btnOrder, (item, key) => {
return (openBlock(), createElementBlock("span", {
key: 'btn_'+ key
}, [
(__props.itemMeta[item].btnKind === 'delete')
? (openBlock(), createBlock(nfButtonService, {
key: 0,
moduleId: __props.moduleId,
dataId: __props.dataId,
dataIds: __props.dataIds,
active: __props.active,
buttonMeta: __props.itemMeta[item],
events: __props.events
}, null, 8 /* PROPS */, ["moduleId", "dataId", "dataIds", "active", "buttonMeta", "events"]))
: (openBlock(), createBlock(nfButtonDialog, {
key: 1,
moduleId: __props.moduleId,
dataId: __props.dataId,
active: __props.active,
buttonMeta: __props.itemMeta[item],
componentKind: __props.componentKind
}, null, 8 /* PROPS */, ["moduleId", "dataId", "active", "buttonMeta", "componentKind"]))
]))
}), 128 /* KEYED_FRAGMENT */))
]),
_: 1 /* STABLE */
})
]))
}
}
};
var nfButton = /*#__PURE__*/_export_sfc(_sfc_main$O, [['__file',"D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/button/button.vue"]]);
const _sfc_main$N = defineComponent({
name: "nf-el-from-item-area",
inheritAttrs: false,
components: {},
props: {
modelValue: [String, Number],
...itemProps
},
emits: ["update:modelValue"],
setup(props, context) {
return {
...itemController(props, context.emit)
};
}
});
function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_input = resolveComponent("el-input");
return openBlock(), createBlock(_component_el_input, mergeProps({
type: "textarea",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
title: _ctx.title,
clearable: _ctx.clearable,
onBlur: _ctx.run,
onChange: _ctx.run,
onClear: _ctx.run,
onKeydown: _ctx.clear
}), null, 16, ["modelValue", "id", "name", "title", "clearable", "onBlur", "onChange", "onClear", "onKeydown"]);
}
var nfArea = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$L], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-area.vue"]]);
const _sfc_main$M = defineComponent({
name: "nf-el-form-item-text",
inheritAttrs: false,
components: {},
props: {
modelValue: [String, Number],
...itemProps
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value,
run,
clear
} = itemController(props, context.emit);
return {
value,
run,
clear
};
}
});
function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_input = resolveComponent("el-input");
return openBlock(), createBlock(_component_el_input, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
title: _ctx.title,
clearable: _ctx.clearable,
onBlur: _ctx.run,
onChange: _ctx.run,
onClear: _ctx.run,
onKeydown: _ctx.clear
}), null, 16, ["modelValue", "id", "name", "title", "clearable", "onBlur", "onChange", "onClear", "onKeydown"]);
}
var nfText$1 = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$K], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-text.vue"]]);
const _sfc_main$L = defineComponent({
name: "nf-el-form-item-password",
inheritAttrs: false,
components: {},
props: {
modelValue: [String],
"show-password": {
type: Boolean,
default: true
},
...itemProps
},
emits: ["update:modelValue"],
setup(props, context) {
return {
...itemController(props, context.emit)
};
}
});
function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_input = resolveComponent("el-input");
return openBlock(), createBlock(_component_el_input, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
title: _ctx.title,
clearable: _ctx.clearable,
"show-password": ""
}), null, 16, ["modelValue", "id", "name", "title", "clearable"]);
}
var nfPassword = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$J], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-password.vue"]]);
const urlManage = (value) => {
const comList = [
{ value: ".com" },
{ value: ".cn" },
{ value: ".net" },
{ value: ".gov" },
{ value: ".com.cn" },
{ value: ".net.cn" },
{ value: ".org.cn" },
{ value: ".gov.cn" },
{ value: ".org" },
{ value: ".top" },
{ value: ".vip" },
{ value: ".\u4E2D\u56FD" },
{ value: ".\u4F01\u4E1A" },
{ value: ".\u516C\u53F8" },
{ value: ".\u7F51\u7EDC" }
];
const querySearch = (str, cb) => {
const results = str ? comList.filter((item) => item.value.indexOf(str.toLowerCase()) === 0) : comList;
cb(results);
};
const url = reactive({
http: "Https://",
com: ".com",
value: ""
});
watch(url, (v1) => {
value.value = url.http + url.value + url.com;
});
watch(() => value.value, (v1) => {
if (typeof v1 !== "string")
return;
if (v1 === null)
return;
if (!v1)
return;
const arrUrlAll = v1.toLowerCase().split("://");
if (arrUrlAll.length === 1) {
url.value = arrUrlAll[0];
} else if (arrUrlAll.length === 2) {
url.http = arrUrlAll[0] + "://";
const arrUrl = arrUrlAll[1].split(".");
const len = arrUrl.length;
let endPosition = 0;
switch (len) {
case 1:
url.value = arrUrl[0];
break;
case 2:
url.value = arrUrl[0];
url.com = "." + arrUrl[1];
break;
default:
if (arrUrl[len - 1] === "cn" && (arrUrl[len - 2] === "com" || arrUrl[len - 2] === "net" || arrUrl[len - 2] === "org" || arrUrl[len - 2] === "gov")) {
endPosition = len - 2;
url.com = "." + arrUrl[endPosition] + ".cn";
} else {
endPosition = len - 1;
url.com = "." + arrUrl[endPosition];
}
url.value = arrUrl[0];
for (let i = 1; i < endPosition; i++) {
url.value += "." + arrUrl[i];
}
break;
}
}
}, { immediate: true });
return {
url,
querySearch
};
};
const _sfc_main$K = defineComponent({
name: "nf-el-form-item-url",
inheritAttrs: false,
components: {},
props: {
modelValue: [String],
...itemProps
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value,
run,
clear
} = itemController(props, context.emit);
const domUrl = ref(null);
onMounted(() => {
setTimeout(() => {
}, 300);
});
return {
domUrl,
run,
clear,
...urlManage(value)
};
}
});
function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_option = resolveComponent("el-option");
const _component_el_select = resolveComponent("el-select");
const _component_el_autocomplete = resolveComponent("el-autocomplete");
const _component_el_input = resolveComponent("el-input");
return openBlock(), createBlock(_component_el_input, mergeProps({
ref: "domUrl",
modelValue: _ctx.url.value,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.url.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
title: _ctx.title,
clearable: _ctx.clearable,
onBlur: _ctx.run,
onChange: _ctx.run,
onClear: _ctx.run,
onKeydown: _ctx.clear
}), {
prepend: withCtx(() => [
createCommentVNode("\u524D\u9762\u7684\u9009\u9879"),
createVNode(_component_el_select, mergeProps({
style: { "width": "90px" },
modelValue: _ctx.url.http,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.url.http = $event)
}, _ctx.$attrs), {
default: withCtx(() => [
createVNode(_component_el_option, {
label: "Http://",
value: "Http://"
}),
createVNode(_component_el_option, {
label: "Https://",
value: "Https://"
})
]),
_: 1
}, 16, ["modelValue"])
]),
append: withCtx(() => [
createCommentVNode("\u540E\u9762\u7684\u57DF\u540D\u540E\u7F00"),
createVNode(_component_el_autocomplete, {
style: { "width": "100px" },
class: "inline-input",
clearable: "",
modelValue: _ctx.url.com,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.url.com = $event),
"fetch-suggestions": _ctx.querySearch
}, null, 8, ["modelValue", "fetch-suggestions"])
]),
_: 1
}, 16, ["modelValue", "id", "name", "title", "clearable", "onBlur", "onChange", "onClear", "onKeydown"]);
}
var nfUrl = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$I], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-url.vue"]]);
const _sfc_main$J = defineComponent({
name: "nf-el-form-item-autocomplete",
inheritAttrs: false,
components: {},
props: {
...itemProps,
modelValue: [String, Array, Number]
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value
} = itemController(props, context.emit);
const querySearch = (str, cb) => {
cb(props.optionList);
};
const { loadDict } = loadController(props);
loadDict();
return {
value,
querySearch
};
}
});
const _hoisted_1$c = { class: "name" };
const _hoisted_2$7 = {
class: "addr",
style: { "float": "right" }
};
function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_autocomplete = resolveComponent("el-autocomplete");
return openBlock(), createBlock(_component_el_autocomplete, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
title: _ctx.title,
clearable: _ctx.clearable,
"fetch-suggestions": _ctx.querySearch
}), {
default: withCtx(({ item }) => [
createElementVNode("div", _hoisted_1$c, [
createTextVNode(toDisplayString(item.value) + " ", 1),
createElementVNode("span", _hoisted_2$7, toDisplayString(item.label), 1)
])
]),
_: 1
}, 16, ["modelValue", "id", "name", "title", "clearable", "fetch-suggestions"]);
}
var nfAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$H], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-autocomplete.vue"]]);
const _sfc_main$I = defineComponent({
name: "nf-el-form-item-color",
inheritAttrs: false,
components: {},
props: {
modelValue: [String],
...itemProps
},
emits: ["update:modelValue"],
setup(props, context) {
return {
...itemController(props, context.emit)
};
}
});
function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_color_picker = resolveComponent("el-color-picker");
return openBlock(), createBlock(_component_el_color_picker, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs), null, 16, ["modelValue"]);
}
var nfColor = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$G], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/t-color.vue"]]);
const _sfc_main$H = defineComponent({
name: "nf-el-from-item-number",
inheritAttrs: false,
components: {},
props: {
...itemProps,
"controls-position": {
type: String,
default: "right"
},
modelValue: [String, Number]
},
emits: ["update:modelValue"],
setup(props, context) {
return {
...itemController(props, context.emit)
};
}
});
function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_input_number = resolveComponent("el-input-number");
return openBlock(), createBlock(_component_el_input_number, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable,
"controls-position": _ctx.controlsPosition
}), null, 16, ["modelValue", "id", "name", "clearable", "controls-position"]);
}
var nfNumber$1 = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$F], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/n-number.vue"]]);
const _sfc_main$G = defineComponent({
name: "nf-el-from-item-range",
inheritAttrs: false,
components: {},
props: {
...itemProps,
modelValue: [String, Number]
},
emits: ["update:modelValue"],
setup(props, context) {
return {
...itemController(props, context.emit)
};
}
});
function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_slider = resolveComponent("el-slider");
return openBlock(), createBlock(_component_el_slider, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "id", "name", "clearable"]);
}
var nfRange = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$E], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/n-range.vue"]]);
/*! Element Plus Icons Vue v2.0.4 */
// unplugin-vue:/plugin-vue/export-helper
var export_helper_default = (sfc, props) => {
let target = sfc.__vccOpts || sfc;
for (let [key, val] of props)
target[key] = val;
return target;
};
var _sfc_main5 = {
name: "ArrowDownBold"
}, _hoisted_15 = {
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg"
}, _hoisted_25 = /* @__PURE__ */ createElementVNode("path", {
fill: "currentColor",
d: "M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"
}, null, -1), _hoisted_35 = [
_hoisted_25
];
function _sfc_render5(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_15, _hoisted_35);
}
var arrow_down_bold_default = /* @__PURE__ */ export_helper_default(_sfc_main5, [["render", _sfc_render5], ["__file", "arrow-down-bold.vue"]]);
var _sfc_main9 = {
name: "ArrowRightBold"
}, _hoisted_19 = {
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg"
}, _hoisted_29 = /* @__PURE__ */ createElementVNode("path", {
fill: "currentColor",
d: "M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"
}, null, -1), _hoisted_39 = [
_hoisted_29
];
function _sfc_render9(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_19, _hoisted_39);
}
var arrow_right_bold_default = /* @__PURE__ */ export_helper_default(_sfc_main9, [["render", _sfc_render9], ["__file", "arrow-right-bold.vue"]]);
var _sfc_main49 = {
name: "CircleCloseFilled"
}, _hoisted_149 = {
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg"
}, _hoisted_249 = /* @__PURE__ */ createElementVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"
}, null, -1), _hoisted_348 = [
_hoisted_249
];
function _sfc_render49(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_149, _hoisted_348);
}
var circle_close_filled_default = /* @__PURE__ */ export_helper_default(_sfc_main49, [["render", _sfc_render49], ["__file", "circle-close-filled.vue"]]);
var _sfc_main72 = {
name: "DArrowRight"
}, _hoisted_172 = {
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg"
}, _hoisted_272 = /* @__PURE__ */ createElementVNode("path", {
fill: "currentColor",
d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688zm-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"
}, null, -1), _hoisted_371 = [
_hoisted_272
];
function _sfc_render72(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_172, _hoisted_371);
}
var d_arrow_right_default = /* @__PURE__ */ export_helper_default(_sfc_main72, [["render", _sfc_render72], ["__file", "d-arrow-right.vue"]]);
const _sfc_main$F = defineComponent({
name: "nf-el-form-item-rate",
inheritAttrs: false,
components: {
CircleCloseFilled: circle_close_filled_default
},
props: {
...itemProps,
modelValue: [String, Number]
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value
} = itemController(props, context.emit);
const myclear = () => {
value.value = null;
};
return {
value,
myclear
};
}
});
function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_rate = resolveComponent("el-rate");
const _component_circle_close_filled = resolveComponent("circle-close-filled");
return openBlock(), createElementBlock(Fragment, null, [
createVNode(_component_el_rate, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "id", "name", "clearable"]),
_ctx.clearable ? (openBlock(), createBlock(_component_circle_close_filled, {
key: 0,
style: { "width": "1.2em", "height": "1.2em", "margin-top": "-2px", "margin-left": "5px", "cursor": "pointer" },
onClick: withModifiers(_ctx.myclear, ["stop"])
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)
], 64);
}
var nfRate = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$D], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/n-rate.vue"]]);
const _sfc_main$E = defineComponent({
name: "nf-el-from-item-date2",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY-MM-DD"
},
valueFormat: {
type: String,
default: "YYYY-MM-DD"
},
modelValue: [String, Date, Number, Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
let dateType = "date";
if (props.formItemMeta.controlType == "125") {
dateType = "daterange";
if (!Array.isArray(value.value)) {
value.value = [];
}
} else {
if (Array.isArray(value.value)) {
value.value = "";
}
}
return {
dateType,
value
};
}
});
function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
ref: "domDate",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
type: _ctx.dateType,
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
"value-format": _ctx.valueFormat,
title: _ctx.title,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "type", "name", "format", "value-format", "title", "clearable"]);
}
var nfDate$1 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$C], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-date.vue"]]);
const _sfc_main$D = defineComponent({
name: "nf-el-from-item-date-time",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY-MM-DD HH:mm:ss"
},
valueFormat: {
type: String,
default: "YYYY-MM-DD HH:mm:ss"
},
modelValue: [String, Date, Number, Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
let dateType = "datetime";
if (props.formItemMeta.controlType == "126") {
dateType = "datetimerange";
if (!Array.isArray(value.value)) {
value.value = [];
}
} else {
if (Array.isArray(value.value)) {
value.value = "";
}
}
return {
dateType,
value
};
}
});
function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
ref: "domDate",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
type: _ctx.dateType,
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
"value-format": _ctx.valueFormat,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "type", "name", "format", "value-format", "clearable"]);
}
var nfDatetime = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$B], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-datetime.vue"]]);
const _sfc_main$C = defineComponent({
name: "nf-el-from-item-month",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY-MM"
},
valueFormat: {
type: String,
default: "YYYY-MM"
},
modelValue: [String, Date, Number, Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
let dateType = "month";
if (props.formItemMeta.controlType == "127") {
dateType = "monthrange";
if (!Array.isArray(value.value)) {
value.value = [];
}
} else {
if (Array.isArray(value.value)) {
value.value = "";
}
}
return {
dateType,
value
};
}
});
function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
ref: "domDate",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
type: _ctx.dateType,
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
"value-format": _ctx.valueFormat,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "type", "name", "format", "value-format", "clearable"]);
}
var nfMonth = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$A], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-month.vue"]]);
const _sfc_main$B = defineComponent({
name: "nf-el-from-item-year",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY"
},
"value-format": {
type: String,
default: "YYYY"
},
modelValue: [String, Date, Number, Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
const dateType = Array.isArray(value.value) ? "yearrange" : "year";
return {
dateType,
value
};
}
});
function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
ref: "domDate",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
type: _ctx.dateType,
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
"value-format": _ctx.valueFormat,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "type", "name", "format", "value-format", "clearable"]);
}
var nfYear = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$z], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-year.vue"]]);
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
var isoWeeksInYear$1 = {exports: {}};
(function (module, exports) {
!function(e,n){module.exports=n();}(commonjsGlobal,(function(){return function(e,n){n.prototype.isoWeeksInYear=function(){var e=this.isLeapYear(),n=this.endOf("y").day();return 4===n||e&&5===n?53:52};}}));
}(isoWeeksInYear$1));
var isoWeeksInYear = isoWeeksInYear$1.exports;
var isLeapYear$1 = {exports: {}};
(function (module, exports) {
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0};}}));
}(isLeapYear$1));
var isLeapYear = isLeapYear$1.exports;
var isoWeek$1 = {exports: {}};
(function (module, exports) {
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e="day";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf("year"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,"week")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return "isoweek"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):n.bind(this)(e,t)};}}));
}(isoWeek$1));
var isoWeek = isoWeek$1.exports;
dayjs.extend(isoWeeksInYear);
dayjs.extend(isLeapYear);
dayjs.extend(isoWeek);
const dateManage = (value, props) => {
const mydate = ref("");
value.value = "";
const dic = {
1: (year) => new Date(year + "-01-01"),
2: (year) => new Date(year - 1 + "-12-31"),
3: (year) => new Date(year - 1 + "-12-30"),
4: (year) => new Date(year - 1 + "-12-29"),
5: (year) => new Date(year + "-01-04"),
6: (year) => new Date(year + "-01-03"),
0: (year) => new Date(year + "-01-02")
};
const weekToDate = (week) => {
if (week === "" || week === 0) {
return new Date();
}
const year = week.substr(0, 4);
const w = week.substr(week.length - 2, 2);
const dayOfWeek = new Date(year + "-01-01").getDay();
const firstDay = dic[dayOfWeek](parseInt(year));
return dayjs(firstDay).add(7 * (w - 1), "day").toDate();
};
watch(() => value.value, (v1, v2) => {
if (v1 === "") {
mydate.value = "";
} else {
mydate.value = weekToDate(v1);
}
}, { immediate: true });
const myChange = (val) => {
if (val === null) {
value.value = "";
} else {
const wk = dayjs(val).add(1, "day").isoWeek().toString();
const year = val.getFullYear();
const re = year.toString() + " " + wk.padStart(2, "0");
value.value = re;
document.getElementsByName("c" + props.formItemMeta.columnId)[0].value = re;
}
};
return {
mydate,
myChange
};
};
const _sfc_main$A = defineComponent({
name: "nf-el-from-item-week",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY-ww"
},
valueFormat: {
type: String,
default: "YYYY-ww"
},
modelValue: [String, Date]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
return {
...dateManage(value, props)
};
}
});
function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
modelValue: _ctx.mydate,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mydate = $event)
}, _ctx.$attrs, {
type: "week",
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
clearable: _ctx.clearable,
onChange: _ctx.myChange
}), null, 16, ["modelValue", "name", "format", "clearable", "onChange"]);
}
var nfWeek = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$y], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-week.vue"]]);
const _sfc_main$z = defineComponent({
name: "nf-el-from-item-date-more",
inheritAttrs: false,
components: {},
props: {
...itemProps,
format: {
type: String,
default: "YYYY-MM-DD"
},
valueFormat: {
type: String,
default: "YYYY-MM-DD"
},
modelValue: [Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
if (!Array.isArray(value.value)) {
value.value = [];
}
return {
value
};
}
});
function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_date_picker = resolveComponent("el-date-picker");
return openBlock(), createBlock(_component_el_date_picker, mergeProps({
ref: "domDate",
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
type: "dates",
name: "c" + _ctx.formItemMeta.columnId,
format: _ctx.format,
"value-format": _ctx.valueFormat,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "name", "format", "value-format", "clearable"]);
}
var nfDates = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$x], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-date-more.vue"]]);
const timeManage$1 = (value) => {
const mytime = ref("");
const getTime = (_val) => {
const hour = _val.getHours().toString().padStart(2, "0");
const mm = _val.getMinutes().toString().padStart(2, "0");
const ss = _val.getSeconds().toString().padStart(2, "0");
const re = `${hour}:${mm}:${ss}`;
return re;
};
if (typeof value.value === "string") {
if (value.value !== "") {
mytime.value = new Date("1900-1-1 " + value.value);
}
}
watch(() => value.value, (v1, v2) => {
if (typeof value.value === "string") {
if (value.value !== "") {
mytime.value = new Date("1900-1-1 " + value.value);
}
}
});
const myChange = (_val) => {
if (_val) {
if (typeof _val === "string") {
value.value = _val;
} else if (Array.isArray(_val)) {
const re1 = getTime(_val[0]);
const re2 = getTime(_val[0]);
value.value = [re1, re2];
} else {
value.value = getTime(_val);
}
}
};
return {
mytime,
myChange
};
};
const _sfc_main$y = defineComponent({
name: "nf-el-from-item-time-picker",
inheritAttrs: false,
components: {},
props: {
...itemProps,
showFormat: {
type: String,
default: "HH:mm:ss"
},
returnFormat: {
type: String,
default: "HH:mm:ss"
},
modelValue: [String, Date]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
const { mytime, myChange } = timeManage$1(value);
return {
mytime,
myChange
};
}
});
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_time_picker = resolveComponent("el-time-picker");
return openBlock(), createBlock(_component_el_time_picker, mergeProps({
modelValue: _ctx.mytime,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mytime = $event)
}, _ctx.$attrs, {
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable,
"is-range": _ctx.formItemMeta.controlType === 131,
format: _ctx.showFormat,
onChange: _ctx.myChange
}), null, 16, ["modelValue", "name", "clearable", "is-range", "format", "onChange"]);
}
var nfTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$w], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-time-picker.vue"]]);
const timeManage = (value) => {
const mytime = ref("");
if (value.value !== null) {
mytime.value = value.value;
}
watch(() => value.value, (v1, v2) => {
mytime.value = v1;
});
const myChange = (_val) => {
value.value = _val;
};
return {
mytime,
myChange
};
};
const _sfc_main$x = defineComponent({
name: "el-from-item-time-select",
inheritAttrs: false,
components: {},
props: {
...itemProps,
showFormat: {
type: String,
default: "HH:mm"
},
returnFormat: {
type: String,
default: "HH:mm"
},
modelValue: [String]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
const { mytime, myChange } = timeManage(value);
return {
mytime,
myChange
};
}
});
function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_time_select = resolveComponent("el-time-select");
return openBlock(), createBlock(_component_el_time_select, mergeProps({
modelValue: _ctx.mytime,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mytime = $event)
}, _ctx.$attrs, {
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable,
format: _ctx.showFormat,
onChange: _ctx.myChange
}), null, 16, ["modelValue", "name", "clearable", "format", "onChange"]);
}
var nfTimeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$v], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/d-time-select.vue"]]);
const _sfc_main$w = defineComponent({
name: "nf-el-from-item-switch",
inheritAttrs: false,
components: {
CircleCloseFilled: circle_close_filled_default
},
props: {
...itemProps,
modelValue: [String, Number, Boolean]
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value
} = itemController(props, context.emit);
const myclear = () => {
value.value = null;
};
return {
value,
myclear
};
}
});
function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_switch = resolveComponent("el-switch");
const _component_circle_close_filled = resolveComponent("circle-close-filled");
return openBlock(), createElementBlock(Fragment, null, [
createVNode(_component_el_switch, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable
}), null, 16, ["modelValue", "id", "name", "clearable"]),
_ctx.clearable ? (openBlock(), createBlock(_component_circle_close_filled, {
key: 0,
style: { "width": "1.2em", "height": "1.2em", "margin-top": "0px", "margin-left": "5px", "cursor": "pointer" },
onClick: withModifiers(_ctx.myclear, ["stop"])
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)
], 64);
}
var nfSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$u], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/s1-switch.vue"]]);
const _sfc_main$v = defineComponent({
name: "nf-el-from-item-checkbox",
inheritAttrs: false,
components: {
CircleCloseFilled: circle_close_filled_default
},
props: {
...itemProps,
modelValue: [Boolean, String]
},
emits: ["update:modelValue"],
setup(props, context) {
const {
value
} = itemController(props, context.emit);
const myclear = () => {
value.value = null;
};
return {
value,
myclear
};
}
});
function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_checkbox = resolveComponent("el-checkbox");
const _component_circle_close_filled = resolveComponent("circle-close-filled");
return openBlock(), createElementBlock(Fragment, null, [
createVNode(_component_el_checkbox, mergeProps({
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable
}), {
default: withCtx(() => [
createTextVNode(toDisplayString(_ctx.title), 1)
]),
_: 1
}, 16, ["modelValue", "id", "name", "clearable"]),
_ctx.clearable ? (openBlock(), createBlock(_component_circle_close_filled, {
key: 0,
style: { "width": "1.2em", "height": "1.2em", "margin-top": "0px", "margin-left": "5px", "cursor": "pointer" },
onClick: withModifiers(_ctx.myclear, ["stop"])
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true)
], 64);
}
var nfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$t], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/s1-checkbox.vue"]]);
const _sfc_main$u = defineComponent({
name: "nf-el-from-item-checkboxs",
inheritAttrs: false,
components: {},
props: {
...itemProps,
modelValue: [Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { value } = itemController(props, context.emit);
const checkValue = computed({
set: (v) => {
value.value = v;
},
get: () => {
if (typeof value.value !== "object") {
return [];
}
return value.value;
}
});
const { loadDict } = loadController(props);
loadDict();
return {
checkValue
};
}
});
function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_checkbox = resolveComponent("el-checkbox");
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
return openBlock(), createBlock(_component_el_checkbox_group, mergeProps({
modelValue: _ctx.checkValue,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.checkValue = $event)
}, _ctx.$attrs, {
id: "c" + _ctx.formItemMeta.columnId,
name: "c" + _ctx.formItemMeta.columnId,
clearable: _ctx.clearable
}), {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.optionList, (item) => {
return openBlock(), createBlock(_component_el_checkbox, mergeProps(_ctx.$attrs, {
key: "check" + item.value,
label: item.value,
disabled: item.disabled
}), {
default: withCtx(() => [
createTextVNode(toDisplayString(item.label), 1)
]),
_: 2
}, 1040, ["label", "disabled"]);
}), 128))
]),
_: 1
}, 16, ["modelValue", "id", "name", "clearable"]);
}
var nfCheckboxs = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$s], ["__file", "D:/nf/gitee-ts/nf-code/nf-rollup-ui-element-plus/lib/form-item/s2-checkboxs.vue"]]);
const _sfc_main$t = defineComponent({
name: "nf-el-from-item-radios",
inheritAttrs: false,
components: {
CircleCloseFilled: circle_close_filled_default
},
props: {
...itemProps,
modelValue: [Array]
},
emits: ["update:modelValue"],
setup(props, context) {
const { loadDict } = loadController(props);
loadDict();
const {
value
} = itemController(props, context.emit);
const myclear = () => {
value.value = null;
};
return {
value,
myclear
};
}
});
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_radio = resolveComponent("el-radio");
const _component_el_radio_group = resolveComponent("el-radio-group");
const _component_circle_close_filled = resolveComponent("cir