@ctzy-web-client/plugin-component-vue 1.0.23 → 1.0.25
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/es/advance-select/advance-operation.mjs +51 -37
- package/es/advance-select/advance-option.mjs +167 -97
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
- package/es/advance-select/advance-select.mjs +368 -310
- package/es/advance-select/index.mjs +5 -5
- package/es/application-slot/breadcrumb-item.mjs +20 -17
- package/es/application-slot/header-tools-item.mjs +20 -17
- package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
- package/es/contextmenu/contextmenu-item.mjs +19 -15
- package/es/contextmenu/contextmenu.mjs +72 -56
- package/es/data-form/data-form-item.mjs +48 -30
- package/es/data-form/data-form.mjs +213 -166
- package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
- package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
- package/es/data-form/form-components/bwa-input-float.mjs +48 -37
- package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
- package/es/data-form/form-components/bwa-input.mjs +43 -32
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
- package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
- package/es/data-form/form-components/bwa-select.mjs +84 -70
- package/es/data-form/form-components/bwa-textarea.mjs +38 -27
- package/es/data-form/form-components/bwa-upload.mjs +172 -148
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
- package/es/data-form/form-components/bwa-user-select.mjs +86 -61
- package/es/data-table/data-column-view.mjs +146 -115
- package/es/data-table/data-table-card.mjs +48 -40
- package/es/data-table/data-table-column.mjs +58 -45
- package/es/data-table/data-table.mjs +402 -316
- package/es/datatable-settings/datatable-settings.mjs +329 -254
- package/es/date-range/date-picker.mjs +130 -116
- package/es/date-range/date-range.mjs +215 -161
- package/es/drag-list/drag-item.mjs +56 -42
- package/es/drag-list/drag-list.mjs +60 -47
- package/es/dragable/dragable-item.mjs +23 -18
- package/es/dragable/dragable-operation.mjs +32 -24
- package/es/dragable/dragable.mjs +32 -23
- package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
- package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
- package/es/filter-panel/conditions/input-condition.mjs +90 -76
- package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
- package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
- package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
- package/es/filter-panel/filter-panel-item.mjs +54 -39
- package/es/filter-panel/filter-panel.mjs +153 -135
- package/es/layout/layout.mjs +85 -78
- package/es/menu/menu-item.mjs +67 -52
- package/es/menu/menu.mjs +70 -53
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
- package/es/panel/panel.mjs +53 -40
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
- package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
- package/es/progress/progress-item.mjs +81 -61
- package/es/progress/progress.mjs +78 -64
- package/es/where-filter-panel/where-filter-panel.mjs +15 -12
- package/lib/advance-select/advance-operation.js +50 -36
- package/lib/advance-select/advance-option.js +166 -96
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
- package/lib/advance-select/advance-select.js +366 -308
- package/lib/application-slot/breadcrumb-item.js +19 -16
- package/lib/application-slot/header-tools-item.js +19 -16
- package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
- package/lib/contextmenu/contextmenu-item.js +18 -14
- package/lib/contextmenu/contextmenu.js +71 -55
- package/lib/data-form/data-form-item.js +47 -29
- package/lib/data-form/data-form.js +212 -165
- package/lib/data-form/form-components/bwa-date-picker.js +50 -38
- package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
- package/lib/data-form/form-components/bwa-input-float.js +47 -36
- package/lib/data-form/form-components/bwa-input-integer.js +67 -49
- package/lib/data-form/form-components/bwa-input.js +42 -31
- package/lib/data-form/form-components/bwa-multi-select.js +39 -28
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
- package/lib/data-form/form-components/bwa-rich-text.js +403 -315
- package/lib/data-form/form-components/bwa-select.js +83 -69
- package/lib/data-form/form-components/bwa-textarea.js +37 -26
- package/lib/data-form/form-components/bwa-upload.js +171 -147
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
- package/lib/data-form/form-components/bwa-user-select.js +85 -60
- package/lib/data-table/data-column-view.js +146 -115
- package/lib/data-table/data-table-card.js +48 -40
- package/lib/data-table/data-table-column.js +57 -44
- package/lib/data-table/data-table.js +401 -315
- package/lib/datatable-settings/datatable-settings.js +328 -253
- package/lib/date-range/date-picker.js +129 -115
- package/lib/date-range/date-range.js +214 -160
- package/lib/drag-list/drag-item.js +55 -41
- package/lib/drag-list/drag-list.js +59 -46
- package/lib/dragable/dragable-item.js +22 -17
- package/lib/dragable/dragable-operation.js +31 -23
- package/lib/dragable/dragable.js +31 -22
- package/lib/filter-panel/conditions/date-range-condition.js +49 -39
- package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
- package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
- package/lib/filter-panel/conditions/input-condition.js +89 -75
- package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
- package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
- package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
- package/lib/filter-panel/conditions/single-user-condition.js +66 -56
- package/lib/filter-panel/filter-panel-item.js +53 -38
- package/lib/filter-panel/filter-panel.js +152 -134
- package/lib/layout/layout.js +84 -77
- package/lib/menu/menu-item.js +66 -51
- package/lib/menu/menu.js +69 -52
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/lib/panel/panel.js +52 -39
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
- package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
- package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
- package/lib/progress/progress-item.js +80 -60
- package/lib/progress/progress.js +77 -63
- package/lib/where-filter-panel/where-filter-panel.js +14 -11
- package/package.json +2 -1
- package/src/advance-select/advance-option.vue +64 -13
- package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
- package/src/datatable-settings/datatable-settings.vue +33 -3
- package/src/date-range/date-picker.vue +1 -1
- package/src/filter-panel/filter-panel.vue +2 -2
- package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
- package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
- package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
|
@@ -8,177 +8,195 @@ var useFilterPanel = require('./use-filter-panel.js');
|
|
|
8
8
|
var filterPanelItem = require('./filter-panel-item.js');
|
|
9
9
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
emits: ["reset", "filter"],
|
|
11
|
+
const _sfc_main = {
|
|
12
|
+
__name: 'filter-panel',
|
|
13
|
+
props: {
|
|
14
|
+
dataTable: {
|
|
15
|
+
type: Object,
|
|
16
|
+
},
|
|
17
|
+
showSearch: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
showFieldOptions: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true,
|
|
24
|
+
},
|
|
25
|
+
searchAttr: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'search',
|
|
28
|
+
},
|
|
29
|
+
searchPlaceholder: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '',
|
|
32
|
+
},
|
|
33
|
+
searchFields: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => [],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
emits: ['reset', 'filter'],
|
|
41
39
|
setup(__props, { emit }) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
40
|
+
|
|
41
|
+
const props = __props;
|
|
42
|
+
|
|
43
|
+
defineOptions({
|
|
44
|
+
name: 'BwaFilterPanel',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
const ns = webBaseClientVue.useNamespace('filterpanel');
|
|
52
|
+
|
|
53
|
+
const {
|
|
54
|
+
dataTable,
|
|
55
|
+
filterPanel,
|
|
56
|
+
currentFilterColumns,
|
|
57
|
+
selectedColumnAttrNames,
|
|
58
|
+
closableColumns,
|
|
59
|
+
searchParams,
|
|
60
|
+
handleFieldSearch,
|
|
61
|
+
searchValue,
|
|
62
|
+
isChange,
|
|
63
|
+
handleReset,
|
|
64
|
+
} = useFilterPanel.useFilterPanel(props, { emit });
|
|
65
|
+
|
|
66
|
+
vue.watch(
|
|
67
|
+
filterPanel,
|
|
68
|
+
(filterPanel, _, onCleanup) => {
|
|
69
|
+
filterPanel.existComponent = true;
|
|
70
|
+
|
|
71
|
+
onCleanup(() => {
|
|
72
|
+
filterPanel.existComponent = false;
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
{ immediate: true }
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
vue.provide(
|
|
79
|
+
webBaseClientVue.filterPanelKey,
|
|
80
|
+
vue.reactive({
|
|
81
|
+
dataTable,
|
|
82
|
+
filterPanel,
|
|
83
|
+
currentFilterColumns,
|
|
84
|
+
})
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
const _component_BwaCondition = vue.resolveComponent("BwaCondition");
|
|
89
|
+
const _component_ElCheckbox = vue.resolveComponent("ElCheckbox");
|
|
90
|
+
const _component_BwaAdvanceOption = vue.resolveComponent("BwaAdvanceOption");
|
|
91
|
+
const _component_BwaAdvanceSelect = vue.resolveComponent("BwaAdvanceSelect");
|
|
92
|
+
const _component_ElInput = vue.resolveComponent("ElInput");
|
|
93
|
+
const _component_ElButton = vue.resolveComponent("ElButton");
|
|
94
|
+
|
|
95
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
96
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
|
97
|
+
}, [
|
|
98
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
99
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(currentFilterColumns), (column) => {
|
|
100
|
+
return vue.renderSlot(_ctx.$slots, `condition-${column.attrName}`, {
|
|
101
|
+
key: column.attrName,
|
|
102
|
+
attrName: column.attrName
|
|
103
|
+
}, () => [
|
|
104
|
+
vue.createVNode(filterPanelItem["default"], {
|
|
105
|
+
prop: column.fullAttrName
|
|
106
|
+
}, {
|
|
107
|
+
default: vue.withCtx(({ data }) => [
|
|
108
|
+
vue.createVNode(_component_BwaCondition, {
|
|
109
|
+
modelValue: data.value,
|
|
110
|
+
"onUpdate:modelValue": $event => ((data.value) = $event),
|
|
111
|
+
column: column,
|
|
112
|
+
record: vue.unref(searchParams)
|
|
113
|
+
}, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "column", "record"])
|
|
114
|
+
]),
|
|
115
|
+
_: 2 /* DYNAMIC */
|
|
116
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["prop"])
|
|
117
|
+
])
|
|
118
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
119
|
+
]),
|
|
120
|
+
(__props.showFieldOptions)
|
|
121
|
+
? (vue.openBlock(), vue.createBlock(filterPanelItem["default"], { key: 0 }, {
|
|
107
122
|
default: vue.withCtx(() => [
|
|
108
123
|
vue.createVNode(_component_BwaAdvanceSelect, {
|
|
109
124
|
modelValue: vue.unref(selectedColumnAttrNames),
|
|
110
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] =
|
|
125
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(selectedColumnAttrNames) ? (selectedColumnAttrNames).value = $event : null)),
|
|
111
126
|
"show-selectIcon": true,
|
|
112
127
|
onSearch: vue.unref(handleFieldSearch),
|
|
113
|
-
class: vue.normalizeClass(vue.unref(ns).e(
|
|
128
|
+
class: vue.normalizeClass(vue.unref(ns).e('options'))
|
|
114
129
|
}, {
|
|
115
130
|
"reference-content": vue.withCtx(() => [
|
|
116
131
|
vue.createCommentVNode(" <ElIcon><Plus /></ElIcon> "),
|
|
117
132
|
vue.createElementVNode("div", {
|
|
118
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
119
|
-
}, null, 2),
|
|
133
|
+
class: vue.normalizeClass(vue.unref(ns).be('filter', 'plus'))
|
|
134
|
+
}, null, 2 /* CLASS */),
|
|
120
135
|
vue.createElementVNode("span", {
|
|
121
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
122
|
-
}, "
|
|
136
|
+
class: vue.normalizeClass(vue.unref(ns).be('filter', 'label'))
|
|
137
|
+
}, " 筛选 ", 2 /* CLASS */)
|
|
123
138
|
]),
|
|
124
139
|
default: vue.withCtx(() => [
|
|
125
140
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(closableColumns), (column) => {
|
|
126
|
-
return vue.openBlock(), vue.createBlock(_component_BwaAdvanceOption, {
|
|
141
|
+
return (vue.openBlock(), vue.createBlock(_component_BwaAdvanceOption, {
|
|
127
142
|
value: column.fullAttrName,
|
|
128
143
|
label: column.title,
|
|
129
144
|
key: column.fullAttrName,
|
|
130
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
145
|
+
class: vue.normalizeClass(vue.unref(ns).be('filter', 'option'))
|
|
131
146
|
}, {
|
|
132
147
|
default: vue.withCtx(() => [
|
|
133
148
|
vue.createVNode(_component_ElCheckbox, {
|
|
134
|
-
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
135
|
-
}, ["prevent"])),
|
|
149
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {}, ["prevent"])),
|
|
136
150
|
modelValue: vue.unref(selectedColumnAttrNames).includes(column.fullAttrName),
|
|
137
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
151
|
+
class: vue.normalizeClass(vue.unref(ns).be('filter', 'checkbox'))
|
|
138
152
|
}, {
|
|
139
153
|
default: vue.withCtx(() => [
|
|
140
|
-
vue.createTextVNode(vue.toDisplayString(column.title), 1)
|
|
154
|
+
vue.createTextVNode(vue.toDisplayString(column.title), 1 /* TEXT */)
|
|
141
155
|
]),
|
|
142
|
-
_: 2
|
|
143
|
-
}, 1032, ["modelValue", "class"]),
|
|
156
|
+
_: 2 /* DYNAMIC */
|
|
157
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "class"]),
|
|
144
158
|
vue.createElementVNode("span", {
|
|
145
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
146
|
-
}, vue.toDisplayString(column.componentTitle), 3)
|
|
159
|
+
class: vue.normalizeClass(vue.unref(ns).be('filter', 'title'))
|
|
160
|
+
}, vue.toDisplayString(column.componentTitle), 3 /* TEXT, CLASS */)
|
|
147
161
|
]),
|
|
148
|
-
_: 2
|
|
149
|
-
}, 1032, ["value", "label", "class"])
|
|
150
|
-
}), 128))
|
|
162
|
+
_: 2 /* DYNAMIC */
|
|
163
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["value", "label", "class"]))
|
|
164
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
151
165
|
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8
|
|
166
|
+
_: 1 /* STABLE */
|
|
167
|
+
}, 8 /* PROPS */, ["modelValue", "onSearch", "class"])
|
|
154
168
|
]),
|
|
155
|
-
_: 1
|
|
156
|
-
}))
|
|
157
|
-
|
|
169
|
+
_: 1 /* STABLE */
|
|
170
|
+
}))
|
|
171
|
+
: vue.createCommentVNode("v-if", true),
|
|
172
|
+
(__props.showSearch)
|
|
173
|
+
? (vue.openBlock(), vue.createBlock(_component_ElInput, {
|
|
158
174
|
key: 1,
|
|
159
175
|
"prefix-icon": "Search",
|
|
160
|
-
size: "small",
|
|
161
176
|
clearable: "",
|
|
162
177
|
modelValue: vue.unref(searchValue),
|
|
163
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] =
|
|
178
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(searchValue) ? (searchValue).value = $event : null)),
|
|
164
179
|
placeholder: __props.searchPlaceholder,
|
|
165
|
-
class: vue.normalizeClass(vue.unref(ns).e(
|
|
166
|
-
}, null, 8
|
|
167
|
-
|
|
180
|
+
class: vue.normalizeClass(vue.unref(ns).e('search'))
|
|
181
|
+
}, null, 8 /* PROPS */, ["modelValue", "placeholder", "class"]))
|
|
182
|
+
: vue.createCommentVNode("v-if", true),
|
|
183
|
+
(vue.unref(isChange))
|
|
184
|
+
? (vue.openBlock(), vue.createBlock(_component_ElButton, {
|
|
168
185
|
key: 2,
|
|
169
|
-
|
|
170
|
-
class: vue.normalizeClass(vue.unref(ns).e("reset")),
|
|
186
|
+
class: vue.normalizeClass(vue.unref(ns).e('reset')),
|
|
171
187
|
onClick: vue.unref(handleReset)
|
|
172
188
|
}, {
|
|
173
189
|
default: vue.withCtx(() => [
|
|
174
|
-
vue.createTextVNode("
|
|
190
|
+
vue.createTextVNode(" 重置 ")
|
|
175
191
|
]),
|
|
176
|
-
_: 1
|
|
177
|
-
}, 8
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
192
|
+
_: 1 /* STABLE */
|
|
193
|
+
}, 8 /* PROPS */, ["class", "onClick"]))
|
|
194
|
+
: vue.createCommentVNode("v-if", true)
|
|
195
|
+
], 2 /* CLASS */))
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
};
|
|
200
|
+
var FilterPanel = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"filter-panel.vue"]]);
|
|
183
201
|
|
|
184
202
|
exports["default"] = FilterPanel;
|
package/lib/layout/layout.js
CHANGED
|
@@ -8,83 +8,90 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
|
|
|
8
8
|
var index = require('../menu/index.js');
|
|
9
9
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
11
|
+
const _sfc_main = {
|
|
12
|
+
__name: 'layout',
|
|
15
13
|
setup(__props) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
],
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
14
|
+
|
|
15
|
+
defineOptions({
|
|
16
|
+
name: 'BwaLayout',
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const router = vueRouter.useRouter();
|
|
20
|
+
|
|
21
|
+
const ns = webBaseClientVue.useNamespace('layout');
|
|
22
|
+
|
|
23
|
+
const menuService = webBaseClientVue.useService('MenuService');
|
|
24
|
+
|
|
25
|
+
const isCollapsed = vue.computed(() => vue.unref(menuService)?.isCollapsed ?? false);
|
|
26
|
+
|
|
27
|
+
const menus = vue.computed(() => vue.unref(menuService)?.getMenus() ?? []);
|
|
28
|
+
const currentMenuID = vue.computed(
|
|
29
|
+
() => vue.unref(menuService)?.getCurrentMenu()?.id ?? ''
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const handleSelect = (menu) => {
|
|
33
|
+
if (!menu) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
switch (menu?.type) {
|
|
38
|
+
case 0:
|
|
39
|
+
vue.unref(menuService).setCurrentMenuById(menu.id);
|
|
40
|
+
router.push(menu.path);
|
|
41
|
+
break;
|
|
42
|
+
case 1:
|
|
43
|
+
let openLink = '';
|
|
44
|
+
|
|
45
|
+
if (
|
|
46
|
+
path.toLowerCase().indexOf('https://') == 0 ||
|
|
47
|
+
path.toLowerCase().indexOf('http://') == 0
|
|
48
|
+
) {
|
|
49
|
+
openLink = path;
|
|
50
|
+
} else if (path.startsWith('//')) {
|
|
51
|
+
openLink = location.protocol + path;
|
|
52
|
+
} else {
|
|
53
|
+
openLink = path;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
window.open(openLink);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
const _component_ElScrollbar = vue.resolveComponent("ElScrollbar");
|
|
63
|
+
|
|
64
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
65
|
+
class: vue.normalizeClass([vue.unref(ns).b(), 'justify-between'])
|
|
66
|
+
}, [
|
|
67
|
+
vue.createVNode(_component_ElScrollbar, {
|
|
68
|
+
class: vue.normalizeClass(vue.unref(ns).e('menu-wrapper')),
|
|
69
|
+
height: "100%"
|
|
70
|
+
}, {
|
|
71
|
+
default: vue.withCtx(() => [
|
|
72
|
+
vue.renderSlot(_ctx.$slots, "left-panel", {}, () => [
|
|
73
|
+
vue.createVNode(vue.unref(index.BwaMenu), {
|
|
74
|
+
class: vue.normalizeClass(vue.unref(ns).e('menu')),
|
|
75
|
+
menus: vue.unref(menus),
|
|
76
|
+
currentMenuID: vue.unref(currentMenuID),
|
|
77
|
+
collapsed: vue.unref(isCollapsed),
|
|
78
|
+
onSelect: handleSelect
|
|
79
|
+
}, null, 8 /* PROPS */, ["class", "menus", "currentMenuID", "collapsed"])
|
|
80
|
+
]),
|
|
81
|
+
vue.renderSlot(_ctx.$slots, "left-panel-append")
|
|
82
|
+
]),
|
|
83
|
+
_: 3 /* FORWARDED */
|
|
84
|
+
}, 8 /* PROPS */, ["class"]),
|
|
85
|
+
vue.createElementVNode("div", {
|
|
86
|
+
class: vue.normalizeClass(vue.unref(ns).e('main'))
|
|
87
|
+
}, [
|
|
88
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
89
|
+
], 2 /* CLASS */)
|
|
90
|
+
], 2 /* CLASS */))
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
};
|
|
95
|
+
var Layout = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"layout.vue"]]);
|
|
89
96
|
|
|
90
97
|
exports["default"] = Layout;
|
package/lib/menu/menu-item.js
CHANGED
|
@@ -6,74 +6,89 @@ var vue = require('vue');
|
|
|
6
6
|
var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
|
|
7
7
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
},
|
|
9
|
+
const _sfc_main = {
|
|
10
|
+
__name: 'menu-item',
|
|
11
|
+
props: {
|
|
12
|
+
item: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
19
17
|
setup(__props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
|
|
19
|
+
const props = __props;
|
|
20
|
+
|
|
21
|
+
defineOptions({
|
|
22
|
+
name: 'BwaMenuItem',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const ns = webBaseClientVue.useNamespace('menu');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const id = vue.computed(() => {
|
|
30
|
+
if (typeof props.id !== 'number' && !props.item.id) {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return props.item.id + '';
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const children = vue.computed(() => props.item?.children || []);
|
|
38
|
+
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
const _component_ElMenuItem = vue.resolveComponent("ElMenuItem");
|
|
41
|
+
const _component_BwaMenuItem = vue.resolveComponent("BwaMenuItem");
|
|
42
|
+
const _component_ElSubMenu = vue.resolveComponent("ElSubMenu");
|
|
43
|
+
|
|
44
|
+
return (!vue.unref(children).length)
|
|
45
|
+
? (vue.openBlock(), vue.createBlock(_component_ElMenuItem, {
|
|
37
46
|
key: 0,
|
|
38
47
|
index: vue.unref(id)
|
|
39
48
|
}, {
|
|
40
49
|
default: vue.withCtx(() => [
|
|
41
|
-
__props.item.iconName
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
(__props.item.iconName)
|
|
51
|
+
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: vue.normalizeClass(['ptp-icon', `ptp-${__props.item.iconName}`])
|
|
54
|
+
}, null, 2 /* CLASS */))
|
|
55
|
+
: vue.createCommentVNode("v-if", true),
|
|
45
56
|
vue.createElementVNode("span", {
|
|
46
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
47
|
-
}, vue.toDisplayString(__props.item.title), 3)
|
|
57
|
+
class: vue.normalizeClass(vue.unref(ns).be('item', 'content'))
|
|
58
|
+
}, vue.toDisplayString(__props.item.title), 3 /* TEXT, CLASS */)
|
|
48
59
|
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8
|
|
60
|
+
_: 1 /* STABLE */
|
|
61
|
+
}, 8 /* PROPS */, ["index"]))
|
|
62
|
+
: (vue.openBlock(), vue.createBlock(_component_ElSubMenu, {
|
|
51
63
|
key: 1,
|
|
52
64
|
index: vue.unref(id),
|
|
53
|
-
"popper-class": vue.unref(ns).b(
|
|
65
|
+
"popper-class": vue.unref(ns).b('sub')
|
|
54
66
|
}, {
|
|
55
67
|
title: vue.withCtx(() => [
|
|
56
|
-
__props.item.iconName
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
(__props.item.iconName)
|
|
69
|
+
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: vue.normalizeClass(['ptp-icon', `ptp-${__props.item.iconName}`])
|
|
72
|
+
}, null, 2 /* CLASS */))
|
|
73
|
+
: vue.createCommentVNode("v-if", true),
|
|
60
74
|
vue.createElementVNode("span", {
|
|
61
|
-
class: vue.normalizeClass(vue.unref(ns).be(
|
|
62
|
-
}, vue.toDisplayString(__props.item.title), 3)
|
|
75
|
+
class: vue.normalizeClass(vue.unref(ns).be('item', 'content'))
|
|
76
|
+
}, vue.toDisplayString(__props.item.title), 3 /* TEXT, CLASS */)
|
|
63
77
|
]),
|
|
64
78
|
default: vue.withCtx(() => [
|
|
65
79
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(children), (child) => {
|
|
66
|
-
return vue.openBlock(), vue.createBlock(_component_BwaMenuItem, {
|
|
80
|
+
return (vue.openBlock(), vue.createBlock(_component_BwaMenuItem, {
|
|
67
81
|
item: child,
|
|
68
82
|
key: child.id
|
|
69
|
-
}, null, 8
|
|
70
|
-
}), 128))
|
|
83
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
84
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
71
85
|
]),
|
|
72
|
-
_: 1
|
|
73
|
-
}, 8
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
_: 1 /* STABLE */
|
|
87
|
+
}, 8 /* PROPS */, ["index", "popper-class"]))
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
};
|
|
92
|
+
var MenuItem = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"menu-item.vue"]]);
|
|
78
93
|
|
|
79
94
|
exports["default"] = MenuItem;
|