@vunk/form 2.4.0 → 2.5.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/cascader/src/index.vue.d.ts +2 -2
- package/components/fieldset/index.cjs +106 -0
- package/components/fieldset/index.css +5 -0
- package/components/fieldset/index.d.ts +4 -0
- package/components/fieldset/index.mjs +100 -0
- package/components/fieldset/src/ctx.d.ts +7 -0
- package/components/fieldset/src/index.vue.d.ts +14 -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 +104 -21
- package/components/input-collection/index.css +9 -0
- package/components/input-collection/index.mjs +105 -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,107 @@ 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
|
+
}, {
|
|
127
|
+
default: () => [vue.createVNode(formItemRenderer.VkfFormItemRenderer, {
|
|
128
|
+
"source": source
|
|
129
|
+
}, null)]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|
|
100
133
|
const buttonsColumn = vue.computed(() => ({
|
|
101
134
|
label: "\u64CD\u4F5C",
|
|
102
135
|
align: "center",
|
|
103
|
-
width: "
|
|
136
|
+
width: "85",
|
|
104
137
|
hidden: readonly.value || !props2.splicable,
|
|
138
|
+
className: "vk-input-collection__buttons",
|
|
105
139
|
slots: ({
|
|
106
140
|
$index
|
|
107
141
|
}) => vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus.ElButton, {
|
|
108
142
|
"size": "small",
|
|
109
143
|
"icon": index.plus_default,
|
|
144
|
+
"circle": true,
|
|
110
145
|
"onClick": () => handlePlus($index)
|
|
111
146
|
}, null), vue.createVNode(elementPlus.ElButton, {
|
|
112
147
|
"size": "small",
|
|
113
148
|
"icon": index.minus_default,
|
|
149
|
+
"circle": true,
|
|
114
150
|
"onClick": () => handleMinus($index)
|
|
115
151
|
}, null)])
|
|
116
152
|
}));
|
|
153
|
+
const allColumns = vue.computed(() => {
|
|
154
|
+
const data = [...fullColumns.value, buttonsColumn.value];
|
|
155
|
+
if (expandFormItemRaws.value.length) {
|
|
156
|
+
data.unshift(expandColumn);
|
|
157
|
+
}
|
|
158
|
+
return data;
|
|
159
|
+
});
|
|
117
160
|
function handlePlus(index) {
|
|
118
161
|
const data = cloneDeep.cloneDeep(props2.modelValue);
|
|
119
162
|
data.splice(index + 1, 0, {});
|
|
120
163
|
emit("update:modelValue", data);
|
|
164
|
+
setExpandRowKeys([]);
|
|
121
165
|
}
|
|
122
166
|
function handleMinus(index) {
|
|
123
167
|
const data = cloneDeep.cloneDeep(props2.modelValue);
|
|
124
168
|
data.splice(index, 1);
|
|
125
169
|
emit("update:modelValue", data);
|
|
170
|
+
setExpandRowKeys([]);
|
|
126
171
|
}
|
|
127
172
|
const addToFirst = () => {
|
|
128
173
|
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
174
|
+
setExpandRowKeys([]);
|
|
129
175
|
};
|
|
130
176
|
const handleFormSetData = e => {
|
|
131
177
|
const data = cloneDeep.cloneDeep(formData.value);
|
|
132
178
|
core.ensetData(data, e);
|
|
133
179
|
emit("update:modelValue", core.getValue(data, props2.prop));
|
|
134
180
|
};
|
|
181
|
+
const ROW_KEY = "_row_key";
|
|
182
|
+
const tableData = vue.computed(() => {
|
|
183
|
+
return props2.modelValue.map((e, index) => {
|
|
184
|
+
return {
|
|
185
|
+
...e,
|
|
186
|
+
[ROW_KEY]: index + ""
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
const expandRowKeys = vue.ref([]);
|
|
191
|
+
const handleExpandChange = (row, expandedRows) => {
|
|
192
|
+
expandRowKeys.value = expandedRows.map(e => e[ROW_KEY]);
|
|
193
|
+
};
|
|
194
|
+
function setExpandRowKeys(v) {
|
|
195
|
+
expandRowKeys.value = v;
|
|
196
|
+
}
|
|
135
197
|
return {
|
|
136
198
|
addToFirst,
|
|
137
199
|
formItemBindProps,
|
|
138
200
|
readonly,
|
|
139
|
-
fullColumns,
|
|
140
|
-
buttonsColumn,
|
|
141
201
|
handleFormSetData,
|
|
142
|
-
formData
|
|
202
|
+
formData,
|
|
203
|
+
Plus: index.plus_default,
|
|
204
|
+
expandRowKeys,
|
|
205
|
+
handleExpandChange,
|
|
206
|
+
tableData,
|
|
207
|
+
ROW_KEY,
|
|
208
|
+
allColumns
|
|
143
209
|
};
|
|
144
210
|
}
|
|
145
211
|
});
|
|
@@ -169,14 +235,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
235
|
vue.createVNode(
|
|
170
236
|
_component_VkfFormItem,
|
|
171
237
|
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
172
|
-
{
|
|
238
|
+
vue.createSlots({
|
|
173
239
|
default: vue.withCtx(() => [
|
|
174
|
-
!_ctx.readonly && _ctx.splicable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
240
|
+
!_ctx.readonly && _ctx.splicable && !_ctx.labelActions ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
175
241
|
vue.createVNode(_component_ElButton, {
|
|
176
242
|
type: "primary",
|
|
177
243
|
onClick: _ctx.addToFirst
|
|
178
244
|
}, {
|
|
179
|
-
default: vue.withCtx(() => _cache[
|
|
245
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
180
246
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
181
247
|
])),
|
|
182
248
|
_: 1
|
|
@@ -184,26 +250,43 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
184
250
|
}, 8, ["onClick"])
|
|
185
251
|
])) : vue.createCommentVNode("v-if", true),
|
|
186
252
|
vue.createVNode(_component_ElTable, {
|
|
187
|
-
data: _ctx.
|
|
188
|
-
class: "vkf-input-collection-table"
|
|
253
|
+
data: _ctx.tableData,
|
|
254
|
+
class: "vkf-input-collection-table",
|
|
255
|
+
"row-key": _ctx.ROW_KEY,
|
|
256
|
+
"expand-row-keys": _ctx.expandRowKeys,
|
|
257
|
+
"default-expand-all": "",
|
|
258
|
+
onExpandChange: _ctx.handleExpandChange
|
|
189
259
|
}, {
|
|
190
260
|
default: vue.withCtx(() => [
|
|
191
|
-
vue.createVNode(_component_VkTableColumns, {
|
|
192
|
-
source: [
|
|
193
|
-
..._ctx.fullColumns,
|
|
194
|
-
_ctx.buttonsColumn
|
|
195
|
-
]
|
|
196
|
-
}, null, 8, ["source"])
|
|
261
|
+
vue.createVNode(_component_VkTableColumns, { source: _ctx.allColumns }, null, 8, ["source"])
|
|
197
262
|
]),
|
|
198
263
|
_: 1
|
|
199
264
|
/* STABLE */
|
|
200
|
-
}, 8, ["data"])
|
|
265
|
+
}, 8, ["data", "row-key", "expand-row-keys", "onExpandChange"])
|
|
201
266
|
]),
|
|
202
|
-
_:
|
|
203
|
-
/*
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
|
|
267
|
+
_: 2
|
|
268
|
+
/* DYNAMIC */
|
|
269
|
+
}, [
|
|
270
|
+
!_ctx.readonly && _ctx.splicable && _ctx.labelActions ? {
|
|
271
|
+
name: "labelActions",
|
|
272
|
+
fn: vue.withCtx(() => [
|
|
273
|
+
vue.createVNode(_component_ElButton, {
|
|
274
|
+
size: "small",
|
|
275
|
+
icon: _ctx.Plus,
|
|
276
|
+
onClick: _ctx.addToFirst
|
|
277
|
+
}, {
|
|
278
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
279
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
280
|
+
])),
|
|
281
|
+
_: 1
|
|
282
|
+
/* STABLE */
|
|
283
|
+
}, 8, ["icon", "onClick"])
|
|
284
|
+
]),
|
|
285
|
+
key: "0"
|
|
286
|
+
} : void 0
|
|
287
|
+
]),
|
|
288
|
+
1040
|
|
289
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
207
290
|
)
|
|
208
291
|
]),
|
|
209
292
|
_: 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,107 @@ 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
|
+
}, {
|
|
123
|
+
default: () => [createVNode(VkfFormItemRenderer, {
|
|
124
|
+
"source": source
|
|
125
|
+
}, null)]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
96
129
|
const buttonsColumn = computed(() => ({
|
|
97
130
|
label: "\u64CD\u4F5C",
|
|
98
131
|
align: "center",
|
|
99
|
-
width: "
|
|
132
|
+
width: "85",
|
|
100
133
|
hidden: readonly.value || !props2.splicable,
|
|
134
|
+
className: "vk-input-collection__buttons",
|
|
101
135
|
slots: ({
|
|
102
136
|
$index
|
|
103
137
|
}) => createVNode(Fragment, null, [createVNode(ElButton, {
|
|
104
138
|
"size": "small",
|
|
105
139
|
"icon": plus_default,
|
|
140
|
+
"circle": true,
|
|
106
141
|
"onClick": () => handlePlus($index)
|
|
107
142
|
}, null), createVNode(ElButton, {
|
|
108
143
|
"size": "small",
|
|
109
144
|
"icon": minus_default,
|
|
145
|
+
"circle": true,
|
|
110
146
|
"onClick": () => handleMinus($index)
|
|
111
147
|
}, null)])
|
|
112
148
|
}));
|
|
149
|
+
const allColumns = computed(() => {
|
|
150
|
+
const data = [...fullColumns.value, buttonsColumn.value];
|
|
151
|
+
if (expandFormItemRaws.value.length) {
|
|
152
|
+
data.unshift(expandColumn);
|
|
153
|
+
}
|
|
154
|
+
return data;
|
|
155
|
+
});
|
|
113
156
|
function handlePlus(index) {
|
|
114
157
|
const data = cloneDeep(props2.modelValue);
|
|
115
158
|
data.splice(index + 1, 0, {});
|
|
116
159
|
emit("update:modelValue", data);
|
|
160
|
+
setExpandRowKeys([]);
|
|
117
161
|
}
|
|
118
162
|
function handleMinus(index) {
|
|
119
163
|
const data = cloneDeep(props2.modelValue);
|
|
120
164
|
data.splice(index, 1);
|
|
121
165
|
emit("update:modelValue", data);
|
|
166
|
+
setExpandRowKeys([]);
|
|
122
167
|
}
|
|
123
168
|
const addToFirst = () => {
|
|
124
169
|
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
170
|
+
setExpandRowKeys([]);
|
|
125
171
|
};
|
|
126
172
|
const handleFormSetData = e => {
|
|
127
173
|
const data = cloneDeep(formData.value);
|
|
128
174
|
ensetData(data, e);
|
|
129
175
|
emit("update:modelValue", getValue(data, props2.prop));
|
|
130
176
|
};
|
|
177
|
+
const ROW_KEY = "_row_key";
|
|
178
|
+
const tableData = computed(() => {
|
|
179
|
+
return props2.modelValue.map((e, index) => {
|
|
180
|
+
return {
|
|
181
|
+
...e,
|
|
182
|
+
[ROW_KEY]: index + ""
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
const expandRowKeys = ref([]);
|
|
187
|
+
const handleExpandChange = (row, expandedRows) => {
|
|
188
|
+
expandRowKeys.value = expandedRows.map(e => e[ROW_KEY]);
|
|
189
|
+
};
|
|
190
|
+
function setExpandRowKeys(v) {
|
|
191
|
+
expandRowKeys.value = v;
|
|
192
|
+
}
|
|
131
193
|
return {
|
|
132
194
|
addToFirst,
|
|
133
195
|
formItemBindProps,
|
|
134
196
|
readonly,
|
|
135
|
-
fullColumns,
|
|
136
|
-
buttonsColumn,
|
|
137
197
|
handleFormSetData,
|
|
138
|
-
formData
|
|
198
|
+
formData,
|
|
199
|
+
Plus: plus_default,
|
|
200
|
+
expandRowKeys,
|
|
201
|
+
handleExpandChange,
|
|
202
|
+
tableData,
|
|
203
|
+
ROW_KEY,
|
|
204
|
+
allColumns
|
|
139
205
|
};
|
|
140
206
|
}
|
|
141
207
|
});
|
|
@@ -165,14 +231,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
231
|
createVNode(
|
|
166
232
|
_component_VkfFormItem,
|
|
167
233
|
normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
|
|
168
|
-
{
|
|
234
|
+
createSlots({
|
|
169
235
|
default: withCtx(() => [
|
|
170
|
-
!_ctx.readonly && _ctx.splicable ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
236
|
+
!_ctx.readonly && _ctx.splicable && !_ctx.labelActions ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
171
237
|
createVNode(_component_ElButton, {
|
|
172
238
|
type: "primary",
|
|
173
239
|
onClick: _ctx.addToFirst
|
|
174
240
|
}, {
|
|
175
|
-
default: withCtx(() => _cache[
|
|
241
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
176
242
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
177
243
|
])),
|
|
178
244
|
_: 1
|
|
@@ -180,26 +246,43 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
180
246
|
}, 8, ["onClick"])
|
|
181
247
|
])) : createCommentVNode("v-if", true),
|
|
182
248
|
createVNode(_component_ElTable, {
|
|
183
|
-
data: _ctx.
|
|
184
|
-
class: "vkf-input-collection-table"
|
|
249
|
+
data: _ctx.tableData,
|
|
250
|
+
class: "vkf-input-collection-table",
|
|
251
|
+
"row-key": _ctx.ROW_KEY,
|
|
252
|
+
"expand-row-keys": _ctx.expandRowKeys,
|
|
253
|
+
"default-expand-all": "",
|
|
254
|
+
onExpandChange: _ctx.handleExpandChange
|
|
185
255
|
}, {
|
|
186
256
|
default: withCtx(() => [
|
|
187
|
-
createVNode(_component_VkTableColumns, {
|
|
188
|
-
source: [
|
|
189
|
-
..._ctx.fullColumns,
|
|
190
|
-
_ctx.buttonsColumn
|
|
191
|
-
]
|
|
192
|
-
}, null, 8, ["source"])
|
|
257
|
+
createVNode(_component_VkTableColumns, { source: _ctx.allColumns }, null, 8, ["source"])
|
|
193
258
|
]),
|
|
194
259
|
_: 1
|
|
195
260
|
/* STABLE */
|
|
196
|
-
}, 8, ["data"])
|
|
261
|
+
}, 8, ["data", "row-key", "expand-row-keys", "onExpandChange"])
|
|
197
262
|
]),
|
|
198
|
-
_:
|
|
199
|
-
/*
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
|
|
263
|
+
_: 2
|
|
264
|
+
/* DYNAMIC */
|
|
265
|
+
}, [
|
|
266
|
+
!_ctx.readonly && _ctx.splicable && _ctx.labelActions ? {
|
|
267
|
+
name: "labelActions",
|
|
268
|
+
fn: withCtx(() => [
|
|
269
|
+
createVNode(_component_ElButton, {
|
|
270
|
+
size: "small",
|
|
271
|
+
icon: _ctx.Plus,
|
|
272
|
+
onClick: _ctx.addToFirst
|
|
273
|
+
}, {
|
|
274
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
275
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
|
276
|
+
])),
|
|
277
|
+
_: 1
|
|
278
|
+
/* STABLE */
|
|
279
|
+
}, 8, ["icon", "onClick"])
|
|
280
|
+
]),
|
|
281
|
+
key: "0"
|
|
282
|
+
} : void 0
|
|
283
|
+
]),
|
|
284
|
+
1040
|
|
285
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
203
286
|
)
|
|
204
287
|
]),
|
|
205
288
|
_: 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
|
|
|
@@ -24,6 +24,14 @@ const props = {
|
|
|
24
24
|
formItems: {
|
|
25
25
|
type: Array,
|
|
26
26
|
default: () => []
|
|
27
|
+
},
|
|
28
|
+
trigger: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "hover"
|
|
31
|
+
},
|
|
32
|
+
showAfter: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 500
|
|
27
35
|
}
|
|
28
36
|
};
|
|
29
37
|
const emits = {};
|
|
@@ -55,7 +63,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
55
63
|
placement: _ctx.placement,
|
|
56
64
|
title: _ctx.theTitle,
|
|
57
65
|
width: 250,
|
|
58
|
-
trigger:
|
|
66
|
+
trigger: _ctx.trigger,
|
|
67
|
+
"show-after": _ctx.showAfter
|
|
59
68
|
}, {
|
|
60
69
|
reference: withCtx(() => [
|
|
61
70
|
createVNode(_component_ElTag, { class: "vkf-tag-information__tag" }, {
|
|
@@ -84,7 +93,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
84
93
|
]),
|
|
85
94
|
_: 3
|
|
86
95
|
/* FORWARDED */
|
|
87
|
-
}, 8, ["placement", "title"]);
|
|
96
|
+
}, 8, ["placement", "title", "trigger", "show-after"]);
|
|
88
97
|
}
|
|
89
98
|
var VkfTagInformation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/tag-information/src/index.vue"]]);
|
|
90
99
|
|