@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,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./ibiz-color-mpicker-custom.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizColorMPickerCustom = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizColorMPickerCustom",
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: Array
|
|
13
|
+
},
|
|
14
|
+
readonly: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["change"],
|
|
24
|
+
setup(props, {
|
|
25
|
+
emit
|
|
26
|
+
}) {
|
|
27
|
+
const ns = vue3Util.useNamespace("color-mpicker-custom");
|
|
28
|
+
const tabs = [{
|
|
29
|
+
text: ibiz.i18n.t("editor.colorPicker.selector"),
|
|
30
|
+
value: "select"
|
|
31
|
+
}, {
|
|
32
|
+
text: ibiz.i18n.t("editor.colorPicker.textValue"),
|
|
33
|
+
value: "write"
|
|
34
|
+
}];
|
|
35
|
+
const predefineColors = vue.ref(["#000000", "#2C2C2C", "#50555C", "#ACB3BF", "#D0D3D9", "#C4C4C4", "#DADADA", "#E5E5E5", "#F0F0F0", "#F24E1E", "#E99C58", "#FFC700", "#FF4D00", "#FF00D6", "#D82E57", "#8E1DE8", "#0ACF83", "#18A0FB", "#A259FF", "#907CFF"]);
|
|
36
|
+
const items = vue.ref([]);
|
|
37
|
+
const curSelect = vue.ref("select");
|
|
38
|
+
const colorStr = vue.ref("");
|
|
39
|
+
const onColorChange = (index, value) => {
|
|
40
|
+
items.value[index] = value;
|
|
41
|
+
emit("change", [...items.value]);
|
|
42
|
+
};
|
|
43
|
+
const onSelect = (value) => {
|
|
44
|
+
curSelect.value = value;
|
|
45
|
+
if (value === "select") {
|
|
46
|
+
const list = colorStr.value.split(",");
|
|
47
|
+
items.value = list.filter((item) => {
|
|
48
|
+
return /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(item);
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
colorStr.value = items.value.toString();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const onAdd = () => {
|
|
55
|
+
if (props.readonly || props.disabled) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
items.value.push("#FFFFFF");
|
|
59
|
+
emit("change", [...items.value]);
|
|
60
|
+
};
|
|
61
|
+
const onBlur = () => {
|
|
62
|
+
if (curSelect.value === "select") {
|
|
63
|
+
emit("change", items.value);
|
|
64
|
+
} else {
|
|
65
|
+
const list = colorStr.value.split(",");
|
|
66
|
+
items.value = list.filter((item) => {
|
|
67
|
+
return /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(item);
|
|
68
|
+
});
|
|
69
|
+
emit("change", items.value);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const renderColorList = () => {
|
|
73
|
+
return items.value.map((item, index) => {
|
|
74
|
+
return vue.createVNode("div", {
|
|
75
|
+
"class": ns.em("color-list", "item")
|
|
76
|
+
}, [vue.createVNode(vue.resolveComponent("el-color-picker"), {
|
|
77
|
+
"modelValue": item,
|
|
78
|
+
"onUpdate:modelValue": ($event) => item = $event,
|
|
79
|
+
"disabled": props.disabled || props.readonly,
|
|
80
|
+
"predefine": predefineColors.value,
|
|
81
|
+
"onChange": (value) => onColorChange(index, value)
|
|
82
|
+
}, null)]);
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
vue.watch(() => props.value, () => {
|
|
86
|
+
if (!props.value || props.value.length === 0) {
|
|
87
|
+
colorStr.value = "";
|
|
88
|
+
items.value = [];
|
|
89
|
+
} else {
|
|
90
|
+
items.value = props.value;
|
|
91
|
+
colorStr.value = items.value.toString();
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
immediate: true,
|
|
95
|
+
deep: true
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
ns,
|
|
99
|
+
tabs,
|
|
100
|
+
curSelect,
|
|
101
|
+
colorStr,
|
|
102
|
+
renderColorList,
|
|
103
|
+
onSelect,
|
|
104
|
+
onAdd,
|
|
105
|
+
onBlur
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
render() {
|
|
109
|
+
return vue.createVNode("div", {
|
|
110
|
+
"class": this.ns.b()
|
|
111
|
+
}, [vue.createVNode("div", {
|
|
112
|
+
"class": [this.ns.e("tabs")]
|
|
113
|
+
}, [vue.createVNode("div", {
|
|
114
|
+
"class": [this.ns.e("anchor"), this.ns.is("select-text", this.curSelect === "write")]
|
|
115
|
+
}, [this.tabs.map((tab) => {
|
|
116
|
+
return vue.createVNode("div", {
|
|
117
|
+
"class": [this.ns.em("tabs", "tab"), this.ns.is("selected", tab.value === this.curSelect)],
|
|
118
|
+
"onClick": () => this.onSelect(tab.value)
|
|
119
|
+
}, [tab.text]);
|
|
120
|
+
})])]), vue.createVNode("div", {
|
|
121
|
+
"class": this.ns.e("content")
|
|
122
|
+
}, [this.curSelect === "select" ? vue.createVNode("div", {
|
|
123
|
+
"class": this.ns.e("color-list")
|
|
124
|
+
}, [this.renderColorList(), vue.createVNode("div", {
|
|
125
|
+
"class": [this.ns.em("color-list", "add"), this.ns.is("disabled", this.disabled || this.readonly)],
|
|
126
|
+
"onClick": this.onAdd,
|
|
127
|
+
"title": ibiz.i18n.t("editor.colorPicker.add")
|
|
128
|
+
}, [vue.createVNode("ion-icon", {
|
|
129
|
+
"name": "add-outline"
|
|
130
|
+
}, null)])]) : vue.createVNode("div", null, [vue.createVNode(vue.resolveComponent("el-input"), {
|
|
131
|
+
"type": "textarea",
|
|
132
|
+
"modelValue": this.colorStr,
|
|
133
|
+
"onUpdate:modelValue": ($event) => this.colorStr = $event,
|
|
134
|
+
"disabled": this.disabled,
|
|
135
|
+
"readonly": this.readonly,
|
|
136
|
+
"onBlur": this.onBlur
|
|
137
|
+
}, null)])])]);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
exports.IBizColorMPickerCustom = IBizColorMPickerCustom;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-color-mpicker-custom{--ibiz-color-mpicker-custom-select-color:var(--ibiz-color-primary-light-active);display:flex;gap:var(--ibiz-spacing-base)}.ibiz-color-mpicker-custom__tabs{flex-shrink:0}.ibiz-color-mpicker-custom__tabs--tab{height:var(--ibiz-form-item-line-height);cursor:pointer}.ibiz-color-mpicker-custom__tabs--tab.is-selected{color:var(--ibiz-color-mpicker-custom-select-color)}.ibiz-color-mpicker-custom__anchor{position:relative;height:-moz-max-content;height:max-content}.ibiz-color-mpicker-custom__anchor::before{position:absolute;top:0;right:-10px;z-index:10;width:3px;height:50%;content:"";background-color:var(--ibiz-color-mpicker-custom-select-color);transition:all ease .3s}.ibiz-color-mpicker-custom__anchor::after{position:absolute;top:0;right:-10px;width:3px;height:100%;content:"";background-color:var(--ibiz-color-border)}.ibiz-color-mpicker-custom__anchor.is-select-text::before{top:50%}.ibiz-color-mpicker-custom__content{flex:1;padding:0 var(--ibiz-spacing-base)}.ibiz-color-mpicker-custom__color-list{display:flex;flex-wrap:wrap;gap:var(--ibiz-spacing-extra-tight)}.ibiz-color-mpicker-custom__color-list--add{display:flex;align-items:center;justify-content:center;width:32px;height:32px;cursor:pointer;border:1px solid var(--ibiz-color-border);border-radius:var(--ibiz-border-radius-small)}.ibiz-color-mpicker-custom__color-list--add:hover{border-color:var(--ibiz-color-primary)}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./ibiz-color-mpicker-default.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizColorMPickerDefault = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizColorMPickerDefault",
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: [Array, String]
|
|
13
|
+
},
|
|
14
|
+
customColorList: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
type: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "ITEMS"
|
|
20
|
+
},
|
|
21
|
+
readonly: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
emits: ["change"],
|
|
31
|
+
setup(props, {
|
|
32
|
+
emit
|
|
33
|
+
}) {
|
|
34
|
+
const ns = vue3Util.useNamespace("color-mpicker-default");
|
|
35
|
+
const curType = vue.ref("default");
|
|
36
|
+
const curTemplateColor = vue.ref("");
|
|
37
|
+
const showTemplateList = vue.ref(false);
|
|
38
|
+
const colorType = [{
|
|
39
|
+
text: ibiz.i18n.t("editor.colorPicker.systemColor"),
|
|
40
|
+
value: "default"
|
|
41
|
+
}, {
|
|
42
|
+
text: ibiz.i18n.t("editor.colorPicker.templateColor"),
|
|
43
|
+
value: "template"
|
|
44
|
+
}];
|
|
45
|
+
const templateColorList = vue.computed(() => {
|
|
46
|
+
if (props.customColorList) {
|
|
47
|
+
return JSON.parse(props.customColorList);
|
|
48
|
+
}
|
|
49
|
+
return [{
|
|
50
|
+
text: ibiz.i18n.t("editor.colorPicker.simpleBlue"),
|
|
51
|
+
value: props.type === "ITEM" ? ["#6698FF"] : ["#6698FF", "#73DEB3", "#7585A2", "#F7BE21", "#EE734A", "#83D0EE"]
|
|
52
|
+
}, {
|
|
53
|
+
text: ibiz.i18n.t("editor.colorPicker.autumnOrange"),
|
|
54
|
+
value: props.type === "ITEM" ? ["#EE734A"] : ["#EE734A", "#7585A2", "#FEC103", "#9EB411", "#CD8050", "#DAD5B5"]
|
|
55
|
+
}, {
|
|
56
|
+
text: ibiz.i18n.t("editor.colorPicker.Macaroon"),
|
|
57
|
+
value: props.type === "ITEM" ? ["#467CE6"] : ["#467CE6", "#CD74CA", "#4997CC", "#BCBFE3", "#666CEB", "#82BC9A"]
|
|
58
|
+
}, {
|
|
59
|
+
text: ibiz.i18n.t("editor.colorPicker.mintGreen"),
|
|
60
|
+
value: props.type === "ITEM" ? ["#118299"] : ["#118299", "#13B3B3", "#73DEB3", "#FEC103", "#9EB411", "#83D0EE"]
|
|
61
|
+
}];
|
|
62
|
+
});
|
|
63
|
+
const handleTemplateColorChange = () => {
|
|
64
|
+
const temmpVal = JSON.parse(curTemplateColor.value);
|
|
65
|
+
emit("change", temmpVal);
|
|
66
|
+
};
|
|
67
|
+
const handleSchemeChange = () => {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (curType.value === "default") {
|
|
70
|
+
showTemplateList.value = false;
|
|
71
|
+
emit("change", (_b = (_a = templateColorList.value[0]) == null ? void 0 : _a.value) == null ? void 0 : _b[0]);
|
|
72
|
+
} else {
|
|
73
|
+
showTemplateList.value = true;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
vue.watch(() => props.value, () => {
|
|
77
|
+
if (props.value) {
|
|
78
|
+
if (typeof props.value === "string") {
|
|
79
|
+
curType.value = "default";
|
|
80
|
+
showTemplateList.value = false;
|
|
81
|
+
} else {
|
|
82
|
+
curType.value = "template";
|
|
83
|
+
showTemplateList.value = true;
|
|
84
|
+
if (props.value.length > 0) {
|
|
85
|
+
curTemplateColor.value = JSON.stringify(props.value);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
curType.value = "default";
|
|
90
|
+
showTemplateList.value = false;
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
immediate: true,
|
|
94
|
+
deep: true
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
ns,
|
|
98
|
+
curType,
|
|
99
|
+
curTemplateColor,
|
|
100
|
+
showTemplateList,
|
|
101
|
+
colorType,
|
|
102
|
+
templateColorList,
|
|
103
|
+
handleTemplateColorChange,
|
|
104
|
+
handleSchemeChange
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
render() {
|
|
108
|
+
return vue.createVNode("div", {
|
|
109
|
+
"class": this.ns.b()
|
|
110
|
+
}, [vue.createVNode(vue.resolveComponent("el-select"), {
|
|
111
|
+
"class": this.ns.b("picker"),
|
|
112
|
+
"popper-class": this.ns.b("popper"),
|
|
113
|
+
"modelValue": this.curType,
|
|
114
|
+
"onUpdate:modelValue": ($event) => this.curType = $event,
|
|
115
|
+
"onChange": this.handleSchemeChange
|
|
116
|
+
}, {
|
|
117
|
+
default: () => {
|
|
118
|
+
return this.colorType.map((scheme) => {
|
|
119
|
+
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
120
|
+
"key": scheme.value,
|
|
121
|
+
"label": scheme.text,
|
|
122
|
+
"value": scheme.value
|
|
123
|
+
}, null);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}), this.showTemplateList && vue.createVNode(vue.resolveComponent("el-select"), {
|
|
127
|
+
"class": this.ns.b("template-color-picker"),
|
|
128
|
+
"popper-class": this.ns.b("popper"),
|
|
129
|
+
"modelValue": this.curTemplateColor,
|
|
130
|
+
"onUpdate:modelValue": ($event) => this.curTemplateColor = $event,
|
|
131
|
+
"onChange": this.handleTemplateColorChange
|
|
132
|
+
}, {
|
|
133
|
+
default: () => {
|
|
134
|
+
return this.templateColorList.map((color) => {
|
|
135
|
+
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
136
|
+
"key": color.key,
|
|
137
|
+
"label": color.text,
|
|
138
|
+
"value": JSON.stringify(color.value)
|
|
139
|
+
}, {
|
|
140
|
+
default: () => {
|
|
141
|
+
return vue.createVNode("div", {
|
|
142
|
+
"class": this.ns.b("template-color-picker-option")
|
|
143
|
+
}, [Array.isArray(color.value) ? color.value.map((item) => vue.createVNode("div", {
|
|
144
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
145
|
+
"style": {
|
|
146
|
+
background: item
|
|
147
|
+
}
|
|
148
|
+
}, null)) : vue.createVNode("div", {
|
|
149
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
150
|
+
"style": {
|
|
151
|
+
background: color.value
|
|
152
|
+
}
|
|
153
|
+
}, null), vue.createVNode("div", {
|
|
154
|
+
"class": this.ns.be("template-color-picker", "text")
|
|
155
|
+
}, [color.text])]);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
prefix: () => {
|
|
161
|
+
if (this.curTemplateColor) {
|
|
162
|
+
const colors = JSON.parse(this.curTemplateColor);
|
|
163
|
+
return Array.isArray(colors) ? colors.map((item) => vue.createVNode("div", {
|
|
164
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
165
|
+
"style": {
|
|
166
|
+
background: item
|
|
167
|
+
}
|
|
168
|
+
}, null)) : vue.createVNode("div", {
|
|
169
|
+
"class": this.ns.be("template-color-picker", "icon"),
|
|
170
|
+
"style": {
|
|
171
|
+
background: colors[0]
|
|
172
|
+
}
|
|
173
|
+
}, [colors[0]]);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
})]);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
exports.IBizColorMPickerDefault = IBizColorMPickerDefault;
|
|
@@ -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)}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
5
|
require('./ibiz-color-picker.css');
|
|
6
|
+
var ibizColorMpickerCustom = require('../ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.cjs');
|
|
7
|
+
var ibizColorMpickerDefault = require('../ibiz-color-mpicker-default/ibiz-color-mpicker-default.cjs');
|
|
6
8
|
|
|
7
9
|
"use strict";
|
|
8
10
|
const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -12,10 +14,15 @@ const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
12
14
|
setup(props, {
|
|
13
15
|
emit
|
|
14
16
|
}) {
|
|
17
|
+
var _a, _b, _c, _d;
|
|
15
18
|
const ns = vue3Util.useNamespace("color-picker");
|
|
16
19
|
const c = props.controller;
|
|
17
20
|
const currentVal = vue.ref("");
|
|
18
21
|
const colorPicker = vue.ref(null);
|
|
22
|
+
const multiple = ((_a = c.editorParams) == null ? void 0 : _a.MULTIPLE) === "true";
|
|
23
|
+
const isCustom = ((_b = c.editorParams) == null ? void 0 : _b.CUSTOM) === "true";
|
|
24
|
+
const type = (_c = c.editorParams) == null ? void 0 : _c.TYPE;
|
|
25
|
+
const customColorList = ((_d = c.editorParams) == null ? void 0 : _d.CUSTOMCOLORLIST) || "";
|
|
19
26
|
const predefineColors = vue.ref(["#000000", "#2C2C2C", "#50555C", "#ACB3BF", "#D0D3D9", "#C4C4C4", "#DADADA", "#E5E5E5", "#F0F0F0", "#F24E1E", "#E99C58", "#FFC700", "#FF4D00", "#FF00D6", "#D82E57", "#8E1DE8", "#0ACF83", "#18A0FB", "#A259FF", "#907CFF"]);
|
|
20
27
|
const showFormDefaultContent = vue.computed(() => {
|
|
21
28
|
if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
|
|
@@ -25,7 +32,17 @@ const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
32
|
});
|
|
26
33
|
vue.watch(() => props.value, (newVal, oldVal) => {
|
|
27
34
|
if (newVal !== oldVal) {
|
|
28
|
-
if (
|
|
35
|
+
if (multiple) {
|
|
36
|
+
if (!newVal) {
|
|
37
|
+
if (isCustom) {
|
|
38
|
+
currentVal.value = [];
|
|
39
|
+
} else {
|
|
40
|
+
currentVal.value = "";
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
currentVal.value = newVal;
|
|
44
|
+
}
|
|
45
|
+
} else if (!newVal) {
|
|
29
46
|
currentVal.value = "";
|
|
30
47
|
} else {
|
|
31
48
|
currentVal.value = newVal;
|
|
@@ -56,6 +73,9 @@ const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
73
|
const onBlur = (e) => {
|
|
57
74
|
emit("blur", e);
|
|
58
75
|
};
|
|
76
|
+
const onChange = (value) => {
|
|
77
|
+
emit("change", value);
|
|
78
|
+
};
|
|
59
79
|
return {
|
|
60
80
|
ns,
|
|
61
81
|
c,
|
|
@@ -63,17 +83,41 @@ const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
83
|
predefineColors,
|
|
64
84
|
contentStyle,
|
|
65
85
|
colorPicker,
|
|
86
|
+
multiple,
|
|
87
|
+
isCustom,
|
|
88
|
+
customColorList,
|
|
89
|
+
type,
|
|
66
90
|
handleChange,
|
|
67
91
|
showPicker,
|
|
68
92
|
onFocus,
|
|
69
93
|
onBlur,
|
|
70
|
-
showFormDefaultContent
|
|
94
|
+
showFormDefaultContent,
|
|
95
|
+
onChange
|
|
71
96
|
};
|
|
72
97
|
},
|
|
73
98
|
render() {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
if (this.multiple) {
|
|
101
|
+
if (this.isCustom) {
|
|
102
|
+
return vue.createVNode(ibizColorMpickerCustom.IBizColorMPickerCustom, {
|
|
103
|
+
"value": this.currentVal || [],
|
|
104
|
+
"onChange": this.onChange,
|
|
105
|
+
"readonly": this.readonly,
|
|
106
|
+
"disabled": this.disabled
|
|
107
|
+
}, null);
|
|
108
|
+
}
|
|
109
|
+
return vue.createVNode(ibizColorMpickerDefault.IBizColorMPickerDefault, {
|
|
110
|
+
"value": this.currentVal || "",
|
|
111
|
+
"type": this.type,
|
|
112
|
+
"customColorList": this.customColorList,
|
|
113
|
+
"readonly": this.readonly,
|
|
114
|
+
"disabled": this.disabled,
|
|
115
|
+
"onChange": this.onChange
|
|
116
|
+
}, null);
|
|
117
|
+
}
|
|
74
118
|
let content = null;
|
|
75
119
|
if (this.readonly) {
|
|
76
|
-
content = "".concat(this.currentVal);
|
|
120
|
+
content = "".concat((_a = this.currentVal) == null ? void 0 : _a.toString());
|
|
77
121
|
} else {
|
|
78
122
|
content = vue.createVNode("span", {
|
|
79
123
|
"class": this.ns.b("content"),
|
|
@@ -90,7 +134,7 @@ const IBizColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
90
134
|
"size": "small",
|
|
91
135
|
"predefine": this.predefineColors,
|
|
92
136
|
"show-alpha": true
|
|
93
|
-
}, this.$attrs), null), vue.createVNode("span", {
|
|
137
|
+
}, this.$attrs), null), ((_b = this.c.editorParams) == null ? void 0 : _b.isHiddenText) === "true" ? null : vue.createVNode("span", {
|
|
94
138
|
"class": this.ns.b("text")
|
|
95
139
|
}, [this.currentVal])]);
|
|
96
140
|
}
|
|
@@ -318,6 +318,7 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
318
318
|
"label": item[this.c.textName]
|
|
319
319
|
}, {
|
|
320
320
|
default: () => {
|
|
321
|
+
var _a;
|
|
321
322
|
if (this.c.acItemProvider) {
|
|
322
323
|
const component = vue.resolveComponent(this.c.acItemProvider.component);
|
|
323
324
|
return vue.h(component, {
|
|
@@ -325,6 +326,15 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
325
326
|
controller: this.c
|
|
326
327
|
});
|
|
327
328
|
}
|
|
329
|
+
const panel = (_a = this.c.deACMode) == null ? void 0 : _a.itemLayoutPanel;
|
|
330
|
+
if (panel) {
|
|
331
|
+
return vue.createVNode(vue.resolveComponent("iBizControlShell"), {
|
|
332
|
+
"data": item,
|
|
333
|
+
"modelData": panel,
|
|
334
|
+
"context": this.c.context,
|
|
335
|
+
"params": this.c.params
|
|
336
|
+
}, null);
|
|
337
|
+
}
|
|
328
338
|
return vue.createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
|
|
329
339
|
}
|
|
330
340
|
});
|
|
@@ -162,7 +162,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
162
|
vue.onMounted(() => {
|
|
163
163
|
vue.watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
164
164
|
if (newVal !== oldVal) {
|
|
165
|
-
if (!isLoaded.value && editorRef.value && ramda.isNil(props.value)) {
|
|
165
|
+
if (!isLoaded.value && editorRef.value && ramda.isNil(props.value) && !ramda.isNil(newVal)) {
|
|
166
166
|
await onSearch("");
|
|
167
167
|
}
|
|
168
168
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
@@ -208,11 +208,17 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
208
208
|
context,
|
|
209
209
|
params
|
|
210
210
|
} = this.c;
|
|
211
|
+
let selected = item[this.c.textName] || item.srfmajortext === this.curValue;
|
|
212
|
+
if (this.c.valueItem) {
|
|
213
|
+
selected = (item[this.c.keyName] || item.srfkey) === this.data[this.c.valueItem];
|
|
214
|
+
}
|
|
215
|
+
const className = [this.ns.is("active", selected), this.ns.e("transfer-item")];
|
|
211
216
|
if (this.c.acItemProvider) {
|
|
212
217
|
const component = vue.resolveComponent(this.c.acItemProvider.component);
|
|
213
218
|
return vue.h(component, {
|
|
214
219
|
item,
|
|
215
220
|
controller: this.c,
|
|
221
|
+
class: className,
|
|
216
222
|
onClick: () => {
|
|
217
223
|
this.onACSelect(item);
|
|
218
224
|
}
|
|
@@ -220,6 +226,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
220
226
|
}
|
|
221
227
|
return panel ? vue.createVNode(vue.resolveComponent("iBizControlShell"), {
|
|
222
228
|
"data": item,
|
|
229
|
+
"class": className,
|
|
223
230
|
"modelData": panel,
|
|
224
231
|
"context": context,
|
|
225
232
|
"params": params,
|
|
@@ -227,7 +234,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
227
234
|
this.onACSelect(item);
|
|
228
235
|
}
|
|
229
236
|
}, null) : vue.createVNode("div", {
|
|
230
|
-
"class": [this.ns.
|
|
237
|
+
"class": [this.ns.is("ellipsis", isEllipsis), ...className],
|
|
231
238
|
"title": core.showTitle(isEllipsis ? item[this.c.textName] : ""),
|
|
232
239
|
"onClick": () => {
|
|
233
240
|
this.onACSelect(item);
|
|
@@ -44,8 +44,8 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
if (newVal === null) {
|
|
45
45
|
curValue.value = "";
|
|
46
46
|
}
|
|
47
|
-
refValue.value = curValue.value;
|
|
48
47
|
const value = props.data[c.valueItem];
|
|
48
|
+
refValue.value = value || curValue.value;
|
|
49
49
|
const index = items.value.findIndex((item) => Object.is(item[c.keyName], value));
|
|
50
50
|
if (index !== -1) {
|
|
51
51
|
return;
|
|
@@ -97,8 +97,7 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
97
|
vue.onMounted(() => {
|
|
98
98
|
vue.watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
99
99
|
if (newVal !== oldVal) {
|
|
100
|
-
if (!isLoaded.value && editorRef.value && ramda.isNil(props.value)) {
|
|
101
|
-
shouldLoad.value = true;
|
|
100
|
+
if (!isLoaded.value && editorRef.value && ramda.isNil(props.value) && !ramda.isNil(newVal)) {
|
|
102
101
|
await onSearch("");
|
|
103
102
|
}
|
|
104
103
|
refValue.value = newVal;
|
|
@@ -250,6 +249,7 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
250
249
|
"label": item[this.c.textName]
|
|
251
250
|
}, {
|
|
252
251
|
default: () => {
|
|
252
|
+
var _a;
|
|
253
253
|
if (this.c.acItemProvider) {
|
|
254
254
|
const component = vue.resolveComponent(this.c.acItemProvider.component);
|
|
255
255
|
return vue.h(component, {
|
|
@@ -257,6 +257,15 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
257
257
|
controller: this.c
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
+
const panel = (_a = this.c.deACMode) == null ? void 0 : _a.itemLayoutPanel;
|
|
261
|
+
if (panel) {
|
|
262
|
+
return vue.createVNode(vue.resolveComponent("iBizControlShell"), {
|
|
263
|
+
"data": item,
|
|
264
|
+
"modelData": panel,
|
|
265
|
+
"context": this.c.context,
|
|
266
|
+
"params": this.c.params
|
|
267
|
+
}, null);
|
|
268
|
+
}
|
|
260
269
|
return vue.createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
|
|
261
270
|
}
|
|
262
271
|
});
|
|
@@ -17,6 +17,7 @@ const IBizPickerLink = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
const c = props.controller;
|
|
18
18
|
const curValue = vue.ref("");
|
|
19
19
|
const items = vue.ref([]);
|
|
20
|
+
const isLoaded = vue.ref(false);
|
|
20
21
|
const {
|
|
21
22
|
useInFocusAndBlur,
|
|
22
23
|
useInValueChange
|
|
@@ -29,6 +30,7 @@ const IBizPickerLink = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
30
|
}
|
|
30
31
|
const res = await c.getServiceData(trimQuery, props.data);
|
|
31
32
|
if (res) {
|
|
33
|
+
isLoaded.value = true;
|
|
32
34
|
items.value = res.data;
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -53,7 +55,7 @@ const IBizPickerLink = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
55
|
vue.onMounted(() => {
|
|
54
56
|
vue.watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
55
57
|
if (newVal !== oldVal) {
|
|
56
|
-
if (ramda.isNil(props.value)) {
|
|
58
|
+
if (!isLoaded.value && ramda.isNil(props.value) && !ramda.isNil(newVal)) {
|
|
57
59
|
await onSearch("");
|
|
58
60
|
}
|
|
59
61
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
@@ -26,6 +26,12 @@ class DropDownListEditorController extends runtime.CodeListEditorController {
|
|
|
26
26
|
* @Date: 2024-03-12 14:33:14
|
|
27
27
|
*/
|
|
28
28
|
__publicField(this, "forceSelection", true);
|
|
29
|
+
/**
|
|
30
|
+
* 默认选中第一个
|
|
31
|
+
*
|
|
32
|
+
* @memberof CustomTagSelectController
|
|
33
|
+
*/
|
|
34
|
+
__publicField(this, "defaultFirstOption", false);
|
|
29
35
|
/**
|
|
30
36
|
* 预置项空白项名称
|
|
31
37
|
*
|
|
@@ -34,7 +40,7 @@ class DropDownListEditorController extends runtime.CodeListEditorController {
|
|
|
34
40
|
__publicField(this, "blankItemName", "");
|
|
35
41
|
}
|
|
36
42
|
async onInit() {
|
|
37
|
-
var _a, _b;
|
|
43
|
+
var _a, _b, _c;
|
|
38
44
|
super.onInit();
|
|
39
45
|
if (this.model.editorType === "MDROPDOWNLIST") {
|
|
40
46
|
this.multiple = true;
|
|
@@ -42,7 +48,12 @@ class DropDownListEditorController extends runtime.CodeListEditorController {
|
|
|
42
48
|
if ((_a = this.editorParams) == null ? void 0 : _a.forceSelection) {
|
|
43
49
|
this.forceSelection = this.toBoolean(this.editorParams.forceSelection);
|
|
44
50
|
}
|
|
45
|
-
if ((_b = this.editorParams) == null ? void 0 : _b.
|
|
51
|
+
if ((_b = this.editorParams) == null ? void 0 : _b.defaultFirstOption) {
|
|
52
|
+
this.defaultFirstOption = this.toBoolean(
|
|
53
|
+
this.editorParams.defaultFirstOption
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
if ((_c = this.editorParams) == null ? void 0 : _c.blankItemName) {
|
|
46
57
|
this.blankItemName = this.editorParams.blankItemName;
|
|
47
58
|
}
|
|
48
59
|
}
|
|
@@ -351,6 +351,8 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
351
351
|
"filterable": true,
|
|
352
352
|
"teleported": !this.showFormDefaultContent,
|
|
353
353
|
"data": this.treeNodes,
|
|
354
|
+
"allow-create": !this.c.forceSelection,
|
|
355
|
+
"default-first-option": this.c.defaultFirstOption,
|
|
354
356
|
"check-strictly": true,
|
|
355
357
|
"render-after-expand": true,
|
|
356
358
|
"multiple": this.c.multiple,
|
|
@@ -362,6 +364,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
362
364
|
"onFocus": this.onFocus,
|
|
363
365
|
"onKeyup": this.handleKeyUp,
|
|
364
366
|
"onVisibleChange": this.onVisibleChange,
|
|
367
|
+
"popper-class": "".concat(this.ns.b("popper"), " ").concat(this.ns.is("allow-create", !this.c.forceSelection)),
|
|
365
368
|
"props": {
|
|
366
369
|
class: this.customNodeClass
|
|
367
370
|
}
|