@ibiz-template/vue3-components 0.7.38-alpha.31 → 0.7.38-alpha.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-NHocZH22.js +1 -0
- package/dist/index-BLHbMaxB.js +1 -0
- package/dist/index-D22WGUVe.js +1 -0
- package/dist/index-b76YR_Js.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-DbA3TyD9.js → xlsx-util-BoMFhSd9.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/button-list/button-list.css +1 -1
- package/es/common/custom-filter-condition/custom-filter-condition.d.ts +3 -0
- package/es/common/custom-theme/custom-theme-model.mjs +168 -47
- package/es/common/custom-theme/custom-theme.controller.d.ts +87 -1
- package/es/common/custom-theme/custom-theme.controller.mjs +235 -5
- package/es/common/custom-theme/custom-theme.css +1 -1
- package/es/common/custom-theme/custom-theme.d.ts +5 -3
- package/es/common/custom-theme/custom-theme.mjs +190 -26
- package/es/common/nav-split/nav-split.mjs +0 -1
- package/es/common/no-data/no-data.css +1 -1
- package/es/common/no-data/no-data.d.ts +3 -3
- package/es/common/no-data/no-data.mjs +2 -2
- package/es/common/view-message/view-message.d.ts +5 -0
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/calendar/calendar-util.d.ts +24 -0
- package/es/control/calendar/calendar-util.mjs +21 -0
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -0
- package/es/control/calendar/calendar.mjs +94 -25
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -0
- package/es/control/calendar/components/calendar-user/calendar-user.d.ts +15 -0
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +133 -0
- package/es/control/calendar/components/calendar-user/index.d.ts +15 -0
- package/es/control/calendar/components/calendar-user/index.mjs +9 -0
- package/es/control/calendar/components/calendar-user/use-calendar-user.d.ts +17 -0
- package/es/control/calendar/components/calendar-user/use-calendar-user.mjs +59 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +3 -2
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +11 -0
- package/es/control/calendar/components/interface/calendar-user.d.ts +10 -0
- package/es/control/calendar/components/interface/calendar-user.mjs +20 -0
- package/es/control/calendar/components/interface/index.d.ts +1 -0
- package/es/control/calendar/components/interface/index.mjs +1 -0
- package/es/control/calendar/index.d.ts +2 -0
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/chart/chart.css +1 -1
- package/es/control/chart/chart.d.ts +1 -0
- package/es/control/chart/chart.mjs +12 -5
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +85 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.d.ts +1 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +36 -16
- package/es/control/dashboard/dashboard-design/dashboard-design.util.d.ts +10 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.util.mjs +246 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +8 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item/composite-form-item.d.ts +35 -0
- package/es/control/form/form-detail/form-item/composite-form-item/composite-form-item.mjs +93 -0
- package/es/control/form/form-detail/form-item/form-item.css +1 -1
- package/es/control/form/form-detail/form-item/form-item.mjs +49 -33
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +71 -0
- package/es/control/grid/grid/grid-control.util.mjs +2 -2
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +3 -2
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
- package/es/control/grid/grid-column/grid-ua-column/grid-ua-column.css +1 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +9 -2
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.d.ts +2 -2
- package/es/control/toolbar/toolbar.mjs +24 -11
- package/es/control/tree/index.d.ts +2 -0
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +2 -0
- package/es/control/tree/tree.mjs +87 -6
- package/es/control/wizard-panel/wizard-panel.mjs +3 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +3 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.css +1 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.d.ts +66 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.mjs +139 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.css +1 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.d.ts +56 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.mjs +178 -0
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +10 -1
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +48 -4
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +10 -0
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +9 -2
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +12 -3
- package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +3 -1
- package/es/editor/data-picker/picker-editor.provider.mjs +0 -1
- package/es/editor/dropdown-list/dropdown-list-editor.controller.d.ts +6 -0
- package/es/editor/dropdown-list/dropdown-list-editor.controller.mjs +13 -2
- package/es/editor/dropdown-list/dropdown-list-editor.provider.mjs +3 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +3 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +83 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +382 -0
- package/es/editor/dropdown-list/index.d.ts +1 -0
- package/es/editor/dropdown-list/index.mjs +1 -0
- package/es/editor/index.mjs +10 -0
- package/es/editor/span/span/span.mjs +1 -1
- package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +2 -0
- package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.mjs +18 -5
- package/es/locale/en/index.d.ts +86 -26
- package/es/locale/en/index.mjs +69 -28
- package/es/locale/zh-CN/index.d.ts +87 -26
- package/es/locale/zh-CN/index.mjs +69 -28
- package/es/panel-component/index.mjs +2 -1
- package/es/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/es/panel-component/user-action/user-action.css +1 -1
- package/es/panel-component/user-action/user-action.mjs +1 -5
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view/login-view/login-view.mjs +22 -15
- package/es/view/share-view/share-view.mjs +1 -6
- package/es/view-engine/custom-view.engine.d.ts +9 -0
- package/es/view-engine/custom-view.engine.mjs +17 -1
- package/es/view-engine/edit-view.engine.d.ts +6 -14
- package/es/view-engine/edit-view.engine.mjs +75 -162
- package/es/view-engine/index-view.engine.d.ts +7 -0
- package/es/view-engine/index-view.engine.mjs +17 -1
- package/es/view-engine/login-view.engine.mjs +10 -1
- package/es/view-engine/portal-view-engine.d.ts +31 -3
- package/es/view-engine/portal-view-engine.mjs +94 -2
- package/es/view-engine/tree-exp-view.engine.d.ts +14 -0
- package/es/view-engine/tree-exp-view.engine.mjs +24 -1
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +4 -0
- package/es/web-app/guard/auth-guard/auth-guard.d.ts +4 -3
- package/es/web-app/guard/auth-guard/auth-guard.mjs +26 -8
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +9 -0
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +21 -0
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/button-list/button-list.css +1 -1
- package/lib/common/custom-theme/custom-theme-model.cjs +168 -47
- package/lib/common/custom-theme/custom-theme.cjs +188 -24
- package/lib/common/custom-theme/custom-theme.controller.cjs +235 -5
- package/lib/common/custom-theme/custom-theme.css +1 -1
- package/lib/common/nav-split/nav-split.cjs +0 -1
- package/lib/common/no-data/no-data.cjs +2 -2
- package/lib/common/no-data/no-data.css +1 -1
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/calendar/calendar-util.cjs +24 -0
- package/lib/control/calendar/calendar.cjs +94 -25
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +135 -0
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -0
- package/lib/control/calendar/components/calendar-user/index.cjs +14 -0
- package/lib/control/calendar/components/calendar-user/use-calendar-user.cjs +63 -0
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +3 -2
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +11 -0
- package/lib/control/calendar/components/interface/calendar-user.cjs +23 -0
- package/lib/control/calendar/components/interface/index.cjs +3 -0
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +12 -5
- package/lib/control/chart/chart.css +1 -1
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +35 -15
- package/lib/control/dashboard/dashboard-design/dashboard-design.util.cjs +248 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/data-view/data-view.cjs +8 -1
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-item/composite-form-item/composite-form-item.cjs +98 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +48 -32
- package/lib/control/form/form-detail/form-item/form-item.css +1 -1
- package/lib/control/grid/grid/grid-control.util.cjs +2 -2
- package/lib/control/grid/grid/grid.cjs +3 -2
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
- package/lib/control/grid/grid-column/grid-ua-column/grid-ua-column.css +1 -1
- package/lib/control/list/list.cjs +9 -2
- package/lib/control/list/list.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +24 -11
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.cjs +87 -6
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/wizard-panel/wizard-panel.cjs +3 -1
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +3 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.cjs +141 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.css +1 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.cjs +180 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.css +1 -0
- package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +48 -4
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +10 -0
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +9 -2
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +12 -3
- package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +3 -1
- package/lib/editor/data-picker/picker-editor.provider.cjs +0 -1
- package/lib/editor/dropdown-list/dropdown-list-editor.controller.cjs +13 -2
- package/lib/editor/dropdown-list/dropdown-list-editor.provider.cjs +3 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +3 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +384 -0
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -0
- package/lib/editor/dropdown-list/index.cjs +2 -0
- package/lib/editor/index.cjs +10 -0
- package/lib/editor/span/span/span.cjs +1 -1
- package/lib/editor/upload/ibiz-image-preview/ibiz-image-preview.cjs +18 -5
- package/lib/locale/en/index.cjs +69 -28
- package/lib/locale/zh-CN/index.cjs +69 -28
- package/lib/panel-component/index.cjs +1 -0
- package/lib/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/lib/panel-component/user-action/user-action.cjs +1 -5
- package/lib/panel-component/user-action/user-action.css +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view/login-view/login-view.cjs +20 -13
- package/lib/view/share-view/share-view.cjs +0 -5
- package/lib/view-engine/custom-view.engine.cjs +16 -0
- package/lib/view-engine/edit-view.engine.cjs +74 -161
- package/lib/view-engine/index-view.engine.cjs +17 -1
- package/lib/view-engine/login-view.engine.cjs +10 -1
- package/lib/view-engine/portal-view-engine.cjs +93 -1
- package/lib/view-engine/tree-exp-view.engine.cjs +23 -0
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -0
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +26 -8
- package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +21 -0
- package/package.json +8 -8
- package/dist/chart-DPS_XpZp.js +0 -1
- package/dist/index-CnCC-cC2.js +0 -1
- package/dist/index-Q4QqDXYJ.js +0 -4
- package/dist/index-X3QXftIl.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.43_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.43_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode, resolveComponent, watch } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './ibiz-color-mpicker-custom.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const IBizColorMPickerCustom = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizColorMPickerCustom",
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: Array
|
|
11
|
+
},
|
|
12
|
+
readonly: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: ["change"],
|
|
22
|
+
setup(props, {
|
|
23
|
+
emit
|
|
24
|
+
}) {
|
|
25
|
+
const ns = useNamespace("color-mpicker-custom");
|
|
26
|
+
const tabs = [{
|
|
27
|
+
text: ibiz.i18n.t("editor.colorPicker.selector"),
|
|
28
|
+
value: "select"
|
|
29
|
+
}, {
|
|
30
|
+
text: ibiz.i18n.t("editor.colorPicker.textValue"),
|
|
31
|
+
value: "write"
|
|
32
|
+
}];
|
|
33
|
+
const predefineColors = ref(["#000000", "#2C2C2C", "#50555C", "#ACB3BF", "#D0D3D9", "#C4C4C4", "#DADADA", "#E5E5E5", "#F0F0F0", "#F24E1E", "#E99C58", "#FFC700", "#FF4D00", "#FF00D6", "#D82E57", "#8E1DE8", "#0ACF83", "#18A0FB", "#A259FF", "#907CFF"]);
|
|
34
|
+
const items = ref([]);
|
|
35
|
+
const curSelect = ref("select");
|
|
36
|
+
const colorStr = ref("");
|
|
37
|
+
const onColorChange = (index, value) => {
|
|
38
|
+
items.value[index] = value;
|
|
39
|
+
emit("change", [...items.value]);
|
|
40
|
+
};
|
|
41
|
+
const onSelect = (value) => {
|
|
42
|
+
curSelect.value = value;
|
|
43
|
+
if (value === "select") {
|
|
44
|
+
const list = colorStr.value.split(",");
|
|
45
|
+
items.value = list.filter((item) => {
|
|
46
|
+
return /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(item);
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
colorStr.value = items.value.toString();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const onAdd = () => {
|
|
53
|
+
if (props.readonly || props.disabled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
items.value.push("#FFFFFF");
|
|
57
|
+
emit("change", [...items.value]);
|
|
58
|
+
};
|
|
59
|
+
const onBlur = () => {
|
|
60
|
+
if (curSelect.value === "select") {
|
|
61
|
+
emit("change", items.value);
|
|
62
|
+
} else {
|
|
63
|
+
const list = colorStr.value.split(",");
|
|
64
|
+
items.value = list.filter((item) => {
|
|
65
|
+
return /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(item);
|
|
66
|
+
});
|
|
67
|
+
emit("change", items.value);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const renderColorList = () => {
|
|
71
|
+
return items.value.map((item, index) => {
|
|
72
|
+
return createVNode("div", {
|
|
73
|
+
"class": ns.em("color-list", "item")
|
|
74
|
+
}, [createVNode(resolveComponent("el-color-picker"), {
|
|
75
|
+
"modelValue": item,
|
|
76
|
+
"onUpdate:modelValue": ($event) => item = $event,
|
|
77
|
+
"disabled": props.disabled || props.readonly,
|
|
78
|
+
"predefine": predefineColors.value,
|
|
79
|
+
"onChange": (value) => onColorChange(index, value)
|
|
80
|
+
}, null)]);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
watch(() => props.value, () => {
|
|
84
|
+
if (!props.value || props.value.length === 0) {
|
|
85
|
+
colorStr.value = "";
|
|
86
|
+
items.value = [];
|
|
87
|
+
} else {
|
|
88
|
+
items.value = props.value;
|
|
89
|
+
colorStr.value = items.value.toString();
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
immediate: true,
|
|
93
|
+
deep: true
|
|
94
|
+
});
|
|
95
|
+
return {
|
|
96
|
+
ns,
|
|
97
|
+
tabs,
|
|
98
|
+
curSelect,
|
|
99
|
+
colorStr,
|
|
100
|
+
renderColorList,
|
|
101
|
+
onSelect,
|
|
102
|
+
onAdd,
|
|
103
|
+
onBlur
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
render() {
|
|
107
|
+
return createVNode("div", {
|
|
108
|
+
"class": this.ns.b()
|
|
109
|
+
}, [createVNode("div", {
|
|
110
|
+
"class": [this.ns.e("tabs")]
|
|
111
|
+
}, [createVNode("div", {
|
|
112
|
+
"class": [this.ns.e("anchor"), this.ns.is("select-text", this.curSelect === "write")]
|
|
113
|
+
}, [this.tabs.map((tab) => {
|
|
114
|
+
return createVNode("div", {
|
|
115
|
+
"class": [this.ns.em("tabs", "tab"), this.ns.is("selected", tab.value === this.curSelect)],
|
|
116
|
+
"onClick": () => this.onSelect(tab.value)
|
|
117
|
+
}, [tab.text]);
|
|
118
|
+
})])]), createVNode("div", {
|
|
119
|
+
"class": this.ns.e("content")
|
|
120
|
+
}, [this.curSelect === "select" ? createVNode("div", {
|
|
121
|
+
"class": this.ns.e("color-list")
|
|
122
|
+
}, [this.renderColorList(), createVNode("div", {
|
|
123
|
+
"class": [this.ns.em("color-list", "add"), this.ns.is("disabled", this.disabled || this.readonly)],
|
|
124
|
+
"onClick": this.onAdd,
|
|
125
|
+
"title": ibiz.i18n.t("editor.colorPicker.add")
|
|
126
|
+
}, [createVNode("ion-icon", {
|
|
127
|
+
"name": "add-outline"
|
|
128
|
+
}, null)])]) : createVNode("div", null, [createVNode(resolveComponent("el-input"), {
|
|
129
|
+
"type": "textarea",
|
|
130
|
+
"modelValue": this.colorStr,
|
|
131
|
+
"onUpdate:modelValue": ($event) => this.colorStr = $event,
|
|
132
|
+
"disabled": this.disabled,
|
|
133
|
+
"readonly": this.readonly,
|
|
134
|
+
"onBlur": this.onBlur
|
|
135
|
+
}, null)])])]);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export { IBizColorMPickerCustom };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-color-mpicker-default-picker{width:100%}.ibiz-color-mpicker-default-template-color-picker{--ibiz-color-picker-padding-20:var(--ibiz-spacing-base-loose);--ibiz-color-picker-padding-12:var(--ibiz-spacing-base-tight);--ibiz-color-picker-padding-2:var(--ibiz-spacing-super-tight);width:100%;margin-top:var(--ibiz-spacing-base-tight)}.ibiz-color-mpicker-default-template-color-picker .el-select__prefix{display:flex}.ibiz-color-mpicker-default-template-color-picker__icon{display:block;width:calc(var(--ibiz-color-picker-padding-12) + var(--ibiz-color-picker-padding-2));height:calc(var(--ibiz-color-picker-padding-12) + var(--ibiz-color-picker-padding-2));margin-right:var(--ibiz-spacing-tight);border-radius:var(--ibiz-border-radius-extra-small)}.ibiz-color-mpicker-default-template-color-picker__icon:last-of-type{margin-right:var(--ibiz-spacing-none)}.ibiz-color-mpicker-default-template-color-picker-option{display:flex;align-items:center}.el-popper.is-light .ibiz-color-mpicker-default-popper .el-select-dropdown__list{margin:var(--ibiz-spacing-base-tight) var(--ibiz-spacing-none)!important}.el-popper.is-light .ibiz-color-mpicker-default-popper .el-select-dropdown__item{height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-none) var(--ibiz-spacing-base-loose);line-height:var(--ibiz-height-control-large)}.el-popper.is-light .ibiz-color-mpicker-default-popper .el-select-dropdown__item.selected{background-color:var(--ibiz-color-primary-light-default)}.ibiz-color-mpicker-default-popper{--ibiz-color-picker-padding-20:var(--ibiz-spacing-base-loose);--ibiz-color-picker-padding-12:var(--ibiz-spacing-base-tight);--ibiz-color-picker-padding-2:var(--ibiz-spacing-super-tight)}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import './ibiz-color-mpicker-default.scss';
|
|
3
|
+
export declare const IBizColorMPickerDefault: import("vue").DefineComponent<{
|
|
4
|
+
value: {
|
|
5
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
6
|
+
};
|
|
7
|
+
customColorList: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
type: PropType<"ITEM" | "ITEMS">;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
readonly: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
disabled: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
24
|
+
curType: import("vue").Ref<string>;
|
|
25
|
+
curTemplateColor: import("vue").Ref<string>;
|
|
26
|
+
showTemplateList: import("vue").Ref<boolean>;
|
|
27
|
+
colorType: IData[];
|
|
28
|
+
templateColorList: import("vue").ComputedRef<any>;
|
|
29
|
+
handleTemplateColorChange: () => void;
|
|
30
|
+
handleSchemeChange: () => void;
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
value: {
|
|
33
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
34
|
+
};
|
|
35
|
+
customColorList: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
type: {
|
|
39
|
+
type: PropType<"ITEM" | "ITEMS">;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
readonly: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
}>> & {
|
|
51
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
type: "ITEM" | "ITEMS";
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
readonly: boolean;
|
|
56
|
+
}, {}>;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './ibiz-color-mpicker-default.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const IBizColorMPickerDefault = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizColorMPickerDefault",
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: [Array, String]
|
|
11
|
+
},
|
|
12
|
+
customColorList: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
type: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "ITEMS"
|
|
18
|
+
},
|
|
19
|
+
readonly: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["change"],
|
|
29
|
+
setup(props, {
|
|
30
|
+
emit
|
|
31
|
+
}) {
|
|
32
|
+
const ns = useNamespace("color-mpicker-default");
|
|
33
|
+
const curType = ref("default");
|
|
34
|
+
const curTemplateColor = ref("");
|
|
35
|
+
const showTemplateList = ref(false);
|
|
36
|
+
const colorType = [{
|
|
37
|
+
text: ibiz.i18n.t("editor.colorPicker.systemColor"),
|
|
38
|
+
value: "default"
|
|
39
|
+
}, {
|
|
40
|
+
text: ibiz.i18n.t("editor.colorPicker.templateColor"),
|
|
41
|
+
value: "template"
|
|
42
|
+
}];
|
|
43
|
+
const templateColorList = computed(() => {
|
|
44
|
+
if (props.customColorList) {
|
|
45
|
+
return JSON.parse(props.customColorList);
|
|
46
|
+
}
|
|
47
|
+
return [{
|
|
48
|
+
text: ibiz.i18n.t("editor.colorPicker.simpleBlue"),
|
|
49
|
+
value: props.type === "ITEM" ? ["#6698FF"] : ["#6698FF", "#73DEB3", "#7585A2", "#F7BE21", "#EE734A", "#83D0EE"]
|
|
50
|
+
}, {
|
|
51
|
+
text: ibiz.i18n.t("editor.colorPicker.autumnOrange"),
|
|
52
|
+
value: props.type === "ITEM" ? ["#EE734A"] : ["#EE734A", "#7585A2", "#FEC103", "#9EB411", "#CD8050", "#DAD5B5"]
|
|
53
|
+
}, {
|
|
54
|
+
text: ibiz.i18n.t("editor.colorPicker.Macaroon"),
|
|
55
|
+
value: props.type === "ITEM" ? ["#467CE6"] : ["#467CE6", "#CD74CA", "#4997CC", "#BCBFE3", "#666CEB", "#82BC9A"]
|
|
56
|
+
}, {
|
|
57
|
+
text: ibiz.i18n.t("editor.colorPicker.mintGreen"),
|
|
58
|
+
value: props.type === "ITEM" ? ["#118299"] : ["#118299", "#13B3B3", "#73DEB3", "#FEC103", "#9EB411", "#83D0EE"]
|
|
59
|
+
}];
|
|
60
|
+
});
|
|
61
|
+
const handleTemplateColorChange = () => {
|
|
62
|
+
const temmpVal = JSON.parse(curTemplateColor.value);
|
|
63
|
+
emit("change", temmpVal);
|
|
64
|
+
};
|
|
65
|
+
const handleSchemeChange = () => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
if (curType.value === "default") {
|
|
68
|
+
showTemplateList.value = false;
|
|
69
|
+
emit("change", (_b = (_a = templateColorList.value[0]) == null ? void 0 : _a.value) == null ? void 0 : _b[0]);
|
|
70
|
+
} else {
|
|
71
|
+
showTemplateList.value = true;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
watch(() => props.value, () => {
|
|
75
|
+
if (props.value) {
|
|
76
|
+
if (typeof props.value === "string") {
|
|
77
|
+
curType.value = "default";
|
|
78
|
+
showTemplateList.value = false;
|
|
79
|
+
} else {
|
|
80
|
+
curType.value = "template";
|
|
81
|
+
showTemplateList.value = true;
|
|
82
|
+
if (props.value.length > 0) {
|
|
83
|
+
curTemplateColor.value = JSON.stringify(props.value);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
curType.value = "default";
|
|
88
|
+
showTemplateList.value = false;
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
immediate: true,
|
|
92
|
+
deep: true
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
ns,
|
|
96
|
+
curType,
|
|
97
|
+
curTemplateColor,
|
|
98
|
+
showTemplateList,
|
|
99
|
+
colorType,
|
|
100
|
+
templateColorList,
|
|
101
|
+
handleTemplateColorChange,
|
|
102
|
+
handleSchemeChange
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
render() {
|
|
106
|
+
return createVNode("div", {
|
|
107
|
+
"class": this.ns.b()
|
|
108
|
+
}, [createVNode(resolveComponent("el-select"), {
|
|
109
|
+
"class": this.ns.b("picker"),
|
|
110
|
+
"popper-class": this.ns.b("popper"),
|
|
111
|
+
"modelValue": this.curType,
|
|
112
|
+
"onUpdate:modelValue": ($event) => this.curType = $event,
|
|
113
|
+
"onChange": this.handleSchemeChange
|
|
114
|
+
}, {
|
|
115
|
+
default: () => {
|
|
116
|
+
return this.colorType.map((scheme) => {
|
|
117
|
+
return createVNode(resolveComponent("el-option"), {
|
|
118
|
+
"key": scheme.value,
|
|
119
|
+
"label": scheme.text,
|
|
120
|
+
"value": scheme.value
|
|
121
|
+
}, null);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}), this.showTemplateList && createVNode(resolveComponent("el-select"), {
|
|
125
|
+
"class": this.ns.b("template-color-picker"),
|
|
126
|
+
"popper-class": this.ns.b("popper"),
|
|
127
|
+
"modelValue": this.curTemplateColor,
|
|
128
|
+
"onUpdate:modelValue": ($event) => this.curTemplateColor = $event,
|
|
129
|
+
"onChange": this.handleTemplateColorChange
|
|
130
|
+
}, {
|
|
131
|
+
default: () => {
|
|
132
|
+
return this.templateColorList.map((color) => {
|
|
133
|
+
return createVNode(resolveComponent("el-option"), {
|
|
134
|
+
"key": color.key,
|
|
135
|
+
"label": color.text,
|
|
136
|
+
"value": JSON.stringify(color.value)
|
|
137
|
+
}, {
|
|
138
|
+
default: () => {
|
|
139
|
+
return createVNode("div", {
|
|
140
|
+
"class": this.ns.b("template-color-picker-option")
|
|
141
|
+
}, [Array.isArray(color.value) ? color.value.map((item) => createVNode("div", {
|
|
142
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
143
|
+
"style": {
|
|
144
|
+
background: item
|
|
145
|
+
}
|
|
146
|
+
}, null)) : createVNode("div", {
|
|
147
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
148
|
+
"style": {
|
|
149
|
+
background: color.value
|
|
150
|
+
}
|
|
151
|
+
}, null), createVNode("div", {
|
|
152
|
+
"class": this.ns.be("template-color-picker", "text")
|
|
153
|
+
}, [color.text])]);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
prefix: () => {
|
|
159
|
+
if (this.curTemplateColor) {
|
|
160
|
+
const colors = JSON.parse(this.curTemplateColor);
|
|
161
|
+
return Array.isArray(colors) ? colors.map((item) => createVNode("div", {
|
|
162
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
163
|
+
"style": {
|
|
164
|
+
background: item
|
|
165
|
+
}
|
|
166
|
+
}, null)) : createVNode("div", {
|
|
167
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
168
|
+
"style": {
|
|
169
|
+
background: colors[0]
|
|
170
|
+
}
|
|
171
|
+
}, [colors[0]]);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
})]);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
export { IBizColorMPickerDefault };
|
|
@@ -26,19 +26,28 @@ export declare const IBizColorPicker: import("vue").DefineComponent<{
|
|
|
26
26
|
}, {
|
|
27
27
|
ns: import("@ibiz-template/core").Namespace;
|
|
28
28
|
c: ColorPickerEditorController;
|
|
29
|
-
currentVal: Ref<string | null>;
|
|
29
|
+
currentVal: Ref<string | string[] | null>;
|
|
30
30
|
predefineColors: Ref<string[]>;
|
|
31
31
|
contentStyle: import("vue").ComputedRef<IData | null>;
|
|
32
32
|
colorPicker: Ref<IData | null>;
|
|
33
|
+
multiple: boolean;
|
|
34
|
+
isCustom: boolean;
|
|
35
|
+
customColorList: any;
|
|
36
|
+
type: any;
|
|
33
37
|
handleChange: (e: string | null) => void;
|
|
34
38
|
showPicker: (_e: Event) => void;
|
|
35
39
|
onFocus: (e: IData) => void;
|
|
36
40
|
onBlur: (e: IData) => void;
|
|
37
41
|
showFormDefaultContent: import("vue").ComputedRef<boolean>;
|
|
42
|
+
onChange: (value: string | string[]) => void;
|
|
38
43
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
44
|
change: (_value: unknown, _name?: string | undefined) => boolean;
|
|
40
45
|
blur: (_event?: IData | undefined) => boolean;
|
|
41
46
|
focus: (_event?: IData | undefined) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 配置示例:
|
|
49
|
+
* CUSTOMCOLORLIST = [{"text":"颜色名字","value":["#123123","#111222","#333322","#11ff33"]}]
|
|
50
|
+
*/
|
|
42
51
|
enter: (_event?: IData | undefined) => boolean;
|
|
43
52
|
infoTextChange: (_text: string) => boolean;
|
|
44
53
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
2
|
import { getColorPickerProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './ibiz-color-picker.css';
|
|
4
|
+
import { IBizColorMPickerCustom } from '../ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.mjs';
|
|
5
|
+
import { IBizColorMPickerDefault } from '../ibiz-color-mpicker-default/ibiz-color-mpicker-default.mjs';
|
|
4
6
|
|
|
5
7
|
"use strict";
|
|
6
8
|
const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
@@ -10,10 +12,15 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
10
12
|
setup(props, {
|
|
11
13
|
emit
|
|
12
14
|
}) {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
13
16
|
const ns = useNamespace("color-picker");
|
|
14
17
|
const c = props.controller;
|
|
15
18
|
const currentVal = ref("");
|
|
16
19
|
const colorPicker = ref(null);
|
|
20
|
+
const multiple = ((_a = c.editorParams) == null ? void 0 : _a.MULTIPLE) === "true";
|
|
21
|
+
const isCustom = ((_b = c.editorParams) == null ? void 0 : _b.CUSTOM) === "true";
|
|
22
|
+
const type = (_c = c.editorParams) == null ? void 0 : _c.TYPE;
|
|
23
|
+
const customColorList = ((_d = c.editorParams) == null ? void 0 : _d.CUSTOMCOLORLIST) || "";
|
|
17
24
|
const predefineColors = ref(["#000000", "#2C2C2C", "#50555C", "#ACB3BF", "#D0D3D9", "#C4C4C4", "#DADADA", "#E5E5E5", "#F0F0F0", "#F24E1E", "#E99C58", "#FFC700", "#FF4D00", "#FF00D6", "#D82E57", "#8E1DE8", "#0ACF83", "#18A0FB", "#A259FF", "#907CFF"]);
|
|
18
25
|
const showFormDefaultContent = computed(() => {
|
|
19
26
|
if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
|
|
@@ -23,7 +30,17 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
23
30
|
});
|
|
24
31
|
watch(() => props.value, (newVal, oldVal) => {
|
|
25
32
|
if (newVal !== oldVal) {
|
|
26
|
-
if (
|
|
33
|
+
if (multiple) {
|
|
34
|
+
if (!newVal) {
|
|
35
|
+
if (isCustom) {
|
|
36
|
+
currentVal.value = [];
|
|
37
|
+
} else {
|
|
38
|
+
currentVal.value = "";
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
currentVal.value = newVal;
|
|
42
|
+
}
|
|
43
|
+
} else if (!newVal) {
|
|
27
44
|
currentVal.value = "";
|
|
28
45
|
} else {
|
|
29
46
|
currentVal.value = newVal;
|
|
@@ -54,6 +71,9 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
54
71
|
const onBlur = (e) => {
|
|
55
72
|
emit("blur", e);
|
|
56
73
|
};
|
|
74
|
+
const onChange = (value) => {
|
|
75
|
+
emit("change", value);
|
|
76
|
+
};
|
|
57
77
|
return {
|
|
58
78
|
ns,
|
|
59
79
|
c,
|
|
@@ -61,17 +81,41 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
61
81
|
predefineColors,
|
|
62
82
|
contentStyle,
|
|
63
83
|
colorPicker,
|
|
84
|
+
multiple,
|
|
85
|
+
isCustom,
|
|
86
|
+
customColorList,
|
|
87
|
+
type,
|
|
64
88
|
handleChange,
|
|
65
89
|
showPicker,
|
|
66
90
|
onFocus,
|
|
67
91
|
onBlur,
|
|
68
|
-
showFormDefaultContent
|
|
92
|
+
showFormDefaultContent,
|
|
93
|
+
onChange
|
|
69
94
|
};
|
|
70
95
|
},
|
|
71
96
|
render() {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
if (this.multiple) {
|
|
99
|
+
if (this.isCustom) {
|
|
100
|
+
return createVNode(IBizColorMPickerCustom, {
|
|
101
|
+
"value": this.currentVal || [],
|
|
102
|
+
"onChange": this.onChange,
|
|
103
|
+
"readonly": this.readonly,
|
|
104
|
+
"disabled": this.disabled
|
|
105
|
+
}, null);
|
|
106
|
+
}
|
|
107
|
+
return createVNode(IBizColorMPickerDefault, {
|
|
108
|
+
"value": this.currentVal || "",
|
|
109
|
+
"type": this.type,
|
|
110
|
+
"customColorList": this.customColorList,
|
|
111
|
+
"readonly": this.readonly,
|
|
112
|
+
"disabled": this.disabled,
|
|
113
|
+
"onChange": this.onChange
|
|
114
|
+
}, null);
|
|
115
|
+
}
|
|
72
116
|
let content = null;
|
|
73
117
|
if (this.readonly) {
|
|
74
|
-
content = "".concat(this.currentVal);
|
|
118
|
+
content = "".concat((_a = this.currentVal) == null ? void 0 : _a.toString());
|
|
75
119
|
} else {
|
|
76
120
|
content = createVNode("span", {
|
|
77
121
|
"class": this.ns.b("content"),
|
|
@@ -88,7 +132,7 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
88
132
|
"size": "small",
|
|
89
133
|
"predefine": this.predefineColors,
|
|
90
134
|
"show-alpha": true
|
|
91
|
-
}, this.$attrs), null), createVNode("span", {
|
|
135
|
+
}, this.$attrs), null), ((_b = this.c.editorParams) == null ? void 0 : _b.isHiddenText) === "true" ? null : createVNode("span", {
|
|
92
136
|
"class": this.ns.b("text")
|
|
93
137
|
}, [this.currentVal])]);
|
|
94
138
|
}
|
|
@@ -316,6 +316,7 @@ const IBizMPicker = /* @__PURE__ */ defineComponent({
|
|
|
316
316
|
"label": item[this.c.textName]
|
|
317
317
|
}, {
|
|
318
318
|
default: () => {
|
|
319
|
+
var _a;
|
|
319
320
|
if (this.c.acItemProvider) {
|
|
320
321
|
const component = resolveComponent(this.c.acItemProvider.component);
|
|
321
322
|
return h(component, {
|
|
@@ -323,6 +324,15 @@ const IBizMPicker = /* @__PURE__ */ defineComponent({
|
|
|
323
324
|
controller: this.c
|
|
324
325
|
});
|
|
325
326
|
}
|
|
327
|
+
const panel = (_a = this.c.deACMode) == null ? void 0 : _a.itemLayoutPanel;
|
|
328
|
+
if (panel) {
|
|
329
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
330
|
+
"data": item,
|
|
331
|
+
"modelData": panel,
|
|
332
|
+
"context": this.c.context,
|
|
333
|
+
"params": this.c.params
|
|
334
|
+
}, null);
|
|
335
|
+
}
|
|
326
336
|
return createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
|
|
327
337
|
}
|
|
328
338
|
});
|
|
@@ -160,7 +160,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
160
160
|
onMounted(() => {
|
|
161
161
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
162
162
|
if (newVal !== oldVal) {
|
|
163
|
-
if (!isLoaded.value && editorRef.value && isNil(props.value)) {
|
|
163
|
+
if (!isLoaded.value && editorRef.value && isNil(props.value) && !isNil(newVal)) {
|
|
164
164
|
await onSearch("");
|
|
165
165
|
}
|
|
166
166
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
@@ -206,11 +206,17 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
206
206
|
context,
|
|
207
207
|
params
|
|
208
208
|
} = this.c;
|
|
209
|
+
let selected = item[this.c.textName] || item.srfmajortext === this.curValue;
|
|
210
|
+
if (this.c.valueItem) {
|
|
211
|
+
selected = (item[this.c.keyName] || item.srfkey) === this.data[this.c.valueItem];
|
|
212
|
+
}
|
|
213
|
+
const className = [this.ns.is("active", selected), this.ns.e("transfer-item")];
|
|
209
214
|
if (this.c.acItemProvider) {
|
|
210
215
|
const component = resolveComponent(this.c.acItemProvider.component);
|
|
211
216
|
return h(component, {
|
|
212
217
|
item,
|
|
213
218
|
controller: this.c,
|
|
219
|
+
class: className,
|
|
214
220
|
onClick: () => {
|
|
215
221
|
this.onACSelect(item);
|
|
216
222
|
}
|
|
@@ -218,6 +224,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
218
224
|
}
|
|
219
225
|
return panel ? createVNode(resolveComponent("iBizControlShell"), {
|
|
220
226
|
"data": item,
|
|
227
|
+
"class": className,
|
|
221
228
|
"modelData": panel,
|
|
222
229
|
"context": context,
|
|
223
230
|
"params": params,
|
|
@@ -225,7 +232,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
225
232
|
this.onACSelect(item);
|
|
226
233
|
}
|
|
227
234
|
}, null) : createVNode("div", {
|
|
228
|
-
"class": [this.ns.
|
|
235
|
+
"class": [this.ns.is("ellipsis", isEllipsis), ...className],
|
|
229
236
|
"title": showTitle(isEllipsis ? item[this.c.textName] : ""),
|
|
230
237
|
"onClick": () => {
|
|
231
238
|
this.onACSelect(item);
|
|
@@ -42,8 +42,8 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
if (newVal === null) {
|
|
43
43
|
curValue.value = "";
|
|
44
44
|
}
|
|
45
|
-
refValue.value = curValue.value;
|
|
46
45
|
const value = props.data[c.valueItem];
|
|
46
|
+
refValue.value = value || curValue.value;
|
|
47
47
|
const index = items.value.findIndex((item) => Object.is(item[c.keyName], value));
|
|
48
48
|
if (index !== -1) {
|
|
49
49
|
return;
|
|
@@ -95,8 +95,7 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
95
95
|
onMounted(() => {
|
|
96
96
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
97
97
|
if (newVal !== oldVal) {
|
|
98
|
-
if (!isLoaded.value && editorRef.value && isNil(props.value)) {
|
|
99
|
-
shouldLoad.value = true;
|
|
98
|
+
if (!isLoaded.value && editorRef.value && isNil(props.value) && !isNil(newVal)) {
|
|
100
99
|
await onSearch("");
|
|
101
100
|
}
|
|
102
101
|
refValue.value = newVal;
|
|
@@ -248,6 +247,7 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
248
247
|
"label": item[this.c.textName]
|
|
249
248
|
}, {
|
|
250
249
|
default: () => {
|
|
250
|
+
var _a;
|
|
251
251
|
if (this.c.acItemProvider) {
|
|
252
252
|
const component = resolveComponent(this.c.acItemProvider.component);
|
|
253
253
|
return h(component, {
|
|
@@ -255,6 +255,15 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
255
255
|
controller: this.c
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
+
const panel = (_a = this.c.deACMode) == null ? void 0 : _a.itemLayoutPanel;
|
|
259
|
+
if (panel) {
|
|
260
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
261
|
+
"data": item,
|
|
262
|
+
"modelData": panel,
|
|
263
|
+
"context": this.c.context,
|
|
264
|
+
"params": this.c.params
|
|
265
|
+
}, null);
|
|
266
|
+
}
|
|
258
267
|
return createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
|
|
259
268
|
}
|
|
260
269
|
});
|
|
@@ -15,6 +15,7 @@ const IBizPickerLink = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
const c = props.controller;
|
|
16
16
|
const curValue = ref("");
|
|
17
17
|
const items = ref([]);
|
|
18
|
+
const isLoaded = ref(false);
|
|
18
19
|
const {
|
|
19
20
|
useInFocusAndBlur,
|
|
20
21
|
useInValueChange
|
|
@@ -27,6 +28,7 @@ const IBizPickerLink = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
}
|
|
28
29
|
const res = await c.getServiceData(trimQuery, props.data);
|
|
29
30
|
if (res) {
|
|
31
|
+
isLoaded.value = true;
|
|
30
32
|
items.value = res.data;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
@@ -51,7 +53,7 @@ const IBizPickerLink = /* @__PURE__ */ defineComponent({
|
|
|
51
53
|
onMounted(() => {
|
|
52
54
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
53
55
|
if (newVal !== oldVal) {
|
|
54
|
-
if (isNil(props.value)) {
|
|
56
|
+
if (!isLoaded.value && isNil(props.value) && !isNil(newVal)) {
|
|
55
57
|
await onSearch("");
|
|
56
58
|
}
|
|
57
59
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
@@ -21,6 +21,12 @@ export declare class DropDownListEditorController extends CodeListEditorControll
|
|
|
21
21
|
* @Date: 2024-03-12 14:33:14
|
|
22
22
|
*/
|
|
23
23
|
forceSelection: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 默认选中第一个
|
|
26
|
+
*
|
|
27
|
+
* @memberof CustomTagSelectController
|
|
28
|
+
*/
|
|
29
|
+
defaultFirstOption: boolean;
|
|
24
30
|
/**
|
|
25
31
|
* 预置项空白项名称
|
|
26
32
|
*
|