@ctzy-web-client/plugin-component-vue 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/advance-select/advance-operation.mjs +51 -37
- package/es/advance-select/advance-option.mjs +167 -97
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
- package/es/advance-select/advance-select.mjs +368 -310
- package/es/advance-select/index.mjs +5 -5
- package/es/application-slot/breadcrumb-item.mjs +20 -17
- package/es/application-slot/header-tools-item.mjs +20 -17
- package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
- package/es/contextmenu/contextmenu-item.mjs +19 -15
- package/es/contextmenu/contextmenu.mjs +72 -56
- package/es/data-form/data-form-item.mjs +48 -30
- package/es/data-form/data-form.mjs +213 -166
- package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
- package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
- package/es/data-form/form-components/bwa-input-float.mjs +48 -37
- package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
- package/es/data-form/form-components/bwa-input.mjs +43 -32
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
- package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
- package/es/data-form/form-components/bwa-select.mjs +84 -70
- package/es/data-form/form-components/bwa-textarea.mjs +38 -27
- package/es/data-form/form-components/bwa-upload.mjs +172 -148
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
- package/es/data-form/form-components/bwa-user-select.mjs +86 -61
- package/es/data-table/data-column-view.mjs +146 -115
- package/es/data-table/data-table-card.mjs +48 -40
- package/es/data-table/data-table-column.mjs +58 -45
- package/es/data-table/data-table.mjs +402 -316
- package/es/datatable-settings/datatable-settings.mjs +329 -254
- package/es/date-range/date-picker.mjs +130 -116
- package/es/date-range/date-range.mjs +215 -161
- package/es/drag-list/drag-item.mjs +56 -42
- package/es/drag-list/drag-list.mjs +60 -47
- package/es/dragable/dragable-item.mjs +23 -18
- package/es/dragable/dragable-operation.mjs +32 -24
- package/es/dragable/dragable.mjs +32 -23
- package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
- package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
- package/es/filter-panel/conditions/input-condition.mjs +90 -76
- package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
- package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
- package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
- package/es/filter-panel/filter-panel-item.mjs +54 -39
- package/es/filter-panel/filter-panel.mjs +153 -135
- package/es/layout/layout.mjs +85 -78
- package/es/menu/menu-item.mjs +67 -52
- package/es/menu/menu.mjs +70 -53
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
- package/es/panel/panel.mjs +53 -40
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
- package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
- package/es/progress/progress-item.mjs +81 -61
- package/es/progress/progress.mjs +78 -64
- package/es/where-filter-panel/where-filter-panel.mjs +15 -12
- package/lib/advance-select/advance-operation.js +50 -36
- package/lib/advance-select/advance-option.js +166 -96
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
- package/lib/advance-select/advance-select.js +366 -308
- package/lib/application-slot/breadcrumb-item.js +19 -16
- package/lib/application-slot/header-tools-item.js +19 -16
- package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
- package/lib/contextmenu/contextmenu-item.js +18 -14
- package/lib/contextmenu/contextmenu.js +71 -55
- package/lib/data-form/data-form-item.js +47 -29
- package/lib/data-form/data-form.js +212 -165
- package/lib/data-form/form-components/bwa-date-picker.js +50 -38
- package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
- package/lib/data-form/form-components/bwa-input-float.js +47 -36
- package/lib/data-form/form-components/bwa-input-integer.js +67 -49
- package/lib/data-form/form-components/bwa-input.js +42 -31
- package/lib/data-form/form-components/bwa-multi-select.js +39 -28
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
- package/lib/data-form/form-components/bwa-rich-text.js +403 -315
- package/lib/data-form/form-components/bwa-select.js +83 -69
- package/lib/data-form/form-components/bwa-textarea.js +37 -26
- package/lib/data-form/form-components/bwa-upload.js +171 -147
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
- package/lib/data-form/form-components/bwa-user-select.js +85 -60
- package/lib/data-table/data-column-view.js +146 -115
- package/lib/data-table/data-table-card.js +48 -40
- package/lib/data-table/data-table-column.js +57 -44
- package/lib/data-table/data-table.js +401 -315
- package/lib/datatable-settings/datatable-settings.js +328 -253
- package/lib/date-range/date-picker.js +129 -115
- package/lib/date-range/date-range.js +214 -160
- package/lib/drag-list/drag-item.js +55 -41
- package/lib/drag-list/drag-list.js +59 -46
- package/lib/dragable/dragable-item.js +22 -17
- package/lib/dragable/dragable-operation.js +31 -23
- package/lib/dragable/dragable.js +31 -22
- package/lib/filter-panel/conditions/date-range-condition.js +49 -39
- package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
- package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
- package/lib/filter-panel/conditions/input-condition.js +89 -75
- package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
- package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
- package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
- package/lib/filter-panel/conditions/single-user-condition.js +66 -56
- package/lib/filter-panel/filter-panel-item.js +53 -38
- package/lib/filter-panel/filter-panel.js +152 -134
- package/lib/layout/layout.js +84 -77
- package/lib/menu/menu-item.js +66 -51
- package/lib/menu/menu.js +69 -52
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/lib/panel/panel.js +52 -39
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
- package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
- package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
- package/lib/progress/progress-item.js +80 -60
- package/lib/progress/progress.js +77 -63
- package/lib/where-filter-panel/where-filter-panel.js +14 -11
- package/package.json +2 -1
- package/src/advance-select/advance-option.vue +64 -13
- package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
- package/src/datatable-settings/datatable-settings.vue +33 -3
- package/src/date-range/date-picker.vue +1 -1
- package/src/filter-panel/filter-panel.vue +2 -2
- package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
- package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
- package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
|
@@ -1,76 +1,90 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, useAttrs, openBlock, createBlock, unref, mergeProps, isRef, 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
|
-
const
|
|
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
|
-
emits: ["update:modelValue"],
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: 'bwa-select',
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: null,
|
|
10
|
+
},
|
|
11
|
+
options: {
|
|
12
|
+
type: Array,
|
|
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'],
|
|
31
29
|
setup(__props, { emit }) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
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"]))
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
};
|
|
88
|
+
var Select = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"bwa-select.vue"]]);
|
|
75
89
|
|
|
76
90
|
export { Select as default };
|
|
@@ -1,33 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAttrs, computed, openBlock, createBlock, unref, mergeProps, isRef } from 'vue';
|
|
2
2
|
import { ElInput } from 'element-plus';
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:model-value"],
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: 'bwa-textarea',
|
|
7
|
+
props: {
|
|
8
|
+
value: {
|
|
9
|
+
type: [String, Number],
|
|
10
|
+
default: '',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
emits: ['update:model-value'],
|
|
16
14
|
setup(__props, { emit }) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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"]))
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
};
|
|
42
|
+
var Textarea = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"bwa-textarea.vue"]]);
|
|
32
43
|
|
|
33
44
|
export { Textarea as default };
|
|
@@ -1,159 +1,183 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { 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
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:modelValue"],
|
|
7
|
+
const _sfc_main = {
|
|
8
|
+
__name: 'bwa-upload',
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: Array, default: () => [] },
|
|
11
|
+
},
|
|
12
|
+
emits: ['update:modelValue'],
|
|
15
13
|
setup(__props, { emit }) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
14
|
+
|
|
15
|
+
const props = __props;
|
|
16
|
+
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'BwaUpload',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
watch(
|
|
26
|
+
computed(() => props.modelValue),
|
|
27
|
+
(modelValue) => {
|
|
28
|
+
if (!Array.isArray(modelValue)) {
|
|
29
|
+
emit('update:modelValue', []);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{ immediate: true }
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const fileList = computed(() =>
|
|
36
|
+
(Array.isArray(props.modelValue) ? props.modelValue : []).map((fileInfo) => {
|
|
37
|
+
return {
|
|
38
|
+
name: fileInfo.fileName,
|
|
39
|
+
response: fileInfo,
|
|
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, {
|
|
98
123
|
default: withCtx(() => [
|
|
99
|
-
createVNode(
|
|
100
|
-
default: withCtx(() => [
|
|
101
|
-
createVNode(_component_Plus)
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
}),
|
|
105
|
-
createTextVNode(" \u4E0A\u4F20\u6587\u4EF6 ")
|
|
124
|
+
createVNode(_component_Plus)
|
|
106
125
|
]),
|
|
107
|
-
_: 1
|
|
108
|
-
})
|
|
126
|
+
_: 1 /* STABLE */
|
|
127
|
+
}),
|
|
128
|
+
createTextVNode(" 上传文件 ")
|
|
109
129
|
]),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
]
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
130
|
+
_: 1 /* STABLE */
|
|
131
|
+
})
|
|
132
|
+
]),
|
|
133
|
+
file: withCtx(({ file }) => [
|
|
134
|
+
createElementVNode("div", {
|
|
135
|
+
class: normalizeClass(unref(ns).b('item'))
|
|
136
|
+
}, [
|
|
137
|
+
createElementVNode("div", {
|
|
138
|
+
class: normalizeClass(unref(ns).be('item', 'info'))
|
|
139
|
+
}, [
|
|
140
|
+
createVNode(_component_ElTooltip, {
|
|
141
|
+
content: file.name
|
|
142
|
+
}, {
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createElementVNode("div", {
|
|
145
|
+
class: normalizeClass(unref(ns).be('item', 'file-name'))
|
|
146
|
+
}, toDisplayString(file.name), 3 /* TEXT, CLASS */)
|
|
147
|
+
]),
|
|
148
|
+
_: 2 /* DYNAMIC */
|
|
149
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content"])
|
|
150
|
+
], 2 /* CLASS */),
|
|
151
|
+
createElementVNode("div", {
|
|
152
|
+
class: normalizeClass(unref(ns).be('item', 'tools'))
|
|
153
|
+
}, [
|
|
154
|
+
createVNode(unref(ElIcon), {
|
|
155
|
+
class: normalizeClass(unref(ns).be('item', 'tools-item')),
|
|
156
|
+
onClick: $event => (handleDownload(file))
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
createVNode(unref(Download))
|
|
160
|
+
]),
|
|
161
|
+
_: 2 /* DYNAMIC */
|
|
162
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "onClick"]),
|
|
163
|
+
createVNode(unref(ElIcon), {
|
|
164
|
+
class: normalizeClass(unref(ns).be('item', 'tools-item')),
|
|
165
|
+
onClick: $event => (handleDelete(file))
|
|
166
|
+
}, {
|
|
167
|
+
default: withCtx(() => [
|
|
168
|
+
createVNode(unref(Delete))
|
|
169
|
+
]),
|
|
170
|
+
_: 2 /* DYNAMIC */
|
|
171
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "onClick"])
|
|
172
|
+
], 2 /* CLASS */)
|
|
173
|
+
], 2 /* CLASS */)
|
|
174
|
+
]),
|
|
175
|
+
_: 1 /* STABLE */
|
|
176
|
+
}, 16 /* FULL_PROPS */, ["file-list", "class"]))
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
};
|
|
181
|
+
var Upload = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"bwa-upload.vue"]]);
|
|
158
182
|
|
|
159
183
|
export { Upload as default };
|
|
@@ -1,30 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, useAttrs, openBlock, createBlock, mergeProps, unref, isRef } 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
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
emits: ["update:model-value"],
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: 'bwa-user-multi-select',
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: null,
|
|
9
|
+
},
|
|
10
|
+
emits: ['update:model-value'],
|
|
13
11
|
setup(__props, { emit }) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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"]))
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
};
|
|
39
|
+
var UserMultiSelect = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"bwa-user-multi-select.vue"]]);
|
|
29
40
|
|
|
30
41
|
export { UserMultiSelect as default };
|