@vunk/form 2.18.1 → 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 -352
- package/components/card-input-collection/index.mjs +177 -261
- package/components/card-input-collection/src/core.vue.d.ts +54 -950
- 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 -297
- package/components/input-array/index.mjs +115 -232
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +1 -900
- package/components/input-array/src/index.vue.d.ts +43 -729
- package/components/input-collection/index.cjs +1 -444
- package/components/input-collection/index.mjs +195 -347
- 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 -110
- package/locale/index.mjs +37 -45
- package/locale/lang/en.d.ts +2 -6
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/locale/lang/zh-cn.d.ts +2 -6
- 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,295 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var formItem = require('@vunk/form/components/form-item');
|
|
7
|
-
var form = require('@vunk/form');
|
|
8
|
-
var composables = require('@vunk/core/composables');
|
|
9
|
-
var formItemRenderer = require('@vunk/form/components/form-item-renderer');
|
|
10
|
-
var templatesDefault = require('@vunk/form/components/templates-default');
|
|
11
|
-
var rendererData = require('@vunk/form/components/renderer-data');
|
|
12
|
-
var core = require('@vunk/core');
|
|
13
|
-
var avatar = require('@vunk/plus/components/avatar');
|
|
14
|
-
var index = require('../index.cjs');
|
|
15
|
-
var text = require('@vunk/plus/components/text');
|
|
16
|
-
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
17
|
-
|
|
18
|
-
const props = {
|
|
19
|
-
...formItem._VkfFormItemCtx.props,
|
|
20
|
-
/**
|
|
21
|
-
* @description model;
|
|
22
|
-
*/
|
|
23
|
-
modelValue: null,
|
|
24
|
-
iconSize: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 22
|
|
27
|
-
},
|
|
28
|
-
readonly: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: void 0
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* @description model; Whether the text is editable.
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
editable: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: void 0
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* @description 编辑主体
|
|
42
|
-
* @default __VkfInput.Source
|
|
43
|
-
*/
|
|
44
|
-
edit: {
|
|
45
|
-
type: Object,
|
|
46
|
-
default: void 0
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* @description 文本属性
|
|
50
|
-
* @link https://element-plus.org/zh-CN/component/text.html
|
|
51
|
-
*/
|
|
52
|
-
textProps: {
|
|
53
|
-
type: Object,
|
|
54
|
-
default: () => ({})
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const emits = {
|
|
58
|
-
"update:editable": null,
|
|
59
|
-
"update:modelValue": null
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var _sfc_main = /* @__PURE__ */vue.defineComponent({
|
|
63
|
-
...{
|
|
64
|
-
name: "VkfEditableText",
|
|
65
|
-
inheritAttrs: false
|
|
66
|
-
},
|
|
67
|
-
__name: "index",
|
|
68
|
-
props: props,
|
|
69
|
-
emits,
|
|
70
|
-
setup(__props, {
|
|
71
|
-
expose: __expose,
|
|
72
|
-
emit: __emit
|
|
73
|
-
}) {
|
|
74
|
-
__expose();
|
|
75
|
-
const props = __props;
|
|
76
|
-
const emit = __emit;
|
|
77
|
-
const id = vue.useId();
|
|
78
|
-
const editable = composables.useModelComputed({
|
|
79
|
-
key: "editable",
|
|
80
|
-
default: false
|
|
81
|
-
}, props, emit);
|
|
82
|
-
const prop = vue.computed(() => {
|
|
83
|
-
return props.prop ?? id;
|
|
84
|
-
});
|
|
85
|
-
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props, []);
|
|
86
|
-
const readonly = form.useComputedReadonly(props);
|
|
87
|
-
const formItemContainerRef = vue.ref();
|
|
88
|
-
const formItemRef = vue.ref();
|
|
89
|
-
const editSource = vue.computed(() => {
|
|
90
|
-
const source = {
|
|
91
|
-
templateType: "VkfInput",
|
|
92
|
-
...formItemBindProps.value,
|
|
93
|
-
inline: true,
|
|
94
|
-
onBlur: handleCheck,
|
|
95
|
-
onKeydown: e => {
|
|
96
|
-
if (e.key === "Enter") {
|
|
97
|
-
handleCheck();
|
|
98
|
-
} else if (e.key === "Escape") {
|
|
99
|
-
handleCancel();
|
|
100
|
-
}
|
|
101
|
-
e.stopPropagation();
|
|
102
|
-
},
|
|
103
|
-
...props.edit,
|
|
104
|
-
prop: prop.value,
|
|
105
|
-
elRef: e => {
|
|
106
|
-
props.edit?.elRef?.(e);
|
|
107
|
-
formItemRef.value = e;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return [source];
|
|
111
|
-
});
|
|
112
|
-
const rendererData$1 = vue.computed(() => {
|
|
113
|
-
const data = {};
|
|
114
|
-
core.setData(data, {
|
|
115
|
-
k: prop.value,
|
|
116
|
-
v: props.modelValue
|
|
117
|
-
});
|
|
118
|
-
return data;
|
|
119
|
-
});
|
|
120
|
-
const handleSetData = ({
|
|
121
|
-
v
|
|
122
|
-
}) => {
|
|
123
|
-
emit("update:modelValue", v);
|
|
124
|
-
};
|
|
125
|
-
const originValue = vue.ref(props.modelValue);
|
|
126
|
-
function handleEdit() {
|
|
127
|
-
originValue.value = props.modelValue;
|
|
128
|
-
editable.value = true;
|
|
129
|
-
vue.nextTick(() => {
|
|
130
|
-
const input = formItemContainerRef.value?.$el.querySelector("input, textarea");
|
|
131
|
-
if (input) {
|
|
132
|
-
input.focus();
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
function handleCheck() {
|
|
137
|
-
if (formItemRef.value?.validate) {
|
|
138
|
-
formItemRef.value.validate().then(() => {
|
|
139
|
-
editable.value = false;
|
|
140
|
-
}).catch(() => {
|
|
141
|
-
console.warn("Validation failed, editable text remains open.");
|
|
142
|
-
});
|
|
143
|
-
} else {
|
|
144
|
-
editable.value = false;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function handleCancel() {
|
|
148
|
-
emit("update:modelValue", originValue.value);
|
|
149
|
-
editable.value = false;
|
|
150
|
-
}
|
|
151
|
-
const __returned__ = {
|
|
152
|
-
props,
|
|
153
|
-
emit,
|
|
154
|
-
id,
|
|
155
|
-
editable,
|
|
156
|
-
prop,
|
|
157
|
-
formItemBindProps,
|
|
158
|
-
readonly,
|
|
159
|
-
formItemContainerRef,
|
|
160
|
-
formItemRef,
|
|
161
|
-
editSource,
|
|
162
|
-
rendererData: rendererData$1,
|
|
163
|
-
handleSetData,
|
|
164
|
-
originValue,
|
|
165
|
-
handleEdit,
|
|
166
|
-
handleCheck,
|
|
167
|
-
handleCancel,
|
|
168
|
-
get VkfFormItem() {
|
|
169
|
-
return formItem.VkfFormItem;
|
|
170
|
-
},
|
|
171
|
-
get VkfFormItemRenderer() {
|
|
172
|
-
return formItemRenderer.VkfFormItemRenderer;
|
|
173
|
-
},
|
|
174
|
-
get VkfTemplatesDefault() {
|
|
175
|
-
return templatesDefault.VkfTemplatesDefault;
|
|
176
|
-
},
|
|
177
|
-
get VkfRendererData() {
|
|
178
|
-
return rendererData.VkfRendererData;
|
|
179
|
-
},
|
|
180
|
-
get VkAvatar() {
|
|
181
|
-
return avatar.VkAvatar;
|
|
182
|
-
},
|
|
183
|
-
get CloseBold() {
|
|
184
|
-
return index.close_bold_default;
|
|
185
|
-
},
|
|
186
|
-
get Select() {
|
|
187
|
-
return index.select_default;
|
|
188
|
-
},
|
|
189
|
-
get VkText() {
|
|
190
|
-
return text.VkText;
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
194
|
-
enumerable: false,
|
|
195
|
-
value: true
|
|
196
|
-
});
|
|
197
|
-
return __returned__;
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
const _hoisted_1 = { class: "vkf-editable-text-actions" };
|
|
202
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
203
|
-
return $setup.readonly || !$setup.editable ? (vue.openBlock(), vue.createBlock(
|
|
204
|
-
$setup["VkfFormItem"],
|
|
205
|
-
vue.normalizeProps(vue.mergeProps({ key: 0 }, {
|
|
206
|
-
...$setup.formItemBindProps,
|
|
207
|
-
..._ctx.$attrs
|
|
208
|
-
})),
|
|
209
|
-
{
|
|
210
|
-
default: vue.withCtx(() => [
|
|
211
|
-
vue.renderSlot(_ctx.$slots, "text", { handleEdit: $setup.handleEdit }, () => [
|
|
212
|
-
vue.createVNode(
|
|
213
|
-
$setup["VkText"],
|
|
214
|
-
vue.mergeProps(_ctx.textProps, { onDblclick: $setup.handleEdit }),
|
|
215
|
-
{
|
|
216
|
-
default: vue.withCtx(() => [
|
|
217
|
-
vue.createTextVNode(
|
|
218
|
-
vue.toDisplayString(_ctx.modelValue),
|
|
219
|
-
1
|
|
220
|
-
/* TEXT */
|
|
221
|
-
)
|
|
222
|
-
]),
|
|
223
|
-
_: 1
|
|
224
|
-
/* STABLE */
|
|
225
|
-
},
|
|
226
|
-
16
|
|
227
|
-
/* FULL_PROPS */
|
|
228
|
-
)
|
|
229
|
-
])
|
|
230
|
-
]),
|
|
231
|
-
_: 3
|
|
232
|
-
/* FORWARDED */
|
|
233
|
-
},
|
|
234
|
-
16
|
|
235
|
-
/* FULL_PROPS */
|
|
236
|
-
)) : (vue.openBlock(), vue.createBlock($setup["VkfRendererData"], {
|
|
237
|
-
key: 1,
|
|
238
|
-
data: $setup.rendererData,
|
|
239
|
-
onSetData: $setup.handleSetData
|
|
240
|
-
}, {
|
|
241
|
-
default: vue.withCtx(() => [
|
|
242
|
-
vue.createVNode(
|
|
243
|
-
$setup["VkfFormItem"],
|
|
244
|
-
vue.mergeProps({
|
|
245
|
-
ref: "formItemContainerRef",
|
|
246
|
-
class: "vk-editable-text-edit-x"
|
|
247
|
-
}, _ctx.$attrs),
|
|
248
|
-
{
|
|
249
|
-
default: vue.withCtx(() => [
|
|
250
|
-
vue.createVNode($setup["VkfFormItemRenderer"], { source: $setup.editSource }, {
|
|
251
|
-
placeholder: vue.withCtx(() => [
|
|
252
|
-
vue.createVNode($setup["VkfTemplatesDefault"])
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
/* STABLE */
|
|
256
|
-
}, 8, ["source"]),
|
|
257
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
258
|
-
vue.createVNode($setup["VkAvatar"], {
|
|
259
|
-
icon: $setup.Select,
|
|
260
|
-
size: _ctx.iconSize,
|
|
261
|
-
color: "var(--el-color-primary)",
|
|
262
|
-
onClick: $setup.handleCheck
|
|
263
|
-
}, null, 8, ["icon", "size"]),
|
|
264
|
-
vue.createVNode($setup["VkAvatar"], {
|
|
265
|
-
icon: $setup.CloseBold,
|
|
266
|
-
size: _ctx.iconSize,
|
|
267
|
-
color: "var(--el-color-danger)",
|
|
268
|
-
onClick: $setup.handleCancel
|
|
269
|
-
}, null, 8, ["icon", "size"])
|
|
270
|
-
])
|
|
271
|
-
]),
|
|
272
|
-
_: 1
|
|
273
|
-
/* STABLE */
|
|
274
|
-
},
|
|
275
|
-
16
|
|
276
|
-
/* FULL_PROPS */
|
|
277
|
-
)
|
|
278
|
-
]),
|
|
279
|
-
_: 1
|
|
280
|
-
/* STABLE */
|
|
281
|
-
}, 8, ["data"]));
|
|
282
|
-
}
|
|
283
|
-
var VkfEditableText = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\labCode\\vunk-form2\\packages\\components\\editable-text\\src\\index.vue"]]);
|
|
284
|
-
|
|
285
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
286
|
-
__proto__: null
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
VkfEditableText.install = (app) => {
|
|
290
|
-
app.component(VkfEditableText.name || "VkfEditableText", VkfEditableText);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
exports.VkfEditableText = VkfEditableText;
|
|
294
|
-
exports.__VkfEditableText = types;
|
|
295
|
-
exports.default = VkfEditableText;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("@vunk/form/components/form-item"),g=require("@vunk/form"),P=require("@vunk/core/composables"),D=require("@vunk/form/components/form-item-renderer"),T=require("@vunk/form/components/templates-default"),z=require("@vunk/form/components/renderer-data"),B=require("@vunk/core"),V=require("@vunk/plus/components/avatar"),y=require("../index.cjs"),N=require("@vunk/plus/components/text"),R={...n._VkfFormItemCtx.props,modelValue:null,iconSize:{type:Number,default:22},readonly:{type:Boolean,default:void 0},editable:{type:Boolean,default:void 0},edit:{type:Object,default:void 0},textProps:{type:Object,default:()=>({})}},E={"update:editable":null,"update:modelValue":null},w={class:"vkf-editable-text-actions"},b=e.defineComponent({name:"VkfEditableText",inheritAttrs:!1,__name:"index",props:R,emits:E,setup(_,{emit:x}){const r=_,u=x,h=e.useId(),a=P.useModelComputed({key:"editable",default:!1},r,u),s=e.computed(()=>r.prop??h),c=n._VkfFormItemCtx.createBindProps(r,[]),C=g.useComputedReadonly(r),f=e.ref(),i=e.ref(),I=e.computed(()=>[{templateType:"VkfInput",...c.value,inline:!0,onBlur:d,onKeydown:o=>{o.key==="Enter"?d():o.key==="Escape"&&v(),o.stopPropagation()},...r.edit,prop:s.value,elRef:o=>{var l,k;(k=(l=r.edit)==null?void 0:l.elRef)==null||k.call(l,o),i.value=o}}]),S=e.computed(()=>{const t={};return B.setData(t,{k:s.value,v:r.modelValue}),t}),q=({v:t})=>{u("update:modelValue",t)},p=e.ref(r.modelValue);function m(){p.value=r.modelValue,a.value=!0,e.nextTick(()=>{var o;const t=(o=f.value)==null?void 0:o.$el.querySelector("input, textarea");t&&t.focus()})}function d(){var t;(t=i.value)!=null&&t.validate?i.value.validate().then(()=>{a.value=!1}).catch(()=>{console.warn("Validation failed, editable text remains open.")}):a.value=!1}function v(){u("update:modelValue",p.value),a.value=!1}return(t,o)=>e.unref(C)||!e.unref(a)?(e.openBlock(),e.createBlock(e.unref(n.VkfFormItem),e.normalizeProps(e.mergeProps({key:0},{...e.unref(c),...t.$attrs})),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"text",{handleEdit:m},()=>[e.createVNode(e.unref(N.VkText),e.mergeProps(t.textProps,{onDblclick:m}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.modelValue),1)]),_:1},16)])]),_:3},16)):(e.openBlock(),e.createBlock(e.unref(z.VkfRendererData),{key:1,data:S.value,onSetData:q},{default:e.withCtx(()=>[e.createVNode(e.unref(n.VkfFormItem),e.mergeProps({ref_key:"formItemContainerRef",ref:f,class:"vk-editable-text-edit-x"},t.$attrs),{default:e.withCtx(()=>[e.createVNode(e.unref(D.VkfFormItemRenderer),{source:I.value},{placeholder:e.withCtx(()=>[e.createVNode(e.unref(T.VkfTemplatesDefault))]),_:1},8,["source"]),e.createElementVNode("div",w,[e.createVNode(e.unref(V.VkAvatar),{icon:e.unref(y.select_default),size:t.iconSize,color:"var(--el-color-primary)",onClick:d},null,8,["icon","size"]),e.createVNode(e.unref(V.VkAvatar),{icon:e.unref(y.close_bold_default),size:t.iconSize,color:"var(--el-color-danger)",onClick:v},null,8,["icon","size"])])]),_:1},16)]),_:1},8,["data"]))}}),j=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfEditableText=b;exports.__VkfEditableText=j;exports.default=b;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { defineComponent, useId, computed, ref,
|
|
2
|
-
import { _VkfFormItemCtx, VkfFormItem } from
|
|
3
|
-
import { useComputedReadonly } from
|
|
4
|
-
import { useModelComputed } from
|
|
5
|
-
import { VkfFormItemRenderer } from
|
|
6
|
-
import { VkfTemplatesDefault } from
|
|
7
|
-
import { VkfRendererData } from
|
|
8
|
-
import { setData } from
|
|
9
|
-
import { VkAvatar } from
|
|
10
|
-
import {
|
|
11
|
-
import { VkText } from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const props = {
|
|
15
|
-
..._VkfFormItemCtx.props,
|
|
1
|
+
import { defineComponent as B, useId as j, computed as c, ref as f, unref as t, openBlock as h, createBlock as x, normalizeProps as N, mergeProps as m, withCtx as n, renderSlot as O, createVNode as l, createTextVNode as $, toDisplayString as w, createElementVNode as F, nextTick as A } from "vue";
|
|
2
|
+
import { _VkfFormItemCtx as z, VkfFormItem as C } from "@vunk/form/components/form-item";
|
|
3
|
+
import { useComputedReadonly as M } from "@vunk/form";
|
|
4
|
+
import { useModelComputed as q } from "@vunk/core/composables";
|
|
5
|
+
import { VkfFormItemRenderer as K } from "@vunk/form/components/form-item-renderer";
|
|
6
|
+
import { VkfTemplatesDefault as G } from "@vunk/form/components/templates-default";
|
|
7
|
+
import { VkfRendererData as H } from "@vunk/form/components/renderer-data";
|
|
8
|
+
import { setData as J } from "@vunk/core";
|
|
9
|
+
import { VkAvatar as S } from "@vunk/plus/components/avatar";
|
|
10
|
+
import { s as L, c as Q } from "../index.cjs";
|
|
11
|
+
import { VkText as U } from "@vunk/plus/components/text";
|
|
12
|
+
const W = {
|
|
13
|
+
...z.props,
|
|
16
14
|
/**
|
|
17
15
|
* @description model;
|
|
18
16
|
*/
|
|
@@ -49,241 +47,117 @@ const props = {
|
|
|
49
47
|
type: Object,
|
|
50
48
|
default: () => ({})
|
|
51
49
|
}
|
|
52
|
-
}
|
|
53
|
-
const emits = {
|
|
50
|
+
}, X = {
|
|
54
51
|
"update:editable": null,
|
|
55
52
|
"update:modelValue": null
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
inheritAttrs: false
|
|
62
|
-
},
|
|
53
|
+
}, Y = {
|
|
54
|
+
class: "vkf-editable-text-actions"
|
|
55
|
+
}, ue = /* @__PURE__ */ B({
|
|
56
|
+
name: "VkfEditableText",
|
|
57
|
+
inheritAttrs: !1,
|
|
63
58
|
__name: "index",
|
|
64
|
-
props:
|
|
65
|
-
emits,
|
|
66
|
-
setup(
|
|
67
|
-
|
|
68
|
-
emit: __emit
|
|
59
|
+
props: W,
|
|
60
|
+
emits: X,
|
|
61
|
+
setup(I, {
|
|
62
|
+
emit: T
|
|
69
63
|
}) {
|
|
70
|
-
|
|
71
|
-
const props = __props;
|
|
72
|
-
const emit = __emit;
|
|
73
|
-
const id = useId();
|
|
74
|
-
const editable = useModelComputed({
|
|
64
|
+
const a = I, d = T, D = j(), r = q({
|
|
75
65
|
key: "editable",
|
|
76
|
-
default:
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
...props.edit,
|
|
100
|
-
prop: prop.value,
|
|
101
|
-
elRef: e => {
|
|
102
|
-
props.edit?.elRef?.(e);
|
|
103
|
-
formItemRef.value = e;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
return [source];
|
|
107
|
-
});
|
|
108
|
-
const rendererData = computed(() => {
|
|
109
|
-
const data = {};
|
|
110
|
-
setData(data, {
|
|
111
|
-
k: prop.value,
|
|
112
|
-
v: props.modelValue
|
|
113
|
-
});
|
|
114
|
-
return data;
|
|
115
|
-
});
|
|
116
|
-
const handleSetData = ({
|
|
117
|
-
v
|
|
66
|
+
default: !1
|
|
67
|
+
}, a, d), p = c(() => a.prop ?? D), v = z.createBindProps(a, []), E = M(a), k = f(), s = f(), P = c(() => [{
|
|
68
|
+
templateType: "VkfInput",
|
|
69
|
+
...v.value,
|
|
70
|
+
inline: !0,
|
|
71
|
+
onBlur: u,
|
|
72
|
+
onKeydown: (o) => {
|
|
73
|
+
o.key === "Enter" ? u() : o.key === "Escape" && b(), o.stopPropagation();
|
|
74
|
+
},
|
|
75
|
+
...a.edit,
|
|
76
|
+
prop: p.value,
|
|
77
|
+
elRef: (o) => {
|
|
78
|
+
var i, _;
|
|
79
|
+
(_ = (i = a.edit) == null ? void 0 : i.elRef) == null || _.call(i, o), s.value = o;
|
|
80
|
+
}
|
|
81
|
+
}]), R = c(() => {
|
|
82
|
+
const e = {};
|
|
83
|
+
return J(e, {
|
|
84
|
+
k: p.value,
|
|
85
|
+
v: a.modelValue
|
|
86
|
+
}), e;
|
|
87
|
+
}), g = ({
|
|
88
|
+
v: e
|
|
118
89
|
}) => {
|
|
119
|
-
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const input = formItemContainerRef.value?.$el.querySelector("input, textarea");
|
|
127
|
-
if (input) {
|
|
128
|
-
input.focus();
|
|
129
|
-
}
|
|
90
|
+
d("update:modelValue", e);
|
|
91
|
+
}, V = f(a.modelValue);
|
|
92
|
+
function y() {
|
|
93
|
+
V.value = a.modelValue, r.value = !0, A(() => {
|
|
94
|
+
var o;
|
|
95
|
+
const e = (o = k.value) == null ? void 0 : o.$el.querySelector("input, textarea");
|
|
96
|
+
e && e.focus();
|
|
130
97
|
});
|
|
131
98
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
} else {
|
|
140
|
-
editable.value = false;
|
|
141
|
-
}
|
|
99
|
+
function u() {
|
|
100
|
+
var e;
|
|
101
|
+
(e = s.value) != null && e.validate ? s.value.validate().then(() => {
|
|
102
|
+
r.value = !1;
|
|
103
|
+
}).catch(() => {
|
|
104
|
+
console.warn("Validation failed, editable text remains open.");
|
|
105
|
+
}) : r.value = !1;
|
|
142
106
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
145
|
-
editable.value = false;
|
|
107
|
+
function b() {
|
|
108
|
+
d("update:modelValue", V.value), r.value = !1;
|
|
146
109
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
handleEdit,
|
|
162
|
-
handleCheck,
|
|
163
|
-
handleCancel,
|
|
164
|
-
get VkfFormItem() {
|
|
165
|
-
return VkfFormItem;
|
|
166
|
-
},
|
|
167
|
-
get VkfFormItemRenderer() {
|
|
168
|
-
return VkfFormItemRenderer;
|
|
169
|
-
},
|
|
170
|
-
get VkfTemplatesDefault() {
|
|
171
|
-
return VkfTemplatesDefault;
|
|
172
|
-
},
|
|
173
|
-
get VkfRendererData() {
|
|
174
|
-
return VkfRendererData;
|
|
175
|
-
},
|
|
176
|
-
get VkAvatar() {
|
|
177
|
-
return VkAvatar;
|
|
178
|
-
},
|
|
179
|
-
get CloseBold() {
|
|
180
|
-
return close_bold_default;
|
|
181
|
-
},
|
|
182
|
-
get Select() {
|
|
183
|
-
return select_default;
|
|
184
|
-
},
|
|
185
|
-
get VkText() {
|
|
186
|
-
return VkText;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
190
|
-
enumerable: false,
|
|
191
|
-
value: true
|
|
192
|
-
});
|
|
193
|
-
return __returned__;
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
const _hoisted_1 = { class: "vkf-editable-text-actions" };
|
|
198
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
199
|
-
return $setup.readonly || !$setup.editable ? (openBlock(), createBlock(
|
|
200
|
-
$setup["VkfFormItem"],
|
|
201
|
-
normalizeProps(mergeProps({ key: 0 }, {
|
|
202
|
-
...$setup.formItemBindProps,
|
|
203
|
-
..._ctx.$attrs
|
|
204
|
-
})),
|
|
205
|
-
{
|
|
206
|
-
default: withCtx(() => [
|
|
207
|
-
renderSlot(_ctx.$slots, "text", { handleEdit: $setup.handleEdit }, () => [
|
|
208
|
-
createVNode(
|
|
209
|
-
$setup["VkText"],
|
|
210
|
-
mergeProps(_ctx.textProps, { onDblclick: $setup.handleEdit }),
|
|
211
|
-
{
|
|
212
|
-
default: withCtx(() => [
|
|
213
|
-
createTextVNode(
|
|
214
|
-
toDisplayString(_ctx.modelValue),
|
|
215
|
-
1
|
|
216
|
-
/* TEXT */
|
|
217
|
-
)
|
|
218
|
-
]),
|
|
219
|
-
_: 1
|
|
220
|
-
/* STABLE */
|
|
221
|
-
},
|
|
222
|
-
16
|
|
223
|
-
/* FULL_PROPS */
|
|
224
|
-
)
|
|
225
|
-
])
|
|
226
|
-
]),
|
|
110
|
+
return (e, o) => t(E) || !t(r) ? (h(), x(t(C), N(m({
|
|
111
|
+
key: 0
|
|
112
|
+
}, {
|
|
113
|
+
...t(v),
|
|
114
|
+
...e.$attrs
|
|
115
|
+
})), {
|
|
116
|
+
default: n(() => [O(e.$slots, "text", {
|
|
117
|
+
handleEdit: y
|
|
118
|
+
}, () => [l(t(U), m(e.textProps, {
|
|
119
|
+
onDblclick: y
|
|
120
|
+
}), {
|
|
121
|
+
default: n(() => [$(w(e.modelValue), 1)]),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 16)])]),
|
|
227
124
|
_: 3
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
class: "vk-editable-text-edit-x"
|
|
243
|
-
}, _ctx.$attrs),
|
|
244
|
-
{
|
|
245
|
-
default: withCtx(() => [
|
|
246
|
-
createVNode($setup["VkfFormItemRenderer"], { source: $setup.editSource }, {
|
|
247
|
-
placeholder: withCtx(() => [
|
|
248
|
-
createVNode($setup["VkfTemplatesDefault"])
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
/* STABLE */
|
|
252
|
-
}, 8, ["source"]),
|
|
253
|
-
createElementVNode("div", _hoisted_1, [
|
|
254
|
-
createVNode($setup["VkAvatar"], {
|
|
255
|
-
icon: $setup.Select,
|
|
256
|
-
size: _ctx.iconSize,
|
|
257
|
-
color: "var(--el-color-primary)",
|
|
258
|
-
onClick: $setup.handleCheck
|
|
259
|
-
}, null, 8, ["icon", "size"]),
|
|
260
|
-
createVNode($setup["VkAvatar"], {
|
|
261
|
-
icon: $setup.CloseBold,
|
|
262
|
-
size: _ctx.iconSize,
|
|
263
|
-
color: "var(--el-color-danger)",
|
|
264
|
-
onClick: $setup.handleCancel
|
|
265
|
-
}, null, 8, ["icon", "size"])
|
|
266
|
-
])
|
|
267
|
-
]),
|
|
125
|
+
}, 16)) : (h(), x(t(H), {
|
|
126
|
+
key: 1,
|
|
127
|
+
data: R.value,
|
|
128
|
+
onSetData: g
|
|
129
|
+
}, {
|
|
130
|
+
default: n(() => [l(t(C), m({
|
|
131
|
+
ref_key: "formItemContainerRef",
|
|
132
|
+
ref: k,
|
|
133
|
+
class: "vk-editable-text-edit-x"
|
|
134
|
+
}, e.$attrs), {
|
|
135
|
+
default: n(() => [l(t(K), {
|
|
136
|
+
source: P.value
|
|
137
|
+
}, {
|
|
138
|
+
placeholder: n(() => [l(t(G))]),
|
|
268
139
|
_: 1
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
140
|
+
}, 8, ["source"]), F("div", Y, [l(t(S), {
|
|
141
|
+
icon: t(L),
|
|
142
|
+
size: e.iconSize,
|
|
143
|
+
color: "var(--el-color-primary)",
|
|
144
|
+
onClick: u
|
|
145
|
+
}, null, 8, ["icon", "size"]), l(t(S), {
|
|
146
|
+
icon: t(Q),
|
|
147
|
+
size: e.iconSize,
|
|
148
|
+
color: "var(--el-color-danger)",
|
|
149
|
+
onClick: b
|
|
150
|
+
}, null, 8, ["icon", "size"])])]),
|
|
151
|
+
_: 1
|
|
152
|
+
}, 16)]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["data"]));
|
|
155
|
+
}
|
|
156
|
+
}), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
282
157
|
__proto__: null
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
158
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
159
|
+
export {
|
|
160
|
+
ue as VkfEditableText,
|
|
161
|
+
ce as __VkfEditableText,
|
|
162
|
+
ue as default
|
|
287
163
|
};
|
|
288
|
-
|
|
289
|
-
export { VkfEditableText, types as __VkfEditableText, VkfEditableText as default };
|