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