@vunk/form 2.4.0 → 2.5.1
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/cascader/src/index.vue.d.ts +2 -2
- package/components/fieldset/index.cjs +114 -0
- package/components/fieldset/index.css +5 -0
- package/components/fieldset/index.d.ts +4 -0
- package/components/fieldset/index.mjs +108 -0
- package/components/fieldset/src/ctx.d.ts +12 -0
- package/components/fieldset/src/index.vue.d.ts +23 -0
- package/components/fieldset/src/types.d.ts +1 -0
- package/components/fieldset/src/use.d.ts +5 -0
- package/components/form-item/index.cjs +42 -5
- package/components/form-item/index.css +13 -0
- package/components/form-item/index.mjs +43 -6
- package/components/form-item/src/index.vue.d.ts +3 -0
- package/components/form-item/src/types.d.ts +1 -0
- package/components/information/src/types.d.ts +3 -2
- package/components/information-templates-default/index.cjs +12 -3
- package/components/information-templates-default/index.mjs +12 -3
- package/components/input-collection/index.cjs +105 -21
- package/components/input-collection/index.css +9 -0
- package/components/input-collection/index.mjs +106 -22
- package/components/input-collection/src/ctx.d.ts +7 -0
- package/components/input-collection/src/index.vue.d.ts +31 -2
- package/components/input-collection/src/types.d.ts +1 -0
- package/components/tables-select/src/index.vue.d.ts +9 -0
- package/components/tag-information/index.cjs +11 -2
- package/components/tag-information/index.mjs +11 -2
- package/components/tag-information/src/ctx.d.ts +8 -0
- package/components/tag-information/src/index.vue.d.ts +24 -6
- package/components/van-cascader/src/index.vue.d.ts +67 -12803
- package/index.css +28 -0
- package/package.json +9 -1
- package/shared/element-plus/ctx.d.ts +4 -4
|
@@ -13,6 +13,7 @@ var formItemRenderer = require('@vunk/form/components/form-item-renderer');
|
|
|
13
13
|
var core = require('@vunk/core');
|
|
14
14
|
var index = require('../index2.cjs');
|
|
15
15
|
var rendererData = require('@vunk/form/components/renderer-data');
|
|
16
|
+
var fieldset = require('@vunk/form/components/fieldset');
|
|
16
17
|
var cloneDeep = require('../cloneDeep.cjs');
|
|
17
18
|
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
18
19
|
require('../isObject.cjs');
|
|
@@ -46,6 +47,13 @@ const props = {
|
|
|
46
47
|
default: (data) => {
|
|
47
48
|
return Object.values(data).join(" ");
|
|
48
49
|
}
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* @description 开启 form-item 的 label 上的操作区域, 在labelPosition为top时生效
|
|
53
|
+
*/
|
|
54
|
+
labelActions: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
49
57
|
}
|
|
50
58
|
};
|
|
51
59
|
const emits = {
|
|
@@ -97,49 +105,108 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
105
|
};
|
|
98
106
|
});
|
|
99
107
|
});
|
|
108
|
+
const expandFormItemRaws = vue.computed(() => props2.columns.filter(e => e.expandVisible));
|
|
109
|
+
const expandColumn = {
|
|
110
|
+
type: "expand",
|
|
111
|
+
slots: e => {
|
|
112
|
+
const source = expandFormItemRaws.value.map(column => {
|
|
113
|
+
return {
|
|
114
|
+
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
115
|
+
label: column.label,
|
|
116
|
+
templateType: column.templateType,
|
|
117
|
+
readonly: readonly.value,
|
|
118
|
+
...column.templateProps,
|
|
119
|
+
...column.createTemplateProps?.(e),
|
|
120
|
+
class: "vk-input-collection__expand-form-item"
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
return vue.createVNode(fieldset.VkfFieldset, {
|
|
124
|
+
"class": "vk-input-collection__expand-fieldset",
|
|
125
|
+
"label-width": "auto",
|
|
126
|
+
"label-position": "right"
|
|
127
|
+
}, {
|
|
128
|
+
default: () => [vue.createVNode(formItemRenderer.VkfFormItemRenderer, {
|
|
129
|
+
"source": source
|
|
130
|
+
}, null)]
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
100
134
|
const buttonsColumn = vue.computed(() => ({
|
|
101
135
|
label: "\u64CD\u4F5C",
|
|
102
136
|
align: "center",
|
|
103
|
-
width: "
|
|
137
|
+
width: "85",
|
|
104
138
|
hidden: readonly.value || !props2.splicable,
|
|
139
|
+
className: "vk-input-collection__buttons",
|
|
105
140
|
slots: ({
|
|
106
141
|
$index
|
|
107
142
|
}) => vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus.ElButton, {
|
|
108
143
|
"size": "small",
|
|
109
144
|
"icon": index.plus_default,
|
|
145
|
+
"circle": true,
|
|
110
146
|
"onClick": () => handlePlus($index)
|
|
111
147
|
}, null), vue.createVNode(elementPlus.ElButton, {
|
|
112
148
|
"size": "small",
|
|
113
149
|
"icon": index.minus_default,
|
|
150
|
+
"circle": true,
|
|
114
151
|
"onClick": () => handleMinus($index)
|
|
115
152
|
}, null)])
|
|
116
153
|
}));
|
|
154
|
+
const allColumns = vue.computed(() => {
|
|
155
|
+
const data = [...fullColumns.value, buttonsColumn.value];
|
|
156
|
+
if (expandFormItemRaws.value.length) {
|
|
157
|
+
data.unshift(expandColumn);
|
|
158
|
+
}
|
|
159
|
+
return data;
|
|
160
|
+
});
|
|
117
161
|
function handlePlus(index) {
|
|
118
162
|
const data = cloneDeep.cloneDeep(props2.modelValue);
|
|
119
163
|
data.splice(index + 1, 0, {});
|
|
120
164
|
emit("update:modelValue", data);
|
|
165
|
+
setExpandRowKeys([]);
|
|
121
166
|
}
|
|
122
167
|
function handleMinus(index) {
|
|
123
168
|
const data = cloneDeep.cloneDeep(props2.modelValue);
|
|
124
169
|
data.splice(index, 1);
|
|
125
170
|
emit("update:modelValue", data);
|
|
171
|
+
setExpandRowKeys([]);
|
|
126
172
|
}
|
|
127
173
|
const addToFirst = () => {
|
|
128
174
|
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
175
|
+
setExpandRowKeys([]);
|
|
129
176
|
};
|
|
130
177
|
const handleFormSetData = e => {
|
|
131
178
|
const data = cloneDeep.cloneDeep(formData.value);
|
|
132
179
|
core.ensetData(data, e);
|
|
133
180
|
emit("update:modelValue", core.getValue(data, props2.prop));
|
|
134
181
|
};
|
|
182
|
+
const ROW_KEY = "_row_key";
|
|
183
|
+
const tableData = vue.computed(() => {
|
|
184
|
+
return props2.modelValue.map((e, index) => {
|
|
185
|
+
return {
|
|
186
|
+
...e,
|
|
187
|
+
[ROW_KEY]: index + ""
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
const expandRowKeys = vue.ref([]);
|
|
192
|
+
const handleExpandChange = (row, expandedRows) => {
|
|
193
|
+
expandRowKeys.value = expandedRows.map(e => e[ROW_KEY]);
|
|
194
|
+
};
|
|
195
|
+
function setExpandRowKeys(v) {
|
|
196
|
+
expandRowKeys.value = v;
|
|
197
|
+
}
|
|
135
198
|
return {
|
|
136
199
|
addToFirst,
|
|
137
200
|
formItemBindProps,
|
|
138
201
|
readonly,
|
|
139
|
-
fullColumns,
|
|
140
|
-
buttonsColumn,
|
|
141
202
|
handleFormSetData,
|
|
142
|
-
formData
|
|
203
|
+
formData,
|
|
204
|
+
Plus: index.plus_default,
|
|
205
|
+
expandRowKeys,
|
|
206
|
+
handleExpandChange,
|
|
207
|
+
tableData,
|
|
208
|
+
ROW_KEY,
|
|
209
|
+
allColumns
|
|
143
210
|
};
|
|
144
211
|
}
|
|
145
212
|
});
|
|
@@ -169,14 +236,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
236
|
vue.createVNode(
|
|
170
237
|
_component_VkfFormItem,
|
|
171
238
|
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
172
|
-
{
|
|
239
|
+
vue.createSlots({
|
|
173
240
|
default: vue.withCtx(() => [
|
|
174
|
-
!_ctx.readonly && _ctx.splicable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
241
|
+
!_ctx.readonly && _ctx.splicable && !_ctx.labelActions ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
175
242
|
vue.createVNode(_component_ElButton, {
|
|
176
243
|
type: "primary",
|
|
177
244
|
onClick: _ctx.addToFirst
|
|
178
245
|
}, {
|
|
179
|
-
default: vue.withCtx(() => _cache[
|
|
246
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
180
247
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
181
248
|
])),
|
|
182
249
|
_: 1
|
|
@@ -184,26 +251,43 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
184
251
|
}, 8, ["onClick"])
|
|
185
252
|
])) : vue.createCommentVNode("v-if", true),
|
|
186
253
|
vue.createVNode(_component_ElTable, {
|
|
187
|
-
data: _ctx.
|
|
188
|
-
class: "vkf-input-collection-table"
|
|
254
|
+
data: _ctx.tableData,
|
|
255
|
+
class: "vkf-input-collection-table",
|
|
256
|
+
"row-key": _ctx.ROW_KEY,
|
|
257
|
+
"expand-row-keys": _ctx.expandRowKeys,
|
|
258
|
+
"default-expand-all": "",
|
|
259
|
+
onExpandChange: _ctx.handleExpandChange
|
|
189
260
|
}, {
|
|
190
261
|
default: vue.withCtx(() => [
|
|
191
|
-
vue.createVNode(_component_VkTableColumns, {
|
|
192
|
-
source: [
|
|
193
|
-
..._ctx.fullColumns,
|
|
194
|
-
_ctx.buttonsColumn
|
|
195
|
-
]
|
|
196
|
-
}, null, 8, ["source"])
|
|
262
|
+
vue.createVNode(_component_VkTableColumns, { source: _ctx.allColumns }, null, 8, ["source"])
|
|
197
263
|
]),
|
|
198
264
|
_: 1
|
|
199
265
|
/* STABLE */
|
|
200
|
-
}, 8, ["data"])
|
|
266
|
+
}, 8, ["data", "row-key", "expand-row-keys", "onExpandChange"])
|
|
201
267
|
]),
|
|
202
|
-
_:
|
|
203
|
-
/*
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
|
|
268
|
+
_: 2
|
|
269
|
+
/* DYNAMIC */
|
|
270
|
+
}, [
|
|
271
|
+
!_ctx.readonly && _ctx.splicable && _ctx.labelActions ? {
|
|
272
|
+
name: "labelActions",
|
|
273
|
+
fn: vue.withCtx(() => [
|
|
274
|
+
vue.createVNode(_component_ElButton, {
|
|
275
|
+
size: "small",
|
|
276
|
+
icon: _ctx.Plus,
|
|
277
|
+
onClick: _ctx.addToFirst
|
|
278
|
+
}, {
|
|
279
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
280
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
281
|
+
])),
|
|
282
|
+
_: 1
|
|
283
|
+
/* STABLE */
|
|
284
|
+
}, 8, ["icon", "onClick"])
|
|
285
|
+
]),
|
|
286
|
+
key: "0"
|
|
287
|
+
} : void 0
|
|
288
|
+
]),
|
|
289
|
+
1040
|
|
290
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
207
291
|
)
|
|
208
292
|
]),
|
|
209
293
|
_: 1
|
|
@@ -9,3 +9,12 @@
|
|
|
9
9
|
.vkf-input-collection-table .vkf-form-item {
|
|
10
10
|
margin-bottom: 0;
|
|
11
11
|
}
|
|
12
|
+
.vkf-input-collection-table .vk-input-collection__expand-form-item {
|
|
13
|
+
margin-bottom: 18px;
|
|
14
|
+
}
|
|
15
|
+
.vk-input-collection__expand-fieldset{
|
|
16
|
+
padding: 8px;
|
|
17
|
+
}
|
|
18
|
+
.vk-input-collection__buttons .cell{
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createVNode, Fragment, resolveComponent, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createElementBlock, createTextVNode, createCommentVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode, Fragment, ref, resolveComponent, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createSlots, createElementBlock, createTextVNode, createCommentVNode } from 'vue';
|
|
2
2
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
3
3
|
import { VkTableColumns } from '@vunk/plus/components/table-columns';
|
|
4
4
|
import { ElTable, ElButton } from 'element-plus';
|
|
@@ -9,6 +9,7 @@ import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
|
|
|
9
9
|
import { ensetData, getValue } from '@vunk/core';
|
|
10
10
|
import { p as plus_default, b as minus_default } from '../index2.mjs';
|
|
11
11
|
import { VkfRendererData } from '@vunk/form/components/renderer-data';
|
|
12
|
+
import { VkfFieldset } from '@vunk/form/components/fieldset';
|
|
12
13
|
import { c as cloneDeep } from '../cloneDeep.mjs';
|
|
13
14
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
14
15
|
import '../isObject.mjs';
|
|
@@ -42,6 +43,13 @@ const props = {
|
|
|
42
43
|
default: (data) => {
|
|
43
44
|
return Object.values(data).join(" ");
|
|
44
45
|
}
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @description 开启 form-item 的 label 上的操作区域, 在labelPosition为top时生效
|
|
49
|
+
*/
|
|
50
|
+
labelActions: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
45
53
|
}
|
|
46
54
|
};
|
|
47
55
|
const emits = {
|
|
@@ -93,49 +101,108 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
101
|
};
|
|
94
102
|
});
|
|
95
103
|
});
|
|
104
|
+
const expandFormItemRaws = computed(() => props2.columns.filter(e => e.expandVisible));
|
|
105
|
+
const expandColumn = {
|
|
106
|
+
type: "expand",
|
|
107
|
+
slots: e => {
|
|
108
|
+
const source = expandFormItemRaws.value.map(column => {
|
|
109
|
+
return {
|
|
110
|
+
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
111
|
+
label: column.label,
|
|
112
|
+
templateType: column.templateType,
|
|
113
|
+
readonly: readonly.value,
|
|
114
|
+
...column.templateProps,
|
|
115
|
+
...column.createTemplateProps?.(e),
|
|
116
|
+
class: "vk-input-collection__expand-form-item"
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
return createVNode(VkfFieldset, {
|
|
120
|
+
"class": "vk-input-collection__expand-fieldset",
|
|
121
|
+
"label-width": "auto",
|
|
122
|
+
"label-position": "right"
|
|
123
|
+
}, {
|
|
124
|
+
default: () => [createVNode(VkfFormItemRenderer, {
|
|
125
|
+
"source": source
|
|
126
|
+
}, null)]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
};
|
|
96
130
|
const buttonsColumn = computed(() => ({
|
|
97
131
|
label: "\u64CD\u4F5C",
|
|
98
132
|
align: "center",
|
|
99
|
-
width: "
|
|
133
|
+
width: "85",
|
|
100
134
|
hidden: readonly.value || !props2.splicable,
|
|
135
|
+
className: "vk-input-collection__buttons",
|
|
101
136
|
slots: ({
|
|
102
137
|
$index
|
|
103
138
|
}) => createVNode(Fragment, null, [createVNode(ElButton, {
|
|
104
139
|
"size": "small",
|
|
105
140
|
"icon": plus_default,
|
|
141
|
+
"circle": true,
|
|
106
142
|
"onClick": () => handlePlus($index)
|
|
107
143
|
}, null), createVNode(ElButton, {
|
|
108
144
|
"size": "small",
|
|
109
145
|
"icon": minus_default,
|
|
146
|
+
"circle": true,
|
|
110
147
|
"onClick": () => handleMinus($index)
|
|
111
148
|
}, null)])
|
|
112
149
|
}));
|
|
150
|
+
const allColumns = computed(() => {
|
|
151
|
+
const data = [...fullColumns.value, buttonsColumn.value];
|
|
152
|
+
if (expandFormItemRaws.value.length) {
|
|
153
|
+
data.unshift(expandColumn);
|
|
154
|
+
}
|
|
155
|
+
return data;
|
|
156
|
+
});
|
|
113
157
|
function handlePlus(index) {
|
|
114
158
|
const data = cloneDeep(props2.modelValue);
|
|
115
159
|
data.splice(index + 1, 0, {});
|
|
116
160
|
emit("update:modelValue", data);
|
|
161
|
+
setExpandRowKeys([]);
|
|
117
162
|
}
|
|
118
163
|
function handleMinus(index) {
|
|
119
164
|
const data = cloneDeep(props2.modelValue);
|
|
120
165
|
data.splice(index, 1);
|
|
121
166
|
emit("update:modelValue", data);
|
|
167
|
+
setExpandRowKeys([]);
|
|
122
168
|
}
|
|
123
169
|
const addToFirst = () => {
|
|
124
170
|
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
171
|
+
setExpandRowKeys([]);
|
|
125
172
|
};
|
|
126
173
|
const handleFormSetData = e => {
|
|
127
174
|
const data = cloneDeep(formData.value);
|
|
128
175
|
ensetData(data, e);
|
|
129
176
|
emit("update:modelValue", getValue(data, props2.prop));
|
|
130
177
|
};
|
|
178
|
+
const ROW_KEY = "_row_key";
|
|
179
|
+
const tableData = computed(() => {
|
|
180
|
+
return props2.modelValue.map((e, index) => {
|
|
181
|
+
return {
|
|
182
|
+
...e,
|
|
183
|
+
[ROW_KEY]: index + ""
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
const expandRowKeys = ref([]);
|
|
188
|
+
const handleExpandChange = (row, expandedRows) => {
|
|
189
|
+
expandRowKeys.value = expandedRows.map(e => e[ROW_KEY]);
|
|
190
|
+
};
|
|
191
|
+
function setExpandRowKeys(v) {
|
|
192
|
+
expandRowKeys.value = v;
|
|
193
|
+
}
|
|
131
194
|
return {
|
|
132
195
|
addToFirst,
|
|
133
196
|
formItemBindProps,
|
|
134
197
|
readonly,
|
|
135
|
-
fullColumns,
|
|
136
|
-
buttonsColumn,
|
|
137
198
|
handleFormSetData,
|
|
138
|
-
formData
|
|
199
|
+
formData,
|
|
200
|
+
Plus: plus_default,
|
|
201
|
+
expandRowKeys,
|
|
202
|
+
handleExpandChange,
|
|
203
|
+
tableData,
|
|
204
|
+
ROW_KEY,
|
|
205
|
+
allColumns
|
|
139
206
|
};
|
|
140
207
|
}
|
|
141
208
|
});
|
|
@@ -165,14 +232,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
232
|
createVNode(
|
|
166
233
|
_component_VkfFormItem,
|
|
167
234
|
normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
|
|
168
|
-
{
|
|
235
|
+
createSlots({
|
|
169
236
|
default: withCtx(() => [
|
|
170
|
-
!_ctx.readonly && _ctx.splicable ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
237
|
+
!_ctx.readonly && _ctx.splicable && !_ctx.labelActions ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
171
238
|
createVNode(_component_ElButton, {
|
|
172
239
|
type: "primary",
|
|
173
240
|
onClick: _ctx.addToFirst
|
|
174
241
|
}, {
|
|
175
|
-
default: withCtx(() => _cache[
|
|
242
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
176
243
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
177
244
|
])),
|
|
178
245
|
_: 1
|
|
@@ -180,26 +247,43 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
180
247
|
}, 8, ["onClick"])
|
|
181
248
|
])) : createCommentVNode("v-if", true),
|
|
182
249
|
createVNode(_component_ElTable, {
|
|
183
|
-
data: _ctx.
|
|
184
|
-
class: "vkf-input-collection-table"
|
|
250
|
+
data: _ctx.tableData,
|
|
251
|
+
class: "vkf-input-collection-table",
|
|
252
|
+
"row-key": _ctx.ROW_KEY,
|
|
253
|
+
"expand-row-keys": _ctx.expandRowKeys,
|
|
254
|
+
"default-expand-all": "",
|
|
255
|
+
onExpandChange: _ctx.handleExpandChange
|
|
185
256
|
}, {
|
|
186
257
|
default: withCtx(() => [
|
|
187
|
-
createVNode(_component_VkTableColumns, {
|
|
188
|
-
source: [
|
|
189
|
-
..._ctx.fullColumns,
|
|
190
|
-
_ctx.buttonsColumn
|
|
191
|
-
]
|
|
192
|
-
}, null, 8, ["source"])
|
|
258
|
+
createVNode(_component_VkTableColumns, { source: _ctx.allColumns }, null, 8, ["source"])
|
|
193
259
|
]),
|
|
194
260
|
_: 1
|
|
195
261
|
/* STABLE */
|
|
196
|
-
}, 8, ["data"])
|
|
262
|
+
}, 8, ["data", "row-key", "expand-row-keys", "onExpandChange"])
|
|
197
263
|
]),
|
|
198
|
-
_:
|
|
199
|
-
/*
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
|
|
264
|
+
_: 2
|
|
265
|
+
/* DYNAMIC */
|
|
266
|
+
}, [
|
|
267
|
+
!_ctx.readonly && _ctx.splicable && _ctx.labelActions ? {
|
|
268
|
+
name: "labelActions",
|
|
269
|
+
fn: withCtx(() => [
|
|
270
|
+
createVNode(_component_ElButton, {
|
|
271
|
+
size: "small",
|
|
272
|
+
icon: _ctx.Plus,
|
|
273
|
+
onClick: _ctx.addToFirst
|
|
274
|
+
}, {
|
|
275
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
276
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
|
277
|
+
])),
|
|
278
|
+
_: 1
|
|
279
|
+
/* STABLE */
|
|
280
|
+
}, 8, ["icon", "onClick"])
|
|
281
|
+
]),
|
|
282
|
+
key: "0"
|
|
283
|
+
} : void 0
|
|
284
|
+
]),
|
|
285
|
+
1040
|
|
286
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
203
287
|
)
|
|
204
288
|
]),
|
|
205
289
|
_: 1
|
|
@@ -28,6 +28,13 @@ export declare const props: {
|
|
|
28
28
|
type: PropType<(data: NormalObject) => string>;
|
|
29
29
|
default: (data: any) => string;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* @description 开启 form-item 的 label 上的操作区域, 在labelPosition为top时生效
|
|
33
|
+
*/
|
|
34
|
+
labelActions: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
31
38
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
32
39
|
formItemSize: {
|
|
33
40
|
type: PropType<"default" | "small" | "large">;
|
|
@@ -22,6 +22,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
22
22
|
type: import("vue").PropType<(data: NormalObject) => string>;
|
|
23
23
|
default: (data: any) => string;
|
|
24
24
|
};
|
|
25
|
+
labelActions: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
25
29
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
26
30
|
formItemSize: {
|
|
27
31
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -81,10 +85,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
81
85
|
addToFirst: () => void;
|
|
82
86
|
formItemBindProps: import("vue").ComputedRef<{}>;
|
|
83
87
|
readonly: import("vue").ComputedRef<boolean>;
|
|
84
|
-
fullColumns: import("vue").ComputedRef<__VkTableColumns.Source<import("@vunk/core").NormalObject>[]>;
|
|
85
|
-
buttonsColumn: import("vue").ComputedRef<__VkTableColumns.Source<import("@vunk/core").NormalObject>>;
|
|
86
88
|
handleFormSetData: (e: SetDataEvent) => void;
|
|
87
89
|
formData: import("vue").ComputedRef<NormalObject | NormalObject[]>;
|
|
90
|
+
Plus: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
91
|
+
expandRowKeys: import("vue").Ref<string[], string[]>;
|
|
92
|
+
handleExpandChange: (row: any, expandedRows: NormalObject[]) => void;
|
|
93
|
+
tableData: import("vue").ComputedRef<{
|
|
94
|
+
_row_key: string;
|
|
95
|
+
}[]>;
|
|
96
|
+
ROW_KEY: string;
|
|
97
|
+
allColumns: import("vue").ComputedRef<__VkTableColumns.Source<import("@vunk/core").NormalObject>[]>;
|
|
88
98
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
89
99
|
'update:modelValue': any;
|
|
90
100
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -108,6 +118,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
108
118
|
type: import("vue").PropType<(data: NormalObject) => string>;
|
|
109
119
|
default: (data: any) => string;
|
|
110
120
|
};
|
|
121
|
+
labelActions: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
111
125
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
112
126
|
formItemSize: {
|
|
113
127
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -182,6 +196,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
182
196
|
modelValue: NormalObject[];
|
|
183
197
|
columns: import("./types").Column<any>[];
|
|
184
198
|
splicable: boolean;
|
|
199
|
+
labelActions: boolean;
|
|
185
200
|
summaryLabel: (data: NormalObject) => string;
|
|
186
201
|
}, {}, {
|
|
187
202
|
ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -262,11 +277,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
262
277
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
263
278
|
flexible: BooleanConstructor;
|
|
264
279
|
showOverflowTooltip: import("vue").PropType<import("element-plus").TableProps<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["showOverflowTooltip"]>;
|
|
280
|
+
tooltipFormatter: import("vue").PropType<import("element-plus").TableProps<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["tooltipFormatter"]>;
|
|
265
281
|
appendFilterPanelTo: StringConstructor;
|
|
266
282
|
scrollbarTabindex: {
|
|
267
283
|
type: (NumberConstructor | StringConstructor)[];
|
|
268
284
|
default: undefined;
|
|
269
285
|
};
|
|
286
|
+
allowDragLastColumn: {
|
|
287
|
+
type: BooleanConstructor;
|
|
288
|
+
default: boolean;
|
|
289
|
+
};
|
|
270
290
|
}, {
|
|
271
291
|
ns: {
|
|
272
292
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -348,6 +368,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
348
368
|
scrollTo: (options: ScrollToOptions | number, yCoord?: number) => void;
|
|
349
369
|
setScrollLeft: (left?: number) => void;
|
|
350
370
|
setScrollTop: (top?: number) => void;
|
|
371
|
+
allowDragLastColumn: boolean;
|
|
351
372
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "select-all" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "current-change" | "header-dragend" | "expand-change" | "scroll")[], "select" | "select-all" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "current-change" | "header-dragend" | "expand-change" | "scroll", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
352
373
|
data: {
|
|
353
374
|
type: import("vue").PropType<import("element-plus/es/components/table/src/table/defaults").DefaultRow[]>;
|
|
@@ -426,11 +447,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
426
447
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
427
448
|
flexible: BooleanConstructor;
|
|
428
449
|
showOverflowTooltip: import("vue").PropType<import("element-plus").TableProps<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["showOverflowTooltip"]>;
|
|
450
|
+
tooltipFormatter: import("vue").PropType<import("element-plus").TableProps<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["tooltipFormatter"]>;
|
|
429
451
|
appendFilterPanelTo: StringConstructor;
|
|
430
452
|
scrollbarTabindex: {
|
|
431
453
|
type: (NumberConstructor | StringConstructor)[];
|
|
432
454
|
default: undefined;
|
|
433
455
|
};
|
|
456
|
+
allowDragLastColumn: {
|
|
457
|
+
type: BooleanConstructor;
|
|
458
|
+
default: boolean;
|
|
459
|
+
};
|
|
434
460
|
}>> & {
|
|
435
461
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
436
462
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
@@ -460,6 +486,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
460
486
|
fit: boolean;
|
|
461
487
|
lazy: boolean;
|
|
462
488
|
scrollbarAlwaysOn: boolean;
|
|
489
|
+
allowDragLastColumn: boolean;
|
|
463
490
|
stripe: boolean;
|
|
464
491
|
treeProps: import("element-plus/es/components/table/src/table/defaults").TreeProps | undefined;
|
|
465
492
|
showHeader: boolean;
|
|
@@ -507,6 +534,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
507
534
|
type: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["showOverflowTooltip"]>;
|
|
508
535
|
default: undefined;
|
|
509
536
|
};
|
|
537
|
+
tooltipFormatter: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["tooltipFormatter"]>;
|
|
510
538
|
fixed: (StringConstructor | BooleanConstructor)[];
|
|
511
539
|
formatter: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["formatter"]>;
|
|
512
540
|
selectable: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["selectable"]>;
|
|
@@ -562,6 +590,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
562
590
|
type: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["showOverflowTooltip"]>;
|
|
563
591
|
default: undefined;
|
|
564
592
|
};
|
|
593
|
+
tooltipFormatter: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["tooltipFormatter"]>;
|
|
565
594
|
fixed: (StringConstructor | BooleanConstructor)[];
|
|
566
595
|
formatter: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["formatter"]>;
|
|
567
596
|
selectable: import("vue").PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults").DefaultRow>["selectable"]>;
|
|
@@ -11,6 +11,7 @@ export interface Source<P extends string = string> extends VueComponentPropsType
|
|
|
11
11
|
export type Column<R extends NormalObject = NormalObject> = Omit<__VkTableColumns.Source<R>, 'slots'> & {
|
|
12
12
|
templateType: __VkfTemplatesDefault.CoreSource['templateType'];
|
|
13
13
|
templateProps?: Partial<__VkfTemplatesDefault.CoreSource<Keyof<R>>>;
|
|
14
|
+
expandVisible?: boolean;
|
|
14
15
|
createTemplateProps?: (e: {
|
|
15
16
|
row: R;
|
|
16
17
|
column: TableColumnCtx<R>;
|
|
@@ -4701,6 +4701,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4701
4701
|
};
|
|
4702
4702
|
readonly modelValue: BooleanConstructor;
|
|
4703
4703
|
readonly modalClass: StringConstructor;
|
|
4704
|
+
readonly headerClass: StringConstructor;
|
|
4705
|
+
readonly bodyClass: StringConstructor;
|
|
4706
|
+
readonly footerClass: StringConstructor;
|
|
4704
4707
|
readonly width: {
|
|
4705
4708
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
4706
4709
|
readonly required: false;
|
|
@@ -4801,6 +4804,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4801
4804
|
};
|
|
4802
4805
|
readonly modelValue: BooleanConstructor;
|
|
4803
4806
|
readonly modalClass: StringConstructor;
|
|
4807
|
+
readonly headerClass: StringConstructor;
|
|
4808
|
+
readonly bodyClass: StringConstructor;
|
|
4809
|
+
readonly footerClass: StringConstructor;
|
|
4804
4810
|
readonly width: {
|
|
4805
4811
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
4806
4812
|
readonly required: false;
|
|
@@ -4890,6 +4896,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4890
4896
|
};
|
|
4891
4897
|
readonly modelValue: BooleanConstructor;
|
|
4892
4898
|
readonly modalClass: StringConstructor;
|
|
4899
|
+
readonly headerClass: StringConstructor;
|
|
4900
|
+
readonly bodyClass: StringConstructor;
|
|
4901
|
+
readonly footerClass: StringConstructor;
|
|
4893
4902
|
readonly width: {
|
|
4894
4903
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
4895
4904
|
readonly required: false;
|
|
@@ -28,6 +28,14 @@ const props = {
|
|
|
28
28
|
formItems: {
|
|
29
29
|
type: Array,
|
|
30
30
|
default: () => []
|
|
31
|
+
},
|
|
32
|
+
trigger: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "hover"
|
|
35
|
+
},
|
|
36
|
+
showAfter: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 500
|
|
31
39
|
}
|
|
32
40
|
};
|
|
33
41
|
const emits = {};
|
|
@@ -59,7 +67,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
67
|
placement: _ctx.placement,
|
|
60
68
|
title: _ctx.theTitle,
|
|
61
69
|
width: 250,
|
|
62
|
-
trigger:
|
|
70
|
+
trigger: _ctx.trigger,
|
|
71
|
+
"show-after": _ctx.showAfter
|
|
63
72
|
}, {
|
|
64
73
|
reference: vue.withCtx(() => [
|
|
65
74
|
vue.createVNode(_component_ElTag, { class: "vkf-tag-information__tag" }, {
|
|
@@ -88,7 +97,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
88
97
|
]),
|
|
89
98
|
_: 3
|
|
90
99
|
/* FORWARDED */
|
|
91
|
-
}, 8, ["placement", "title"]);
|
|
100
|
+
}, 8, ["placement", "title", "trigger", "show-after"]);
|
|
92
101
|
}
|
|
93
102
|
var VkfTagInformation = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/tag-information/src/index.vue"]]);
|
|
94
103
|
|