@ibiz-template/vue3-components 0.7.41-alpha.13 → 0.7.41-alpha.15
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/index-1hn7qv2s.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-3dojS1dZ.js +1 -0
- package/dist/{wang-editor-Iw-hqw1q.js → wang-editor-yDknWojV.js} +1 -1
- package/dist/{xlsx-util-FnTIZeKq.js → xlsx-util-8l4wyK1s.js} +1 -1
- package/es/common/carousel/carousel.css +1 -1
- package/es/common/map-chart/map-chart.mjs +6 -14
- package/es/control/calendar/calendar-util.d.ts +12 -0
- package/es/control/calendar/calendar-util.mjs +30 -1
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -0
- package/es/control/calendar/calendar.mjs +110 -26
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +2 -0
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +66 -16
- package/es/control/calendar/components/calendar-daily/index.d.ts +2 -0
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +3 -1
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +99 -44
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.d.ts +6 -0
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +74 -38
- package/es/control/calendar/components/calendar-week/index.d.ts +6 -0
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +12 -1
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +313 -155
- package/es/control/calendar/components/constant/event.d.ts +1 -0
- package/es/control/calendar/components/constant/event.mjs +2 -1
- package/es/control/calendar/components/constant/index.mjs +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.d.ts +2 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +8 -10
- package/es/control/calendar/components/custom-calendar/index.d.ts +2 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +4 -0
- package/es/control/calendar/components/interface/calendar-daily.d.ts +1 -0
- package/es/control/calendar/components/interface/calendar-daily.mjs +6 -1
- package/es/control/calendar/components/interface/calendar-week.d.ts +1 -0
- package/es/control/calendar/components/interface/calendar-week.mjs +2 -1
- package/es/control/calendar/components/interface/common.d.ts +20 -18
- package/es/control/calendar/components/interface/custom-calendar.d.ts +1 -0
- package/es/control/calendar/components/interface/custom-calendar.mjs +3 -2
- package/es/control/calendar/components/util/index.mjs +1 -1
- package/es/control/calendar/components/util/util.d.ts +20 -1
- package/es/control/calendar/components/util/util.mjs +10 -2
- package/es/control/calendar/index.d.ts +2 -0
- package/es/control/drbar/drbar.controller.d.ts +6 -0
- package/es/control/drbar/drbar.controller.mjs +8 -0
- package/es/control/drbar/drbar.mjs +6 -0
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +6 -0
- package/es/control/drtab/drtab.controller.mjs +9 -0
- package/es/control/drtab/drtab.mjs +13 -0
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.mjs +3 -1
- package/es/control/gantt/gantt.mjs +4 -1
- package/es/control/grid/virtualized-table/virtualized-table.css +1 -1
- package/es/control/grid/virtualized-table/virtualized-table.mjs +4 -3
- package/es/control/grid/virtualized-table/virtualized-table.util.mjs +4 -4
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.mjs +6 -9
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
- package/es/control/kanban/{lane-kanban/lane-kanban.d.ts → swimlane-kanban/swimlane-kanban.d.ts} +3 -2
- package/es/control/kanban/{lane-kanban/lane-kanban.mjs → swimlane-kanban/swimlane-kanban.mjs} +22 -29
- package/es/control/map/map.mjs +1 -1
- package/es/control/medit-view-panel/index.d.ts +2 -0
- package/es/control/medit-view-panel/medit-view-panel.d.ts +2 -0
- package/es/control/medit-view-panel/medit-view-panel.mjs +19 -6
- package/es/control/search-bar/search-bar.mjs +1 -1
- package/es/control/tab-exp-panel/index.d.ts +1 -0
- package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/es/control/tab-exp-panel/tab-exp-panel.d.ts +2 -1
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +21 -2
- package/es/control/tree/tree.mjs +4 -1
- package/es/editor/span/span/span.mjs +2 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/custom-view.engine.d.ts +1 -1
- package/es/view-engine/custom-view.engine.mjs +5 -5
- package/es/view-engine/de-index-view-engine.mjs +1 -1
- package/es/view-engine/edit-view.engine.mjs +1 -1
- package/es/view-engine/index.mjs +4 -0
- package/es/view-engine/md-custom-view.engine.d.ts +1 -1
- package/es/view-engine/md-custom-view.engine.mjs +5 -5
- package/es/view-engine/opt-view.engine.mjs +1 -1
- package/lib/common/carousel/carousel.css +1 -1
- package/lib/common/map-chart/map-chart.cjs +5 -13
- package/lib/control/calendar/calendar-util.cjs +30 -0
- package/lib/control/calendar/calendar.cjs +108 -24
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +64 -14
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +98 -43
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +73 -37
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +311 -153
- package/lib/control/calendar/components/constant/event.cjs +2 -0
- package/lib/control/calendar/components/constant/index.cjs +1 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +8 -10
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +4 -0
- package/lib/control/calendar/components/interface/calendar-daily.cjs +6 -1
- package/lib/control/calendar/components/interface/calendar-week.cjs +2 -1
- package/lib/control/calendar/components/interface/custom-calendar.cjs +2 -1
- package/lib/control/calendar/components/util/index.cjs +2 -0
- package/lib/control/calendar/components/util/util.cjs +11 -1
- package/lib/control/drbar/drbar.cjs +6 -0
- package/lib/control/drbar/drbar.controller.cjs +8 -0
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +13 -0
- package/lib/control/drtab/drtab.controller.cjs +9 -0
- package/lib/control/drtab/flow-drtab.cjs +3 -1
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/gantt/gantt.cjs +4 -1
- package/lib/control/grid/virtualized-table/virtualized-table.cjs +3 -2
- package/lib/control/grid/virtualized-table/virtualized-table.css +1 -1
- package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +4 -4
- package/lib/control/kanban/kanban.cjs +6 -9
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/{lane-kanban/lane-kanban.cjs → swimlane-kanban/swimlane-kanban.cjs} +22 -29
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
- package/lib/control/map/map.cjs +1 -1
- package/lib/control/medit-view-panel/medit-view-panel.cjs +19 -6
- package/lib/control/search-bar/search-bar.cjs +1 -1
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +20 -1
- package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/lib/control/tree/tree.cjs +4 -1
- package/lib/editor/span/span/span.cjs +2 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/custom-view.engine.cjs +5 -5
- package/lib/view-engine/de-index-view-engine.cjs +1 -1
- package/lib/view-engine/edit-view.engine.cjs +1 -1
- package/lib/view-engine/index.cjs +4 -0
- package/lib/view-engine/md-custom-view.engine.cjs +5 -5
- package/lib/view-engine/opt-view.engine.cjs +1 -1
- package/package.json +5 -5
- package/dist/index-LzKAcXeH.js +0 -4
- package/dist/map-chart-HL7emT5a.js +0 -1
- package/es/control/kanban/lane-kanban/lane-kanban.css +0 -1
- package/lib/control/kanban/lane-kanban/lane-kanban.css +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_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.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
package/es/control/kanban/{lane-kanban/lane-kanban.mjs → swimlane-kanban/swimlane-kanban.mjs}
RENAMED
|
@@ -2,14 +2,14 @@ import { isVNode, ref, computed, resolveComponent, createVNode, createTextVNode,
|
|
|
2
2
|
import { useNamespace, useUIStore } from '@ibiz-template/vue3-util';
|
|
3
3
|
import draggable from 'vuedraggable';
|
|
4
4
|
import { showTitle } from '@ibiz-template/core';
|
|
5
|
-
import './
|
|
5
|
+
import './swimlane-kanban.css';
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
8
|
function _isSlot(s) {
|
|
9
9
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
name: "
|
|
11
|
+
const SwimlaneKanban = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "IBizSwimlaneKanban",
|
|
13
13
|
components: {
|
|
14
14
|
draggable
|
|
15
15
|
},
|
|
@@ -24,7 +24,7 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
},
|
|
25
25
|
setup(props) {
|
|
26
26
|
var _a, _b;
|
|
27
|
-
const ns = useNamespace("
|
|
27
|
+
const ns = useNamespace("swimlane-kanban");
|
|
28
28
|
const c = props.controller;
|
|
29
29
|
const {
|
|
30
30
|
zIndex
|
|
@@ -35,25 +35,16 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
};
|
|
36
36
|
const expandAll = ref(true);
|
|
37
37
|
const dropdownKey = ref();
|
|
38
|
-
const cardStyle = computed(() => {
|
|
39
|
-
const {
|
|
40
|
-
cardWidth,
|
|
41
|
-
cardHeight
|
|
42
|
-
} = c.model;
|
|
43
|
-
const style = {};
|
|
44
|
-
if (cardWidth)
|
|
45
|
-
Object.assign(style, {
|
|
46
|
-
width: "".concat(cardWidth, "px")
|
|
47
|
-
});
|
|
48
|
-
if (cardHeight)
|
|
49
|
-
Object.assign(style, {
|
|
50
|
-
height: "".concat(cardHeight, "px")
|
|
51
|
-
});
|
|
52
|
-
return style;
|
|
53
|
-
});
|
|
54
38
|
const disabled = computed(() => {
|
|
55
39
|
return !c.state.draggable || c.draggableMode === 0 || c.state.updating || c.state.readonly;
|
|
56
40
|
});
|
|
41
|
+
const width = computed(() => {
|
|
42
|
+
const {
|
|
43
|
+
groupWidth,
|
|
44
|
+
cardWidth
|
|
45
|
+
} = c.model;
|
|
46
|
+
return groupWidth || cardWidth || 320;
|
|
47
|
+
});
|
|
57
48
|
const batchKey = computed(() => {
|
|
58
49
|
return c.state.batching ? c.state.selectGroupKey : "";
|
|
59
50
|
});
|
|
@@ -115,7 +106,7 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
115
106
|
};
|
|
116
107
|
const handleExpandAll = () => {
|
|
117
108
|
expandAll.value = !expandAll.value;
|
|
118
|
-
c.state.
|
|
109
|
+
c.state.swimlanes.forEach((lane) => {
|
|
119
110
|
lane.isExpand = expandAll.value;
|
|
120
111
|
});
|
|
121
112
|
};
|
|
@@ -317,7 +308,7 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
317
308
|
}, _isSlot(_slot2 = ibiz.i18n.t("control.kanban.selectAll")) ? _slot2 : {
|
|
318
309
|
default: () => [_slot2]
|
|
319
310
|
}), createVNode("span", {
|
|
320
|
-
"class": ns.
|
|
311
|
+
"class": ns.em("batch", "info"),
|
|
321
312
|
"innerHTML": ibiz.i18n.t("control.kanban.selectedDataCount", {
|
|
322
313
|
length: selectedData.length
|
|
323
314
|
})
|
|
@@ -347,7 +338,6 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
347
338
|
return createVNode(resolveComponent("el-card"), {
|
|
348
339
|
"shadow": "hover",
|
|
349
340
|
"class": [ns.e("card"), ns.is("selected", isSelected(element)), ns.is("disabled", c.state.draggable && c.state.updating)],
|
|
350
|
-
"body-style": cardStyle.value,
|
|
351
341
|
"onClick": () => c.onRowClick(element),
|
|
352
342
|
"onDblclick": () => c.onDbRowClick(element)
|
|
353
343
|
}, {
|
|
@@ -363,9 +353,7 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
363
353
|
const renderBody = () => {
|
|
364
354
|
return createVNode("div", {
|
|
365
355
|
"class": ns.e("body")
|
|
366
|
-
}, [
|
|
367
|
-
"class": ns.em("body", "scollor")
|
|
368
|
-
}, [c.state.lanes.map((lane, index) => {
|
|
356
|
+
}, [c.state.swimlanes.map((lane, index) => {
|
|
369
357
|
return createVNode("div", {
|
|
370
358
|
"class": [ns.em("body", "row"), ns.is("expand", lane.isExpand)]
|
|
371
359
|
}, [createVNode("div", {
|
|
@@ -389,21 +377,26 @@ const LaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
389
377
|
}, ["".concat(lane.count, " \u4E2A").concat(c.laneDescription)])])])]), c.state.groups.map((group) => {
|
|
390
378
|
return renderBodyCell(index, lane, group);
|
|
391
379
|
})]);
|
|
392
|
-
})])
|
|
380
|
+
})]);
|
|
393
381
|
};
|
|
394
382
|
return {
|
|
395
383
|
ns,
|
|
384
|
+
width,
|
|
396
385
|
renderHeader,
|
|
397
386
|
renderBody
|
|
398
387
|
};
|
|
399
388
|
},
|
|
400
389
|
render() {
|
|
390
|
+
var _a;
|
|
401
391
|
return createVNode("div", {
|
|
402
|
-
"class": this.ns.b()
|
|
392
|
+
"class": [this.ns.b(), this.ns.e((_a = this.controller.model.groupStyle) == null ? void 0 : _a.toLowerCase())],
|
|
393
|
+
"style": {
|
|
394
|
+
"--ibiz-swimlane-kanban-width": "".concat(this.width, "px")
|
|
395
|
+
}
|
|
403
396
|
}, [createVNode("div", {
|
|
404
397
|
"class": this.ns.e("table")
|
|
405
398
|
}, [this.renderHeader(), this.renderBody()])]);
|
|
406
399
|
}
|
|
407
400
|
});
|
|
408
401
|
|
|
409
|
-
export {
|
|
402
|
+
export { SwimlaneKanban };
|
package/es/control/map/map.mjs
CHANGED
|
@@ -16,6 +16,8 @@ export declare const IBizMEditViewPanelControl: import("@ibiz-template/vue3-util
|
|
|
16
16
|
ns: import("@ibiz-template/core").Namespace;
|
|
17
17
|
panelContent: import("vue").Ref<Element | null>;
|
|
18
18
|
handleDelete: (item: import("@ibiz-template/runtime").IPanelUiItem) => void;
|
|
19
|
+
onTabChange: (name: string) => void;
|
|
20
|
+
handleTabDelete: (item: import("@ibiz-template/runtime").IPanelUiItem, event: MouseEvent) => void;
|
|
19
21
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
22
|
modelData: {
|
|
21
23
|
type: import("vue").PropType<import("@ibiz/model-core").IDEMultiEditViewPanel>;
|
|
@@ -30,6 +30,8 @@ export declare const MEditViewPanelControl: import("vue").DefineComponent<{
|
|
|
30
30
|
ns: import("@ibiz-template/core").Namespace;
|
|
31
31
|
panelContent: Ref<Element | null>;
|
|
32
32
|
handleDelete: (item: IPanelUiItem) => void;
|
|
33
|
+
onTabChange: (name: string) => void;
|
|
34
|
+
handleTabDelete: (item: IPanelUiItem, event: MouseEvent) => void;
|
|
33
35
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
36
|
/**
|
|
35
37
|
* @description 多编辑视图面板模型数据
|
|
@@ -42,6 +42,14 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
const handleDelete = (item) => {
|
|
43
43
|
c.handleDelete(item);
|
|
44
44
|
};
|
|
45
|
+
const onTabChange = (name) => {
|
|
46
|
+
c.state.activeTab = name;
|
|
47
|
+
c.onTabChange(name);
|
|
48
|
+
};
|
|
49
|
+
const handleTabDelete = (item, event) => {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
c.handleDelete(item);
|
|
52
|
+
};
|
|
45
53
|
onMounted(() => {
|
|
46
54
|
if (panelContent.value) {
|
|
47
55
|
mutationObserver = new MutationObserver(() => {
|
|
@@ -74,7 +82,9 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
74
82
|
c,
|
|
75
83
|
ns,
|
|
76
84
|
panelContent,
|
|
77
|
-
handleDelete
|
|
85
|
+
handleDelete,
|
|
86
|
+
onTabChange,
|
|
87
|
+
handleTabDelete
|
|
78
88
|
};
|
|
79
89
|
},
|
|
80
90
|
render() {
|
|
@@ -84,8 +94,9 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
84
94
|
return createVNode(resolveComponent("el-tabs"), {
|
|
85
95
|
"class": this.ns.b("tabs"),
|
|
86
96
|
"modelValue": this.c.state.activeTab,
|
|
87
|
-
"onUpdate:modelValue": ($event) => this.c.state.activeTab = $event
|
|
88
|
-
|
|
97
|
+
"onUpdate:modelValue": ($event) => this.c.state.activeTab = $event,
|
|
98
|
+
"onTabChange": this.onTabChange
|
|
99
|
+
}, _isSlot(_slot = this.c.state.panelUiItems.map((item) => {
|
|
89
100
|
return createVNode(resolveComponent("el-tab-pane"), {
|
|
90
101
|
"key": item.id + item.srfmajortext,
|
|
91
102
|
"name": item.id
|
|
@@ -95,7 +106,7 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
95
106
|
"class": this.ns.b("tab-label")
|
|
96
107
|
}, [createVNode("span", null, [item.srfmajortext]), createVNode("ion-icon", {
|
|
97
108
|
"name": "close-outline",
|
|
98
|
-
"onClick": () => this.
|
|
109
|
+
"onClick": (event) => this.handleTabDelete(item, event)
|
|
99
110
|
}, null)]);
|
|
100
111
|
},
|
|
101
112
|
default: () => {
|
|
@@ -103,7 +114,8 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
103
114
|
context: item.context,
|
|
104
115
|
params: item.params,
|
|
105
116
|
viewId: this.c.model.embeddedAppViewId,
|
|
106
|
-
onDataChange: (args) => this.c.onViewDataChange(args, item.id)
|
|
117
|
+
onDataChange: (args) => this.c.onViewDataChange(args, item.id),
|
|
118
|
+
onCreated: (event) => this.c.onViewCreated(event, item.id)
|
|
107
119
|
});
|
|
108
120
|
}
|
|
109
121
|
});
|
|
@@ -120,7 +132,8 @@ const MEditViewPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
120
132
|
context: item.context,
|
|
121
133
|
params: item.params,
|
|
122
134
|
viewId: this.c.model.embeddedAppViewId,
|
|
123
|
-
onDataChange: (args) => this.c.onViewDataChange(args, item.id)
|
|
135
|
+
onDataChange: (args) => this.c.onViewDataChange(args, item.id),
|
|
136
|
+
onCreated: (event) => this.c.onViewCreated(event, item.id)
|
|
124
137
|
}), createVNode("div", {
|
|
125
138
|
"class": this.ns.b("close")
|
|
126
139
|
}, [createVNode("ion-icon", {
|
|
@@ -40,7 +40,7 @@ const SearchBarControl = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
setup() {
|
|
41
41
|
var _a;
|
|
42
42
|
const c = useControlController((...args) => new SearchBarController(...args));
|
|
43
|
-
c.setStorageKeyFn(useLocalCacheKey(c.context, "SEARCH_BAR_SELECTED_GROUP", c.view.modal.routeDepth));
|
|
43
|
+
c.setStorageKeyFn(useLocalCacheKey(c.context, "SEARCH_BAR_SELECTED_GROUP", c.view.modal.routeDepth, "@", "".concat(c.view.model.codeName, "@").concat(c.model.codeName)));
|
|
44
44
|
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
45
45
|
let isSearch = false;
|
|
46
46
|
const onSearch = () => {
|
|
@@ -22,6 +22,7 @@ export declare const IBizTabExpPanelControl: import("@ibiz-template/vue3-util").
|
|
|
22
22
|
c: import("@ibiz-template/runtime").TabExpPanelController;
|
|
23
23
|
ns: import("@ibiz-template/core").Namespace;
|
|
24
24
|
tabPosition: string;
|
|
25
|
+
counterData: import("vue").Ref<import("@ibiz-template/core").IApiData>;
|
|
25
26
|
handleTabChange: () => void;
|
|
26
27
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
28
|
modelData: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-tabexppanel{--ibiz-control-tabexppanel-color:var(--ibiz-color-text-2);--ibiz-control-tabexppanel-hover-color:var(--ibiz-color-text-0);--ibiz-control-tabexppanel-active-color:var(--ibiz-color-primary);--ibiz-control-tabexppanel-bar-color:var(--ibiz-color-primary)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header{margin:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap{margin:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__active-bar{background-color:var(--ibiz-control-tabexppanel-bar-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item{font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-tabexppanel-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item:hover{color:var(--ibiz-control-tabexppanel-hover-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item.is-active{color:var(--ibiz-control-tabexppanel-active-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item.is-top:last-child{padding-right:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs.el-tabs--bottom,.ibiz-control-tabexppanel .el-tabs.el-tabs--top{padding-left:var(--ibiz-spacing-base)}.ibiz-control-tabexppanel .el-tabs__item{padding:var(--ibiz-spacing-base)}
|
|
1
|
+
.ibiz-control-tabexppanel{--ibiz-control-tabexppanel-color:var(--ibiz-color-text-2);--ibiz-control-tabexppanel-hover-color:var(--ibiz-color-text-0);--ibiz-control-tabexppanel-active-color:var(--ibiz-color-primary);--ibiz-control-tabexppanel-bar-color:var(--ibiz-color-primary)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header{margin:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap{margin:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__active-bar{background-color:var(--ibiz-control-tabexppanel-bar-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item{font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-tabexppanel-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item:hover{color:var(--ibiz-control-tabexppanel-hover-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item.is-active{color:var(--ibiz-control-tabexppanel-active-color)}.ibiz-control-tabexppanel .el-tabs .el-tabs__header .el-tabs__nav-wrap .el-tabs__nav .el-tabs__item.is-top:last-child{padding-right:var(--ibiz-spacing-none)}.ibiz-control-tabexppanel .el-tabs.el-tabs--bottom,.ibiz-control-tabexppanel .el-tabs.el-tabs--top{padding-left:var(--ibiz-spacing-base)}.ibiz-control-tabexppanel .el-tabs__item{padding:var(--ibiz-spacing-base)}.ibiz-control-tabexppanel__counter{margin-left:var(--ibiz-spacing-tight)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, Ref } from 'vue';
|
|
2
2
|
import { ITabExpPanel } from '@ibiz/model-core';
|
|
3
3
|
import './tab-exp-panel.scss';
|
|
4
4
|
import { IControlProvider, TabExpPanelController } from '@ibiz-template/runtime';
|
|
@@ -42,6 +42,7 @@ export declare const TabExpPanelControl: import("vue").DefineComponent<{
|
|
|
42
42
|
c: TabExpPanelController;
|
|
43
43
|
ns: import("@ibiz-template/core").Namespace;
|
|
44
44
|
tabPosition: string;
|
|
45
|
+
counterData: Ref<import("@ibiz-template/core").IApiData>;
|
|
45
46
|
handleTabChange: () => void;
|
|
46
47
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
48
|
/**
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { isVNode, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, ref, onUnmounted, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace, getNestedRoutePath, route2routePath } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './tab-exp-panel.css';
|
|
4
4
|
import { TabExpPanelController } from '@ibiz-template/runtime';
|
|
5
5
|
import { useRoute } from 'vue-router';
|
|
6
|
+
import { isNil } from 'ramda';
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
8
9
|
function _isSlot(s) {
|
|
@@ -51,6 +52,19 @@ const TabExpPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
51
52
|
var _a;
|
|
52
53
|
const c = useControlController((...args) => new TabExpPanelController(...args));
|
|
53
54
|
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
55
|
+
const counterData = ref({});
|
|
56
|
+
const fn = (counter) => {
|
|
57
|
+
counterData.value = counter;
|
|
58
|
+
};
|
|
59
|
+
c.evt.on("onCreated", () => {
|
|
60
|
+
if (c.counter) {
|
|
61
|
+
c.counter.onChange(fn, true);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
onUnmounted(() => {
|
|
65
|
+
var _a2;
|
|
66
|
+
(_a2 = c.counter) == null ? void 0 : _a2.offChange(fn);
|
|
67
|
+
});
|
|
54
68
|
const handleTabChange = () => {
|
|
55
69
|
c.handleTabChange();
|
|
56
70
|
};
|
|
@@ -84,6 +98,7 @@ const TabExpPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
84
98
|
c,
|
|
85
99
|
ns,
|
|
86
100
|
tabPosition,
|
|
101
|
+
counterData,
|
|
87
102
|
handleTabChange
|
|
88
103
|
};
|
|
89
104
|
},
|
|
@@ -102,6 +117,7 @@ const TabExpPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
102
117
|
"tabPosition": this.tabPosition,
|
|
103
118
|
"onTabChange": this.handleTabChange
|
|
104
119
|
}, _isSlot(_slot = tabPages.map((tab) => {
|
|
120
|
+
const counterNum = tab.counterId ? this.counterData[tab.counterId] : void 0;
|
|
105
121
|
return createVNode(resolveComponent("el-tab-pane"), {
|
|
106
122
|
"class": [this.ns.e("tab-item")],
|
|
107
123
|
"label": tab.caption,
|
|
@@ -112,7 +128,10 @@ const TabExpPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
112
128
|
"class": [...tab.class]
|
|
113
129
|
}, [this.c.isShowIcon && createVNode(resolveComponent("iBizIcon"), {
|
|
114
130
|
"icon": tab.sysImage
|
|
115
|
-
}, null), this.c.isShowCaption && tab.caption
|
|
131
|
+
}, null), this.c.isShowCaption && tab.caption, !isNil(counterNum) && createVNode(resolveComponent("iBizBadge"), {
|
|
132
|
+
"class": this.ns.e("counter"),
|
|
133
|
+
"value": counterNum
|
|
134
|
+
}, null)]);
|
|
116
135
|
}
|
|
117
136
|
});
|
|
118
137
|
})) ? _slot : {
|
package/es/control/tree/tree.mjs
CHANGED
|
@@ -588,7 +588,10 @@ const TreeControl = /* @__PURE__ */ defineComponent({
|
|
|
588
588
|
if (!contextMenuC.model.detoolbarItems) {
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
|
-
await contextMenuC.calcButtonState(nodeData._deData || (nodeData.srfkey ? nodeData : void 0), nodeModel.appDataEntityId
|
|
591
|
+
await contextMenuC.calcButtonState(nodeData._deData || (nodeData.srfkey ? nodeData : void 0), nodeModel.appDataEntityId, {
|
|
592
|
+
view: c.view,
|
|
593
|
+
ctrl: c
|
|
594
|
+
});
|
|
592
595
|
const menuState = contextMenuC.state.buttonsState;
|
|
593
596
|
const menus = calcContextMenuItems(contextMenuC.model.detoolbarItems, nodeData, evt, menuState);
|
|
594
597
|
if (!menus.length) {
|
|
@@ -151,7 +151,8 @@ const IBizSpan = /* @__PURE__ */ defineComponent({
|
|
|
151
151
|
"class": this.ns.e("code-list"),
|
|
152
152
|
"codeListItems": this.items,
|
|
153
153
|
"codeList": this.c.codeList,
|
|
154
|
-
"value": this.text
|
|
154
|
+
"value": this.text,
|
|
155
|
+
"convertToCodeItemText": this.c.convertToCodeItemText
|
|
155
156
|
}, null);
|
|
156
157
|
}
|
|
157
158
|
} else if (this.text) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import ElementPlus from 'element-plus';
|
|
3
|
-
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.
|
|
3
|
+
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs';
|
|
4
4
|
import { IBizFullscreenToolbar } from '../../common/fullscreen-toolbar/fullscreen-toolbar.mjs';
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
@@ -30,6 +30,6 @@ export declare class CustomViewEngine extends ViewEngineBase {
|
|
|
30
30
|
* @param {(IData | undefined)} data 数据
|
|
31
31
|
* @memberof CustomViewEngine
|
|
32
32
|
*/
|
|
33
|
-
calcToolbarButtonState(control: IMDControl, data: IData | undefined): void;
|
|
33
|
+
calcToolbarButtonState(control: IMDControl, data: IData | undefined, _params?: IParams): void;
|
|
34
34
|
call(key: keyof IApiCustomViewCall, args: any): Promise<IData | null | undefined>;
|
|
35
35
|
}
|
|
@@ -43,15 +43,15 @@ class CustomViewEngine extends ViewEngineBase {
|
|
|
43
43
|
);
|
|
44
44
|
control == null ? void 0 : control.evt.on(
|
|
45
45
|
"onLoadSuccess",
|
|
46
|
-
() => this.calcToolbarButtonState(ctrl, void 0)
|
|
46
|
+
(evt) => this.calcToolbarButtonState(ctrl, void 0, evt)
|
|
47
47
|
);
|
|
48
48
|
control == null ? void 0 : control.evt.on(
|
|
49
49
|
"onSelectionChange",
|
|
50
|
-
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0])
|
|
50
|
+
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0], evt)
|
|
51
51
|
);
|
|
52
52
|
control == null ? void 0 : control.evt.on(
|
|
53
53
|
"onRefreshSuccess",
|
|
54
|
-
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0])
|
|
54
|
+
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0], evt)
|
|
55
55
|
);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -62,7 +62,7 @@ class CustomViewEngine extends ViewEngineBase {
|
|
|
62
62
|
* @param {(IData | undefined)} data 数据
|
|
63
63
|
* @memberof CustomViewEngine
|
|
64
64
|
*/
|
|
65
|
-
calcToolbarButtonState(control, data) {
|
|
65
|
+
calcToolbarButtonState(control, data, _params) {
|
|
66
66
|
const model = this.controls.find(
|
|
67
67
|
(ctrl) => {
|
|
68
68
|
var _a;
|
|
@@ -73,7 +73,7 @@ class CustomViewEngine extends ViewEngineBase {
|
|
|
73
73
|
const toolbar = this.view.getController(
|
|
74
74
|
model.name
|
|
75
75
|
);
|
|
76
|
-
toolbar == null ? void 0 : toolbar.calcButtonState(data, control.appDataEntityId);
|
|
76
|
+
toolbar == null ? void 0 : toolbar.calcButtonState(data, control.appDataEntityId, _params);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
async call(key, args) {
|
|
@@ -46,7 +46,7 @@ class DEIndexViewEngine extends EditViewEngine {
|
|
|
46
46
|
const { evt } = this.view;
|
|
47
47
|
const formDeId = this.form.model.appDataEntityId;
|
|
48
48
|
const data = event.data[0];
|
|
49
|
-
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId);
|
|
49
|
+
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId, event);
|
|
50
50
|
if (data.srfkey) {
|
|
51
51
|
evt.emit("onViewInfoChange", { dataInfo: data.srfmajortext || "" });
|
|
52
52
|
}
|
|
@@ -101,7 +101,7 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
101
101
|
const { model, evt } = this.view;
|
|
102
102
|
const formDeId = this.form.model.appDataEntityId;
|
|
103
103
|
const data = event.data[0];
|
|
104
|
-
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId);
|
|
104
|
+
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId, event);
|
|
105
105
|
if (model.showDataInfoBar) {
|
|
106
106
|
if (data.srfkey) {
|
|
107
107
|
evt.emit("onViewInfoChange", { dataInfo: data.srfmajortext || "" });
|
package/es/view-engine/index.mjs
CHANGED
|
@@ -206,6 +206,10 @@ const IBizViewEngine = {
|
|
|
206
206
|
"VIEW_DEPICKUPDATAVIEW",
|
|
207
207
|
(c) => new PickupDataViewEngine(c)
|
|
208
208
|
);
|
|
209
|
+
ibiz.engine.register(
|
|
210
|
+
"VIEW_PickupDataView",
|
|
211
|
+
(c) => new PickupDataViewEngine(c)
|
|
212
|
+
);
|
|
209
213
|
ibiz.engine.register(
|
|
210
214
|
"VIEW_DEINDEXPICKUPDATAVIEW",
|
|
211
215
|
(c) => new PickupDataViewEngine(c)
|
|
@@ -35,7 +35,7 @@ export declare class MDCustomViewEngine extends ViewEngineBase {
|
|
|
35
35
|
* @param {(IData | undefined)} data 数据
|
|
36
36
|
* @memberof MDCustomViewEngine
|
|
37
37
|
*/
|
|
38
|
-
calcToolbarButtonState(control: IMDControl, data: IData | undefined): void;
|
|
38
|
+
calcToolbarButtonState(control: IMDControl, data: IData | undefined, _params?: IParams): void;
|
|
39
39
|
call(key: keyof IApiMDCustomViewCall, args: any): Promise<IData | null | undefined>;
|
|
40
40
|
/**
|
|
41
41
|
* @description 刷新数据
|
|
@@ -46,15 +46,15 @@ class MDCustomViewEngine extends ViewEngineBase {
|
|
|
46
46
|
);
|
|
47
47
|
control == null ? void 0 : control.evt.on(
|
|
48
48
|
"onLoadSuccess",
|
|
49
|
-
() => this.calcToolbarButtonState(ctrl, void 0)
|
|
49
|
+
(evt) => this.calcToolbarButtonState(ctrl, void 0, evt)
|
|
50
50
|
);
|
|
51
51
|
control == null ? void 0 : control.evt.on(
|
|
52
52
|
"onSelectionChange",
|
|
53
|
-
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0])
|
|
53
|
+
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0], evt)
|
|
54
54
|
);
|
|
55
55
|
control == null ? void 0 : control.evt.on(
|
|
56
56
|
"onRefreshSuccess",
|
|
57
|
-
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0])
|
|
57
|
+
(evt) => this.calcToolbarButtonState(ctrl, evt.data[0], evt)
|
|
58
58
|
);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
@@ -79,7 +79,7 @@ class MDCustomViewEngine extends ViewEngineBase {
|
|
|
79
79
|
* @param {(IData | undefined)} data 数据
|
|
80
80
|
* @memberof MDCustomViewEngine
|
|
81
81
|
*/
|
|
82
|
-
calcToolbarButtonState(control, data) {
|
|
82
|
+
calcToolbarButtonState(control, data, _params) {
|
|
83
83
|
const model = this.controls.find(
|
|
84
84
|
(ctrl) => {
|
|
85
85
|
var _a;
|
|
@@ -90,7 +90,7 @@ class MDCustomViewEngine extends ViewEngineBase {
|
|
|
90
90
|
const toolbar = this.view.getController(
|
|
91
91
|
model.name
|
|
92
92
|
);
|
|
93
|
-
toolbar == null ? void 0 : toolbar.calcButtonState(data, control.appDataEntityId);
|
|
93
|
+
toolbar == null ? void 0 : toolbar.calcButtonState(data, control.appDataEntityId, _params);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
async call(key, args) {
|
|
@@ -68,7 +68,7 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
68
68
|
const formDataStateChange = (event) => {
|
|
69
69
|
var _a;
|
|
70
70
|
const data = event.data[0];
|
|
71
|
-
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId);
|
|
71
|
+
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(data, formDeId, event);
|
|
72
72
|
if (data.srfkey) {
|
|
73
73
|
evt.emit("onViewInfoChange", { dataInfo: data.srfmajortext });
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-carousel-component .el-carousel__container .el-carousel__item{display:flex;align-items:center;justify-content:center}.ibiz-carousel-component .el-carousel__container .el-carousel__item img{display:inline-block;width:100%;height:100
|
|
1
|
+
.ibiz-carousel-component .el-carousel__container .el-carousel__item{display:flex;align-items:center;justify-content:center}.ibiz-carousel-component .el-carousel__container .el-carousel__item img{display:inline-block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}
|
|
@@ -46,8 +46,7 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
historyNames,
|
|
47
47
|
changeMap,
|
|
48
48
|
getCityName,
|
|
49
|
-
goBack
|
|
50
|
-
refresh
|
|
49
|
+
goBack
|
|
51
50
|
} = mapManager.useMapManager(options, (mapName) => {
|
|
52
51
|
const {
|
|
53
52
|
visualMap,
|
|
@@ -56,8 +55,8 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
55
|
hoverAreaColor,
|
|
57
56
|
areaBorderColor
|
|
58
57
|
} = options.value;
|
|
59
|
-
const
|
|
60
|
-
const
|
|
58
|
+
const areaData = props.areaData || [];
|
|
59
|
+
const pointData = props.pointData || [];
|
|
61
60
|
const result = {
|
|
62
61
|
geo: {
|
|
63
62
|
map: mapName
|
|
@@ -127,7 +126,7 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
|
|
|
127
126
|
select: {
|
|
128
127
|
disabled: true
|
|
129
128
|
},
|
|
130
|
-
data:
|
|
129
|
+
data: areaData.map((item) => ({
|
|
131
130
|
name: "".concat(item._areaCode),
|
|
132
131
|
value: item._value,
|
|
133
132
|
_id: item._id
|
|
@@ -163,7 +162,7 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
|
|
|
163
162
|
return find == null ? void 0 : find._tooltip;
|
|
164
163
|
}
|
|
165
164
|
},
|
|
166
|
-
data:
|
|
165
|
+
data: pointData.map((item) => {
|
|
167
166
|
return {
|
|
168
167
|
_id: item._id,
|
|
169
168
|
symbol: item._symbol ? "image://".concat(item._symbol) : void 0,
|
|
@@ -194,13 +193,6 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
|
|
|
194
193
|
vue.onMounted(() => {
|
|
195
194
|
changeMap(options.value.defaultAreaCode, true);
|
|
196
195
|
});
|
|
197
|
-
const {
|
|
198
|
-
areaData,
|
|
199
|
-
pointData
|
|
200
|
-
} = vue.toRefs(props);
|
|
201
|
-
vue.watch([areaData, pointData], () => {
|
|
202
|
-
refresh();
|
|
203
|
-
});
|
|
204
196
|
return {
|
|
205
197
|
ns,
|
|
206
198
|
chartRef,
|
|
@@ -19,6 +19,36 @@ const isTimeBetween = (_argrs) => {
|
|
|
19
19
|
const { date, beginTime, endTime, unit = "day" } = _argrs;
|
|
20
20
|
return !!(beginTime && dayjs(date).isSame(beginTime, unit) || endTime && dayjs(date).isSame(endTime, unit) || beginTime && endTime && dayjs(date).isAfter(beginTime, unit) && dayjs(date).isBefore(endTime, unit));
|
|
21
21
|
};
|
|
22
|
+
function useCalendarLegend(ns) {
|
|
23
|
+
const getVarValue = (varName) => {
|
|
24
|
+
const root = document.documentElement;
|
|
25
|
+
return getComputedStyle(root).getPropertyValue(varName);
|
|
26
|
+
};
|
|
27
|
+
const bgColors = [
|
|
28
|
+
// 首个颜色用主题色
|
|
29
|
+
getVarValue("".concat(ns.cssVarName("color-primary"))),
|
|
30
|
+
"#2196F3",
|
|
31
|
+
"#4CAF50",
|
|
32
|
+
"#3F51B5",
|
|
33
|
+
"#FF9800",
|
|
34
|
+
"#673AB7",
|
|
35
|
+
"#757575"
|
|
36
|
+
];
|
|
37
|
+
const actBdrColors = bgColors.map(
|
|
38
|
+
() => getVarValue("".concat(ns.cssVarName("color-black")))
|
|
39
|
+
);
|
|
40
|
+
const getBkColor = (_index) => {
|
|
41
|
+
return bgColors[_index] || bgColors[0];
|
|
42
|
+
};
|
|
43
|
+
const getActBdrColors = (_index) => {
|
|
44
|
+
return actBdrColors[_index] || getVarValue("".concat(ns.cssVarName("color-primary")));
|
|
45
|
+
};
|
|
46
|
+
const getFontColor = () => {
|
|
47
|
+
return getVarValue("".concat(ns.cssVarName("color-primary-text")));
|
|
48
|
+
};
|
|
49
|
+
return { getFontColor, getBkColor, getActBdrColors };
|
|
50
|
+
}
|
|
22
51
|
|
|
23
52
|
exports.getWeekRange = getWeekRange;
|
|
24
53
|
exports.isTimeBetween = isTimeBetween;
|
|
54
|
+
exports.useCalendarLegend = useCalendarLegend;
|