@ibiz-template/vue3-components 0.6.2-dev.0 → 0.6.3
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-IsmrW_d0.js +1 -0
- package/dist/index-9YFoUwI0.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-HHwgsM7j.js → xlsx-util-c9vmypX3.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/action-toolbar/action-toolbar.mjs +6 -2
- package/es/common/carousel/carousel.css +1 -0
- package/es/common/carousel/carousel.d.ts +133 -0
- package/es/common/carousel/carousel.mjs +78 -0
- package/es/common/index.mjs +2 -0
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.mjs +22 -19
- package/es/control/caption-bar/caption-bar.d.ts +1 -1
- package/es/control/caption-bar/caption-bar.mjs +3 -8
- package/es/control/chart/chart.css +1 -1
- package/es/control/chart/chart.mjs +5 -2
- package/es/control/dashboard/dashboard.mjs +3 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +7 -0
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.d.ts +1 -0
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +51 -12
- package/es/control/form/form-detail/form-tab-panel/index.d.ts +1 -0
- package/es/control/gantt/gantt.css +1 -1
- package/es/control/gantt/gantt.mjs +2 -1
- package/es/control/search-bar/index.d.ts +1 -0
- package/es/control/search-bar/search-bar.d.ts +1 -0
- package/es/control/search-bar/search-bar.mjs +10 -0
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +16 -9
- package/es/editor/carousel/carousel-editor.controller.d.ts +10 -0
- package/es/editor/carousel/carousel-editor.controller.mjs +7 -0
- package/es/editor/carousel/carousel-editor.provider.d.ts +17 -0
- package/es/editor/carousel/carousel-editor.provider.mjs +22 -0
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.css +0 -0
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +76 -0
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +64 -0
- package/es/editor/carousel/index.d.ts +3 -0
- package/es/editor/carousel/index.mjs +5 -0
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +20 -6
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +1 -0
- package/es/editor/index.mjs +8 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-static-carousel/index.d.ts +31 -0
- package/es/panel-component/panel-static-carousel/index.mjs +18 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.css +0 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +34 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +80 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.provider.d.ts +15 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.provider.mjs +21 -0
- package/es/panel-component/user-message/index.d.ts +2 -2
- package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.css +1 -1
- package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.mjs +9 -3
- package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.d.ts +1 -0
- package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.mjs +8 -1
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +20 -1
- package/es/panel-component/user-message/user-message.d.ts +2 -2
- package/es/panel-component/user-message/user-message.mjs +32 -5
- package/es/util/app-modal/app-modal-component.d.ts +1 -0
- package/es/util/app-modal/app-modal-component.mjs +1 -1
- package/es/util/notification-util/notification-util.d.ts +1 -0
- package/es/util/notification-util/notification-util.mjs +4 -0
- package/es/view-engine/calendar-view.engine.d.ts +3 -1
- package/es/view-engine/calendar-view.engine.mjs +11 -0
- package/es/view-engine/gantt-view.engine.d.ts +2 -1
- package/es/view-engine/gantt-view.engine.mjs +3 -0
- package/es/view-engine/opt-view.engine.mjs +1 -1
- package/es/view-engine/tree-grid-view.engine.d.ts +1 -0
- package/es/view-engine/tree-grid-view.engine.mjs +8 -0
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +2 -1
- package/lib/common/action-toolbar/action-toolbar.cjs +6 -2
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/carousel/carousel.cjs +80 -0
- package/lib/common/carousel/carousel.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/calendar/calendar.cjs +22 -19
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/caption-bar/caption-bar.cjs +3 -8
- package/lib/control/chart/chart.cjs +5 -2
- package/lib/control/chart/chart.css +1 -1
- package/lib/control/dashboard/dashboard.cjs +2 -0
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +50 -11
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/lib/control/gantt/gantt.cjs +2 -1
- package/lib/control/gantt/gantt.css +1 -1
- package/lib/control/search-bar/search-bar.cjs +10 -0
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +15 -8
- package/lib/editor/carousel/carousel-editor.controller.cjs +9 -0
- package/lib/editor/carousel/carousel-editor.provider.cjs +24 -0
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +66 -0
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.css +0 -0
- package/lib/editor/carousel/index.cjs +11 -0
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +20 -6
- package/lib/editor/index.cjs +8 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-static-carousel/index.cjs +23 -0
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +82 -0
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.css +0 -0
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.provider.cjs +23 -0
- package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.cjs +8 -2
- package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.css +1 -1
- package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.cjs +8 -1
- package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +19 -0
- package/lib/panel-component/user-message/user-message.cjs +30 -3
- package/lib/util/app-modal/app-modal-component.cjs +1 -1
- package/lib/util/notification-util/notification-util.cjs +4 -0
- package/lib/view-engine/calendar-view.engine.cjs +11 -0
- package/lib/view-engine/gantt-view.engine.cjs +3 -0
- package/lib/view-engine/opt-view.engine.cjs +1 -1
- package/lib/view-engine/tree-grid-view.engine.cjs +8 -0
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +2 -1
- package/package.json +8 -8
- package/dist/chart-fWcrZRts.js +0 -1
- package/dist/index-NdPkOMvL.js +0 -4
|
@@ -23,9 +23,14 @@ const FormTabPanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
23
|
required: true
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
setup(props
|
|
26
|
+
setup(props, {
|
|
27
|
+
slots
|
|
28
|
+
}) {
|
|
27
29
|
const ns = vue3Util.useNamespace("form-tab-panel");
|
|
28
30
|
vue3Util.useController(props.controller);
|
|
31
|
+
let counter = null;
|
|
32
|
+
const counterData = vue.reactive({});
|
|
33
|
+
const counterRefId = vue.ref("");
|
|
29
34
|
const onTabClick = (tabIns, event) => {
|
|
30
35
|
props.controller.onTabChange(tabIns.props.name);
|
|
31
36
|
const pageC = props.controller.form.details[tabIns.props.name];
|
|
@@ -33,20 +38,51 @@ const FormTabPanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
33
38
|
pageC.onClick(event);
|
|
34
39
|
}
|
|
35
40
|
};
|
|
41
|
+
vue.onMounted(() => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
const defaultSlots = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
|
|
44
|
+
for (let i = 0; i < defaultSlots.length; i++) {
|
|
45
|
+
const slot = defaultSlots[i];
|
|
46
|
+
const pagePropsC = (_b = slot.props) == null ? void 0 : _b.controller;
|
|
47
|
+
if (pagePropsC && pagePropsC.model && pagePropsC.model.appCounterRefId) {
|
|
48
|
+
counterRefId.value = pagePropsC.model.appCounterRefId;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (counterRefId.value) {
|
|
53
|
+
counter = props.controller.getCounter(counterRefId.value);
|
|
54
|
+
if (counter) {
|
|
55
|
+
counter.onChange((data) => {
|
|
56
|
+
counterData.value = data;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
vue.onUnmounted(() => {
|
|
62
|
+
counter == null ? void 0 : counter.destroy();
|
|
63
|
+
});
|
|
36
64
|
return {
|
|
37
65
|
ns,
|
|
38
|
-
onTabClick
|
|
66
|
+
onTabClick,
|
|
67
|
+
counterData
|
|
39
68
|
};
|
|
40
69
|
},
|
|
41
70
|
render() {
|
|
42
71
|
var _a, _b;
|
|
43
|
-
let
|
|
72
|
+
let _slot2;
|
|
44
73
|
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
74
|
+
const renderItemText = (c) => {
|
|
75
|
+
return vue.createVNode("span", {
|
|
76
|
+
"class": [this.ns.b("tab-item-content"), ...c.labelClass]
|
|
77
|
+
}, [c.model.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
78
|
+
"icon": c.model.sysImage
|
|
79
|
+
}, null), c.model.showCaption && c.model.caption]);
|
|
80
|
+
};
|
|
45
81
|
return vue.createVNode(vue.resolveComponent("el-tabs"), {
|
|
46
82
|
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), ...this.controller.containerClass],
|
|
47
83
|
"model-value": this.controller.state.activeTab,
|
|
48
84
|
"onTabClick": this.onTabClick
|
|
49
|
-
}, _isSlot(
|
|
85
|
+
}, _isSlot(_slot2 = defaultSlots.map((slot) => {
|
|
50
86
|
const props = slot.props;
|
|
51
87
|
if (!props || !props.controller) {
|
|
52
88
|
return slot;
|
|
@@ -63,15 +99,18 @@ const FormTabPanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
99
|
}, {
|
|
64
100
|
default: () => slot,
|
|
65
101
|
label: () => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
102
|
+
let _slot;
|
|
103
|
+
return c.model.counterId ? vue.createVNode(vue.resolveComponent("el-badge"), {
|
|
104
|
+
"class": this.ns.e("badge"),
|
|
105
|
+
"value": this.counterData.value[c.model.counterId],
|
|
106
|
+
"hidden": !this.counterData.value[c.model.counterId] || this.counterData.value[c.model.counterId] === 0
|
|
107
|
+
}, _isSlot(_slot = renderItemText(c)) ? _slot : {
|
|
108
|
+
default: () => [_slot]
|
|
109
|
+
}) : renderItemText(c);
|
|
71
110
|
}
|
|
72
111
|
});
|
|
73
|
-
})) ?
|
|
74
|
-
default: () => [
|
|
112
|
+
})) ? _slot2 : {
|
|
113
|
+
default: () => [_slot2]
|
|
75
114
|
});
|
|
76
115
|
}
|
|
77
116
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-form-tab-panel{width:100%;height:100%;--ibiz-form-tab-panel-font-size:var(--ibiz-font-size-header-4);--ibiz-form-tab-panel-header-border-color:var(--ibiz-color-border);--ibiz-form-tab-panel-text-color:var(--ibiz-color-text-2);--ibiz-form-tab-panel-bg-color:transparent;--ibiz-form-tab-panel-hover-text-color:var(--ibiz-color-primary);--ibiz-form-tab-panel-hover-bg-color:transparent;--ibiz-form-tab-panel-active-text-color:var(--ibiz-color-primary);--ibiz-form-tab-panel-active-bg-color:transparent;--ibiz-form-tab-panel-active-border-color:var(--ibiz-color-primary)}.ibiz-form-tab-panel>.el-tabs__header.is-top{margin-bottom:var(--ibiz-spacing-tight)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top{font-size:var(--ibiz-form-tab-panel-font-size);color:var(--ibiz-form-tab-panel-text-color);background-color:var(--ibiz-form-tab-panel-bg-color)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top:hover{color:var(--ibiz-form-tab-panel-hover-text-color);background-color:var(--ibiz-form-tab-panel-hover-bg-color)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top.is-active{color:var(--ibiz-form-tab-panel-active-text-color);background-color:var(--ibiz-form-tab-panel-active-bg-color)}.ibiz-form-tab-panel .el-tabs__nav-wrap::after{background-color:var(--ibiz-form-tab-panel-header-border-color)}.ibiz-form-tab-panel .el-tabs__active-bar{background-color:var(--ibiz-form-tab-panel-active-border-color)}
|
|
1
|
+
.ibiz-form-tab-panel{width:100%;height:100%;--ibiz-form-tab-panel-font-size:var(--ibiz-font-size-header-4);--ibiz-form-tab-panel-header-border-color:var(--ibiz-color-border);--ibiz-form-tab-panel-text-color:var(--ibiz-color-text-2);--ibiz-form-tab-panel-bg-color:transparent;--ibiz-form-tab-panel-hover-text-color:var(--ibiz-color-primary);--ibiz-form-tab-panel-hover-bg-color:transparent;--ibiz-form-tab-panel-active-text-color:var(--ibiz-color-primary);--ibiz-form-tab-panel-active-bg-color:transparent;--ibiz-form-tab-panel-active-border-color:var(--ibiz-color-primary)}.ibiz-form-tab-panel>.el-tabs__header.is-top{margin-bottom:var(--ibiz-spacing-tight)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top{font-size:var(--ibiz-form-tab-panel-font-size);color:var(--ibiz-form-tab-panel-text-color);background-color:var(--ibiz-form-tab-panel-bg-color)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top:hover{color:var(--ibiz-form-tab-panel-hover-text-color);background-color:var(--ibiz-form-tab-panel-hover-bg-color)}.ibiz-form-tab-panel>.el-tabs__header.is-top .el-tabs__item.is-top.is-active{color:var(--ibiz-form-tab-panel-active-text-color);background-color:var(--ibiz-form-tab-panel-active-bg-color)}.ibiz-form-tab-panel .el-tabs__nav-wrap::after{background-color:var(--ibiz-form-tab-panel-header-border-color)}.ibiz-form-tab-panel .el-tabs__active-bar{background-color:var(--ibiz-form-tab-panel-active-border-color)}.ibiz-form-tab-panel__badge .el-badge__content{padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);background-color:var(--ibiz-color-danger)}
|
|
@@ -268,7 +268,6 @@ const GanttControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
268
268
|
"label": caption,
|
|
269
269
|
"prop": codeName,
|
|
270
270
|
"width": width && width > 30 ? width : 30,
|
|
271
|
-
"ellipsis": true,
|
|
272
271
|
"center": (align == null ? void 0 : align.toLowerCase()) === "center"
|
|
273
272
|
}, {
|
|
274
273
|
title: ({
|
|
@@ -359,6 +358,8 @@ const GanttControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
359
358
|
"style": {
|
|
360
359
|
background: sliderColor.value[row._nodeId]
|
|
361
360
|
},
|
|
361
|
+
"onClick": (evt) => onNodeClick(row, evt),
|
|
362
|
+
"onDblclick": () => onNodeDbClick(row),
|
|
362
363
|
"onContextmenu": (evt) => onNodeContextmenu(row, evt)
|
|
363
364
|
}, null);
|
|
364
365
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-gantt{height:100
|
|
1
|
+
.ibiz-control-gantt{width:100%;height:100%}.ibiz-control-gantt .xg-root .xg-table-body .xg-table-row{cursor:pointer}.ibiz-control-gantt .xg-root .xg-table-body .xg-table-row .xg-table-cell:not(:first-child)>div{padding:0}.ibiz-control-gantt .xg-root .xg-table-cell>div{width:100%}.ibiz-control-gantt .xg-root .xg-table-cell>div .cell{height:100%}.ibiz-control-gantt--empty .xg-table-body{height:calc(100% - 86px)!important}.ibiz-control-gantt__slider{height:100%;padding:0 12px;cursor:pointer;border-radius:4px}.ibiz-control-gantt__slider--container-title .icon{margin-right:6px}.ibiz-control-gantt__slider--container-title .number{display:flex;align-items:center}.ibiz-control-gantt__slider--container-title .caption{margin:8px;font-size:16px;font-weight:400}.ibiz-control-gantt__slider--container-content{display:flex;justify-content:space-between}.ibiz-control-gantt__slider--container-content .caption{margin:4px;color:var(--ibiz-color-disabled-text)}.ibiz-control-gantt__slider--container-content .detail{display:flex;flex-direction:column;flex-grow:1;align-items:center}.ibiz-control-gantt .ibiz-tree-grid-ex-field-column--ellipsis .ibiz-tree-grid-ex-field-column-text-container{min-width:0}.ibiz-control-gantt .ibiz-tree-grid-ex-field-column-toolbar-container{flex-shrink:0}.ibiz-control-gantt .ibiz-tree-grid-ex-edit-column__editor{min-height:32px}
|
|
@@ -29,9 +29,17 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
29
|
var _a;
|
|
30
30
|
const c = vue3Util.useControlController((...args) => new runtime.SearchBarController(...args));
|
|
31
31
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
32
|
+
let isSearch = false;
|
|
32
33
|
const onSearch = () => {
|
|
34
|
+
isSearch = true;
|
|
33
35
|
c.onSearch();
|
|
34
36
|
};
|
|
37
|
+
const onClear = () => {
|
|
38
|
+
if (isSearch === true) {
|
|
39
|
+
isSearch = false;
|
|
40
|
+
c.onSearch();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
35
43
|
const onKeydown = (e) => {
|
|
36
44
|
if (e.code === "Enter") {
|
|
37
45
|
onSearch();
|
|
@@ -93,6 +101,7 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
93
101
|
ns,
|
|
94
102
|
cssVars,
|
|
95
103
|
filterButtonRef,
|
|
104
|
+
onClear,
|
|
96
105
|
onSearch,
|
|
97
106
|
onKeydown,
|
|
98
107
|
onGroupClick,
|
|
@@ -133,6 +142,7 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
133
142
|
"placeholder": this.c.placeHolder,
|
|
134
143
|
"clearable": true,
|
|
135
144
|
"onKeydown": this.onKeydown,
|
|
145
|
+
"onClear": this.onClear,
|
|
136
146
|
"suffix-icon": vue.createVNode("ion-icon", {
|
|
137
147
|
"onClick": this.onSearch,
|
|
138
148
|
"class": this.ns.e("search-icon"),
|
|
@@ -42,17 +42,24 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
42
42
|
};
|
|
43
43
|
const tabPosition = ((_a = c.view.model.tabLayout) == null ? void 0 : _a.toLowerCase()) || "top";
|
|
44
44
|
const route = vueRouter.useRoute();
|
|
45
|
+
let expViewRoutePath = "";
|
|
46
|
+
if (c.routeDepth) {
|
|
47
|
+
expViewRoutePath = vue3Util.getNestedRoutePath(route, c.routeDepth);
|
|
48
|
+
}
|
|
45
49
|
vue.watch(() => route.fullPath, (newVal, oldVal) => {
|
|
46
50
|
if (newVal !== oldVal) {
|
|
47
|
-
const depth = c.
|
|
51
|
+
const depth = c.routeDepth;
|
|
48
52
|
if (depth) {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
c.
|
|
53
|
+
const currentRoutePath = vue3Util.getNestedRoutePath(route, c.routeDepth);
|
|
54
|
+
if (currentRoutePath === expViewRoutePath) {
|
|
55
|
+
const routePath = vue3Util.route2routePath(route);
|
|
56
|
+
const {
|
|
57
|
+
srfnav
|
|
58
|
+
} = routePath.pathNodes[depth - 1];
|
|
59
|
+
if (srfnav && c.state.activeName && c.state.activeName !== srfnav) {
|
|
60
|
+
c.state.activeName = srfnav;
|
|
61
|
+
c.handleTabChange();
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var carouselEditor_controller = require('./carousel-editor.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class CarouselEditorProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "formEditor", "IBizCarousel");
|
|
15
|
+
__publicField(this, "gridEditor", "IBizCarousel");
|
|
16
|
+
}
|
|
17
|
+
async createController(editorModel, parentController) {
|
|
18
|
+
const c = new carouselEditor_controller.CarouselEditorController(editorModel, parentController);
|
|
19
|
+
await c.init();
|
|
20
|
+
return c;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.CarouselEditorProvider = CarouselEditorProvider;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./ibiz-carousel.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizCarousel",
|
|
10
|
+
props: vue3Util.getDatePickerProps(),
|
|
11
|
+
emits: vue3Util.getEditorEmits(),
|
|
12
|
+
setup(props) {
|
|
13
|
+
const ns = vue3Util.useNamespace("carousel");
|
|
14
|
+
const c = props.controller;
|
|
15
|
+
const editorModel = c.model;
|
|
16
|
+
const carouselData = vue.ref([]);
|
|
17
|
+
const isAuto = vue.ref(true);
|
|
18
|
+
const timeSpan = vue.ref(3e3);
|
|
19
|
+
const downloadUrl = vue.ref("");
|
|
20
|
+
vue.watch(() => props.value, (newVal) => {
|
|
21
|
+
if (typeof newVal === "string") {
|
|
22
|
+
carouselData.value = !newVal ? [] : JSON.parse(newVal);
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
immediate: true
|
|
26
|
+
});
|
|
27
|
+
vue.watch(() => props.data, (newVal) => {
|
|
28
|
+
if (newVal) {
|
|
29
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
|
|
30
|
+
downloadUrl.value = urls.downloadUrl;
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
immediate: true,
|
|
34
|
+
deep: true
|
|
35
|
+
});
|
|
36
|
+
vue.watch(carouselData, (newVal) => {
|
|
37
|
+
if ((newVal == null ? void 0 : newVal.length) && downloadUrl.value) {
|
|
38
|
+
newVal.forEach((carousel) => {
|
|
39
|
+
carousel.imgUrl = carousel.imgUrl || downloadUrl.value.replace("%fileId%", carousel.id);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
immediate: true
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
ns,
|
|
47
|
+
c,
|
|
48
|
+
editorModel,
|
|
49
|
+
downloadUrl,
|
|
50
|
+
carouselData,
|
|
51
|
+
isAuto,
|
|
52
|
+
timeSpan
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
render() {
|
|
56
|
+
return vue.createVNode("div", {
|
|
57
|
+
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.e(this.editorModel.editorType)]
|
|
58
|
+
}, [vue.createVNode(vue.resolveComponent("iBizCarouselComponent"), {
|
|
59
|
+
"carouselData": this.carouselData,
|
|
60
|
+
"isAuto": this.isAuto,
|
|
61
|
+
"timeSpan": this.timeSpan
|
|
62
|
+
}, null)]);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
exports.IBizCarousel = IBizCarousel;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ibizCarousel = require('./ibiz-carousel/ibiz-carousel.cjs');
|
|
4
|
+
var carouselEditor_controller = require('./carousel-editor.controller.cjs');
|
|
5
|
+
var carouselEditor_provider = require('./carousel-editor.provider.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
exports.IBizCarousel = ibizCarousel.IBizCarousel;
|
|
10
|
+
exports.CarouselEditorController = carouselEditor_controller.CarouselEditorController;
|
|
11
|
+
exports.CarouselEditorProvider = carouselEditor_provider.CarouselEditorProvider;
|
|
@@ -200,6 +200,25 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
200
200
|
};
|
|
201
201
|
},
|
|
202
202
|
render() {
|
|
203
|
+
const itemContent = (item) => {
|
|
204
|
+
var _a;
|
|
205
|
+
const panel = (_a = this.c.deACMode) == null ? void 0 : _a.itemLayoutPanel;
|
|
206
|
+
const {
|
|
207
|
+
context,
|
|
208
|
+
params
|
|
209
|
+
} = this.c;
|
|
210
|
+
return panel ? vue.createVNode(vue.resolveComponent("iBizControlShell"), {
|
|
211
|
+
"data": item,
|
|
212
|
+
"modelData": panel,
|
|
213
|
+
"context": context,
|
|
214
|
+
"params": params
|
|
215
|
+
}, null) : vue.createVNode("div", {
|
|
216
|
+
"class": this.ns.e("transfer-item"),
|
|
217
|
+
"onClick": () => {
|
|
218
|
+
this.onACSelect(item);
|
|
219
|
+
}
|
|
220
|
+
}, [item[this.c.textName]]);
|
|
221
|
+
};
|
|
203
222
|
const editContent = this.c.noAC ? vue.createVNode(vue.resolveComponent("el-input"), {
|
|
204
223
|
"ref": "editorRef",
|
|
205
224
|
"class": [this.ns.b("input")],
|
|
@@ -252,12 +271,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
252
271
|
if (this.$slots.append) {
|
|
253
272
|
return this.$slots.append({});
|
|
254
273
|
}
|
|
255
|
-
return
|
|
256
|
-
"class": this.ns.e("transfer-item"),
|
|
257
|
-
"onClick": () => {
|
|
258
|
-
this.onACSelect(item);
|
|
259
|
-
}
|
|
260
|
-
}, [item[this.c.textName]]);
|
|
274
|
+
return itemContent(item);
|
|
261
275
|
},
|
|
262
276
|
suffix: () => {
|
|
263
277
|
if (this.c.noButton) {
|
package/lib/editor/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ require('./array/index.cjs');
|
|
|
30
30
|
require('./cascader/index.cjs');
|
|
31
31
|
require('./color-picker/index.cjs');
|
|
32
32
|
require('./preset/index.cjs');
|
|
33
|
+
require('./carousel/index.cjs');
|
|
33
34
|
require('./user/ibiz-searchcond-edit/index.cjs');
|
|
34
35
|
var span = require('./span/span/span.cjs');
|
|
35
36
|
var spanLink = require('./span/span-link/span-link.cjs');
|
|
@@ -65,6 +66,7 @@ var ibizCascader = require('./cascader/ibiz-cascader/ibiz-cascader.cjs');
|
|
|
65
66
|
var ibizColorPicker = require('./color-picker/ibiz-color-picker/ibiz-color-picker.cjs');
|
|
66
67
|
var ibizPresetRawitem = require('./preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.cjs');
|
|
67
68
|
var ibizSearchcondEdit = require('./user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs');
|
|
69
|
+
var ibizCarousel = require('./carousel/ibiz-carousel/ibiz-carousel.cjs');
|
|
68
70
|
var spanEditor_provider = require('./span/span-editor.provider.cjs');
|
|
69
71
|
var textBoxEditor_provider = require('./text-box/text-box-editor.provider.cjs');
|
|
70
72
|
var dropdownListEditor_provider = require('./dropdown-list/dropdown-list-editor.provider.cjs');
|
|
@@ -90,6 +92,7 @@ var arrayEditor_provider = require('./array/array-editor.provider.cjs');
|
|
|
90
92
|
var cascaderEditor_provider = require('./cascader/cascader-editor.provider.cjs');
|
|
91
93
|
var colorPickerEditor_provider = require('./color-picker/color-picker-editor.provider.cjs');
|
|
92
94
|
var ibizSearchcondEdit_provider = require('./user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.cjs');
|
|
95
|
+
var carouselEditor_provider = require('./carousel/carousel-editor.provider.cjs');
|
|
93
96
|
|
|
94
97
|
"use strict";
|
|
95
98
|
const IBizEditor = {
|
|
@@ -129,6 +132,7 @@ const IBizEditor = {
|
|
|
129
132
|
v.component(ibizColorPicker.IBizColorPicker.name, ibizColorPicker.IBizColorPicker);
|
|
130
133
|
v.component(ibizPresetRawitem.IBizPresetRawitem.name, ibizPresetRawitem.IBizPresetRawitem);
|
|
131
134
|
v.component(ibizSearchcondEdit.IBizSearchCondEdit.name, ibizSearchcondEdit.IBizSearchCondEdit);
|
|
135
|
+
v.component(ibizCarousel.IBizCarousel.name, ibizCarousel.IBizCarousel);
|
|
132
136
|
v.component(
|
|
133
137
|
"IBizHtml",
|
|
134
138
|
vue.defineAsyncComponent(() => Promise.resolve().then(function () { return require('./html/wang-editor/wang-editor.cjs'); }))
|
|
@@ -367,6 +371,10 @@ const IBizEditor = {
|
|
|
367
371
|
"AUTH_PASSWORD_PASSWORD",
|
|
368
372
|
() => textBoxEditorProvider
|
|
369
373
|
);
|
|
374
|
+
runtime.registerEditorProvider(
|
|
375
|
+
"FIELD_CAROUSEL_PICTURE",
|
|
376
|
+
() => new carouselEditor_provider.CarouselEditorProvider()
|
|
377
|
+
);
|
|
370
378
|
}
|
|
371
379
|
};
|
|
372
380
|
|
|
@@ -21,6 +21,7 @@ var index$7 = require('./index-actions/index.cjs');
|
|
|
21
21
|
var index$f = require('./user-message/index.cjs');
|
|
22
22
|
var index$g = require('./searchform-buttons/index.cjs');
|
|
23
23
|
var index$h = require('./view-message/index.cjs');
|
|
24
|
+
var index$i = require('./panel-static-carousel/index.cjs');
|
|
24
25
|
var navPosIndex_state = require('./nav-pos-index/nav-pos-index.state.cjs');
|
|
25
26
|
var navPosIndex_controller = require('./nav-pos-index/nav-pos-index.controller.cjs');
|
|
26
27
|
var panelButton_controller = require('./panel-button/panel-button.controller.cjs');
|
|
@@ -61,6 +62,7 @@ const IBizPanelComponents = {
|
|
|
61
62
|
v.use(index$g.IBizSearchFormButtons);
|
|
62
63
|
v.use(vue3Util.IBizPanelItemRender);
|
|
63
64
|
v.use(index$h.IBizViewMessage);
|
|
65
|
+
v.use(index$i.IBizPanelStaticCarousel);
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
var runtime = require('@ibiz-template/runtime');
|
|
7
|
+
var panelStaticCarousel = require('./panel-static-carousel.cjs');
|
|
8
|
+
var panelStaticCarousel_provider = require('./panel-static-carousel.provider.cjs');
|
|
9
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
const IBizPanelStaticCarousel = vue3Util.withInstall(
|
|
12
|
+
panelStaticCarousel.PanelStaticCarousel,
|
|
13
|
+
function(v) {
|
|
14
|
+
v.component(panelStaticCarousel.PanelStaticCarousel.name, panelStaticCarousel.PanelStaticCarousel);
|
|
15
|
+
runtime.registerPanelItemProvider(
|
|
16
|
+
"RAWITEM_STATIC_CAROUSEL",
|
|
17
|
+
() => new panelStaticCarousel_provider.PanelStaticCarouselProvider()
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
exports.IBizPanelStaticCarousel = IBizPanelStaticCarousel;
|
|
23
|
+
exports.default = IBizPanelStaticCarousel;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
require('./panel-static-carousel.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
name: "IBizPanelStaticCarousel",
|
|
11
|
+
props: {
|
|
12
|
+
modelData: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
controller: {
|
|
17
|
+
type: runtime.PanelItemController,
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(props) {
|
|
22
|
+
var _a;
|
|
23
|
+
const ns = vue3Util.useNamespace("panel-static-carousel");
|
|
24
|
+
const model = props.modelData;
|
|
25
|
+
const carouselData = vue.ref([]);
|
|
26
|
+
const isAuto = vue.ref(true);
|
|
27
|
+
const timeSpan = vue.ref(3e3);
|
|
28
|
+
const getSwipeConfig = (swipeData) => {
|
|
29
|
+
const autoPlay = swipeData.find((item) => Object.is(item.key, "autoplay"));
|
|
30
|
+
if (autoPlay) {
|
|
31
|
+
isAuto.value = !!Object.is(autoPlay.value, "1");
|
|
32
|
+
}
|
|
33
|
+
const span = swipeData.find((item) => Object.is(item.key, "timespan"));
|
|
34
|
+
if (span) {
|
|
35
|
+
timeSpan.value = Number(span.value) || 0;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
|
|
39
|
+
let swipeData = [];
|
|
40
|
+
const imgData = model.rawItem.rawItemParams;
|
|
41
|
+
const configItem = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
|
|
42
|
+
if (configItem > -1) {
|
|
43
|
+
swipeData = imgData.slice(0, -2);
|
|
44
|
+
getSwipeConfig(imgData.slice(-2));
|
|
45
|
+
} else {
|
|
46
|
+
swipeData = imgData;
|
|
47
|
+
getSwipeConfig(imgData);
|
|
48
|
+
}
|
|
49
|
+
carouselData.value = swipeData.map((item) => {
|
|
50
|
+
const {
|
|
51
|
+
id,
|
|
52
|
+
key,
|
|
53
|
+
sysImage
|
|
54
|
+
} = item;
|
|
55
|
+
return {
|
|
56
|
+
id,
|
|
57
|
+
name: key,
|
|
58
|
+
imgUrl: sysImage == null ? void 0 : sysImage.imagePath,
|
|
59
|
+
cssClass: sysImage == null ? void 0 : sysImage.cssClass,
|
|
60
|
+
linkPath: item.linkPath
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
ns,
|
|
66
|
+
carouselData,
|
|
67
|
+
isAuto,
|
|
68
|
+
timeSpan
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
render() {
|
|
72
|
+
return vue.createVNode("div", {
|
|
73
|
+
"class": this.ns.b()
|
|
74
|
+
}, [vue.createVNode(vue.resolveComponent("iBizCarouselComponent"), {
|
|
75
|
+
"carouselData": this.carouselData,
|
|
76
|
+
"isAuto": this.isAuto,
|
|
77
|
+
"timeSpan": this.timeSpan
|
|
78
|
+
}, null)]);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
exports.PanelStaticCarousel = PanelStaticCarousel;
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class PanelStaticCarouselProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "component", "IBizPanelStaticCarousel");
|
|
15
|
+
}
|
|
16
|
+
async createController(panelItem, panel, parent) {
|
|
17
|
+
const c = new runtime.PanelItemController(panelItem, panel, parent);
|
|
18
|
+
await c.init();
|
|
19
|
+
return c;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.PanelStaticCarouselProvider = PanelStaticCarouselProvider;
|
|
@@ -86,14 +86,20 @@ const InternalMessageContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
86
|
}, [(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), vue.createVNode("div", {
|
|
87
87
|
"class": this.ns.b("toolbar")
|
|
88
88
|
}, [this.finalToolbarItems.map((item) => {
|
|
89
|
-
return vue.createVNode("
|
|
89
|
+
return vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
90
90
|
"class": this.ns.be("toolbar", "button"),
|
|
91
|
-
"
|
|
91
|
+
"icon": {
|
|
92
|
+
imagePath: "svg/read.svg"
|
|
93
|
+
},
|
|
94
|
+
"baseDir": "iconfont",
|
|
92
95
|
"title": item.tooltip,
|
|
93
96
|
"onClick": (e) => this.onToolbarClick(e, item.key)
|
|
94
97
|
}, null);
|
|
95
98
|
})]), vue.createVNode("div", {
|
|
96
99
|
"class": this.ns.e("unread-tag")
|
|
100
|
+
}, null), this.isClickable && vue.createVNode("ion-icon", {
|
|
101
|
+
"class": this.ns.e("click-tag"),
|
|
102
|
+
"name": "chevron-forward-outline"
|
|
97
103
|
}, null)]);
|
|
98
104
|
}
|
|
99
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-internal-message-container{position:relative}.ibiz-internal-message-container--clickable{cursor:pointer}.ibiz-internal-message-container:hover .ibiz-internal-message-container-toolbar{display:block}.ibiz-internal-message-container__unread-tag{position:absolute;top:8px;right:8px;display:none;align-self:flex-start;width:10px;height:10px;background-color:var(--ibiz-color-danger);border-radius:50%}.ibiz-internal-message-container--unread .ibiz-internal-message-container__unread-tag{display:block}.ibiz-internal-message-container--unread:hover .ibiz-internal-message-container__unread-tag{display:none}.ibiz-internal-message-container-toolbar{position:absolute;top:0;right:0;display:none;padding:8px}.ibiz-internal-message-container-toolbar__button{margin-left:10px;
|
|
1
|
+
.ibiz-internal-message-container{position:relative}.ibiz-internal-message-container--clickable{cursor:pointer}.ibiz-internal-message-container:hover .ibiz-internal-message-container-toolbar{display:block}.ibiz-internal-message-container__unread-tag{position:absolute;top:8px;right:8px;display:none;align-self:flex-start;width:10px;height:10px;background-color:var(--ibiz-color-danger);border-radius:50%}.ibiz-internal-message-container__click-tag{position:absolute;top:50%;right:4px;font-size:18px;transform:translateY(-50%)}.ibiz-internal-message-container--unread .ibiz-internal-message-container__unread-tag{display:block}.ibiz-internal-message-container--unread:hover .ibiz-internal-message-container__unread-tag{display:none}.ibiz-internal-message-container-toolbar{position:absolute;top:0;right:0;display:none;padding:8px}.ibiz-internal-message-container-toolbar__button{margin-left:10px;cursor:pointer}.ibiz-internal-message-container-toolbar__button:hover{color:var(--ibiz-color-primary)}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var core = require('@ibiz-template/core');
|
|
4
4
|
var runtime = require('@ibiz-template/runtime');
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var vueRouter = require('vue-router');
|
|
6
7
|
var internalMessageDefault = require('./internal-message-default.cjs');
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
@@ -15,6 +16,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15
16
|
class InternalMessageDefaultProvider {
|
|
16
17
|
constructor() {
|
|
17
18
|
__publicField(this, "component", internalMessageDefault.InternalMessageDefault);
|
|
19
|
+
__publicField(this, "router", vueRouter.useRouter());
|
|
18
20
|
}
|
|
19
21
|
render(props) {
|
|
20
22
|
return vue.h(this.component, {
|
|
@@ -26,7 +28,12 @@ class InternalMessageDefaultProvider {
|
|
|
26
28
|
await ibiz.hub.notice.internalMessage.markRead(message);
|
|
27
29
|
const redirectUrl = ibiz.env.isMob ? message.mobile_url : message.url;
|
|
28
30
|
if (redirectUrl) {
|
|
29
|
-
|
|
31
|
+
if (redirectUrl.startsWith("view://")) {
|
|
32
|
+
this.openRedirectView(message, redirectUrl);
|
|
33
|
+
} else if (redirectUrl.startsWith("route://")) {
|
|
34
|
+
const routeUrl = "/".concat(redirectUrl.split("route://")[1]);
|
|
35
|
+
this.router.push(routeUrl);
|
|
36
|
+
}
|
|
30
37
|
return true;
|
|
31
38
|
}
|
|
32
39
|
return false;
|
|
@@ -25,11 +25,13 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
setup(props, {
|
|
26
26
|
emit
|
|
27
27
|
}) {
|
|
28
|
+
var _a;
|
|
28
29
|
const ns = vue3Util.useNamespace("internal-message-tab");
|
|
29
30
|
const hiddenPopover = () => {
|
|
30
31
|
emit("hiddenPopover");
|
|
31
32
|
};
|
|
32
33
|
const c = props.controller;
|
|
34
|
+
const unreadOnlyTag = "".concat((_a = ibiz.appData) == null ? void 0 : _a.context.srfsystemid, "-unreadOnly");
|
|
33
35
|
const hasNotice = vue.ref(false);
|
|
34
36
|
ibiz.mc.command.internalMessage.on(async (msg) => {
|
|
35
37
|
ibiz.log.debug("mqtt internalMessage: ", msg);
|
|
@@ -70,7 +72,24 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
70
72
|
};
|
|
71
73
|
const switchChange = () => {
|
|
72
74
|
c.toggleUnReadOnly();
|
|
75
|
+
localStorage.setItem(unreadOnlyTag, c.unreadOnly.toString());
|
|
73
76
|
};
|
|
77
|
+
const initUnreadOnly = () => {
|
|
78
|
+
const unreadOnlyStr = localStorage.getItem(unreadOnlyTag);
|
|
79
|
+
if (unreadOnlyStr) {
|
|
80
|
+
if (unreadOnlyStr === "true") {
|
|
81
|
+
state.unreadOnly = true;
|
|
82
|
+
c.unreadOnly = true;
|
|
83
|
+
} else {
|
|
84
|
+
state.unreadOnly = false;
|
|
85
|
+
c.unreadOnly = false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
vue.onMounted(() => {
|
|
90
|
+
initUnreadOnly();
|
|
91
|
+
c.load();
|
|
92
|
+
});
|
|
74
93
|
return {
|
|
75
94
|
ns,
|
|
76
95
|
allItems,
|