@vunk/form 2.18.2 → 2.19.0
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/components/_plugin-vue_export-helper.cjs +1 -11
- package/components/api-tables-select/index.cjs +1 -467
- package/components/api-tables-select/index.mjs +56 -413
- package/components/api-tables-select/src/ctx.d.ts +152 -172
- package/components/api-tables-select/src/index.vue.d.ts +394 -983
- package/components/button/index.cjs +1 -112
- package/components/button/index.mjs +57 -85
- package/components/button/src/ctx.d.ts +28 -113
- package/components/button/src/index.vue.d.ts +317 -625
- package/components/card-input-collection/index.cjs +1 -370
- package/components/card-input-collection/index.mjs +175 -277
- package/components/card-input-collection/src/core.vue.d.ts +54 -951
- package/components/card-input-collection/src/ctx.d.ts +19 -49
- package/components/card-input-collection/src/index.vue.d.ts +46 -110
- package/components/cascader/index.cjs +1 -150
- package/components/cascader/index.mjs +88 -116
- package/components/cascader/src/ctx.d.ts +140 -207
- package/components/cascader/src/index.vue.d.ts +315 -522
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.cjs +1 -152
- package/components/checkbox/index.mjs +75 -119
- package/components/checkbox/src/ctx.d.ts +46 -69
- package/components/checkbox/src/index.vue.d.ts +448 -1016
- package/components/cloneDeep.cjs +1 -2106
- package/components/color-picker/index.cjs +1 -80
- package/components/color-picker/index.mjs +46 -69
- package/components/color-picker/src/ctx.d.ts +130 -107
- package/components/color-picker/src/index.vue.d.ts +285 -255
- package/components/date-picker/index.cjs +1 -119
- package/components/date-picker/index.mjs +63 -97
- package/components/date-picker/src/ctx.d.ts +123 -206
- package/components/date-picker/src/index.vue.d.ts +269 -1358
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/date-picker-range/index.cjs +1 -177
- package/components/date-picker-range/index.mjs +62 -113
- package/components/date-picker-range/src/ctx.d.ts +130 -206
- package/components/date-picker-range/src/index.vue.d.ts +861 -448
- package/components/debounce.cjs +1 -0
- package/components/dialog/index.cjs +1 -126
- package/components/dialog/index.mjs +65 -99
- package/components/dialog/src/ctx.d.ts +17 -108
- package/components/dialog/src/index.vue.d.ts +77 -1072
- package/components/dialog-input-collection/index.cjs +1 -624
- package/components/dialog-input-collection/index.mjs +276 -498
- package/components/dialog-input-collection/src/ctx.d.ts +21 -52
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +29 -6371
- package/components/dialog-input-collection/src/index.vue.d.ts +65 -7630
- package/components/dialog-input-collection/src/layout.vue.d.ts +13 -73
- package/components/download-plus/index.cjs +1 -456
- package/components/download-plus/index.mjs +215 -358
- package/components/download-plus/src/api.d.ts +1 -1
- package/components/download-plus/src/ctx.d.ts +21 -52
- package/components/download-plus/src/index.vue.d.ts +437 -1177
- package/components/editable-text/index.cjs +1 -295
- package/components/editable-text/index.mjs +113 -239
- package/components/editable-text/src/ctx.d.ts +24 -50
- package/components/editable-text/src/index.vue.d.ts +59 -3258
- package/components/el-slider/index.cjs +1 -0
- package/components/el-slider/index.d.ts +5 -0
- package/components/el-slider/index.mjs +475 -0
- package/components/el-slider/src/button.d.ts +36 -0
- package/components/el-slider/src/button.vue.d.ts +41 -0
- package/components/el-slider/src/composables/index.cjs +1 -0
- package/components/el-slider/src/composables/index.d.ts +6 -0
- package/components/el-slider/src/composables/index.mjs +9 -0
- package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
- package/components/el-slider/src/composables/use-marks.d.ts +7 -0
- package/components/el-slider/src/composables/use-slide.d.ts +23 -0
- package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
- package/components/el-slider/src/composables/use-stops.d.ts +8 -0
- package/components/el-slider/src/composables/use-watch.d.ts +4 -0
- package/components/el-slider/src/constants.d.ts +14 -0
- package/components/el-slider/src/marker.d.ts +37 -0
- package/components/el-slider/src/slider-core.vue.d.ts +218 -0
- package/components/el-slider/src/slider.d.ts +174 -0
- package/components/esri-input-geojson/index.cjs +2 -1604
- package/components/esri-input-geojson/index.mjs +682 -1290
- package/components/esri-input-geojson/src/append.vue.d.ts +239 -1099
- package/components/esri-input-geojson/src/const.d.ts +1 -1
- package/components/esri-input-geojson/src/ctx.d.ts +66 -161
- package/components/esri-input-geojson/src/default-view.vue.d.ts +8 -132
- package/components/esri-input-geojson/src/index.vue.d.ts +982 -708
- package/components/esri-input-geojson/src/types.d.ts +1 -0
- package/components/esri-input-geojson/src/viewer.vue.d.ts +53 -282
- package/components/fieldset/index.cjs +1 -110
- package/components/fieldset/index.mjs +63 -76
- package/components/fieldset/src/ctx.d.ts +4 -4
- package/components/fieldset/src/index.vue.d.ts +7 -7
- package/components/form/index.cjs +1 -248
- package/components/form/index.mjs +107 -161
- package/components/form/src/ctx.d.ts +15 -64
- package/components/form/src/index.vue.d.ts +374 -2431
- package/components/form-item/index.cjs +1 -294
- package/components/form-item/index.mjs +140 -229
- package/components/form-item/src/core.vue.d.ts +32 -1854
- package/components/form-item/src/ctx.d.ts +19 -51
- package/components/form-item/src/index.vue.d.ts +38 -101
- package/components/form-item-renderer/index.cjs +1 -193
- package/components/form-item-renderer/index.mjs +103 -162
- package/components/form-item-renderer/src/core.vue.d.ts +9 -9
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +24 -74
- package/components/form-item-renderer-template/index.cjs +1 -47
- package/components/form-item-renderer-template/index.mjs +20 -33
- package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
- package/components/forms-provider/index.cjs +1 -99
- package/components/forms-provider/index.mjs +44 -73
- package/components/forms-provider/src/core.d.ts +3 -2
- package/components/forms-provider/src/segment.vue.d.ts +8 -8
- package/components/forms-provider/src/view.vue.d.ts +14 -4
- package/components/index.cjs +1 -399
- package/components/index2.cjs +1 -17
- package/components/information/index.cjs +1 -65
- package/components/information/index.mjs +28 -38
- package/components/information/src/ctx.d.ts +2 -2
- package/components/information/src/index.vue.d.ts +4 -4
- package/components/information-collection/index.cjs +1 -81
- package/components/information-collection/index.mjs +44 -48
- package/components/information-collection/src/ctx.d.ts +29 -65
- package/components/information-collection/src/index.vue.d.ts +64 -136
- package/components/information-renderer/index.cjs +1 -16
- package/components/information-renderer/index.d.ts +9 -9
- package/components/information-renderer/index.mjs +9 -10
- package/components/information-tag/index.cjs +1 -101
- package/components/information-tag/index.mjs +44 -54
- package/components/information-tag/src/ctx.d.ts +6 -21
- package/components/information-tag/src/index.vue.d.ts +23 -51
- package/components/information-templates-default/index.cjs +1 -101
- package/components/information-templates-default/index.mjs +63 -73
- package/components/information-templates-default/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -115
- package/components/input/index.mjs +60 -83
- package/components/input/src/ctx.d.ts +51 -152
- package/components/input/src/index.vue.d.ts +392 -951
- package/components/input-array/index.cjs +1 -310
- package/components/input-array/index.mjs +114 -244
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +1 -901
- package/components/input-array/src/index.vue.d.ts +43 -730
- package/components/input-collection/index.cjs +1 -452
- package/components/input-collection/index.mjs +195 -355
- package/components/input-collection/src/core.vue.d.ts +64 -1026
- package/components/input-collection/src/ctx.d.ts +21 -51
- package/components/input-collection/src/index.vue.d.ts +50 -114
- package/components/input-file/index.cjs +1 -142
- package/components/input-file/index.mjs +68 -100
- package/components/input-file/src/ctx.d.ts +8 -29
- package/components/input-file/src/index.vue.d.ts +444 -74
- package/components/input-file/src/template.vue.d.ts +1 -124
- package/components/input-link/index.cjs +1 -167
- package/components/input-link/index.mjs +60 -83
- package/components/input-link/src/ctx.d.ts +52 -137
- package/components/input-link/src/index.vue.d.ts +833 -311
- package/components/input-number/index.cjs +1 -119
- package/components/input-number/index.mjs +73 -87
- package/components/input-number/src/ctx.d.ts +38 -131
- package/components/input-number/src/index.vue.d.ts +321 -683
- package/components/input-tag/index.cjs +1 -100
- package/components/input-tag/index.mjs +51 -78
- package/components/input-tag/src/ctx.d.ts +43 -145
- package/components/input-tag/src/index.vue.d.ts +324 -778
- package/components/isObject.cjs +1 -165
- package/components/monaco-editor/index.cjs +1 -83
- package/components/monaco-editor/index.mjs +40 -59
- package/components/monaco-editor/src/ctx.d.ts +19 -44
- package/components/monaco-editor/src/index.vue.d.ts +209 -109
- package/components/radio/index.cjs +1 -267
- package/components/radio/index.mjs +110 -209
- package/components/radio/src/ctx.d.ts +27 -91
- package/components/radio/src/index.vue.d.ts +298 -1279
- package/components/radio/src/option.vue.d.ts +29 -881
- package/components/radio/src/wraper.vue.d.ts +64 -196
- package/components/renderer-data/index.cjs +1 -41
- package/components/renderer-data/index.mjs +19 -26
- package/components/renderer-data/src/ctx.d.ts +1 -1
- package/components/renderer-data/src/index.vue.d.ts +2 -2
- package/components/select/index.cjs +1 -311
- package/components/select/index.mjs +156 -214
- package/components/select/src/core.vue.d.ts +638 -1080
- package/components/select/src/ctx.d.ts +140 -223
- package/components/select/src/index.vue.d.ts +334 -610
- package/components/select/src/options.vue.d.ts +1 -1
- package/components/slider/index.cjs +1 -88
- package/components/slider/index.mjs +41 -70
- package/components/slider/src/ctx.d.ts +63 -174
- package/components/slider/src/index.vue.d.ts +151 -420
- package/components/style.css +1 -0
- package/components/switch/index.cjs +1 -88
- package/components/switch/index.mjs +37 -69
- package/components/switch/src/ctx.d.ts +34 -113
- package/components/switch/src/index.vue.d.ts +88 -699
- package/components/switch/src/types.d.ts +2 -2
- package/components/tables-select/index.cjs +1 -263
- package/components/tables-select/index.mjs +102 -172
- package/components/tables-select/src/ctx.d.ts +76 -91
- package/components/tables-select/src/index.vue.d.ts +228 -4969
- package/components/template-instances-provider/index.cjs +1 -31
- package/components/template-instances-provider/index.mjs +18 -22
- package/components/template-instances-provider/src/index.vue.d.ts +2 -2
- package/components/templates-default/index.cjs +1 -235
- package/components/templates-default/index.mjs +152 -211
- package/components/templates-default/src/ctx.d.ts +5 -3
- package/components/templates-default/src/index.vue.d.ts +7298 -157
- package/components/templates-element-plus/index.cjs +1 -112
- package/components/templates-element-plus/index.mjs +49 -91
- package/components/templates-element-plus/src/ctx.d.ts +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +65 -258
- package/components/templates-esri/index.cjs +1 -65
- package/components/templates-esri/index.mjs +29 -39
- package/components/templates-esri/src/ctx.d.ts +1 -1
- package/components/templates-esri/src/index.vue.d.ts +1776 -24
- package/components/templates-layout/index.cjs +1 -137
- package/components/templates-layout/index.mjs +78 -116
- package/components/templates-layout/src/ctx.d.ts +1 -1
- package/components/templates-layout/src/index.vue.d.ts +79 -411
- package/components/templates-variant/index.cjs +1 -70
- package/components/templates-variant/index.mjs +33 -43
- package/components/templates-variant/src/ctx.d.ts +1 -1
- package/components/templates-variant/src/index.vue.d.ts +1238 -24
- package/components/time-picker/index.cjs +1 -104
- package/components/time-picker/index.mjs +57 -87
- package/components/time-picker/src/ctx.d.ts +121 -211
- package/components/time-picker/src/index.vue.d.ts +263 -1368
- package/components/upload/index.cjs +1 -663
- package/components/upload/index.mjs +343 -537
- package/components/upload/src/ctx.d.ts +108 -195
- package/components/upload/src/file.vue.d.ts +197 -776
- package/components/upload/src/index.vue.d.ts +689 -1931
- package/components/upload/src/types.d.ts +1 -1
- package/components/upload/src/wraper.vue.d.ts +232 -407
- package/components/upload-plus/index.cjs +21 -18673
- package/components/upload-plus/index.mjs +4598 -18372
- package/components/upload-plus/src/api.d.ts +2 -2
- package/components/upload-plus/src/ctx.d.ts +24 -51
- package/components/upload-plus/src/index.vue.d.ts +51 -1656
- package/components/use-watch.cjs +1 -0
- package/components/van-cascader/index.cjs +1 -125
- package/components/van-cascader/index.mjs +51 -96
- package/components/van-cascader/src/ctx.d.ts +135 -203
- package/components/van-cascader/src/index.vue.d.ts +312 -985
- package/components/var-datetime-picker/index.cjs +1 -333
- package/components/var-datetime-picker/index.mjs +175 -254
- package/components/var-datetime-picker/src/ctx.d.ts +19 -50
- package/components/var-datetime-picker/src/index.vue.d.ts +688 -1115
- package/components/vditor/index.cjs +1 -86
- package/components/vditor/index.mjs +40 -66
- package/components/vditor/src/ctx.d.ts +16 -45
- package/components/vditor/src/index.vue.d.ts +195 -120
- package/composables/element-plus/index.cjs +1 -23
- package/composables/element-plus/index.mjs +14 -18
- package/composables/index.cjs +1 -161
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +102 -135
- package/composables/useForm.d.ts +2 -2
- package/composables/useRtl.d.ts +18 -0
- package/composables/useSourceManager.d.ts +2 -2
- package/composables/useTemplateInstances.d.ts +3 -3
- package/index.css +1 -562
- package/index.d.ts +0 -3
- package/index.esm.js +23 -48
- package/locale/index.cjs +1 -102
- package/locale/index.mjs +34 -34
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/package.json +14 -85
- package/shared/const/index.cjs +1 -59
- package/shared/const/index.d.ts +1 -1
- package/shared/const/index.mjs +18 -20
- package/shared/element-plus/ctx.d.ts +40 -37
- package/shared/element-plus/index.cjs +1 -211
- package/shared/element-plus/index.mjs +93 -161
- package/shared/element-plus/instances.d.ts +207 -321
- package/shared/form/index.cjs +1 -33
- package/shared/form/index.mjs +23 -25
- package/shared/helper/index.cjs +1 -11
- package/shared/helper/index.mjs +7 -8
- package/shared/index.cjs +1 -8
- package/shared/index.mjs +5 -1
- package/shared/infer-prop/index.cjs +1 -36
- package/shared/infer-prop/index.mjs +22 -28
- package/shared/progress-it/index.cjs +1 -42
- package/shared/progress-it/index.mjs +15 -31
- package/shared/rules/index.cjs +1 -56
- package/shared/rules/index.mjs +19 -18
- package/shared/types/form/index.cjs +1 -2
- package/shared/types/index.cjs +1 -2
- package/shared/types/source/index.cjs +1 -2
- package/shared/types/source-manager/index.cjs +1 -2
- package/shared/upload/index.cjs +1 -774
- package/shared/upload/index.mjs +180 -764
- package/component.d.ts +0 -3
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/card-input-collection/index.css +0 -21
- package/components/cascader/index.css +0 -9
- package/components/checkbox/index.css +0 -30
- package/components/cloneDeep.mjs +0 -2104
- package/components/date-picker-range/index.css +0 -18
- package/components/dialog-input-collection/index.css +0 -21
- package/components/download-plus/index.css +0 -68
- package/components/editable-text/index.css +0 -9
- package/components/esri-input-geojson/index.css +0 -32
- package/components/fieldset/index.css +0 -5
- package/components/form-item/index.css +0 -35
- package/components/index.mjs +0 -378
- package/components/index2.mjs +0 -14
- package/components/information-tag/index.css +0 -6
- package/components/information-templates-default/index.css +0 -16
- package/components/input-array/index.css +0 -14
- package/components/input-collection/index.css +0 -20
- package/components/input-link/index.css +0 -4
- package/components/input-number/index.css +0 -13
- package/components/isObject.mjs +0 -158
- package/components/monaco-editor/index.css +0 -4
- package/components/radio/index.css +0 -40
- package/components/select/index.css +0 -15
- package/components/switch/index.css +0 -10
- package/components/tables-select/index.css +0 -3
- package/components/templates-layout/index.css +0 -3
- package/components/upload/index.css +0 -34
- package/components/upload-plus/index.css +0 -84
- package/components/van-cascader/index.css +0 -6
- package/components/var-datetime-picker/index.css +0 -17
- package/defaults.d.ts +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BasicSource } from '@vunk/form/shared';
|
|
2
|
-
import { VueComponentPropsType } from '@vunk/core';
|
|
1
|
+
import type { BasicSource } from '@vunk/form/shared';
|
|
2
|
+
import type { VueComponentPropsType } from '@vunk/core';
|
|
3
3
|
import VkfSwitch from './index.vue';
|
|
4
4
|
export interface Source<P = string> extends VueComponentPropsType<typeof VkfSwitch>, BasicSource {
|
|
5
5
|
prop: P;
|
|
@@ -1,263 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tablesV1Checkbox = require('@vunk/plus/components/tables-v1-checkbox');
|
|
6
|
-
var formItem = require('@vunk/form/components/form-item');
|
|
7
|
-
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
8
|
-
var vue = require('vue');
|
|
9
|
-
var select = require('@vunk/form/components/select');
|
|
10
|
-
var elementPlus = require('element-plus');
|
|
11
|
-
var array = require('@vunk/shared/array');
|
|
12
|
-
var object = require('@vunk/shared/object');
|
|
13
|
-
var composables = require('@vunk/form/composables');
|
|
14
|
-
var elementPlus$1 = require('@vunk/form/composables/element-plus');
|
|
15
|
-
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
16
|
-
|
|
17
|
-
const props = {
|
|
18
|
-
...formItem._VkfFormItemCtx.props,
|
|
19
|
-
...tablesV1Checkbox._VkTablesV1CheckboxCtx.props,
|
|
20
|
-
prop: null,
|
|
21
|
-
/**
|
|
22
|
-
* @description v-model 绑定值
|
|
23
|
-
*/
|
|
24
|
-
modelValue: {
|
|
25
|
-
type: [Array, String],
|
|
26
|
-
default: () => []
|
|
27
|
-
},
|
|
28
|
-
labelField: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: "label"
|
|
31
|
-
},
|
|
32
|
-
clearable: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: true
|
|
35
|
-
},
|
|
36
|
-
multiple: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* @description 获取完整数据
|
|
42
|
-
*/
|
|
43
|
-
getRows: {
|
|
44
|
-
type: Function,
|
|
45
|
-
default: () => []
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* @description 是否在补全 Rows 后更新 modelValue
|
|
49
|
-
*/
|
|
50
|
-
updateWhenCompleted: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
},
|
|
54
|
-
/**
|
|
55
|
-
* @description 是否将选中的数据 join 为字符串
|
|
56
|
-
*/
|
|
57
|
-
stringify: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* @description 是否只读
|
|
63
|
-
*/
|
|
64
|
-
readonly: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: void 0
|
|
67
|
-
},
|
|
68
|
-
placeholder: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: ""
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* @description dialog 样式
|
|
74
|
-
*/
|
|
75
|
-
dialogClass: null,
|
|
76
|
-
/**
|
|
77
|
-
* @description check 触发方式
|
|
78
|
-
*/
|
|
79
|
-
checkTrigger: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: "rowClick"
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
85
|
-
const emits = {
|
|
86
|
-
...tablesV1Checkbox._VkTablesV1CheckboxCtx.emits,
|
|
87
|
-
"update:modelValue": null
|
|
88
|
-
};
|
|
89
|
-
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
90
|
-
|
|
91
|
-
var ctx = /*#__PURE__*/Object.freeze({
|
|
92
|
-
__proto__: null,
|
|
93
|
-
createBindProps: createBindProps,
|
|
94
|
-
createOnEmits: createOnEmits,
|
|
95
|
-
emits: emits,
|
|
96
|
-
props: props
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
var _sfc_main = vue.defineComponent({
|
|
100
|
-
name: "VkfTablesSelect",
|
|
101
|
-
components: {
|
|
102
|
-
VkfSelect: select.VkfSelect,
|
|
103
|
-
VkTablesV1Checkbox: tablesV1Checkbox.VkTablesV1Checkbox,
|
|
104
|
-
ElDialog: elementPlus.ElDialog
|
|
105
|
-
},
|
|
106
|
-
inheritAttrs: false,
|
|
107
|
-
props,
|
|
108
|
-
emits,
|
|
109
|
-
setup(props2, { emit }) {
|
|
110
|
-
const formItemProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
111
|
-
const tablesProps = tablesV1Checkbox._VkTablesV1CheckboxCtx.createBindProps(props2, ["modelValue"]);
|
|
112
|
-
const tablesEmits = tablesV1Checkbox._VkTablesV1CheckboxCtx.createOnEmits(emit, ["update:modelValue"]);
|
|
113
|
-
const readonly = composables.useComputedReadonly(props2);
|
|
114
|
-
const { tr } = elementPlus$1.useLocale();
|
|
115
|
-
const dialogVisible = vue.ref(false);
|
|
116
|
-
const backupRowMap = vue.ref(/* @__PURE__ */ new Map());
|
|
117
|
-
const theModelValue = vue.computed({
|
|
118
|
-
get: () => {
|
|
119
|
-
if (props2.stringify && typeof props2.modelValue === "string") {
|
|
120
|
-
return props2.modelValue ? props2.modelValue.split(",").map((v) => ({ [props2.oidField]: v })) : [];
|
|
121
|
-
}
|
|
122
|
-
return props2.modelValue;
|
|
123
|
-
},
|
|
124
|
-
set: (modelValue) => {
|
|
125
|
-
if (!Array.isArray(modelValue)) {
|
|
126
|
-
modelValue = modelValue ? [modelValue] : [];
|
|
127
|
-
}
|
|
128
|
-
if (props2.stringify) {
|
|
129
|
-
const value = modelValue.reduce((a, v) => {
|
|
130
|
-
if (object.isNotEmptyObject(v) && v[props2.oidField] !== void 0) {
|
|
131
|
-
a.push(v[props2.oidField]);
|
|
132
|
-
}
|
|
133
|
-
return a;
|
|
134
|
-
}, []).join(",");
|
|
135
|
-
emit("update:modelValue", value);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
emit("update:modelValue", modelValue);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
const selectOptions = vue.computed(() => {
|
|
142
|
-
return theModelValue.value.map((item) => {
|
|
143
|
-
const backupRow = backupRowMap.value.get(item[props2.oidField]);
|
|
144
|
-
return {
|
|
145
|
-
label: item[props2.labelField] || backupRow?.[props2.labelField],
|
|
146
|
-
value: item
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
const selectValue = vue.computed(() => {
|
|
151
|
-
return props2.multiple ? theModelValue.value : theModelValue.value[0];
|
|
152
|
-
});
|
|
153
|
-
vue.watch(
|
|
154
|
-
() => selectOptions.value.filter((v) => !v.label),
|
|
155
|
-
(rows) => {
|
|
156
|
-
if (!rows.length) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
readItems(rows.map((v) => v.value[props2.oidField])).then(() => {
|
|
160
|
-
if (props2.stringify) return;
|
|
161
|
-
if (!props2.updateWhenCompleted) return;
|
|
162
|
-
const newModelValue = theModelValue.value.reduce((a, v) => {
|
|
163
|
-
const backupRow = backupRowMap.value.get(v[props2.oidField]);
|
|
164
|
-
backupRow ? a.push(backupRow) : a.push(v);
|
|
165
|
-
return a;
|
|
166
|
-
}, []);
|
|
167
|
-
theModelValue.value = newModelValue;
|
|
168
|
-
});
|
|
169
|
-
},
|
|
170
|
-
{ immediate: true }
|
|
171
|
-
);
|
|
172
|
-
async function readItems(ids) {
|
|
173
|
-
const idRows = ids.filter((v) => !backupRowMap.value.has(v)).map((id) => ({ [props2.oidField]: id }));
|
|
174
|
-
if (!idRows.length) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
const { updateRows, addMap } = array.compareArray(props2.data, idRows, props2.oidField);
|
|
178
|
-
updateRows.forEach((row) => {
|
|
179
|
-
backupRowMap.value.set(row[props2.oidField], row);
|
|
180
|
-
});
|
|
181
|
-
if (!addMap.size) {
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
const oids = Array.from(addMap.keys());
|
|
185
|
-
const rows = await props2.getRows(oids);
|
|
186
|
-
rows.forEach((row) => {
|
|
187
|
-
backupRowMap.value.set(row[props2.oidField], row);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
return {
|
|
191
|
-
formItemProps,
|
|
192
|
-
selectOptions,
|
|
193
|
-
tablesProps,
|
|
194
|
-
tablesEmits,
|
|
195
|
-
dialogVisible,
|
|
196
|
-
selectValue,
|
|
197
|
-
theModelValue,
|
|
198
|
-
readonly,
|
|
199
|
-
tr
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
205
|
-
const _component_VkfSelect = vue.resolveComponent("VkfSelect");
|
|
206
|
-
const _component_VkTablesV1Checkbox = vue.resolveComponent("VkTablesV1Checkbox");
|
|
207
|
-
const _component_ElDialog = vue.resolveComponent("ElDialog");
|
|
208
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
209
|
-
vue.Fragment,
|
|
210
|
-
null,
|
|
211
|
-
[
|
|
212
|
-
vue.createVNode(_component_VkfSelect, vue.mergeProps({
|
|
213
|
-
..._ctx.formItemProps,
|
|
214
|
-
..._ctx.$attrs
|
|
215
|
-
}, {
|
|
216
|
-
multiple: _ctx.multiple,
|
|
217
|
-
options: _ctx.selectOptions,
|
|
218
|
-
"model-value": _ctx.selectValue,
|
|
219
|
-
clearable: _ctx.clearable,
|
|
220
|
-
"popper-class": "vkf-tables-select__popper",
|
|
221
|
-
"value-key": _ctx.oidField,
|
|
222
|
-
readonly: _ctx.readonly,
|
|
223
|
-
placeholder: _ctx.placeholder,
|
|
224
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.theModelValue = $event),
|
|
225
|
-
onVisibleChange: _cache[1] || (_cache[1] = ($event) => !_ctx.readonly && (_ctx.dialogVisible = true))
|
|
226
|
-
}), null, 16, ["multiple", "options", "model-value", "clearable", "value-key", "readonly", "placeholder"]),
|
|
227
|
-
vue.createVNode(_component_ElDialog, {
|
|
228
|
-
modelValue: _ctx.dialogVisible,
|
|
229
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.dialogVisible = $event),
|
|
230
|
-
title: _ctx.placeholder || _ctx.label || _ctx.tr("el.select.placeholder", "\u8BF7\u9009\u62E9"),
|
|
231
|
-
"append-to-body": "",
|
|
232
|
-
"model-class": "vkf-tables-select__model",
|
|
233
|
-
class: vue.normalizeClass(["vkf-tables-select__dialog", _ctx.dialogClass])
|
|
234
|
-
}, {
|
|
235
|
-
default: vue.withCtx(() => [
|
|
236
|
-
vue.renderSlot(_ctx.$slots, "dialog"),
|
|
237
|
-
vue.createVNode(_component_VkTablesV1Checkbox, vue.mergeProps(_ctx.tablesProps, {
|
|
238
|
-
modelValue: _ctx.theModelValue,
|
|
239
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.theModelValue = $event)
|
|
240
|
-
}, vue.toHandlers(_ctx.tablesEmits)), null, 16, ["modelValue"])
|
|
241
|
-
]),
|
|
242
|
-
_: 3
|
|
243
|
-
/* FORWARDED */
|
|
244
|
-
}, 8, ["modelValue", "title", "class"])
|
|
245
|
-
],
|
|
246
|
-
64
|
|
247
|
-
/* STABLE_FRAGMENT */
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
var VkfTablesSelect = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/tables-select/src/index.vue"]]);
|
|
251
|
-
|
|
252
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
253
|
-
__proto__: null
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
VkfTablesSelect.install = (app) => {
|
|
257
|
-
app.component(VkfTablesSelect.name || "VkfTablesSelect", VkfTablesSelect);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
exports.VkfTablesSelect = VkfTablesSelect;
|
|
261
|
-
exports._VkfTablesSelectCtx = ctx;
|
|
262
|
-
exports.__VkfTablesSelect = types;
|
|
263
|
-
exports.default = VkfTablesSelect;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@vunk/plus/components/tables-v1-checkbox"),V=require("@vunk/form/components/form-item"),g=require("@vunk/core/shared/utils-vue"),w=require("@vunk/form/components/select"),B=require("element-plus"),x=require("@vunk/shared/array"),E=require("@vunk/shared/object"),M=require("@vunk/form/composables"),O=require("@vunk/form/composables/element-plus"),f={...V._VkfFormItemCtx.props,...i._VkTablesV1CheckboxCtx.props,columns:{type:Array,default:()=>[]},prop:null,modelValue:{type:[Array,String],default:()=>[]},labelField:{type:String,default:"label"},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},getRows:{type:Function,default:()=>[]},updateWhenCompleted:{type:Boolean,default:!1},stringify:{type:Boolean,default:!1},readonly:{type:Boolean,default:void 0},placeholder:{type:String,default:""},dialogClass:null,checkTrigger:{type:String,default:"rowClick"}},j=g.bindPropsFactory(f),m={...i._VkTablesV1CheckboxCtx.emits,"update:modelValue":null},A=g.onEmitsFactory(m),R=Object.freeze(Object.defineProperty({__proto__:null,createBindProps:j,createOnEmits:A,emits:m,props:f},Symbol.toStringTag,{value:"Module"})),v=e.defineComponent({name:"VkfTablesSelect",inheritAttrs:!1,__name:"index",props:f,emits:m,setup(k,{emit:C}){const t=k,p=C,h=e.useAttrs(),F=V._VkfFormItemCtx.createBindProps(t),S=i._VkTablesV1CheckboxCtx.createBindProps(t,["modelValue"]),_=i._VkTablesV1CheckboxCtx.createOnEmits(p,["update:modelValue"]),b=M.useComputedReadonly(t),{tr:P}=O.useLocale(),c=e.ref(!1),n=e.ref(new Map),u=e.computed({get:()=>t.stringify&&typeof t.modelValue=="string"?t.modelValue?t.modelValue.split(",").map(l=>({[t.oidField]:l})):[]:t.modelValue,set:l=>{if(Array.isArray(l)||(l=l?[l]:[]),t.stringify){const o=l.reduce((a,r)=>(E.isNotEmptyObject(r)&&r[t.oidField]!==void 0&&a.push(r[t.oidField]),a),[]).join(",");p("update:modelValue",o);return}p("update:modelValue",l)}}),y=e.computed(()=>u.value.map(l=>{const o=n.value.get(l[t.oidField]);return{label:l[t.labelField]||(o==null?void 0:o[t.labelField]),value:l}})),T=e.computed(()=>t.multiple?u.value:u.value[0]);e.watch(()=>y.value.filter(l=>!l.label),l=>{l.length&&q(l.map(o=>o.value[t.oidField])).then(()=>{if(t.stringify||!t.updateWhenCompleted)return;const o=u.value.reduce((a,r)=>{const d=n.value.get(r[t.oidField]);return d?a.push(d):a.push(r),a},[]);u.value=o})},{immediate:!0});async function q(l){const o=l.filter(s=>!n.value.has(s)).map(s=>({[t.oidField]:s}));if(!o.length)return;const{updateRows:a,addMap:r}=x.compareArray(t.data,o,t.oidField);if(a.forEach(s=>{n.value.set(s[t.oidField],s)}),!r.size)return;const d=Array.from(r.keys());(await t.getRows(d)).forEach(s=>{n.value.set(s[t.oidField],s)})}return(l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.VkfSelect),e.mergeProps({...e.unref(F),...e.unref(h)},{multiple:l.multiple,options:y.value,"model-value":T.value,clearable:l.clearable,"popper-class":"vkf-tables-select__popper","value-key":l.oidField,readonly:e.unref(b),placeholder:l.placeholder,"onUpdate:modelValue":o[0]||(o[0]=a=>u.value=a),onVisibleChange:o[1]||(o[1]=a=>!e.unref(b)&&(c.value=!0))}),null,16,["multiple","options","model-value","clearable","value-key","readonly","placeholder"]),e.createVNode(e.unref(B.ElDialog),{modelValue:c.value,"onUpdate:modelValue":o[3]||(o[3]=a=>c.value=a),title:l.placeholder||l.label||e.unref(P)("el.select.placeholder","请选择"),"append-to-body":"","model-class":"vkf-tables-select__model",class:e.normalizeClass(["vkf-tables-select__dialog",l.dialogClass])},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"dialog"),e.createVNode(e.unref(i.VkTablesV1Checkbox),e.mergeProps(e.unref(S),{modelValue:u.value,"onUpdate:modelValue":o[2]||(o[2]=a=>u.value=a)},e.toHandlers(e.unref(_))),null,16,["modelValue"])]),_:3},8,["modelValue","title","class"])],64))}}),I=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfTablesSelect=v;exports._VkfTablesSelectCtx=R;exports.__VkfTablesSelect=I;exports.default=v;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { VkfSelect } from
|
|
6
|
-
import { ElDialog } from
|
|
7
|
-
import { compareArray } from
|
|
8
|
-
import { isNotEmptyObject } from
|
|
9
|
-
import { useComputedReadonly } from
|
|
10
|
-
import { useLocale } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { defineComponent as A, useAttrs as O, ref as V, computed as c, watch as M, openBlock as j, createElementBlock as R, Fragment as z, createVNode as f, unref as a, mergeProps as k, normalizeClass as I, withCtx as U, renderSlot as x, toHandlers as N } from "vue";
|
|
2
|
+
import { _VkTablesV1CheckboxCtx as d, VkTablesV1Checkbox as W } from "@vunk/plus/components/tables-v1-checkbox";
|
|
3
|
+
import { _VkfFormItemCtx as F } from "@vunk/form/components/form-item";
|
|
4
|
+
import { bindPropsFactory as $, onEmitsFactory as D } from "@vunk/core/shared/utils-vue";
|
|
5
|
+
import { VkfSelect as H } from "@vunk/form/components/select";
|
|
6
|
+
import { ElDialog as L } from "element-plus";
|
|
7
|
+
import { compareArray as q } from "@vunk/shared/array";
|
|
8
|
+
import { isNotEmptyObject as G } from "@vunk/shared/object";
|
|
9
|
+
import { useComputedReadonly as J } from "@vunk/form/composables";
|
|
10
|
+
import { useLocale as K } from "@vunk/form/composables/element-plus";
|
|
11
|
+
const y = {
|
|
12
|
+
...F.props,
|
|
13
|
+
...d.props,
|
|
14
|
+
columns: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
16
18
|
prop: null,
|
|
17
19
|
/**
|
|
18
20
|
* @description v-model 绑定值
|
|
@@ -27,11 +29,11 @@ const props = {
|
|
|
27
29
|
},
|
|
28
30
|
clearable: {
|
|
29
31
|
type: Boolean,
|
|
30
|
-
default:
|
|
32
|
+
default: !0
|
|
31
33
|
},
|
|
32
34
|
multiple: {
|
|
33
35
|
type: Boolean,
|
|
34
|
-
default:
|
|
36
|
+
default: !0
|
|
35
37
|
},
|
|
36
38
|
/**
|
|
37
39
|
* @description 获取完整数据
|
|
@@ -45,14 +47,14 @@ const props = {
|
|
|
45
47
|
*/
|
|
46
48
|
updateWhenCompleted: {
|
|
47
49
|
type: Boolean,
|
|
48
|
-
default:
|
|
50
|
+
default: !1
|
|
49
51
|
},
|
|
50
52
|
/**
|
|
51
53
|
* @description 是否将选中的数据 join 为字符串
|
|
52
54
|
*/
|
|
53
55
|
stringify: {
|
|
54
56
|
type: Boolean,
|
|
55
|
-
default:
|
|
57
|
+
default: !1
|
|
56
58
|
},
|
|
57
59
|
/**
|
|
58
60
|
* @description 是否只读
|
|
@@ -76,181 +78,109 @@ const props = {
|
|
|
76
78
|
type: String,
|
|
77
79
|
default: "rowClick"
|
|
78
80
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const emits = {
|
|
82
|
-
..._VkTablesV1CheckboxCtx.emits,
|
|
81
|
+
}, Q = $(y), b = {
|
|
82
|
+
...d.emits,
|
|
83
83
|
"update:modelValue": null
|
|
84
|
-
}
|
|
85
|
-
const createOnEmits = onEmitsFactory(emits);
|
|
86
|
-
|
|
87
|
-
var ctx = /*#__PURE__*/Object.freeze({
|
|
84
|
+
}, X = D(b), ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
88
85
|
__proto__: null,
|
|
89
|
-
createBindProps:
|
|
90
|
-
createOnEmits:
|
|
91
|
-
emits:
|
|
92
|
-
props:
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
var _sfc_main = defineComponent({
|
|
86
|
+
createBindProps: Q,
|
|
87
|
+
createOnEmits: X,
|
|
88
|
+
emits: b,
|
|
89
|
+
props: y
|
|
90
|
+
}, Symbol.toStringTag, { value: "Module" })), de = /* @__PURE__ */ A({
|
|
96
91
|
name: "VkfTablesSelect",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const tablesEmits = _VkTablesV1CheckboxCtx.createOnEmits(emit, ["update:modelValue"]);
|
|
109
|
-
const readonly = useComputedReadonly(props2);
|
|
110
|
-
const { tr } = useLocale();
|
|
111
|
-
const dialogVisible = ref(false);
|
|
112
|
-
const backupRowMap = ref(/* @__PURE__ */ new Map());
|
|
113
|
-
const theModelValue = computed({
|
|
114
|
-
get: () => {
|
|
115
|
-
if (props2.stringify && typeof props2.modelValue === "string") {
|
|
116
|
-
return props2.modelValue ? props2.modelValue.split(",").map((v) => ({ [props2.oidField]: v })) : [];
|
|
117
|
-
}
|
|
118
|
-
return props2.modelValue;
|
|
119
|
-
},
|
|
120
|
-
set: (modelValue) => {
|
|
121
|
-
if (!Array.isArray(modelValue)) {
|
|
122
|
-
modelValue = modelValue ? [modelValue] : [];
|
|
123
|
-
}
|
|
124
|
-
if (props2.stringify) {
|
|
125
|
-
const value = modelValue.reduce((a, v) => {
|
|
126
|
-
if (isNotEmptyObject(v) && v[props2.oidField] !== void 0) {
|
|
127
|
-
a.push(v[props2.oidField]);
|
|
128
|
-
}
|
|
129
|
-
return a;
|
|
130
|
-
}, []).join(",");
|
|
131
|
-
emit("update:modelValue", value);
|
|
92
|
+
inheritAttrs: !1,
|
|
93
|
+
__name: "index",
|
|
94
|
+
props: y,
|
|
95
|
+
emits: b,
|
|
96
|
+
setup(h, { emit: C }) {
|
|
97
|
+
const l = h, p = C, S = O(), w = F.createBindProps(l), B = d.createBindProps(l, ["modelValue"]), _ = d.createOnEmits(p, ["update:modelValue"]), g = J(l), { tr: E } = K(), m = V(!1), i = V(/* @__PURE__ */ new Map()), n = c({
|
|
98
|
+
get: () => l.stringify && typeof l.modelValue == "string" ? l.modelValue ? l.modelValue.split(",").map((e) => ({ [l.oidField]: e })) : [] : l.modelValue,
|
|
99
|
+
set: (e) => {
|
|
100
|
+
if (Array.isArray(e) || (e = e ? [e] : []), l.stringify) {
|
|
101
|
+
const t = e.reduce((o, r) => (G(r) && r[l.oidField] !== void 0 && o.push(r[l.oidField]), o), []).join(",");
|
|
102
|
+
p("update:modelValue", t);
|
|
132
103
|
return;
|
|
133
104
|
}
|
|
134
|
-
|
|
105
|
+
p("update:modelValue", e);
|
|
135
106
|
}
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (!rows.length) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
readItems(rows.map((v) => v.value[props2.oidField])).then(() => {
|
|
156
|
-
if (props2.stringify) return;
|
|
157
|
-
if (!props2.updateWhenCompleted) return;
|
|
158
|
-
const newModelValue = theModelValue.value.reduce((a, v) => {
|
|
159
|
-
const backupRow = backupRowMap.value.get(v[props2.oidField]);
|
|
160
|
-
backupRow ? a.push(backupRow) : a.push(v);
|
|
161
|
-
return a;
|
|
107
|
+
}), v = c(() => n.value.map((e) => {
|
|
108
|
+
const t = i.value.get(e[l.oidField]);
|
|
109
|
+
return {
|
|
110
|
+
label: e[l.labelField] || (t == null ? void 0 : t[l.labelField]),
|
|
111
|
+
value: e
|
|
112
|
+
};
|
|
113
|
+
})), P = c(() => l.multiple ? n.value : n.value[0]);
|
|
114
|
+
M(
|
|
115
|
+
() => v.value.filter((e) => !e.label),
|
|
116
|
+
(e) => {
|
|
117
|
+
e.length && T(e.map((t) => t.value[l.oidField])).then(() => {
|
|
118
|
+
if (l.stringify || !l.updateWhenCompleted)
|
|
119
|
+
return;
|
|
120
|
+
const t = n.value.reduce((o, r) => {
|
|
121
|
+
const u = i.value.get(r[l.oidField]);
|
|
122
|
+
return u ? o.push(u) : o.push(r), o;
|
|
162
123
|
}, []);
|
|
163
|
-
|
|
124
|
+
n.value = t;
|
|
164
125
|
});
|
|
165
126
|
},
|
|
166
|
-
{ immediate:
|
|
127
|
+
{ immediate: !0 }
|
|
167
128
|
);
|
|
168
|
-
async function
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
129
|
+
async function T(e) {
|
|
130
|
+
const t = e.filter((s) => !i.value.has(s)).map((s) => ({ [l.oidField]: s }));
|
|
131
|
+
if (!t.length)
|
|
171
132
|
return;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
});
|
|
177
|
-
if (!addMap.size) {
|
|
133
|
+
const { updateRows: o, addMap: r } = q(l.data, t, l.oidField);
|
|
134
|
+
if (o.forEach((s) => {
|
|
135
|
+
i.value.set(s[l.oidField], s);
|
|
136
|
+
}), !r.size)
|
|
178
137
|
return;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
rows.forEach((row) => {
|
|
183
|
-
backupRowMap.value.set(row[props2.oidField], row);
|
|
138
|
+
const u = Array.from(r.keys());
|
|
139
|
+
(await l.getRows(u)).forEach((s) => {
|
|
140
|
+
i.value.set(s[l.oidField], s);
|
|
184
141
|
});
|
|
185
142
|
}
|
|
186
|
-
return
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
tablesEmits,
|
|
191
|
-
dialogVisible,
|
|
192
|
-
selectValue,
|
|
193
|
-
theModelValue,
|
|
194
|
-
readonly,
|
|
195
|
-
tr
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
201
|
-
const _component_VkfSelect = resolveComponent("VkfSelect");
|
|
202
|
-
const _component_VkTablesV1Checkbox = resolveComponent("VkTablesV1Checkbox");
|
|
203
|
-
const _component_ElDialog = resolveComponent("ElDialog");
|
|
204
|
-
return openBlock(), createElementBlock(
|
|
205
|
-
Fragment,
|
|
206
|
-
null,
|
|
207
|
-
[
|
|
208
|
-
createVNode(_component_VkfSelect, mergeProps({
|
|
209
|
-
..._ctx.formItemProps,
|
|
210
|
-
..._ctx.$attrs
|
|
143
|
+
return (e, t) => (j(), R(z, null, [
|
|
144
|
+
f(a(H), k({
|
|
145
|
+
...a(w),
|
|
146
|
+
...a(S)
|
|
211
147
|
}, {
|
|
212
|
-
multiple:
|
|
213
|
-
options:
|
|
214
|
-
"model-value":
|
|
215
|
-
clearable:
|
|
148
|
+
multiple: e.multiple,
|
|
149
|
+
options: v.value,
|
|
150
|
+
"model-value": P.value,
|
|
151
|
+
clearable: e.clearable,
|
|
216
152
|
"popper-class": "vkf-tables-select__popper",
|
|
217
|
-
"value-key":
|
|
218
|
-
readonly:
|
|
219
|
-
placeholder:
|
|
220
|
-
"onUpdate:modelValue":
|
|
221
|
-
onVisibleChange:
|
|
153
|
+
"value-key": e.oidField,
|
|
154
|
+
readonly: a(g),
|
|
155
|
+
placeholder: e.placeholder,
|
|
156
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => n.value = o),
|
|
157
|
+
onVisibleChange: t[1] || (t[1] = (o) => !a(g) && (m.value = !0))
|
|
222
158
|
}), null, 16, ["multiple", "options", "model-value", "clearable", "value-key", "readonly", "placeholder"]),
|
|
223
|
-
|
|
224
|
-
modelValue:
|
|
225
|
-
"onUpdate:modelValue":
|
|
226
|
-
title:
|
|
159
|
+
f(a(L), {
|
|
160
|
+
modelValue: m.value,
|
|
161
|
+
"onUpdate:modelValue": t[3] || (t[3] = (o) => m.value = o),
|
|
162
|
+
title: e.placeholder || e.label || a(E)("el.select.placeholder", "请选择"),
|
|
227
163
|
"append-to-body": "",
|
|
228
164
|
"model-class": "vkf-tables-select__model",
|
|
229
|
-
class:
|
|
165
|
+
class: I(["vkf-tables-select__dialog", e.dialogClass])
|
|
230
166
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
modelValue:
|
|
235
|
-
"onUpdate:modelValue":
|
|
236
|
-
},
|
|
167
|
+
default: U(() => [
|
|
168
|
+
x(e.$slots, "dialog"),
|
|
169
|
+
f(a(W), k(a(B), {
|
|
170
|
+
modelValue: n.value,
|
|
171
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => n.value = o)
|
|
172
|
+
}, N(a(_))), null, 16, ["modelValue"])
|
|
237
173
|
]),
|
|
238
174
|
_: 3
|
|
239
|
-
/* FORWARDED */
|
|
240
175
|
}, 8, ["modelValue", "title", "class"])
|
|
241
|
-
],
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
var VkfTablesSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/tables-select/src/index.vue"]]);
|
|
247
|
-
|
|
248
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
176
|
+
], 64));
|
|
177
|
+
}
|
|
178
|
+
}), pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
249
179
|
__proto__: null
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
180
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
181
|
+
export {
|
|
182
|
+
de as VkfTablesSelect,
|
|
183
|
+
ue as _VkfTablesSelectCtx,
|
|
184
|
+
pe as __VkfTablesSelect,
|
|
185
|
+
de as default
|
|
254
186
|
};
|
|
255
|
-
|
|
256
|
-
export { VkfTablesSelect, ctx as _VkfTablesSelectCtx, types as __VkfTablesSelect, VkfTablesSelect as default };
|