@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive } from 'vue';
|
|
2
1
|
import { clone } from 'ramda';
|
|
2
|
+
import { reactive } from 'vue';
|
|
3
3
|
import { predefineThemeVars } from './custom-theme-model.mjs';
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
@@ -10,6 +10,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10
10
|
return value;
|
|
11
11
|
};
|
|
12
12
|
class CustomThemeController {
|
|
13
|
+
/**
|
|
14
|
+
* Creates an instance of CustomThemeController.
|
|
15
|
+
* @author tony001
|
|
16
|
+
* @date 2024-12-26 18:12:28
|
|
17
|
+
*/
|
|
13
18
|
constructor() {
|
|
14
19
|
/**
|
|
15
20
|
* 自定义主题状态
|
|
@@ -25,6 +30,15 @@ class CustomThemeController {
|
|
|
25
30
|
* @memberof CustomThemeController
|
|
26
31
|
*/
|
|
27
32
|
__publicField(this, "model", []);
|
|
33
|
+
/**
|
|
34
|
+
* 模型映射对象,key为value,value值为var对象
|
|
35
|
+
*
|
|
36
|
+
* @author tony001
|
|
37
|
+
* @date 2024-12-27 10:12:57
|
|
38
|
+
* @private
|
|
39
|
+
* @type {IData}
|
|
40
|
+
*/
|
|
41
|
+
__publicField(this, "modelMapping", {});
|
|
28
42
|
/**
|
|
29
43
|
* 预定义类型
|
|
30
44
|
*
|
|
@@ -36,18 +50,119 @@ class CustomThemeController {
|
|
|
36
50
|
codeName: "light",
|
|
37
51
|
label: "\u4EAE\u8272",
|
|
38
52
|
labelLang: "light",
|
|
39
|
-
color: "#557da5"
|
|
53
|
+
color: "#557da5",
|
|
54
|
+
isCustom: false
|
|
40
55
|
},
|
|
41
56
|
{
|
|
42
57
|
codeName: "dark",
|
|
43
58
|
label: "\u6697\u8272",
|
|
44
|
-
|
|
59
|
+
labelLang: "dark",
|
|
60
|
+
color: "#1c1c1c",
|
|
61
|
+
isCustom: false
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
codeName: "blue",
|
|
65
|
+
label: "\u84DD\u8272",
|
|
66
|
+
labelLang: "blue",
|
|
67
|
+
color: "rgba(0, 132, 255, 1)",
|
|
68
|
+
isCustom: false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
codeName: "user1",
|
|
72
|
+
label: "\u81EA\u5B9A\u4E491",
|
|
73
|
+
labelLang: "user1",
|
|
74
|
+
color: "#999",
|
|
75
|
+
isCustom: true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
codeName: "user2",
|
|
79
|
+
label: "\u81EA\u5B9A\u4E492",
|
|
80
|
+
labelLang: "user2",
|
|
81
|
+
color: "#888",
|
|
82
|
+
isCustom: true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
codeName: "user3",
|
|
86
|
+
label: "\u81EA\u5B9A\u4E493",
|
|
87
|
+
labelLang: "user3",
|
|
88
|
+
color: "#777",
|
|
89
|
+
isCustom: true
|
|
45
90
|
}
|
|
46
91
|
]);
|
|
47
92
|
this.model = predefineThemeVars;
|
|
48
93
|
const customTheme = ibiz.util.theme.getCustomTheme();
|
|
49
94
|
this.state = clone(customTheme);
|
|
50
95
|
this.state = reactive(this.state);
|
|
96
|
+
this.model.forEach((item) => {
|
|
97
|
+
this.initModelMapping(item);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 初始化模型映射
|
|
102
|
+
*
|
|
103
|
+
* @author tony001
|
|
104
|
+
* @date 2024-12-27 13:12:53
|
|
105
|
+
* @private
|
|
106
|
+
* @param {IData} item
|
|
107
|
+
*/
|
|
108
|
+
initModelMapping(item) {
|
|
109
|
+
if (item.children && item.children.length > 0) {
|
|
110
|
+
item.children.forEach((child) => {
|
|
111
|
+
this.initModelMapping(child);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (item.vars && item.vars.length > 0) {
|
|
115
|
+
item.vars.forEach((varItem) => {
|
|
116
|
+
this.modelMapping[varItem.value] = varItem;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 获取模型编辑数据
|
|
122
|
+
*
|
|
123
|
+
* @author tony001
|
|
124
|
+
* @date 2024-12-27 13:12:48
|
|
125
|
+
* @public
|
|
126
|
+
* @return {*} {IData}
|
|
127
|
+
*/
|
|
128
|
+
getModelEditData() {
|
|
129
|
+
const result = {};
|
|
130
|
+
this.model.forEach((item) => {
|
|
131
|
+
const tempData = {};
|
|
132
|
+
this.getSingleGroupModelData(item, tempData);
|
|
133
|
+
result[item.labelLang] = tempData;
|
|
134
|
+
});
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* 获取单个分组的模型数据
|
|
139
|
+
*
|
|
140
|
+
* @author tony001
|
|
141
|
+
* @date 2024-12-27 13:12:05
|
|
142
|
+
* @private
|
|
143
|
+
* @param {IData} item
|
|
144
|
+
* @param {IData} result
|
|
145
|
+
*/
|
|
146
|
+
getSingleGroupModelData(item, result) {
|
|
147
|
+
if (item.children && item.children.length > 0) {
|
|
148
|
+
item.children.forEach((child) => {
|
|
149
|
+
this.getSingleGroupModelData(child, result);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
if (item.vars && item.vars.length > 0) {
|
|
153
|
+
item.vars.forEach((varItem) => {
|
|
154
|
+
this.modelMapping[varItem.value] = varItem;
|
|
155
|
+
if (varItem.type === "size") {
|
|
156
|
+
result[varItem.value] = this.getCssVar(varItem.value);
|
|
157
|
+
} else {
|
|
158
|
+
let name = varItem.value;
|
|
159
|
+
if (varItem.className) {
|
|
160
|
+
name = "".concat(varItem.className, ":").concat(name);
|
|
161
|
+
}
|
|
162
|
+
result[varItem.value] = this.getCssVar(name, varItem.defaultValue);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
51
166
|
}
|
|
52
167
|
/**
|
|
53
168
|
* 获取css变量
|
|
@@ -57,13 +172,24 @@ class CustomThemeController {
|
|
|
57
172
|
* @memberof CustomThemeController
|
|
58
173
|
*/
|
|
59
174
|
getCssVar(name, defaultVar) {
|
|
175
|
+
var _a;
|
|
60
176
|
let result = defaultVar || name;
|
|
61
177
|
if (this.state.themeVars && this.state.themeVars[name]) {
|
|
62
178
|
result = this.state.themeVars[name];
|
|
63
179
|
} else {
|
|
64
|
-
|
|
180
|
+
let elt = document.documentElement;
|
|
181
|
+
let varName = defaultVar || name;
|
|
182
|
+
if (name.split(":").length === 2) {
|
|
183
|
+
const className = name.split(":")[0];
|
|
184
|
+
const element = (_a = document.getElementsByClassName(className)) == null ? void 0 : _a[0];
|
|
185
|
+
if (element) {
|
|
186
|
+
elt = element;
|
|
187
|
+
varName = name.split(":")[1];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const styles = window.getComputedStyle(elt);
|
|
65
191
|
if (styles) {
|
|
66
|
-
result = styles.getPropertyValue(
|
|
192
|
+
result = styles.getPropertyValue(varName) || result;
|
|
67
193
|
}
|
|
68
194
|
}
|
|
69
195
|
if (result.toString().endsWith("px")) {
|
|
@@ -74,6 +200,110 @@ class CustomThemeController {
|
|
|
74
200
|
}
|
|
75
201
|
return result;
|
|
76
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* 处理主题变更
|
|
205
|
+
*
|
|
206
|
+
* @author tony001
|
|
207
|
+
* @date 2024-12-26 15:12:57
|
|
208
|
+
* @param {string} tag
|
|
209
|
+
* @return {*} {Promise<void>}
|
|
210
|
+
*/
|
|
211
|
+
async handleThemeChange(tag) {
|
|
212
|
+
await ibiz.util.theme.clearCustomThemeParams(this.state.themeTag);
|
|
213
|
+
this.state.themeTag = tag;
|
|
214
|
+
this.state.themeVars = {};
|
|
215
|
+
await this.handleThemePreview(true);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* 计算变更主题变量
|
|
219
|
+
*
|
|
220
|
+
* @author tony001
|
|
221
|
+
* @date 2024-12-27 17:12:21
|
|
222
|
+
* @param {IData} newData
|
|
223
|
+
* @return {*} {Promise<void>}
|
|
224
|
+
*/
|
|
225
|
+
async computeChangeThemeVars(newData) {
|
|
226
|
+
const changeVars = [];
|
|
227
|
+
const oldData = this.getModelEditData();
|
|
228
|
+
Object.keys(newData).forEach((type) => {
|
|
229
|
+
const newThemeVar = newData[type];
|
|
230
|
+
Object.keys(newThemeVar).forEach((varName) => {
|
|
231
|
+
const oldValue = oldData[type][varName];
|
|
232
|
+
if (oldValue !== newThemeVar[varName]) {
|
|
233
|
+
changeVars.push({ key: varName, value: newThemeVar[varName] });
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
if (changeVars.length > 0) {
|
|
238
|
+
changeVars.forEach((item) => {
|
|
239
|
+
const targetItem = this.modelMapping[item.key];
|
|
240
|
+
if (targetItem) {
|
|
241
|
+
if (targetItem.type === "size") {
|
|
242
|
+
this.calcSizeChange(item.key, Number(item.value), targetItem);
|
|
243
|
+
} else {
|
|
244
|
+
let name = item.key;
|
|
245
|
+
if (targetItem.className) {
|
|
246
|
+
name = "".concat(targetItem.className, ":").concat(item.key);
|
|
247
|
+
}
|
|
248
|
+
this.state.themeVars[name] = item.value;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* 处理主题预览
|
|
256
|
+
*
|
|
257
|
+
* @author tony001
|
|
258
|
+
* @date 2024-12-26 17:12:59
|
|
259
|
+
* @return {*} {Promise<void>}
|
|
260
|
+
*/
|
|
261
|
+
async handleThemePreview(isLoad) {
|
|
262
|
+
const { themeTag, themeVars } = await ibiz.util.theme.previewCustomTheme(
|
|
263
|
+
this.state.themeTag,
|
|
264
|
+
this.state.themeVars,
|
|
265
|
+
isLoad
|
|
266
|
+
);
|
|
267
|
+
this.state.themeTag = themeTag;
|
|
268
|
+
this.state.themeVars = themeVars;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* 处理主题保存
|
|
272
|
+
*
|
|
273
|
+
* @author tony001
|
|
274
|
+
* @date 2024-12-26 18:12:44
|
|
275
|
+
* @param {boolean} isShare
|
|
276
|
+
* @return {*} {Promise<void>}
|
|
277
|
+
*/
|
|
278
|
+
async handleThemeSave(isShare) {
|
|
279
|
+
await this.handleThemePreview(false);
|
|
280
|
+
await ibiz.util.theme.saveCustomTheme(
|
|
281
|
+
this.state.themeTag,
|
|
282
|
+
this.state.themeVars,
|
|
283
|
+
isShare
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* 处理主题重置
|
|
288
|
+
*
|
|
289
|
+
* @author tony001
|
|
290
|
+
* @date 2024-12-27 20:12:03
|
|
291
|
+
* @param {boolean} isShare
|
|
292
|
+
* @return {*} {Promise<void>}
|
|
293
|
+
*/
|
|
294
|
+
async handleThemeReset(isShare) {
|
|
295
|
+
const res = await ibiz.confirm.info({
|
|
296
|
+
title: ibiz.i18n.t("control.common.customTheme.resetConfirmation"),
|
|
297
|
+
desc: isShare ? ibiz.i18n.t("control.common.customTheme.resetConfirmationGlobalDesc") : ibiz.i18n.t("control.common.customTheme.resetConfirmationDesc")
|
|
298
|
+
});
|
|
299
|
+
if (!res)
|
|
300
|
+
return;
|
|
301
|
+
const { themeVars } = await ibiz.util.theme.resetCustomTheme(
|
|
302
|
+
this.state.themeTag,
|
|
303
|
+
isShare
|
|
304
|
+
);
|
|
305
|
+
this.state.themeVars = themeVars;
|
|
306
|
+
}
|
|
77
307
|
/**
|
|
78
308
|
* 计算尺寸改变,同类size批量更改
|
|
79
309
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-custom-theme{display:flex;flex-direction:column;height:100%;padding:var(--ibiz-spacing-loose)}.ibiz-custom-theme .ibiz-custom-theme-header .el-button{padding:var(--ibiz-spacing-tight)}.ibiz-custom-theme .ibiz-custom-theme-content{
|
|
1
|
+
.ibiz-custom-theme{display:flex;flex-direction:column;height:100%;padding:var(--ibiz-spacing-loose)}.ibiz-custom-theme .ibiz-custom-theme-header .el-button{padding:var(--ibiz-spacing-tight)}.ibiz-custom-theme .ibiz-custom-theme-content{flex-grow:1;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);overflow:hidden}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container{width:100%;height:100%}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-edit-container{width:100%;height:100%}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-edit-container.is-hidden{display:none}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-default-container{width:100%;height:100%}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-default-container.is-hidden{display:none}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-default-container .el-tabs{height:100%}.ibiz-custom-theme .ibiz-custom-theme-content .ibiz-custom-theme-content-container .ibiz-custom-theme-default-container .el-tabs__content{height:calc(100% - 55px);overflow:auto}.ibiz-custom-theme .ibiz-custom-theme-footer{flex:none;height:64px;padding:var(--ibiz-spacing-base);display:flex;align-items:center;justify-content:flex-start}.ibiz-custom-theme .ibiz-custom-theme-footer .el-button+.el-dropdown{margin-left:12px}.ibiz-custom-theme-item{padding:var(--ibiz-spacing-base);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-theme-item__caption{font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold);line-height:var(--ibiz-spacing-super-loose)}.ibiz-custom-theme-item__container{display:flex;align-items:center;justify-content:space-between}.ibiz-custom-theme-item__content{padding:var(--ibiz-spacing-base) 0}.ibiz-custom-theme-item__content .el-button{min-width:var(--ibiz-height-control-default)}.ibiz-custom-theme-item .ibiz-custom-theme-content-setting{font-size:var(--el-font-size-base);cursor:pointer}.ibiz-custom-theme-var{gap:var(--ibiz-spacing-base);padding:var(--ibiz-spacing-extra-tight) 0;display:flex;align-items:center;justify-content:space-between}
|
|
@@ -10,10 +10,12 @@ export declare const CustomTheme: import("vue").DefineComponent<{
|
|
|
10
10
|
}, {
|
|
11
11
|
ns: import("@ibiz-template/core").Namespace;
|
|
12
12
|
c: CustomThemeController;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
showSaveAndShare: import("vue").ComputedRef<boolean>;
|
|
14
|
+
handlePreview: () => Promise<void>;
|
|
15
|
+
handleReset: () => Promise<void>;
|
|
15
16
|
handleSave: () => Promise<void>;
|
|
16
|
-
|
|
17
|
+
handleSaveAndShare: () => Promise<void>;
|
|
18
|
+
handleResetAndShare: () => Promise<void>;
|
|
17
19
|
renderHeader: () => JSX.Element;
|
|
18
20
|
renderContent: () => JSX.Element;
|
|
19
21
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { isVNode, defineComponent, getCurrentInstance, ref, createVNode, resolveComponent } from 'vue';
|
|
2
|
-
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
1
|
+
import { isVNode, defineComponent, getCurrentInstance, ref, watch, nextTick, onMounted, onUnmounted, computed, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace, useUIStore } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { showTitle } from '@ibiz-template/core';
|
|
4
|
+
import '../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/index.mjs';
|
|
4
5
|
import { CustomThemeController } from './custom-theme.controller.mjs';
|
|
5
6
|
import './custom-theme.css';
|
|
7
|
+
import loader from '../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/loader/index.mjs';
|
|
6
8
|
|
|
7
9
|
"use strict";
|
|
8
10
|
function _isSlot(s) {
|
|
@@ -22,8 +24,93 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
22
24
|
const vue = getCurrentInstance().proxy;
|
|
23
25
|
const c = new CustomThemeController();
|
|
24
26
|
const activeTab = ref(0);
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
+
const codeEditRef = ref();
|
|
28
|
+
const currentVal = ref("");
|
|
29
|
+
const isEditMode = ref(false);
|
|
30
|
+
let editor;
|
|
31
|
+
let monacoEditor;
|
|
32
|
+
const {
|
|
33
|
+
UIStore
|
|
34
|
+
} = useUIStore();
|
|
35
|
+
const getMonacoTheme = (name) => {
|
|
36
|
+
return name === "dark" ? "vs-".concat(UIStore.theme) : "vs";
|
|
37
|
+
};
|
|
38
|
+
watch(() => UIStore.theme, (newVal) => {
|
|
39
|
+
monacoEditor.setTheme(getMonacoTheme(newVal));
|
|
40
|
+
});
|
|
41
|
+
const editorInit = () => {
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
loader.config({
|
|
44
|
+
paths: {
|
|
45
|
+
vs: "".concat(ibiz.env.pluginBaseUrl, "/monaco-editor@0.45.0/min/vs")
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
loader.init().then((loaderMonaco) => {
|
|
49
|
+
if (!editor) {
|
|
50
|
+
monacoEditor = loaderMonaco.editor;
|
|
51
|
+
editor = monacoEditor.create(codeEditRef.value, {
|
|
52
|
+
language: "json",
|
|
53
|
+
// 语言支持自行查阅demo
|
|
54
|
+
theme: getMonacoTheme(UIStore.theme),
|
|
55
|
+
foldingStrategy: "indentation",
|
|
56
|
+
renderLineHighlight: "all",
|
|
57
|
+
// 行亮
|
|
58
|
+
selectOnLineNumbers: true,
|
|
59
|
+
// 显示行号
|
|
60
|
+
minimap: {
|
|
61
|
+
enabled: true
|
|
62
|
+
},
|
|
63
|
+
fontSize: 16,
|
|
64
|
+
// 字体大小
|
|
65
|
+
scrollBeyondLastLine: false,
|
|
66
|
+
// 取消代码后面一大段空白
|
|
67
|
+
overviewRulerBorder: false
|
|
68
|
+
// 不要滚动条的边框
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
editor.layout();
|
|
73
|
+
editor.setValue(currentVal.value);
|
|
74
|
+
});
|
|
75
|
+
window.addEventListener("resize", () => {
|
|
76
|
+
editor.layout();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
onMounted(() => {
|
|
82
|
+
editorInit();
|
|
83
|
+
});
|
|
84
|
+
onUnmounted(() => {
|
|
85
|
+
editor == null ? void 0 : editor.dispose();
|
|
86
|
+
});
|
|
87
|
+
const showSaveAndShare = computed(() => {
|
|
88
|
+
if (ibiz.appData) {
|
|
89
|
+
if (ibiz.appData.enablepermissionvalid === false) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if (ibiz.appData.unires.length) {
|
|
93
|
+
const targetUnire = ibiz.appData.unires.find((unire) => {
|
|
94
|
+
return unire === "UNIRES_CLOUD_CONF_CONFIG_SHARE";
|
|
95
|
+
});
|
|
96
|
+
if (targetUnire) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
});
|
|
103
|
+
const handleThemeChange = async (codeName) => {
|
|
104
|
+
await c.handleThemeChange(codeName);
|
|
105
|
+
if (isEditMode.value) {
|
|
106
|
+
const result = c.getModelEditData();
|
|
107
|
+
nextTick(() => {
|
|
108
|
+
currentVal.value = JSON.stringify(result, null, 2);
|
|
109
|
+
editor == null ? void 0 : editor.setValue(currentVal.value);
|
|
110
|
+
editor == null ? void 0 : editor.layout();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
vue.$forceUpdate();
|
|
27
114
|
};
|
|
28
115
|
const handleColorChange = (varName, color, className) => {
|
|
29
116
|
let name = varName;
|
|
@@ -35,35 +122,52 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
35
122
|
const handleSizeChange = (varName, size, item) => {
|
|
36
123
|
c.calcSizeChange(varName, size, item);
|
|
37
124
|
};
|
|
38
|
-
const handlePreview = () => {
|
|
39
|
-
|
|
125
|
+
const handlePreview = async () => {
|
|
126
|
+
if (isEditMode.value && editor) {
|
|
127
|
+
await c.computeChangeThemeVars(JSON.parse(editor.getValue()));
|
|
128
|
+
}
|
|
129
|
+
await c.handleThemePreview(false);
|
|
40
130
|
vue.$forceUpdate();
|
|
41
131
|
};
|
|
42
132
|
const handleSave = async () => {
|
|
43
|
-
|
|
133
|
+
if (isEditMode.value && editor) {
|
|
134
|
+
await c.computeChangeThemeVars(JSON.parse(editor.getValue()));
|
|
135
|
+
}
|
|
136
|
+
await c.handleThemeSave(false);
|
|
44
137
|
vue.$forceUpdate();
|
|
45
|
-
await ibiz.util.theme.saveCustomTheme(c.state.themeTag, c.state.themeVars);
|
|
46
138
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
139
|
+
const handleSaveAndShare = async () => {
|
|
140
|
+
if (isEditMode.value && editor) {
|
|
141
|
+
await c.computeChangeThemeVars(JSON.parse(editor.getValue()));
|
|
142
|
+
}
|
|
143
|
+
await c.handleThemeSave(true);
|
|
50
144
|
vue.$forceUpdate();
|
|
51
145
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
146
|
+
const handleReset = async () => {
|
|
147
|
+
await c.handleThemeReset(false);
|
|
148
|
+
if (isEditMode.value) {
|
|
149
|
+
const result = c.getModelEditData();
|
|
150
|
+
nextTick(() => {
|
|
151
|
+
currentVal.value = JSON.stringify(result, null, 2);
|
|
152
|
+
editor == null ? void 0 : editor.setValue(currentVal.value);
|
|
153
|
+
editor == null ? void 0 : editor.layout();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
54
156
|
vue.$forceUpdate();
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
157
|
+
};
|
|
158
|
+
const handleResetAndShare = async () => {
|
|
159
|
+
await c.handleThemeReset(true);
|
|
160
|
+
if (isEditMode.value) {
|
|
161
|
+
const result = c.getModelEditData();
|
|
162
|
+
nextTick(() => {
|
|
163
|
+
currentVal.value = JSON.stringify(result, null, 2);
|
|
164
|
+
editor == null ? void 0 : editor.setValue(currentVal.value);
|
|
165
|
+
editor == null ? void 0 : editor.layout();
|
|
61
166
|
});
|
|
62
|
-
if (confirm) {
|
|
63
|
-
ibiz.util.text.copy(shareUrl);
|
|
64
|
-
}
|
|
65
167
|
}
|
|
168
|
+
vue.$forceUpdate();
|
|
66
169
|
};
|
|
170
|
+
const predefineColors = ref(["rgb(241, 4, 4)", "rgb(242, 76, 4)", "rgb(238, 153, 33)", "rgb(98, 230, 10)", "rgb(10, 230, 164)", "rgb(3, 144, 245)", "rgb(3, 7, 245)", "rgb(108, 3, 245)", "rgb(245, 3, 241)", "rgb(245, 3, 92)"]);
|
|
67
171
|
const renderColorPicker = (data) => {
|
|
68
172
|
let {
|
|
69
173
|
value
|
|
@@ -72,6 +176,7 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
72
176
|
value = "".concat(data.className, ":").concat(value);
|
|
73
177
|
}
|
|
74
178
|
return createVNode(resolveComponent("el-color-picker"), {
|
|
179
|
+
"predefine": predefineColors.value,
|
|
75
180
|
"onChange": (val) => {
|
|
76
181
|
handleColorChange(data.value, val, data.className);
|
|
77
182
|
},
|
|
@@ -115,12 +220,41 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
115
220
|
}, [ibiz.i18n.t("control.common.customTheme.".concat(data.labelLang))]), content]);
|
|
116
221
|
})])]);
|
|
117
222
|
};
|
|
223
|
+
const handAdvancedSetting = async () => {
|
|
224
|
+
const tempIsEditMode = !isEditMode.value;
|
|
225
|
+
if (isEditMode.value) {
|
|
226
|
+
if (editor) {
|
|
227
|
+
await c.computeChangeThemeVars(JSON.parse(editor.getValue()));
|
|
228
|
+
}
|
|
229
|
+
isEditMode.value = tempIsEditMode;
|
|
230
|
+
vue.$forceUpdate();
|
|
231
|
+
} else {
|
|
232
|
+
const result = c.getModelEditData();
|
|
233
|
+
isEditMode.value = tempIsEditMode;
|
|
234
|
+
nextTick(() => {
|
|
235
|
+
currentVal.value = JSON.stringify(result, null, 2);
|
|
236
|
+
editor == null ? void 0 : editor.setValue(currentVal.value);
|
|
237
|
+
editor == null ? void 0 : editor.layout();
|
|
238
|
+
vue.$forceUpdate();
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const renderAdvancedSetting = () => {
|
|
243
|
+
return createVNode("span", {
|
|
244
|
+
"class": ns.b("content-setting"),
|
|
245
|
+
"onClick": () => {
|
|
246
|
+
handAdvancedSetting();
|
|
247
|
+
}
|
|
248
|
+
}, [isEditMode.value ? ibiz.i18n.t("control.common.customTheme.closeModelEdit") : ibiz.i18n.t("control.common.customTheme.modelEdit")]);
|
|
249
|
+
};
|
|
118
250
|
const renderHeader = () => {
|
|
119
251
|
return createVNode("div", {
|
|
120
252
|
"class": ns.b("item")
|
|
121
253
|
}, [createVNode("div", {
|
|
122
254
|
"class": ns.be("item", "caption")
|
|
123
255
|
}, [ibiz.i18n.t("control.common.customTheme.themeColor")]), createVNode("div", {
|
|
256
|
+
"class": ns.be("item", "container")
|
|
257
|
+
}, [createVNode("div", {
|
|
124
258
|
"class": ns.be("item", "content")
|
|
125
259
|
}, [c.predefineType.map((item) => {
|
|
126
260
|
return createVNode(resolveComponent("el-button"), {
|
|
@@ -134,11 +268,18 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
134
268
|
"name": "checkmark-sharp"
|
|
135
269
|
}, null)]
|
|
136
270
|
});
|
|
137
|
-
})])]);
|
|
271
|
+
})]), renderAdvancedSetting()])]);
|
|
138
272
|
};
|
|
139
273
|
const renderContent = () => {
|
|
140
274
|
let _slot2;
|
|
141
|
-
return createVNode(
|
|
275
|
+
return createVNode("div", {
|
|
276
|
+
"class": ns.b("content-container")
|
|
277
|
+
}, [createVNode("div", {
|
|
278
|
+
"ref": codeEditRef,
|
|
279
|
+
"class": [ns.b("edit-container"), ns.is("hidden", !isEditMode.value)]
|
|
280
|
+
}, null), createVNode("div", {
|
|
281
|
+
"class": [ns.b("default-container"), ns.is("hidden", isEditMode.value)]
|
|
282
|
+
}, [createVNode(resolveComponent("el-tabs"), {
|
|
142
283
|
"modelValue": activeTab.value,
|
|
143
284
|
"onUpdate:modelValue": ($event) => activeTab.value = $event
|
|
144
285
|
}, _isSlot(_slot2 = c.model.map((item, index) => {
|
|
@@ -151,15 +292,17 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
151
292
|
});
|
|
152
293
|
})) ? _slot2 : {
|
|
153
294
|
default: () => [_slot2]
|
|
154
|
-
});
|
|
295
|
+
})])]);
|
|
155
296
|
};
|
|
156
297
|
return {
|
|
157
298
|
ns,
|
|
158
299
|
c,
|
|
300
|
+
showSaveAndShare,
|
|
159
301
|
handlePreview,
|
|
160
302
|
handleReset,
|
|
161
303
|
handleSave,
|
|
162
|
-
|
|
304
|
+
handleSaveAndShare,
|
|
305
|
+
handleResetAndShare,
|
|
163
306
|
renderHeader,
|
|
164
307
|
renderContent
|
|
165
308
|
};
|
|
@@ -186,6 +329,27 @@ const CustomTheme = /* @__PURE__ */ defineComponent({
|
|
|
186
329
|
"onClick": this.handleReset
|
|
187
330
|
}, _isSlot(_slot5 = ibiz.i18n.t("control.common.customTheme.reset")) ? _slot5 : {
|
|
188
331
|
default: () => [_slot5]
|
|
332
|
+
}), this.showSaveAndShare && createVNode(resolveComponent("el-dropdown"), {
|
|
333
|
+
"split-button": true,
|
|
334
|
+
"type": "primary",
|
|
335
|
+
"trigger": "click"
|
|
336
|
+
}, {
|
|
337
|
+
default: () => {
|
|
338
|
+
return ibiz.i18n.t("control.common.customTheme.adminOperation");
|
|
339
|
+
},
|
|
340
|
+
dropdown: () => {
|
|
341
|
+
return createVNode(resolveComponent("el-dropdown-menu"), null, {
|
|
342
|
+
default: () => [createVNode(resolveComponent("el-dropdown-item"), null, {
|
|
343
|
+
default: () => [createVNode("span", {
|
|
344
|
+
"onClick": this.handleSaveAndShare
|
|
345
|
+
}, [ibiz.i18n.t("control.common.customTheme.saveAndShare")])]
|
|
346
|
+
}), createVNode(resolveComponent("el-dropdown-item"), null, {
|
|
347
|
+
default: () => [createVNode("span", {
|
|
348
|
+
"onClick": this.handleResetAndShare
|
|
349
|
+
}, [ibiz.i18n.t("control.common.customTheme.resetAndShare")])]
|
|
350
|
+
})]
|
|
351
|
+
});
|
|
352
|
+
}
|
|
189
353
|
})])]);
|
|
190
354
|
}
|
|
191
355
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-no-data{width:100%;height:100
|
|
1
|
+
.ibiz-no-data{--ibiz-no-data-min-height:200px;--ibiz-no-data-max-height:100%;width:100%;height:100%;min-height:var(--ibiz-no-data-min-height);max-height:var(--ibiz-no-data-max-height);--el-empty-bottom-margin-top:0}.ibiz-no-data .el-empty__description p{color:var(--ibiz-color-text-0)}.ibiz-no-data .el-empty__image{flex:0;width:100%;max-width:var(--el-empty-image-width);height:inherit}.ibiz-no-data.hideImage{padding:0}.ibiz-no-data.hideImage .el-table__empty-text{line-height:30px}.ibiz-no-data.hideImage .el-empty__image{display:none}
|
|
@@ -10,7 +10,7 @@ export declare const IBizNoData: import("vue").DefineComponent<{
|
|
|
10
10
|
type: PropType<ILanguageRes>;
|
|
11
11
|
default: undefined;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
hideNoDataImage: {
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
@@ -26,12 +26,12 @@ export declare const IBizNoData: import("vue").DefineComponent<{
|
|
|
26
26
|
type: PropType<ILanguageRes>;
|
|
27
27
|
default: undefined;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
hideNoDataImage: {
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
33
|
}>>, {
|
|
34
34
|
text: string;
|
|
35
35
|
emptyTextLanguageRes: ILanguageRes;
|
|
36
|
-
|
|
36
|
+
hideNoDataImage: boolean;
|
|
37
37
|
}, {}>;
|
|
@@ -14,7 +14,7 @@ const IBizNoData = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
type: Object,
|
|
15
15
|
default: void 0
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
hideNoDataImage: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: false
|
|
20
20
|
}
|
|
@@ -32,7 +32,7 @@ const IBizNoData = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
},
|
|
33
33
|
render() {
|
|
34
34
|
return createVNode(resolveComponent("el-empty"), {
|
|
35
|
-
"class": [this.ns.b(), this.
|
|
35
|
+
"class": [this.ns.b(), this.hideNoDataImage ? "hideImage" : ""],
|
|
36
36
|
"description": this.label
|
|
37
37
|
}, {
|
|
38
38
|
default: () => {
|