@ctzy-web-client/plugin-component-vue 1.0.26 → 1.0.27
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/_virtual/_plugin-vue_export-helper.mjs +11 -0
- package/es/advance-select/advance-operation.mjs +48 -51
- package/es/advance-select/advance-option.mjs +128 -163
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +11 -5
- package/es/advance-select/advance-select.mjs +323 -370
- package/es/advance-select/events-helpers.mjs +9 -0
- package/es/advance-select/index.mjs +9 -0
- package/es/advance-select/use-advance-option.mjs +9 -0
- package/es/advance-select/use-advance-select.mjs +9 -0
- package/es/application-slot/application-slot.mjs +9 -0
- package/es/application-slot/breadcrumb-item.mjs +26 -20
- package/es/application-slot/header-tools-item.mjs +26 -20
- package/es/application-slot/index.mjs +9 -0
- package/es/breadcrumb-select/breadcrumb-select.mjs +123 -137
- package/es/breadcrumb-select/index.mjs +9 -0
- package/es/components.mjs +9 -0
- package/es/contextmenu/contextmenu-item.mjs +24 -19
- package/es/contextmenu/contextmenu.mjs +68 -73
- package/es/contextmenu/index.mjs +9 -0
- package/es/contextmenu/use-contextmenu.mjs +10 -1
- package/es/data-form/data-form-item.mjs +41 -49
- package/es/data-form/data-form.mjs +176 -213
- package/es/data-form/dynamic-component.mjs +9 -0
- package/es/data-form/form-components/Blots/AtBlot.mjs +9 -0
- package/es/data-form/form-components/bwa-date-picker.mjs +50 -51
- package/es/data-form/form-components/bwa-date-time-picker.mjs +55 -56
- package/es/data-form/form-components/bwa-input-float.mjs +48 -48
- package/es/data-form/form-components/bwa-input-integer.mjs +61 -68
- package/es/data-form/form-components/bwa-input.mjs +43 -43
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -40
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +230 -555
- package/es/data-form/form-components/bwa-rich-text.mjs +326 -404
- package/es/data-form/form-components/bwa-select.mjs +81 -84
- package/es/data-form/form-components/bwa-textarea.mjs +38 -38
- package/es/data-form/form-components/bwa-upload.mjs +160 -173
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -35
- package/es/data-form/form-components/bwa-user-select.mjs +72 -86
- package/es/data-form/index.mjs +9 -0
- package/es/data-table/data-column-view.mjs +124 -146
- package/es/data-table/data-table-card.mjs +49 -48
- package/es/data-table/data-table-column.mjs +55 -58
- package/es/data-table/data-table.mjs +328 -404
- package/es/data-table/dynamic-component.mjs +9 -0
- package/es/data-table/index.mjs +9 -0
- package/es/data-table/use-datatable-drag.mjs +9 -0
- package/es/datatable-settings/datatable-settings.mjs +286 -328
- package/es/datatable-settings/index.mjs +9 -0
- package/es/date-range/date-picker.mjs +125 -131
- package/es/date-range/date-range.mjs +173 -216
- package/es/date-range/index.mjs +9 -0
- package/es/drag-list/constants.mjs +10 -0
- package/es/drag-list/drag-item.mjs +51 -56
- package/es/drag-list/drag-list.mjs +58 -60
- package/es/drag-list/index.mjs +9 -0
- package/es/drag-list/use-drag-list.mjs +10 -1
- package/es/dragable/constants.mjs +10 -0
- package/es/dragable/dragable-item.mjs +27 -23
- package/es/dragable/dragable-operation.mjs +33 -32
- package/es/dragable/dragable.mjs +33 -32
- package/es/dragable/index.mjs +9 -0
- package/es/dragable/use-dragable.mjs +9 -0
- package/es/filter-panel/conditions/condition.mjs +9 -0
- package/es/filter-panel/conditions/date-range-condition.mjs +51 -50
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +82 -99
- package/es/filter-panel/conditions/department-condition/department-node.mjs +69 -73
- package/es/filter-panel/conditions/index.mjs +9 -0
- package/es/filter-panel/conditions/input-condition.mjs +88 -91
- package/es/filter-panel/conditions/multi-user-condition.mjs +66 -67
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +44 -54
- package/es/filter-panel/conditions/single-menu-condition.mjs +71 -65
- package/es/filter-panel/conditions/single-user-condition.mjs +66 -67
- package/es/filter-panel/filter-panel-item.mjs +51 -55
- package/es/filter-panel/filter-panel.mjs +147 -156
- package/es/filter-panel/index.mjs +9 -0
- package/es/filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/filter-panel/use-filter-panel.mjs +9 -0
- package/es/hooks/use-data/index.mjs +9 -0
- package/es/index.mjs +9 -0
- package/es/layout/index.mjs +9 -0
- package/es/layout/layout.mjs +87 -85
- package/es/make-installer.mjs +9 -0
- package/es/math/Rectangle.mjs +10 -0
- package/es/menu/index.mjs +9 -0
- package/es/menu/menu-item.mjs +65 -70
- package/es/menu/menu.mjs +64 -70
- package/es/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.mjs +680 -454
- package/es/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.mjs +108 -46
- package/es/panel/index.mjs +9 -0
- package/es/panel/panel.mjs +49 -53
- package/es/panel-tabs/index.mjs +9 -0
- package/es/panel-tabs/panel-tabs.mjs +9 -0
- package/es/pct-filter-panel/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +73 -75
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +77 -77
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +345 -374
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +149 -154
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +52 -56
- package/es/pct-filter-panel/pct-filter-panel.mjs +235 -248
- package/es/pct-filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/pct-filter-panel/use-filter-panel.mjs +9 -0
- package/es/plugins.mjs +9 -0
- package/es/progress/index.mjs +9 -0
- package/es/progress/progress-item.mjs +71 -81
- package/es/progress/progress.mjs +74 -78
- package/es/progress/use-progress.mjs +9 -0
- package/es/utils/db.mjs +9 -0
- package/es/utils.css +1 -0
- package/es/utils.mjs +9 -0
- package/es/where-filter-panel/index.mjs +9 -1
- package/es/where-filter-panel/use-where-filter-panel.mjs +9 -0
- package/es/where-filter-panel/where-filter-panel.mjs +21 -15
- package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
- package/lib/advance-select/advance-operation.js +47 -50
- package/lib/advance-select/advance-option.js +127 -162
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +11 -6
- package/lib/advance-select/advance-select.js +322 -369
- package/lib/advance-select/events-helpers.js +9 -0
- package/lib/advance-select/index.js +9 -0
- package/lib/advance-select/use-advance-option.js +9 -0
- package/lib/advance-select/use-advance-select.js +9 -0
- package/lib/application-slot/application-slot.js +9 -0
- package/lib/application-slot/breadcrumb-item.js +25 -19
- package/lib/application-slot/header-tools-item.js +25 -19
- package/lib/application-slot/index.js +9 -0
- package/lib/breadcrumb-select/breadcrumb-select.js +122 -136
- package/lib/breadcrumb-select/index.js +9 -0
- package/lib/components.js +9 -0
- package/lib/contextmenu/contextmenu-item.js +23 -18
- package/lib/contextmenu/contextmenu.js +67 -72
- package/lib/contextmenu/index.js +9 -0
- package/lib/contextmenu/use-contextmenu.js +10 -1
- package/lib/data-form/data-form-item.js +40 -48
- package/lib/data-form/data-form.js +175 -212
- package/lib/data-form/dynamic-component.js +9 -0
- package/lib/data-form/form-components/Blots/AtBlot.js +9 -0
- package/lib/data-form/form-components/bwa-date-picker.js +49 -50
- package/lib/data-form/form-components/bwa-date-time-picker.js +54 -55
- package/lib/data-form/form-components/bwa-input-float.js +47 -47
- package/lib/data-form/form-components/bwa-input-integer.js +60 -67
- package/lib/data-form/form-components/bwa-input.js +42 -42
- package/lib/data-form/form-components/bwa-multi-select.js +39 -39
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +229 -554
- package/lib/data-form/form-components/bwa-rich-text.js +325 -403
- package/lib/data-form/form-components/bwa-select.js +80 -83
- package/lib/data-form/form-components/bwa-textarea.js +37 -37
- package/lib/data-form/form-components/bwa-upload.js +159 -172
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -34
- package/lib/data-form/form-components/bwa-user-select.js +71 -85
- package/lib/data-form/index.js +9 -0
- package/lib/data-table/data-column-view.js +124 -146
- package/lib/data-table/data-table-card.js +49 -48
- package/lib/data-table/data-table-column.js +54 -57
- package/lib/data-table/data-table.js +327 -403
- package/lib/data-table/dynamic-component.js +9 -0
- package/lib/data-table/index.js +9 -0
- package/lib/data-table/use-datatable-drag.js +9 -0
- package/lib/datatable-settings/datatable-settings.js +285 -327
- package/lib/datatable-settings/index.js +9 -0
- package/lib/date-range/date-picker.js +124 -130
- package/lib/date-range/date-range.js +172 -215
- package/lib/date-range/index.js +9 -0
- package/lib/drag-list/constants.js +10 -0
- package/lib/drag-list/drag-item.js +50 -55
- package/lib/drag-list/drag-list.js +57 -59
- package/lib/drag-list/index.js +9 -0
- package/lib/drag-list/use-drag-list.js +10 -1
- package/lib/dragable/constants.js +10 -0
- package/lib/dragable/dragable-item.js +26 -22
- package/lib/dragable/dragable-operation.js +32 -31
- package/lib/dragable/dragable.js +32 -31
- package/lib/dragable/index.js +9 -0
- package/lib/dragable/use-dragable.js +9 -0
- package/lib/filter-panel/conditions/condition.js +9 -0
- package/lib/filter-panel/conditions/date-range-condition.js +50 -49
- package/lib/filter-panel/conditions/department-condition/department-condition.js +81 -98
- package/lib/filter-panel/conditions/department-condition/department-node.js +68 -72
- package/lib/filter-panel/conditions/index.js +9 -0
- package/lib/filter-panel/conditions/input-condition.js +87 -90
- package/lib/filter-panel/conditions/multi-user-condition.js +65 -66
- package/lib/filter-panel/conditions/multiple-menu-condition.js +43 -53
- package/lib/filter-panel/conditions/single-menu-condition.js +70 -64
- package/lib/filter-panel/conditions/single-user-condition.js +65 -66
- package/lib/filter-panel/filter-panel-item.js +50 -54
- package/lib/filter-panel/filter-panel.js +146 -155
- package/lib/filter-panel/index.js +9 -0
- package/lib/filter-panel/use-filter-panel-item.js +9 -0
- package/lib/filter-panel/use-filter-panel.js +9 -0
- package/lib/hooks/use-data/index.js +9 -0
- package/lib/index.js +9 -0
- package/lib/layout/index.js +9 -0
- package/lib/layout/layout.js +86 -84
- package/lib/make-installer.js +9 -0
- package/lib/math/Rectangle.js +10 -0
- package/lib/menu/index.js +9 -0
- package/lib/menu/menu-item.js +64 -69
- package/lib/menu/menu.js +63 -69
- package/lib/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.js +685 -451
- package/lib/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.js +109 -44
- package/lib/panel/index.js +9 -0
- package/lib/panel/panel.js +48 -52
- package/lib/panel-tabs/index.js +9 -0
- package/lib/panel-tabs/panel-tabs.js +9 -0
- package/lib/pct-filter-panel/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +72 -74
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +76 -76
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +344 -373
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +148 -153
- package/lib/pct-filter-panel/pct-filter-panel-item.js +51 -55
- package/lib/pct-filter-panel/pct-filter-panel.js +234 -247
- package/lib/pct-filter-panel/use-filter-panel-item.js +9 -0
- package/lib/pct-filter-panel/use-filter-panel.js +9 -0
- package/lib/plugins.js +9 -0
- package/lib/progress/index.js +9 -0
- package/lib/progress/progress-item.js +70 -80
- package/lib/progress/progress.js +73 -77
- package/lib/progress/use-progress.js +9 -0
- package/lib/utils/db.js +9 -0
- package/lib/utils.css +1 -0
- package/lib/utils.js +9 -0
- package/lib/where-filter-panel/index.js +9 -0
- package/lib/where-filter-panel/use-where-filter-panel.js +9 -0
- package/lib/where-filter-panel/where-filter-panel.js +20 -14
- package/package.json +1 -1
- package/style/index.css +1 -1
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -32
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import { shallowRef, watchEffect, readonly, unref, ref, isVue3, watch, customRef,
|
|
1
|
+
import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
// Inject __name helper
|
|
4
|
+
if (typeof __name === 'undefined') {
|
|
5
|
+
function __name(obj, name) {
|
|
6
|
+
Object.defineProperty(obj, "name", {
|
|
7
|
+
value: name,
|
|
8
|
+
configurable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
2
12
|
|
|
3
13
|
var __defProp$9 = Object.defineProperty;
|
|
4
14
|
var __defProps$6 = Object.defineProperties;
|
|
@@ -63,7 +73,9 @@ function resolveUnref(r) {
|
|
|
63
73
|
|
|
64
74
|
function createFilterWrapper(filter, fn) {
|
|
65
75
|
function wrapper(...args) {
|
|
66
|
-
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
77
|
+
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
|
|
78
|
+
});
|
|
67
79
|
}
|
|
68
80
|
return wrapper;
|
|
69
81
|
}
|
|
@@ -73,48 +85,64 @@ const bypassFilter = (invoke) => {
|
|
|
73
85
|
function debounceFilter(ms, options = {}) {
|
|
74
86
|
let timer;
|
|
75
87
|
let maxTimer;
|
|
88
|
+
let lastRejector = noop;
|
|
89
|
+
const _clearTimeout = (timer2) => {
|
|
90
|
+
clearTimeout(timer2);
|
|
91
|
+
lastRejector();
|
|
92
|
+
lastRejector = noop;
|
|
93
|
+
};
|
|
76
94
|
const filter = (invoke) => {
|
|
77
95
|
const duration = resolveUnref(ms);
|
|
78
96
|
const maxDuration = resolveUnref(options.maxWait);
|
|
79
97
|
if (timer)
|
|
80
|
-
|
|
98
|
+
_clearTimeout(timer);
|
|
81
99
|
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
82
100
|
if (maxTimer) {
|
|
83
|
-
|
|
101
|
+
_clearTimeout(maxTimer);
|
|
84
102
|
maxTimer = null;
|
|
85
103
|
}
|
|
86
|
-
return invoke();
|
|
104
|
+
return Promise.resolve(invoke());
|
|
87
105
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
108
|
+
if (maxDuration && !maxTimer) {
|
|
109
|
+
maxTimer = setTimeout(() => {
|
|
110
|
+
if (timer)
|
|
111
|
+
_clearTimeout(timer);
|
|
112
|
+
maxTimer = null;
|
|
113
|
+
resolve(invoke());
|
|
114
|
+
}, maxDuration);
|
|
115
|
+
}
|
|
116
|
+
timer = setTimeout(() => {
|
|
117
|
+
if (maxTimer)
|
|
118
|
+
_clearTimeout(maxTimer);
|
|
92
119
|
maxTimer = null;
|
|
93
|
-
invoke();
|
|
94
|
-
},
|
|
95
|
-
}
|
|
96
|
-
timer = setTimeout(() => {
|
|
97
|
-
if (maxTimer)
|
|
98
|
-
clearTimeout(maxTimer);
|
|
99
|
-
maxTimer = null;
|
|
100
|
-
invoke();
|
|
101
|
-
}, duration);
|
|
120
|
+
resolve(invoke());
|
|
121
|
+
}, duration);
|
|
122
|
+
});
|
|
102
123
|
};
|
|
103
124
|
return filter;
|
|
104
125
|
}
|
|
105
|
-
function throttleFilter(ms, trailing = true, leading = true) {
|
|
126
|
+
function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
|
|
106
127
|
let lastExec = 0;
|
|
107
128
|
let timer;
|
|
108
129
|
let isLeading = true;
|
|
130
|
+
let lastRejector = noop;
|
|
131
|
+
let lastValue;
|
|
109
132
|
const clear = () => {
|
|
110
133
|
if (timer) {
|
|
111
134
|
clearTimeout(timer);
|
|
112
135
|
timer = void 0;
|
|
136
|
+
lastRejector();
|
|
137
|
+
lastRejector = noop;
|
|
113
138
|
}
|
|
114
139
|
};
|
|
115
|
-
const filter = (
|
|
140
|
+
const filter = (_invoke) => {
|
|
116
141
|
const duration = resolveUnref(ms);
|
|
117
142
|
const elapsed = Date.now() - lastExec;
|
|
143
|
+
const invoke = () => {
|
|
144
|
+
return lastValue = _invoke();
|
|
145
|
+
};
|
|
118
146
|
clear();
|
|
119
147
|
if (duration <= 0) {
|
|
120
148
|
lastExec = Date.now();
|
|
@@ -124,16 +152,20 @@ function throttleFilter(ms, trailing = true, leading = true) {
|
|
|
124
152
|
lastExec = Date.now();
|
|
125
153
|
invoke();
|
|
126
154
|
} else if (trailing) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
155
|
+
lastValue = new Promise((resolve, reject) => {
|
|
156
|
+
lastRejector = rejectOnCancel ? reject : resolve;
|
|
157
|
+
timer = setTimeout(() => {
|
|
158
|
+
lastExec = Date.now();
|
|
159
|
+
isLeading = true;
|
|
160
|
+
resolve(invoke());
|
|
161
|
+
clear();
|
|
162
|
+
}, Math.max(0, duration - elapsed));
|
|
163
|
+
});
|
|
133
164
|
}
|
|
134
165
|
if (!leading && !timer)
|
|
135
166
|
timer = setTimeout(() => isLeading = true, duration);
|
|
136
167
|
isLeading = false;
|
|
168
|
+
return lastValue;
|
|
137
169
|
};
|
|
138
170
|
return filter;
|
|
139
171
|
}
|
|
@@ -149,7 +181,7 @@ function pausableFilter(extendFilter = bypassFilter) {
|
|
|
149
181
|
if (isActive.value)
|
|
150
182
|
extendFilter(...args);
|
|
151
183
|
};
|
|
152
|
-
return { isActive, pause, resume, eventFilter };
|
|
184
|
+
return { isActive: readonly(isActive), pause, resume, eventFilter };
|
|
153
185
|
}
|
|
154
186
|
|
|
155
187
|
function __onlyVue3(name = "this function") {
|
|
@@ -157,6 +189,11 @@ function __onlyVue3(name = "this function") {
|
|
|
157
189
|
return;
|
|
158
190
|
throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
|
|
159
191
|
}
|
|
192
|
+
function __onlyVue27Plus(name = "this function") {
|
|
193
|
+
if (isVue3 || version.startsWith("2.7."))
|
|
194
|
+
return;
|
|
195
|
+
throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);
|
|
196
|
+
}
|
|
160
197
|
const directiveHooks = {
|
|
161
198
|
mounted: isVue3 ? "mounted" : "inserted",
|
|
162
199
|
updated: isVue3 ? "updated" : "componentUpdated",
|
|
@@ -250,6 +287,14 @@ function computedWithControl(source, fn) {
|
|
|
250
287
|
return result;
|
|
251
288
|
}
|
|
252
289
|
|
|
290
|
+
function tryOnScopeDispose(fn) {
|
|
291
|
+
if (getCurrentScope()) {
|
|
292
|
+
onScopeDispose(fn);
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
|
|
253
298
|
function createEventHook() {
|
|
254
299
|
const fns = [];
|
|
255
300
|
const off = (fn) => {
|
|
@@ -259,8 +304,10 @@ function createEventHook() {
|
|
|
259
304
|
};
|
|
260
305
|
const on = (fn) => {
|
|
261
306
|
fns.push(fn);
|
|
307
|
+
const offFn = () => off(fn);
|
|
308
|
+
tryOnScopeDispose(offFn);
|
|
262
309
|
return {
|
|
263
|
-
off:
|
|
310
|
+
off: offFn
|
|
264
311
|
};
|
|
265
312
|
};
|
|
266
313
|
const trigger = (param) => {
|
|
@@ -289,20 +336,14 @@ function createGlobalState(stateFactory) {
|
|
|
289
336
|
function createInjectionState(composable) {
|
|
290
337
|
const key = Symbol("InjectionState");
|
|
291
338
|
const useProvidingState = (...args) => {
|
|
292
|
-
|
|
339
|
+
const state = composable(...args);
|
|
340
|
+
provide(key, state);
|
|
341
|
+
return state;
|
|
293
342
|
};
|
|
294
343
|
const useInjectedState = () => inject(key);
|
|
295
344
|
return [useProvidingState, useInjectedState];
|
|
296
345
|
}
|
|
297
346
|
|
|
298
|
-
function tryOnScopeDispose(fn) {
|
|
299
|
-
if (getCurrentScope()) {
|
|
300
|
-
onScopeDispose(fn);
|
|
301
|
-
return true;
|
|
302
|
-
}
|
|
303
|
-
return false;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
347
|
function createSharedComposable(composable) {
|
|
307
348
|
let subscribers = 0;
|
|
308
349
|
let state;
|
|
@@ -327,7 +368,7 @@ function createSharedComposable(composable) {
|
|
|
327
368
|
}
|
|
328
369
|
|
|
329
370
|
function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
|
|
330
|
-
|
|
371
|
+
__onlyVue27Plus();
|
|
331
372
|
for (const [key, value] of Object.entries(extend)) {
|
|
332
373
|
if (key === "value")
|
|
333
374
|
continue;
|
|
@@ -521,8 +562,8 @@ function refDefault(source, defaultValue) {
|
|
|
521
562
|
});
|
|
522
563
|
}
|
|
523
564
|
|
|
524
|
-
function useThrottleFn(fn, ms = 200, trailing = false, leading = true) {
|
|
525
|
-
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
|
|
565
|
+
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
|
|
566
|
+
return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
|
|
526
567
|
}
|
|
527
568
|
|
|
528
569
|
function refThrottled(value, delay = 200, trailing = true, leading = true) {
|
|
@@ -834,6 +875,18 @@ function useArrayFindIndex(list, fn) {
|
|
|
834
875
|
return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));
|
|
835
876
|
}
|
|
836
877
|
|
|
878
|
+
function findLast(arr, cb) {
|
|
879
|
+
let index = arr.length;
|
|
880
|
+
while (index-- > 0) {
|
|
881
|
+
if (cb(arr[index], index, arr))
|
|
882
|
+
return arr[index];
|
|
883
|
+
}
|
|
884
|
+
return void 0;
|
|
885
|
+
}
|
|
886
|
+
function useArrayFindLast(list, fn) {
|
|
887
|
+
return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));
|
|
888
|
+
}
|
|
889
|
+
|
|
837
890
|
function useArrayJoin(list, separator) {
|
|
838
891
|
return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));
|
|
839
892
|
}
|
|
@@ -854,6 +907,10 @@ function useArraySome(list, fn) {
|
|
|
854
907
|
return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));
|
|
855
908
|
}
|
|
856
909
|
|
|
910
|
+
function useArrayUnique(list) {
|
|
911
|
+
return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);
|
|
912
|
+
}
|
|
913
|
+
|
|
857
914
|
function useCounter(initialValue = 0, options = {}) {
|
|
858
915
|
const count = ref(initialValue);
|
|
859
916
|
const {
|
|
@@ -958,17 +1015,18 @@ function useIntervalFn(cb, interval = 1e3, options = {}) {
|
|
|
958
1015
|
clean();
|
|
959
1016
|
}
|
|
960
1017
|
function resume() {
|
|
961
|
-
|
|
1018
|
+
const intervalValue = resolveUnref(interval);
|
|
1019
|
+
if (intervalValue <= 0)
|
|
962
1020
|
return;
|
|
963
1021
|
isActive.value = true;
|
|
964
1022
|
if (immediateCallback)
|
|
965
1023
|
cb();
|
|
966
1024
|
clean();
|
|
967
|
-
timer = setInterval(cb,
|
|
1025
|
+
timer = setInterval(cb, intervalValue);
|
|
968
1026
|
}
|
|
969
1027
|
if (immediate && isClient)
|
|
970
1028
|
resume();
|
|
971
|
-
if (isRef(interval)) {
|
|
1029
|
+
if (isRef(interval) || isFunction(interval)) {
|
|
972
1030
|
const stopWatch = watch(interval, () => {
|
|
973
1031
|
if (isActive.value && isClient)
|
|
974
1032
|
resume();
|
|
@@ -1007,13 +1065,17 @@ function useInterval(interval = 1e3, options = {}) {
|
|
|
1007
1065
|
} = options;
|
|
1008
1066
|
const counter = ref(0);
|
|
1009
1067
|
const update = () => counter.value += 1;
|
|
1068
|
+
const reset = () => {
|
|
1069
|
+
counter.value = 0;
|
|
1070
|
+
};
|
|
1010
1071
|
const controls = useIntervalFn(callback ? () => {
|
|
1011
1072
|
update();
|
|
1012
1073
|
callback(counter.value);
|
|
1013
1074
|
} : update, interval, { immediate });
|
|
1014
1075
|
if (exposeControls) {
|
|
1015
1076
|
return __spreadValues$6({
|
|
1016
|
-
counter
|
|
1077
|
+
counter,
|
|
1078
|
+
reset
|
|
1017
1079
|
}, controls);
|
|
1018
1080
|
} else {
|
|
1019
1081
|
return counter;
|
|
@@ -1059,7 +1121,7 @@ function useTimeoutFn(cb, interval, options = {}) {
|
|
|
1059
1121
|
}
|
|
1060
1122
|
tryOnScopeDispose(stop);
|
|
1061
1123
|
return {
|
|
1062
|
-
isPending,
|
|
1124
|
+
isPending: readonly(isPending),
|
|
1063
1125
|
start,
|
|
1064
1126
|
stop
|
|
1065
1127
|
};
|
|
@@ -1514,4 +1576,4 @@ function whenever(source, cb, options) {
|
|
|
1514
1576
|
}, options);
|
|
1515
1577
|
}
|
|
1516
1578
|
|
|
1517
|
-
export { __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1579
|
+
export { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
package/es/panel/index.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { withInstall } from 'element-plus/es/utils/vue/install';
|
|
2
2
|
import Panel from './panel.mjs';
|
|
3
3
|
|
|
4
|
+
// Inject __name helper
|
|
5
|
+
if (typeof __name === 'undefined') {
|
|
6
|
+
function __name(obj, name) {
|
|
7
|
+
Object.defineProperty(obj, "name", {
|
|
8
|
+
value: name,
|
|
9
|
+
configurable: true
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
4
13
|
const BwaPanel = withInstall(Panel);
|
|
5
14
|
|
|
6
15
|
export { BwaPanel, BwaPanel as default };
|
package/es/panel/panel.mjs
CHANGED
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
import { useSlots, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode } from 'vue';
|
|
1
|
+
import { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode } 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
// Inject __name helper
|
|
6
|
+
if (typeof __name === 'undefined') {
|
|
7
|
+
function __name(obj, name) {
|
|
8
|
+
Object.defineProperty(obj, "name", {
|
|
9
|
+
value: name,
|
|
10
|
+
configurable: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "BwaPanel"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
|
+
props: {
|
|
19
|
+
name: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
16
27
|
setup(__props) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const slots = useSlots();
|
|
27
|
-
|
|
28
|
-
return (_ctx, _cache) => {
|
|
29
|
-
return (openBlock(), createElementBlock("div", {
|
|
30
|
-
class: normalizeClass(unref(ns).b())
|
|
31
|
-
}, [
|
|
32
|
-
(unref(slots).header)
|
|
33
|
-
? (openBlock(), createElementBlock("div", {
|
|
28
|
+
;
|
|
29
|
+
const ns = useNamespace("panel");
|
|
30
|
+
const slots = useSlots();
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createElementBlock("div", {
|
|
33
|
+
class: normalizeClass(unref(ns).b())
|
|
34
|
+
}, [
|
|
35
|
+
unref(slots).header ? (openBlock(), createElementBlock("div", {
|
|
34
36
|
key: 0,
|
|
35
|
-
class: normalizeClass(unref(ns).e(
|
|
37
|
+
class: normalizeClass(unref(ns).e("header"))
|
|
36
38
|
}, [
|
|
37
39
|
renderSlot(_ctx.$slots, "header")
|
|
38
|
-
], 2
|
|
39
|
-
|
|
40
|
-
(unref(slots).tools)
|
|
41
|
-
? (openBlock(), createElementBlock("div", {
|
|
40
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
41
|
+
unref(slots).tools ? (openBlock(), createElementBlock("div", {
|
|
42
42
|
key: 1,
|
|
43
|
-
class: normalizeClass(unref(ns).e(
|
|
43
|
+
class: normalizeClass(unref(ns).e("tools"))
|
|
44
44
|
}, [
|
|
45
45
|
renderSlot(_ctx.$slots, "tools")
|
|
46
|
-
], 2
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
(unref(slots).footer)
|
|
54
|
-
? (openBlock(), createElementBlock("div", {
|
|
46
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
47
|
+
createElementVNode("div", {
|
|
48
|
+
class: normalizeClass(unref(ns).e("body"))
|
|
49
|
+
}, [
|
|
50
|
+
renderSlot(_ctx.$slots, "default")
|
|
51
|
+
], 2),
|
|
52
|
+
unref(slots).footer ? (openBlock(), createElementBlock("div", {
|
|
55
53
|
key: 2,
|
|
56
|
-
class: normalizeClass(unref(ns).e(
|
|
54
|
+
class: normalizeClass(unref(ns).e("footer"))
|
|
57
55
|
}, [
|
|
58
56
|
renderSlot(_ctx.$slots, "footer")
|
|
59
|
-
], 2
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
var Panel = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"panel.vue"]]);
|
|
57
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
58
|
+
], 2);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "panel.vue"]]);
|
|
67
63
|
|
|
68
64
|
export { Panel as default };
|
package/es/panel-tabs/index.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { withInstall } from 'element-plus/es/utils/vue/install';
|
|
2
2
|
import PanelTab from './panel-tabs.mjs';
|
|
3
3
|
|
|
4
|
+
// Inject __name helper
|
|
5
|
+
if (typeof __name === 'undefined') {
|
|
6
|
+
function __name(obj, name) {
|
|
7
|
+
Object.defineProperty(obj, "name", {
|
|
8
|
+
value: name,
|
|
9
|
+
configurable: true
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
4
13
|
const BwaPanelTab = withInstall(PanelTab);
|
|
5
14
|
|
|
6
15
|
export { BwaPanelTab, BwaPanelTab as default };
|
|
@@ -2,6 +2,15 @@ import { ElTabs, ElTabPane } from 'element-plus';
|
|
|
2
2
|
import { defineComponent, useSlots, useAttrs, ref, watch, computed, h, unref } from 'vue';
|
|
3
3
|
import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
|
|
4
4
|
|
|
5
|
+
// Inject __name helper
|
|
6
|
+
if (typeof __name === 'undefined') {
|
|
7
|
+
function __name(obj, name) {
|
|
8
|
+
Object.defineProperty(obj, "name", {
|
|
9
|
+
value: name,
|
|
10
|
+
configurable: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
5
14
|
var PanelTab = defineComponent({
|
|
6
15
|
name: "BwaPanelTabs",
|
|
7
16
|
props: {
|
|
@@ -3,6 +3,15 @@ import PctFilterPanel from './pct-filter-panel.mjs';
|
|
|
3
3
|
export { default } from './pct-filter-panel.mjs';
|
|
4
4
|
import PctFilterPanelItem from './pct-filter-panel-item.mjs';
|
|
5
5
|
|
|
6
|
+
// Inject __name helper
|
|
7
|
+
if (typeof __name === 'undefined') {
|
|
8
|
+
function __name(obj, name) {
|
|
9
|
+
Object.defineProperty(obj, "name", {
|
|
10
|
+
value: name,
|
|
11
|
+
configurable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
6
15
|
const BwaPctFilterPanel = withInstall(PctFilterPanel, {
|
|
7
16
|
PctFilterPanelItem
|
|
8
17
|
});
|
|
@@ -3,6 +3,15 @@ import PctMultipleMenuCondition from './pct-multiple-menu-condition.mjs';
|
|
|
3
3
|
import PctInputCondition from './pct-Input-condition.mjs';
|
|
4
4
|
import PctDateRangeCondition from './pct-date-range-condition.mjs';
|
|
5
5
|
|
|
6
|
+
// Inject __name helper
|
|
7
|
+
if (typeof __name === 'undefined') {
|
|
8
|
+
function __name(obj, name) {
|
|
9
|
+
Object.defineProperty(obj, "name", {
|
|
10
|
+
value: name,
|
|
11
|
+
configurable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
6
15
|
const BwaPctInputCondition = withInstall(PctInputCondition, {});
|
|
7
16
|
const BwaPctMultipleMenuCondition = withInstall(PctMultipleMenuCondition, {});
|
|
8
17
|
const BwaPctDateRangeCondition = withInstall(PctDateRangeCondition, {});
|
|
@@ -1,82 +1,80 @@
|
|
|
1
|
-
import { inject, computed, useAttrs, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode
|
|
1
|
+
import { defineComponent, inject, computed, useAttrs, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode } from 'vue';
|
|
2
2
|
import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
|
|
3
3
|
import { dataProps } from '../../hooks/use-data/index.mjs';
|
|
4
4
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type: String,
|
|
15
|
-
default: '请输入',
|
|
16
|
-
},
|
|
17
|
-
prefixIcon: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'Search',
|
|
20
|
-
},
|
|
21
|
-
showIcon: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false,
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ['update:modelValue'],
|
|
27
|
-
setup(__props, { emit }) {
|
|
28
|
-
|
|
29
|
-
const props = __props;
|
|
30
|
-
|
|
31
|
-
const ns = useNamespace('pct-input');
|
|
32
|
-
|
|
33
|
-
defineOptions({
|
|
34
|
-
name: 'BwaPctInputCondition',
|
|
35
|
-
__conditionTitle__: '输入框',
|
|
36
|
-
__conditionDefault__: () => [],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const filterPanelItem = inject(filterPanelItemKey, null);
|
|
42
|
-
const column = computed(() => filterPanelItem?.column ?? null);
|
|
43
|
-
|
|
44
|
-
const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
|
|
45
|
-
|
|
46
|
-
const attrs = useAttrs();
|
|
47
|
-
const showTitle = computed(() => attrs.showTitle);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const modelValue = computed({
|
|
51
|
-
get: () => props.modelValue,
|
|
52
|
-
set: (v) => emit('update:modelValue', v),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
const _component_el_input = resolveComponent("el-input");
|
|
57
|
-
|
|
58
|
-
return (openBlock(), createElementBlock("div", {
|
|
59
|
-
class: normalizeClass(unref(ns).e('inputCon'))
|
|
60
|
-
}, [
|
|
61
|
-
(unref(showTitle))
|
|
62
|
-
? (openBlock(), createElementBlock("span", {
|
|
63
|
-
key: 0,
|
|
64
|
-
class: normalizeClass(unref(ns).e('title'))
|
|
65
|
-
}, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
|
|
66
|
-
: createCommentVNode("v-if", true),
|
|
67
|
-
createVNode(_component_el_input, {
|
|
68
|
-
"prefix-icon": __props.showIcon ? __props.prefixIcon : '',
|
|
69
|
-
clearable: "",
|
|
70
|
-
class: normalizeClass(unref(ns).e('search')),
|
|
71
|
-
placeholder: unref(placeholderStr),
|
|
72
|
-
modelValue: unref(modelValue),
|
|
73
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null))
|
|
74
|
-
}, null, 8 /* PROPS */, ["prefix-icon", "class", "placeholder", "modelValue"])
|
|
75
|
-
], 2 /* CLASS */))
|
|
6
|
+
// Inject __name helper
|
|
7
|
+
if (typeof __name === 'undefined') {
|
|
8
|
+
function __name(obj, name) {
|
|
9
|
+
Object.defineProperty(obj, "name", {
|
|
10
|
+
value: name,
|
|
11
|
+
configurable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
76
14
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "BwaPctInputCondition",
|
|
17
|
+
__conditionTitle__: "\u8F93\u5165\u6846",
|
|
18
|
+
__conditionDefault__: () => []
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
21
|
+
props: {
|
|
22
|
+
...dataProps,
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: null
|
|
25
|
+
},
|
|
26
|
+
placeholder: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "\u8BF7\u8F93\u5165"
|
|
29
|
+
},
|
|
30
|
+
prefixIcon: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "Search"
|
|
33
|
+
},
|
|
34
|
+
showIcon: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
const ns = useNamespace("pct-input");
|
|
42
|
+
const emit = __emit;
|
|
43
|
+
;
|
|
44
|
+
const props = __props;
|
|
45
|
+
const filterPanelItem = inject(filterPanelItemKey, null);
|
|
46
|
+
const column = computed(() => {
|
|
47
|
+
var _a;
|
|
48
|
+
return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
|
|
49
|
+
});
|
|
50
|
+
const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
|
|
51
|
+
const attrs = useAttrs();
|
|
52
|
+
const showTitle = computed(() => attrs.showTitle);
|
|
53
|
+
const modelValue = computed({
|
|
54
|
+
get: () => props.modelValue,
|
|
55
|
+
set: (v) => emit("update:modelValue", v)
|
|
56
|
+
});
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
const _component_el_input = resolveComponent("el-input");
|
|
59
|
+
return openBlock(), createElementBlock("div", {
|
|
60
|
+
class: normalizeClass(unref(ns).e("inputCon"))
|
|
61
|
+
}, [
|
|
62
|
+
showTitle.value ? (openBlock(), createElementBlock("span", {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
65
|
+
}, toDisplayString(column.value.title), 3)) : createCommentVNode("v-if", true),
|
|
66
|
+
createVNode(_component_el_input, {
|
|
67
|
+
"prefix-icon": __props.showIcon ? __props.prefixIcon : "",
|
|
68
|
+
clearable: "",
|
|
69
|
+
class: normalizeClass(unref(ns).e("search")),
|
|
70
|
+
placeholder: placeholderStr.value,
|
|
71
|
+
modelValue: modelValue.value,
|
|
72
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
73
|
+
}, null, 8, ["prefix-icon", "class", "placeholder", "modelValue"])
|
|
74
|
+
], 2);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var PctInputCondition = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pct-Input-condition.vue"]]);
|
|
81
79
|
|
|
82
80
|
export { PctInputCondition as default };
|