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