@ctzy-web-client/plugin-component-vue 1.0.25 → 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,90 +1,87 @@
|
|
|
1
|
-
import { computed, useAttrs, openBlock, createBlock, unref, mergeProps,
|
|
1
|
+
import { defineComponent, computed, useAttrs, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
2
|
import { ElSelect, ElOption } from 'element-plus';
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
default: () => [],
|
|
14
|
-
},
|
|
15
|
-
labelProp: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: 'label',
|
|
18
|
-
},
|
|
19
|
-
valueProp: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: 'value',
|
|
22
|
-
},
|
|
23
|
-
multiple: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
emits: ['update:modelValue'],
|
|
29
|
-
setup(__props, { emit }) {
|
|
30
|
-
|
|
31
|
-
const props = __props;
|
|
32
|
-
|
|
33
|
-
defineOptions({
|
|
34
|
-
name: 'BwaSelect',
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const options = computed(() =>
|
|
40
|
-
(props.options || []).map((item) => ({
|
|
41
|
-
...item,
|
|
42
|
-
value: item.value + '',
|
|
43
|
-
}))
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
const attrs = useAttrs();
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const modelValue = computed({
|
|
51
|
-
get: () => {
|
|
52
|
-
if (props.multiple) {
|
|
53
|
-
return Array.isArray(props.modelValue)
|
|
54
|
-
? props.modelValue.map((item) => item + '')
|
|
55
|
-
: [];
|
|
56
|
-
} else {
|
|
57
|
-
return props.modelValue == null ? '' : props.modelValue + '';
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
set: (v) => emit('update:modelValue', v),
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
return (_ctx, _cache) => {
|
|
64
|
-
return (openBlock(), createBlock(unref(ElSelect), mergeProps(unref(attrs), {
|
|
65
|
-
modelValue: unref(modelValue),
|
|
66
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null)),
|
|
67
|
-
clearable: "",
|
|
68
|
-
multiple: __props.multiple,
|
|
69
|
-
teleported: false
|
|
70
|
-
}), {
|
|
71
|
-
default: withCtx(() => [
|
|
72
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
73
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(options), (item) => {
|
|
74
|
-
return (openBlock(), createBlock(unref(ElOption), {
|
|
75
|
-
key: item.value,
|
|
76
|
-
value: item.value,
|
|
77
|
-
label: item.label
|
|
78
|
-
}, null, 8 /* PROPS */, ["value", "label"]))
|
|
79
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
80
|
-
])
|
|
81
|
-
]),
|
|
82
|
-
_: 3 /* FORWARDED */
|
|
83
|
-
}, 16 /* FULL_PROPS */, ["modelValue", "multiple"]))
|
|
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
|
+
}
|
|
84
13
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "BwaSelect"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: null
|
|
21
|
+
},
|
|
22
|
+
options: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
labelProp: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "label"
|
|
29
|
+
},
|
|
30
|
+
valueProp: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "value"
|
|
33
|
+
},
|
|
34
|
+
multiple: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
;
|
|
42
|
+
const props = __props;
|
|
43
|
+
const options = computed(
|
|
44
|
+
() => (props.options || []).map((item) => ({
|
|
45
|
+
...item,
|
|
46
|
+
value: item.value + ""
|
|
47
|
+
}))
|
|
48
|
+
);
|
|
49
|
+
const attrs = useAttrs();
|
|
50
|
+
const emit = __emit;
|
|
51
|
+
const modelValue = computed({
|
|
52
|
+
get: () => {
|
|
53
|
+
if (props.multiple) {
|
|
54
|
+
return Array.isArray(props.modelValue) ? props.modelValue.map((item) => item + "") : [];
|
|
55
|
+
} else {
|
|
56
|
+
return props.modelValue == null ? "" : props.modelValue + "";
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
set: (v) => emit("update:modelValue", v)
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createBlock(unref(ElSelect), mergeProps(unref(attrs), {
|
|
63
|
+
modelValue: modelValue.value,
|
|
64
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
65
|
+
clearable: "",
|
|
66
|
+
multiple: __props.multiple,
|
|
67
|
+
teleported: false
|
|
68
|
+
}), {
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
71
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item) => {
|
|
72
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
73
|
+
key: item.value,
|
|
74
|
+
value: item.value,
|
|
75
|
+
label: item.label
|
|
76
|
+
}, null, 8, ["value", "label"]);
|
|
77
|
+
}), 128))
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 16, ["modelValue", "multiple"]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
var Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-select.vue"]]);
|
|
89
86
|
|
|
90
87
|
export { Select as default };
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { useAttrs, computed, openBlock, createBlock, unref, mergeProps
|
|
1
|
+
import { defineComponent, useAttrs, computed, openBlock, createBlock, unref, mergeProps } from 'vue';
|
|
2
2
|
import { ElInput } from 'element-plus';
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
emits: ['update:model-value'],
|
|
14
|
-
setup(__props, { emit }) {
|
|
15
|
-
|
|
16
|
-
const props = __props;
|
|
17
|
-
|
|
18
|
-
defineOptions({
|
|
19
|
-
name: 'BwaTextarea',
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const attrs = useAttrs();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const modelValue = computed({
|
|
29
|
-
get: () => props.modelValue,
|
|
30
|
-
set: (v) => emit('update:model-value', v),
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return (_ctx, _cache) => {
|
|
34
|
-
return (openBlock(), createBlock(unref(ElInput), mergeProps({ type: "textarea" }, unref(attrs), {
|
|
35
|
-
modelValue: unref(modelValue),
|
|
36
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null))
|
|
37
|
-
}), null, 16 /* FULL_PROPS */, ["modelValue"]))
|
|
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
|
+
}
|
|
38
13
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "BwaTextarea"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
|
+
props: {
|
|
19
|
+
value: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:model-value"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
;
|
|
27
|
+
const props = __props;
|
|
28
|
+
const attrs = useAttrs();
|
|
29
|
+
const emit = __emit;
|
|
30
|
+
const modelValue = computed({
|
|
31
|
+
get: () => props.modelValue,
|
|
32
|
+
set: (v) => emit("update:model-value", v)
|
|
33
|
+
});
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return openBlock(), createBlock(unref(ElInput), mergeProps({ type: "textarea" }, unref(attrs), {
|
|
36
|
+
modelValue: modelValue.value,
|
|
37
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
38
|
+
}), null, 16, ["modelValue"]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-textarea.vue"]]);
|
|
43
43
|
|
|
44
44
|
export { Textarea as default };
|
|
@@ -1,183 +1,170 @@
|
|
|
1
|
-
import { watch, computed, useAttrs, unref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from 'vue';
|
|
1
|
+
import { defineComponent, watch, computed, useAttrs, unref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from 'vue';
|
|
2
2
|
import { Download, Delete } from '@element-plus/icons';
|
|
3
3
|
import { ElMessage, ElUpload, ElButton, ElIcon } from 'element-plus';
|
|
4
4
|
import { useNamespace, useService } from '@ctzy-web-client/web-base-client-vue';
|
|
5
5
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const attrs = useAttrs();
|
|
45
|
-
|
|
46
|
-
const ns = useNamespace('upload');
|
|
47
|
-
const fileService = useService('FileService');
|
|
48
|
-
|
|
49
|
-
const handleHttpRequest = ({ file, onProgress, onSuccess, onError }) => {
|
|
50
|
-
if (!unref(fileService)) {
|
|
51
|
-
ElMessage.error('无法上传文件。');
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
unref(fileService)
|
|
56
|
-
.uploadFile(file, {
|
|
57
|
-
onUploadProgress: (event) => {
|
|
58
|
-
onProgress({ ...event, percent: event.progress });
|
|
59
|
-
},
|
|
60
|
-
})
|
|
61
|
-
.then((res) => {
|
|
62
|
-
if (res.code != 0) {
|
|
63
|
-
onError(res.msg);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
onSuccess(res.data);
|
|
67
|
-
}, onError);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const handleSuccess = (fileInfo) => {
|
|
71
|
-
const value = Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
72
|
-
emit('update:modelValue', value.concat(fileInfo));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const handleError = (error) => {
|
|
76
|
-
console.error(error);
|
|
77
|
-
ElMessage.error('文件上传失败。');
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const handleDelete = (file) => {
|
|
81
|
-
emit(
|
|
82
|
-
'update:modelValue',
|
|
83
|
-
props.modelValue.filter((fileInfo) => fileInfo !== file.response)
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const handleDownload = async (file) => {
|
|
88
|
-
if (!unref(fileService)) {
|
|
89
|
-
ElMessage.error('无法下载文件。');
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
const downloadFileResult = await unref(fileService).downloadFile(
|
|
95
|
-
file.response
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
if (downloadFileResult.code != 0) {
|
|
99
|
-
ElMessage.error(downloadFileResult.msg);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
} catch (e) {
|
|
103
|
-
console.error(e);
|
|
104
|
-
ElMessage.error('下载文件失败。');
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
return (_ctx, _cache) => {
|
|
109
|
-
const _component_Plus = resolveComponent("Plus");
|
|
110
|
-
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
111
|
-
|
|
112
|
-
return (openBlock(), createBlock(unref(ElUpload), mergeProps(unref(attrs), {
|
|
113
|
-
"file-list": unref(fileList),
|
|
114
|
-
"http-request": handleHttpRequest,
|
|
115
|
-
class: unref(ns).b(),
|
|
116
|
-
"on-success": handleSuccess,
|
|
117
|
-
"on-error": handleError
|
|
118
|
-
}), {
|
|
119
|
-
trigger: withCtx(() => [
|
|
120
|
-
createVNode(unref(ElButton), null, {
|
|
121
|
-
default: withCtx(() => [
|
|
122
|
-
createVNode(unref(ElIcon), null, {
|
|
123
|
-
default: withCtx(() => [
|
|
124
|
-
createVNode(_component_Plus)
|
|
125
|
-
]),
|
|
126
|
-
_: 1 /* STABLE */
|
|
127
|
-
}),
|
|
128
|
-
createTextVNode(" 上传文件 ")
|
|
129
|
-
]),
|
|
130
|
-
_: 1 /* STABLE */
|
|
7
|
+
// Inject __name helper
|
|
8
|
+
if (typeof __name === 'undefined') {
|
|
9
|
+
function __name(obj, name) {
|
|
10
|
+
Object.defineProperty(obj, "name", {
|
|
11
|
+
value: name,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const __default__ = defineComponent({
|
|
17
|
+
name: "BwaUpload"
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
20
|
+
props: {
|
|
21
|
+
modelValue: { type: Array, default: () => [] }
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
;
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
watch(
|
|
29
|
+
computed(() => props.modelValue),
|
|
30
|
+
(modelValue) => {
|
|
31
|
+
if (!Array.isArray(modelValue)) {
|
|
32
|
+
emit("update:modelValue", []);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{ immediate: true }
|
|
36
|
+
);
|
|
37
|
+
const fileList = computed(
|
|
38
|
+
() => (Array.isArray(props.modelValue) ? props.modelValue : []).map((fileInfo) => {
|
|
39
|
+
return {
|
|
40
|
+
name: fileInfo.fileName,
|
|
41
|
+
response: fileInfo
|
|
42
|
+
};
|
|
131
43
|
})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
44
|
+
);
|
|
45
|
+
const attrs = useAttrs();
|
|
46
|
+
const ns = useNamespace("upload");
|
|
47
|
+
const fileService = useService("FileService");
|
|
48
|
+
const handleHttpRequest = ({ file, onProgress, onSuccess, onError }) => {
|
|
49
|
+
if (!unref(fileService)) {
|
|
50
|
+
ElMessage.error("\u65E0\u6CD5\u4E0A\u4F20\u6587\u4EF6\u3002");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
unref(fileService).uploadFile(file, {
|
|
54
|
+
onUploadProgress: (event) => {
|
|
55
|
+
onProgress({ ...event, percent: event.progress });
|
|
56
|
+
}
|
|
57
|
+
}).then((res) => {
|
|
58
|
+
if (res.code != 0) {
|
|
59
|
+
onError(res.msg);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
onSuccess(res.data);
|
|
63
|
+
}, onError);
|
|
64
|
+
};
|
|
65
|
+
const handleSuccess = (fileInfo) => {
|
|
66
|
+
const value = Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
67
|
+
emit("update:modelValue", value.concat(fileInfo));
|
|
68
|
+
};
|
|
69
|
+
const handleError = (error) => {
|
|
70
|
+
console.error(error);
|
|
71
|
+
ElMessage.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002");
|
|
72
|
+
};
|
|
73
|
+
const handleDelete = (file) => {
|
|
74
|
+
emit(
|
|
75
|
+
"update:modelValue",
|
|
76
|
+
props.modelValue.filter((fileInfo) => fileInfo !== file.response)
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
const handleDownload = async (file) => {
|
|
80
|
+
if (!unref(fileService)) {
|
|
81
|
+
ElMessage.error("\u65E0\u6CD5\u4E0B\u8F7D\u6587\u4EF6\u3002");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
const downloadFileResult = await unref(fileService).downloadFile(
|
|
86
|
+
file.response
|
|
87
|
+
);
|
|
88
|
+
if (downloadFileResult.code != 0) {
|
|
89
|
+
ElMessage.error(downloadFileResult.msg);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
} catch (e) {
|
|
93
|
+
console.error(e);
|
|
94
|
+
ElMessage.error("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25\u3002");
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return (_ctx, _cache) => {
|
|
98
|
+
const _component_Plus = resolveComponent("Plus");
|
|
99
|
+
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
100
|
+
return openBlock(), createBlock(unref(ElUpload), mergeProps(unref(attrs), {
|
|
101
|
+
"file-list": fileList.value,
|
|
102
|
+
"http-request": handleHttpRequest,
|
|
103
|
+
class: unref(ns).b(),
|
|
104
|
+
"on-success": handleSuccess,
|
|
105
|
+
"on-error": handleError
|
|
106
|
+
}), {
|
|
107
|
+
trigger: withCtx(() => [
|
|
108
|
+
createVNode(unref(ElButton), null, {
|
|
167
109
|
default: withCtx(() => [
|
|
168
|
-
createVNode(unref(
|
|
110
|
+
createVNode(unref(ElIcon), null, {
|
|
111
|
+
default: withCtx(() => [
|
|
112
|
+
createVNode(_component_Plus)
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}),
|
|
116
|
+
_cache[0] || (_cache[0] = createTextVNode(" \u4E0A\u4F20\u6587\u4EF6 ", -1))
|
|
169
117
|
]),
|
|
170
|
-
_:
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
118
|
+
_: 1
|
|
119
|
+
})
|
|
120
|
+
]),
|
|
121
|
+
file: withCtx(({ file }) => [
|
|
122
|
+
createElementVNode("div", {
|
|
123
|
+
class: normalizeClass(unref(ns).b("item"))
|
|
124
|
+
}, [
|
|
125
|
+
createElementVNode("div", {
|
|
126
|
+
class: normalizeClass(unref(ns).be("item", "info"))
|
|
127
|
+
}, [
|
|
128
|
+
createVNode(_component_ElTooltip, {
|
|
129
|
+
content: file.name
|
|
130
|
+
}, {
|
|
131
|
+
default: withCtx(() => [
|
|
132
|
+
createElementVNode("div", {
|
|
133
|
+
class: normalizeClass(unref(ns).be("item", "file-name"))
|
|
134
|
+
}, toDisplayString(file.name), 3)
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, 1032, ["content"])
|
|
138
|
+
], 2),
|
|
139
|
+
createElementVNode("div", {
|
|
140
|
+
class: normalizeClass(unref(ns).be("item", "tools"))
|
|
141
|
+
}, [
|
|
142
|
+
createVNode(unref(ElIcon), {
|
|
143
|
+
class: normalizeClass(unref(ns).be("item", "tools-item")),
|
|
144
|
+
onClick: ($event) => handleDownload(file)
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(unref(Download))
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["class", "onClick"]),
|
|
151
|
+
createVNode(unref(ElIcon), {
|
|
152
|
+
class: normalizeClass(unref(ns).be("item", "tools-item")),
|
|
153
|
+
onClick: ($event) => handleDelete(file)
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
createVNode(unref(Delete))
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
}, 8, ["class", "onClick"])
|
|
160
|
+
], 2)
|
|
161
|
+
], 2)
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 16, ["file-list", "class"]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-upload.vue"]]);
|
|
182
169
|
|
|
183
170
|
export { Upload as default };
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { computed, useAttrs, openBlock, createBlock, mergeProps, unref
|
|
1
|
+
import { defineComponent, computed, useAttrs, openBlock, createBlock, mergeProps, unref } from 'vue';
|
|
2
2
|
import UserSelect from './bwa-user-select.mjs';
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const props = __props;
|
|
14
|
-
|
|
15
|
-
defineOptions({
|
|
16
|
-
name: 'BwaUserMultiSelect',
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const modelValue = computed({
|
|
24
|
-
get: () => props.modelValue,
|
|
25
|
-
set: (v) => emit('update:model-value', v),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const attrs = useAttrs();
|
|
29
|
-
|
|
30
|
-
return (_ctx, _cache) => {
|
|
31
|
-
return (openBlock(), createBlock(UserSelect, mergeProps({
|
|
32
|
-
modelValue: unref(modelValue),
|
|
33
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null))
|
|
34
|
-
}, unref(attrs), { multiple: "" }), null, 16 /* FULL_PROPS */, ["modelValue"]))
|
|
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
|
+
}
|
|
35
13
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "BwaUserMultiSelect"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: null
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:model-value"],
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
;
|
|
24
|
+
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const modelValue = computed({
|
|
27
|
+
get: () => props.modelValue,
|
|
28
|
+
set: (v) => emit("update:model-value", v)
|
|
29
|
+
});
|
|
30
|
+
const attrs = useAttrs();
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createBlock(UserSelect, mergeProps({
|
|
33
|
+
modelValue: modelValue.value,
|
|
34
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
35
|
+
}, unref(attrs), { multiple: "" }), null, 16, ["modelValue"]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
var UserMultiSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-user-multi-select.vue"]]);
|
|
40
40
|
|
|
41
41
|
export { UserMultiSelect as default };
|