@veltra/desktop 1.7.13 → 1.7.15
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/dist/components/batch-edit/batch-edit-form.js +9 -3
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/batch-edit-list.js +2 -1
- package/dist/components/batch-edit/batch-edit-list.js.map +1 -1
- package/dist/components/batch-edit/batch-edit.js +57 -30
- package/dist/components/batch-edit/batch-edit.js.map +1 -1
- package/dist/components/batch-edit/style.d.ts +1 -0
- package/dist/components/batch-edit/style.js +1 -0
- package/dist/components/batch-edit/style2.css +14 -0
- package/dist/components/batch-edit/use-dialog-effect.js +20 -0
- package/dist/components/batch-edit/use-dialog-effect.js.map +1 -0
- package/dist/components/batch-edit/use-edit-state.js +22 -3
- package/dist/components/batch-edit/use-edit-state.js.map +1 -1
- package/dist/components/batch-edit/use-handlers.js +5 -0
- package/dist/components/batch-edit/use-handlers.js.map +1 -1
- package/dist/components/batch-edit/use-shortcut-key.js +5 -2
- package/dist/components/batch-edit/use-shortcut-key.js.map +1 -1
- package/dist/components/file-viewer/file-viewer.js +21 -14
- package/dist/components/file-viewer/file-viewer.js.map +1 -1
- package/dist/components/file-viewer/helper.js +2 -0
- package/dist/components/file-viewer/helper.js.map +1 -1
- package/dist/components/file-viewer/previewers/ofd-previewer.js +196 -0
- package/dist/components/file-viewer/previewers/ofd-previewer.js.map +1 -0
- package/dist/components/file-viewer/style2.css +27 -0
- package/dist/components/table-editor/style2.css +23 -3
- package/dist/components/table-editor/table-editor.js +213 -63
- package/dist/components/table-editor/table-editor.js.map +1 -1
- package/dist/components/tip/style2.css +63 -0
- package/dist/components/tip/tip.js +6 -1
- package/dist/components/tip/tip.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/packages/ofd-core/dist/color.js +69 -0
- package/dist/packages/ofd-core/dist/color.js.map +1 -0
- package/dist/packages/ofd-core/dist/ctm.js +55 -0
- package/dist/packages/ofd-core/dist/ctm.js.map +1 -0
- package/dist/packages/ofd-core/dist/error.js +14 -0
- package/dist/packages/ofd-core/dist/error.js.map +1 -0
- package/dist/packages/ofd-core/dist/font.js +384 -0
- package/dist/packages/ofd-core/dist/font.js.map +1 -0
- package/dist/packages/ofd-core/dist/index.js +6 -0
- package/dist/packages/ofd-core/dist/number.js +13 -0
- package/dist/packages/ofd-core/dist/number.js.map +1 -0
- package/dist/packages/ofd-core/dist/page-objects.js +181 -0
- package/dist/packages/ofd-core/dist/page-objects.js.map +1 -0
- package/dist/packages/ofd-core/dist/parse.js +65 -0
- package/dist/packages/ofd-core/dist/parse.js.map +1 -0
- package/dist/packages/ofd-core/dist/render.js +361 -0
- package/dist/packages/ofd-core/dist/render.js.map +1 -0
- package/dist/packages/ofd-core/dist/xml.js +199 -0
- package/dist/packages/ofd-core/dist/xml.js.map +1 -0
- package/dist/packages/ofd-core/dist/zip.js +93 -0
- package/dist/packages/ofd-core/dist/zip.js.map +1 -0
- package/dist/style.d.ts +1 -1
- package/dist/style.js +1 -1
- package/dist/types/batch-edit.d.ts +6 -0
- package/dist/types/file-viewer.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/table-editor.d.ts +28 -7
- package/dist/types/tip.d.ts +5 -1
- package/package.json +8 -7
- package/src/components/batch-edit/__test__/batch-edit.test.ts +191 -4
- package/src/components/batch-edit/batch-edit-form.vue +17 -3
- package/src/components/batch-edit/batch-edit-list.vue +2 -1
- package/src/components/batch-edit/batch-edit.vue +22 -4
- package/src/components/batch-edit/style.scss +20 -0
- package/src/components/batch-edit/style.ts +1 -0
- package/src/components/batch-edit/use-dialog-effect.ts +9 -3
- package/src/components/batch-edit/use-edit-state.ts +32 -4
- package/src/components/batch-edit/use-handlers.ts +10 -0
- package/src/components/batch-edit/use-shortcut-key.ts +6 -2
- package/src/components/file-viewer/__test__/helper.test.ts +13 -0
- package/src/components/file-viewer/file-viewer.vue +23 -16
- package/src/components/file-viewer/helper.ts +2 -0
- package/src/components/file-viewer/previewers/ofd-previewer.vue +216 -0
- package/src/components/file-viewer/style.scss +33 -0
- package/src/components/table-editor/__test__/table-editor.test.ts +471 -0
- package/src/components/table-editor/style.scss +42 -4
- package/src/components/table-editor/table-editor.vue +265 -38
- package/src/components/tip/style.scss +15 -0
- package/src/components/tip/tip.vue +1 -1
- package/src/types/batch-edit.ts +6 -0
- package/src/types/file-viewer.ts +1 -1
- package/src/types/table-editor.ts +29 -7
- package/src/types/tip.ts +6 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import _sfc_main$1 from "../
|
|
2
|
-
import _sfc_main$2 from "../
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import _sfc_main$2 from "../tip/tip.js";
|
|
3
|
+
import { validateField } from "../form-item/validate.js";
|
|
4
|
+
import _sfc_main$3 from "../button/button.js";
|
|
5
|
+
import _sfc_main$4 from "../table/table.js";
|
|
6
|
+
import { computed, createBlock, createCommentVNode, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, mergeProps, normalizeClass, normalizeProps, openBlock, renderList, renderSlot, shallowRef, toRaw, triggerRef, unref, useSlots, watch, withCtx } from "vue";
|
|
5
7
|
import { bem } from "@veltra/utils";
|
|
6
|
-
import { Copy, Minus, Plus } from "@veltra/icons/normal";
|
|
8
|
+
import { Copy, Minus, Plus, Warning } from "@veltra/icons/normal";
|
|
9
|
+
import { o } from "@cat-kit/core";
|
|
7
10
|
//#region src/components/table-editor/table-editor.vue
|
|
8
11
|
const _hoisted_1 = { style: {
|
|
9
12
|
"text-align": "center",
|
|
@@ -13,9 +16,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
13
16
|
name: "UTableEditor",
|
|
14
17
|
__name: "table-editor",
|
|
15
18
|
props: {
|
|
16
|
-
modelValue: {
|
|
19
|
+
modelValue: {},
|
|
20
|
+
columns: {},
|
|
21
|
+
readonly: { type: Boolean },
|
|
17
22
|
size: {},
|
|
18
|
-
columns: { default: () => [] },
|
|
19
23
|
checked: {},
|
|
20
24
|
selected: {},
|
|
21
25
|
checkable: { type: Boolean },
|
|
@@ -35,82 +39,224 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
35
39
|
textEllipsis: { type: Boolean }
|
|
36
40
|
},
|
|
37
41
|
emits: ["update:modelValue"],
|
|
38
|
-
setup(__props, { emit: __emit }) {
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
39
44
|
const emit = __emit;
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
const columns = computed(() => props.columns ?? []);
|
|
46
|
+
const modelValue = computed(() => props.modelValue ?? []);
|
|
47
|
+
/** 转发给 u-table 的表格属性;columns / modelValue / readonly 为编辑器自用,stripe / showIndex 被覆盖 */
|
|
48
|
+
const tableProps = computed(() => {
|
|
49
|
+
const rest = { ...props };
|
|
50
|
+
delete rest.columns;
|
|
51
|
+
delete rest.modelValue;
|
|
52
|
+
delete rest.readonly;
|
|
53
|
+
return rest;
|
|
46
54
|
});
|
|
55
|
+
const cls = bem("table-editor");
|
|
56
|
+
const slots = useSlots();
|
|
47
57
|
const actionColumn = {
|
|
48
58
|
key: "__operation",
|
|
49
59
|
name: "操作",
|
|
50
|
-
width:
|
|
60
|
+
width: 104,
|
|
51
61
|
align: "center",
|
|
52
62
|
fixed: "right",
|
|
53
63
|
resizable: false
|
|
54
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* 内部列定义:单元格渲染挂在列的 render 上(用户列自带的 render 优先),
|
|
67
|
+
* 配置了 rules 的列包装 nameRender 追加校验标识,非只读时末尾追加操作列。
|
|
68
|
+
* 列 key 带上只读态后缀:u-table 行内单元格在 props 值相等时可能跳过子组件补丁,
|
|
69
|
+
* 只读切换改用挂载键直接重挂单元格,确保控件在编辑/只读形态间可靠切换。
|
|
70
|
+
*/
|
|
55
71
|
const internalColumns = computed(() => {
|
|
56
|
-
|
|
72
|
+
const list = columns.value.map((column) => ({
|
|
73
|
+
...column,
|
|
74
|
+
key: `${column.key}${props.readonly ? ":ro" : ""}`,
|
|
75
|
+
nameRender: column.rules ? headerCell(column) : column.nameRender,
|
|
76
|
+
render: column.render ?? ((ctx) => editCell(column, ctx))
|
|
77
|
+
}));
|
|
78
|
+
return props.readonly ? list : [...list, actionColumn];
|
|
79
|
+
});
|
|
80
|
+
/** 透传给 u-table 的插槽名:column:* 经 editCell 注入 model、empty 由组件接管,其余透传 */
|
|
81
|
+
const passSlotNames = Object.keys(slots).filter((name) => !name.startsWith("column:") && name !== "empty");
|
|
82
|
+
/**
|
|
83
|
+
* 带校验的列表头包装:required 时列名前渲染红星;该列存在未通过项时文字标红并追加
|
|
84
|
+
* 感叹号图标,悬停经 UTip 气泡展示各行错误明细;`#header:key` 插槽 / nameRender 内容替代列名。
|
|
85
|
+
* 渲染函数内读取 columnErrors 建立响应依赖,错误出现/消失即时更新表头。
|
|
86
|
+
*/
|
|
87
|
+
function headerCell(column) {
|
|
88
|
+
return (ctx) => {
|
|
89
|
+
const messages = columnErrors.value.get(column.key);
|
|
90
|
+
const nodes = [h("span", { class: [cls.e("header-text"), bem.is("error", !!messages?.length)] }, slots[`header:${column.key}`]?.(ctx) ?? column.nameRender?.(ctx) ?? column.name)];
|
|
91
|
+
if (column.rules?.required) nodes.unshift(h("span", {
|
|
92
|
+
class: cls.e("required-mark"),
|
|
93
|
+
"aria-hidden": "true"
|
|
94
|
+
}, "*"));
|
|
95
|
+
if (messages?.length) nodes.push(h(_sfc_main$2, { key: "header-error-tip" }, {
|
|
96
|
+
default: () => h(_sfc_main$1, {
|
|
97
|
+
size: 14,
|
|
98
|
+
class: cls.e("header-icon")
|
|
99
|
+
}, { default: () => h(Warning) }),
|
|
100
|
+
content: () => messages.map((message) => h("div", { key: message }, message))
|
|
101
|
+
}));
|
|
102
|
+
return nodes;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** 行数据(以原始对象为键)→ 列 key → 错误信息 */
|
|
106
|
+
const cellErrors = shallowRef(/* @__PURE__ */ new Map());
|
|
107
|
+
/** 行节点 data 可能是响应式代理,统一取原始对象作为键 */
|
|
108
|
+
const errorRowKey = (rowData) => toRaw(rowData);
|
|
109
|
+
function setCellError(rowData, key, message) {
|
|
110
|
+
const row = errorRowKey(rowData);
|
|
111
|
+
const rowErrors = cellErrors.value.get(row);
|
|
112
|
+
if (!message) {
|
|
113
|
+
if (!rowErrors?.delete(key)) return;
|
|
114
|
+
} else {
|
|
115
|
+
if (rowErrors?.get(key) === message) return;
|
|
116
|
+
if (rowErrors) rowErrors.set(key, message);
|
|
117
|
+
else cellErrors.value.set(row, /* @__PURE__ */ new Map([[key, message]]));
|
|
118
|
+
}
|
|
119
|
+
triggerRef(cellErrors);
|
|
120
|
+
}
|
|
121
|
+
/** 丢弃同一单元格过期的异步校验结果 */
|
|
122
|
+
const validateSeqs = /* @__PURE__ */ new WeakMap();
|
|
123
|
+
/** 单元格级校验:以行数据为 formData、列 key 为 field,结果同步到错误状态 */
|
|
124
|
+
async function validateCell(rowData, key, rules) {
|
|
125
|
+
if (!rules) return;
|
|
126
|
+
const row = errorRowKey(rowData);
|
|
127
|
+
let seqs = validateSeqs.get(row);
|
|
128
|
+
if (!seqs) {
|
|
129
|
+
seqs = /* @__PURE__ */ new Map();
|
|
130
|
+
validateSeqs.set(row, seqs);
|
|
131
|
+
}
|
|
132
|
+
const seq = (seqs.get(key) ?? 0) + 1;
|
|
133
|
+
seqs.set(key, seq);
|
|
134
|
+
const message = await validateField(rowData, key, rules);
|
|
135
|
+
if (seqs.get(key) !== seq) return;
|
|
136
|
+
if (!modelValue.value.some((item) => errorRowKey(item) === row)) return;
|
|
137
|
+
setCellError(row, key, message);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* 整表校验:自上而下逐行校验,某行存在未通过项即停止校验其后的行(懒校验)。
|
|
141
|
+
* 全部通过 resolve true,否则 resolve false。
|
|
142
|
+
*/
|
|
143
|
+
async function validate() {
|
|
144
|
+
const ruleColumns = columns.value.filter((column) => column.rules);
|
|
145
|
+
for (const row of modelValue.value) {
|
|
146
|
+
await Promise.all(ruleColumns.map((column) => validateCell(row, column.key, column.rules)));
|
|
147
|
+
if (cellErrors.value.get(errorRowKey(row))?.size) return false;
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
watch(modelValue, (rows) => {
|
|
152
|
+
if (!cellErrors.value.size) return;
|
|
153
|
+
const aliveRows = new Set(rows.map(errorRowKey));
|
|
154
|
+
const next = /* @__PURE__ */ new Map();
|
|
155
|
+
let changed = false;
|
|
156
|
+
for (const [row, errors] of cellErrors.value) if (aliveRows.has(row)) next.set(row, errors);
|
|
157
|
+
else changed = true;
|
|
158
|
+
if (changed) cellErrors.value = next;
|
|
159
|
+
});
|
|
160
|
+
/** 列 key → 该列全部未通过信息(带行序号),驱动表头错误标识 */
|
|
161
|
+
const columnErrors = computed(() => {
|
|
162
|
+
const map = /* @__PURE__ */ new Map();
|
|
163
|
+
if (!cellErrors.value.size) return map;
|
|
164
|
+
for (const [row, errors] of cellErrors.value) {
|
|
165
|
+
const index = modelValue.value.findIndex((item) => errorRowKey(item) === row);
|
|
166
|
+
const label = index >= 0 ? `第 ${index + 1} 行:` : "";
|
|
167
|
+
for (const [key, message] of errors) {
|
|
168
|
+
const list = map.get(key) ?? [];
|
|
169
|
+
list.push(`${label}${message}`);
|
|
170
|
+
map.set(key, list);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return map;
|
|
57
174
|
});
|
|
175
|
+
/** 声明了 `#column:key` 插槽的列调用编辑插槽(注入 model),未声明的渲染字段原始值 */
|
|
176
|
+
function editCell(column, ctx) {
|
|
177
|
+
const editSlot = slots[`column:${column.key}`];
|
|
178
|
+
const val = o(ctx.rowData).get(column.key);
|
|
179
|
+
if (!editSlot) return val;
|
|
180
|
+
const scope = {
|
|
181
|
+
...ctx,
|
|
182
|
+
val
|
|
183
|
+
};
|
|
184
|
+
return editSlot({
|
|
185
|
+
...scope,
|
|
186
|
+
model: createCellModel(column, scope)
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* 单元格编辑 model:值先原地写回行数据(行节点与 DOM 得以复用,输入不丢焦点),
|
|
191
|
+
* 再以浅拷贝数组经 update:modelValue 通知宿主,维持 v-model 契约。
|
|
192
|
+
* 只读下注入 readonly: true 且不提供写回通道,值不可修改;
|
|
193
|
+
* 列配置了 rules 时,控件的 change 事件(如失焦提交)触发单元格级校验,输入过程不校验。
|
|
194
|
+
*/
|
|
195
|
+
function createCellModel(column, ctx) {
|
|
196
|
+
const { rowData, val } = ctx;
|
|
197
|
+
const key = column.key;
|
|
198
|
+
const rules = column.rules;
|
|
199
|
+
return {
|
|
200
|
+
modelValue: val,
|
|
201
|
+
...props.readonly ? { readonly: true } : { "onUpdate:modelValue": (value) => {
|
|
202
|
+
rowData[key] = value;
|
|
203
|
+
emit("update:modelValue", [...modelValue.value]);
|
|
204
|
+
} },
|
|
205
|
+
...rules ? { onChange: () => void validateCell(rowData, key, rules) } : {}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
58
208
|
function handleCreate(index) {
|
|
59
|
-
|
|
60
|
-
|
|
209
|
+
const at = index !== void 0 ? index + 1 : modelValue.value.length;
|
|
210
|
+
emit("update:modelValue", [
|
|
211
|
+
...modelValue.value.slice(0, at),
|
|
61
212
|
{},
|
|
62
|
-
...
|
|
213
|
+
...modelValue.value.slice(at)
|
|
63
214
|
]);
|
|
64
|
-
else emit("update:modelValue", [...__props.modelValue, {}]);
|
|
65
215
|
}
|
|
66
216
|
function handleCopy(row) {
|
|
67
217
|
emit("update:modelValue", [
|
|
68
|
-
...
|
|
218
|
+
...modelValue.value.slice(0, row.index + 1),
|
|
69
219
|
JSON.parse(JSON.stringify(row.data)),
|
|
70
|
-
...
|
|
220
|
+
...modelValue.value.slice(row.index + 1)
|
|
71
221
|
]);
|
|
72
222
|
}
|
|
73
223
|
function handleDelete(index) {
|
|
74
|
-
emit("update:modelValue",
|
|
224
|
+
emit("update:modelValue", modelValue.value.filter((_, i) => i !== index));
|
|
75
225
|
}
|
|
226
|
+
__expose({ validate });
|
|
76
227
|
return (_ctx, _cache) => {
|
|
77
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
228
|
+
return openBlock(), createBlock(unref(_sfc_main$4), mergeProps(tableProps.value, {
|
|
78
229
|
columns: internalColumns.value,
|
|
79
|
-
data:
|
|
80
|
-
class:
|
|
230
|
+
data: modelValue.value,
|
|
231
|
+
class: unref(cls).b,
|
|
81
232
|
stripe: false,
|
|
82
|
-
"show-index": ""
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, null, 8, ["icon", "onClick"])
|
|
110
|
-
]),
|
|
111
|
-
_: 2
|
|
112
|
-
}, 1024)]),
|
|
113
|
-
empty: withCtx(() => [createElementVNode("div", _hoisted_1, [!__props.modelValue.length ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
233
|
+
"show-index": ""
|
|
234
|
+
}), createSlots({
|
|
235
|
+
"column:__operation": withCtx(({ row }) => [createElementVNode("div", { class: normalizeClass(unref(cls).e("operations")) }, [
|
|
236
|
+
createVNode(unref(_sfc_main$3), {
|
|
237
|
+
text: "",
|
|
238
|
+
size: "small",
|
|
239
|
+
type: "danger",
|
|
240
|
+
icon: unref(Minus),
|
|
241
|
+
title: "移除",
|
|
242
|
+
onClick: ($event) => handleDelete(row.index)
|
|
243
|
+
}, null, 8, ["icon", "onClick"]),
|
|
244
|
+
createVNode(unref(_sfc_main$3), {
|
|
245
|
+
text: "",
|
|
246
|
+
size: "small",
|
|
247
|
+
icon: unref(Plus),
|
|
248
|
+
title: "新增到下一行",
|
|
249
|
+
onClick: ($event) => handleCreate(row.index)
|
|
250
|
+
}, null, 8, ["icon", "onClick"]),
|
|
251
|
+
createVNode(unref(_sfc_main$3), {
|
|
252
|
+
text: "",
|
|
253
|
+
size: "small",
|
|
254
|
+
icon: unref(Copy),
|
|
255
|
+
title: "复制到下一行",
|
|
256
|
+
onClick: ($event) => handleCopy(row)
|
|
257
|
+
}, null, 8, ["icon", "onClick"])
|
|
258
|
+
], 2)]),
|
|
259
|
+
empty: withCtx(() => [createElementVNode("div", _hoisted_1, [!props.readonly ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
114
260
|
key: 0,
|
|
115
261
|
text: "",
|
|
116
262
|
size: "small",
|
|
@@ -118,15 +264,19 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
118
264
|
icon: unref(Plus),
|
|
119
265
|
onClick: _cache[0] || (_cache[0] = ($event) => handleCreate())
|
|
120
266
|
}, {
|
|
121
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("添加", -1)])]),
|
|
267
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" 添加 ", -1)])]),
|
|
122
268
|
_: 1
|
|
123
269
|
}, 8, ["icon"])) : createCommentVNode("v-if", true)])]),
|
|
124
|
-
_:
|
|
125
|
-
},
|
|
270
|
+
_: 2
|
|
271
|
+
}, [renderList(unref(passSlotNames), (name) => {
|
|
272
|
+
return {
|
|
273
|
+
name,
|
|
274
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scope)))])
|
|
275
|
+
};
|
|
276
|
+
})]), 1040, [
|
|
126
277
|
"columns",
|
|
127
278
|
"data",
|
|
128
|
-
"class"
|
|
129
|
-
"slots"
|
|
279
|
+
"class"
|
|
130
280
|
]);
|
|
131
281
|
};
|
|
132
282
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-editor.js","names":["$slots"],"sources":["../../../src/components/table-editor/table-editor.vue"],"sourcesContent":["<template>\n <u-table\n :columns=\"internalColumns\"\n :data=\"modelValue || []\"\n :class=\"cls.b\"\n :stripe=\"false\"\n show-index\n :slots=\"$slots\"\n >\n <template #column:__operation=\"{ row }\">\n <ButtonCommonProps tag=\"div\" style=\"display: flex; justify-content: center; gap: 8px\">\n <u-button type=\"danger\" @click=\"handleDelete(row.index)\" :icon=\"Minus\" title=\"移除\" />\n <u-button :icon=\"Plus\" @click=\"handleCreate(row.index)\" title=\"新增到下一行\" />\n <u-button :icon=\"Copy\" @click=\"handleCopy(row)\" title=\"复制到下一行\" />\n </ButtonCommonProps>\n </template>\n\n <!-- <template #header:__operation> </template> -->\n\n <template #empty>\n <div style=\"text-align: center; padding: 4px 0\">\n <u-button\n text\n size=\"small\"\n type=\"primary\"\n v-if=\"!modelValue.length\"\n :icon=\"Plus\"\n @click=\"handleCreate()\"\n >添加</u-button\n >\n </div>\n </template>\n </u-table>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useComponentProps } from '@veltra/compositions'\nimport { Copy, Minus, Plus } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed } from 'vue'\n\nimport type { TableEditorProps, TableEditorEmits, TableColumn } from '../../types'\nimport { UButton } from '../button'\nimport { UTable } from '../table'\nimport type { TableRowNode } from '../table/node/row'\n\ndefineOptions({ name: 'UTableEditor' })\n\nconst { columns = [], modelValue = [] } = defineProps<TableEditorProps>()\nconst emit = defineEmits<TableEditorEmits>()\n\nconst cls = bem('table-editor')\n\nconst ButtonCommonProps = useComponentProps({\n size: 'small',\n circle: true,\n text: true,\n type: 'primary'\n})\n\nconst actionColumn: TableColumn = {\n key: '__operation',\n name: '操作', // 使用name而不是title\n width: 120,\n align: 'center',\n fixed: 'right',\n resizable: false\n}\n\n// 内部列定义,添加编辑和删除操作列\nconst internalColumns = computed(() => {\n return [...columns, actionColumn]\n})\n\nfunction handleCreate(index?: number) {\n if (index !== undefined) {\n emit('update:modelValue', [\n ...modelValue.slice(0, index + 1),\n {},\n ...modelValue.slice(index + 1)\n ])\n } else {\n emit('update:modelValue', [...modelValue, {}])\n }\n}\n\nfunction handleCopy(row: TableRowNode) {\n emit('update:modelValue', [\n ...modelValue.slice(0, row.index + 1),\n JSON.parse(JSON.stringify(row.data)),\n ...modelValue.slice(row.index + 1)\n ])\n}\n\nfunction handleDelete(index: number) {\n emit(\n 'update:modelValue',\n modelValue.filter((_, i) => i !== index)\n )\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,cAAc;EAE9B,MAAM,oBAAoB,kBAAkB;GAC1C,MAAM;GACN,QAAQ;GACR,MAAM;GACN,MAAM;EACR,CAAC;EAED,MAAM,eAA4B;GAChC,KAAK;GACL,MAAM;GACN,OAAO;GACP,OAAO;GACP,OAAO;GACP,WAAW;EACb;EAGA,MAAM,kBAAkB,eAAe;GACrC,OAAO,CAAC,GAAG,QAAA,SAAS,YAAY;EAClC,CAAC;EAED,SAAS,aAAa,OAAgB;GACpC,IAAI,UAAU,KAAA,GACZ,KAAK,qBAAqB;IACxB,GAAG,QAAA,WAAW,MAAM,GAAG,QAAQ,CAAC;IAChC,CAAC;IACD,GAAG,QAAA,WAAW,MAAM,QAAQ,CAAC;GAC/B,CAAC;QAED,KAAK,qBAAqB,CAAC,GAAG,QAAA,YAAY,CAAC,CAAC,CAAC;EAEjD;EAEA,SAAS,WAAW,KAAmB;GACrC,KAAK,qBAAqB;IACxB,GAAG,QAAA,WAAW,MAAM,GAAG,IAAI,QAAQ,CAAC;IACpC,KAAK,MAAM,KAAK,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table-editor/table-editor.vue"],"sourcesContent":["<template>\n <u-table\n v-bind=\"tableProps\"\n :columns=\"internalColumns\"\n :data=\"modelValue\"\n :class=\"cls.b\"\n :stripe=\"false\"\n show-index\n >\n <!-- 其余插槽(header:* / row:expand / foot / append 等)透传给 u-table;column:* 与 empty 由组件接管 -->\n <template v-for=\"name in passSlotNames\" :key=\"name\" #[name]=\"scope\">\n <slot :name=\"name\" v-bind=\"scope\" />\n </template>\n\n <template #column:__operation=\"{ row }\">\n <div :class=\"cls.e('operations')\">\n <u-button\n text\n size=\"small\"\n type=\"danger\"\n :icon=\"Minus\"\n title=\"移除\"\n @click=\"handleDelete(row.index)\"\n />\n <u-button\n text\n size=\"small\"\n :icon=\"Plus\"\n title=\"新增到下一行\"\n @click=\"handleCreate(row.index)\"\n />\n <u-button text size=\"small\" :icon=\"Copy\" title=\"复制到下一行\" @click=\"handleCopy(row)\" />\n </div>\n </template>\n\n <template #empty>\n <div style=\"text-align: center; padding: 4px 0\">\n <u-button\n v-if=\"!props.readonly\"\n text\n size=\"small\"\n type=\"primary\"\n :icon=\"Plus\"\n @click=\"handleCreate()\"\n >\n 添加\n </u-button>\n </div>\n </template>\n </u-table>\n</template>\n\n<script lang=\"ts\" setup>\nimport { o } from '@cat-kit/core'\nimport { Copy, Minus, Plus, Warning } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, h, shallowRef, toRaw, triggerRef, useSlots, watch } from 'vue'\n\nimport type {\n TableEditorProps,\n TableEditorEmits,\n TableEditorColumn,\n _TableEditorExposed,\n TableColumn,\n TableColumnNode,\n TableColumnRenderContext,\n TableColumnSlotsScope,\n RenderReturn\n} from '../../types'\nimport { UButton } from '../button'\nimport { validateField } from '../form-item/validate'\nimport { UIcon } from '../icon'\nimport { UTable } from '../table'\nimport type { TableRowNode } from '../table/node/row'\nimport { UTip } from '../tip'\n\ndefineOptions({ name: 'UTableEditor' })\n\ndefineSlots<{\n [key: `column:${string}`]: (props: TableColumnSlotsScope) => any\n [key: `header:${string}`]: (props: { column: TableColumnNode }) => any\n}>()\n\nconst props = defineProps<TableEditorProps>()\nconst emit = defineEmits<TableEditorEmits>()\n\nconst columns = computed(() => props.columns ?? [])\nconst modelValue = computed(() => props.modelValue ?? [])\n\n/** 转发给 u-table 的表格属性;columns / modelValue / readonly 为编辑器自用,stripe / showIndex 被覆盖 */\nconst tableProps = computed(() => {\n const rest: Record<string, any> = { ...props }\n delete rest.columns\n delete rest.modelValue\n delete rest.readonly\n return rest\n})\n\nconst cls = bem('table-editor')\n\nconst slots = useSlots()\n\nconst actionColumn: TableColumn = {\n key: '__operation',\n name: '操作',\n width: 104,\n align: 'center',\n fixed: 'right',\n resizable: false\n}\n\n/**\n * 内部列定义:单元格渲染挂在列的 render 上(用户列自带的 render 优先),\n * 配置了 rules 的列包装 nameRender 追加校验标识,非只读时末尾追加操作列。\n * 列 key 带上只读态后缀:u-table 行内单元格在 props 值相等时可能跳过子组件补丁,\n * 只读切换改用挂载键直接重挂单元格,确保控件在编辑/只读形态间可靠切换。\n */\nconst internalColumns = computed<TableColumn[]>(() => {\n const list = columns.value.map((column) => ({\n ...column,\n key: `${column.key}${props.readonly ? ':ro' : ''}`,\n nameRender: column.rules ? headerCell(column) : column.nameRender,\n render: column.render ?? ((ctx: TableColumnRenderContext) => editCell(column, ctx))\n }))\n return props.readonly ? list : [...list, actionColumn]\n})\n\n/** 透传给 u-table 的插槽名:column:* 经 editCell 注入 model、empty 由组件接管,其余透传 */\nconst passSlotNames = Object.keys(slots).filter(\n (name) => !name.startsWith('column:') && name !== 'empty'\n)\n\n/**\n * 带校验的列表头包装:required 时列名前渲染红星;该列存在未通过项时文字标红并追加\n * 感叹号图标,悬停经 UTip 气泡展示各行错误明细;`#header:key` 插槽 / nameRender 内容替代列名。\n * 渲染函数内读取 columnErrors 建立响应依赖,错误出现/消失即时更新表头。\n */\nfunction headerCell(column: TableEditorColumn) {\n return (ctx: { column: TableColumnNode }): RenderReturn => {\n const messages = columnErrors.value.get(column.key)\n const nodes = [\n h(\n 'span',\n { class: [cls.e('header-text'), bem.is('error', !!messages?.length)] },\n slots[`header:${column.key}`]?.(ctx) ?? column.nameRender?.(ctx) ?? column.name\n )\n ]\n\n if (column.rules?.required) {\n nodes.unshift(h('span', { class: cls.e('required-mark'), 'aria-hidden': 'true' }, '*'))\n }\n\n if (messages?.length) {\n nodes.push(\n h(\n UTip,\n { key: 'header-error-tip' },\n {\n default: () =>\n h(UIcon, { size: 14, class: cls.e('header-icon') }, { default: () => h(Warning) }),\n content: () => messages.map((message) => h('div', { key: message }, message))\n }\n )\n )\n }\n\n return nodes\n }\n}\n\n// --- 按列校验 ---\n\n/** 行数据(以原始对象为键)→ 列 key → 错误信息 */\nconst cellErrors = shallowRef(new Map<Record<string, any>, Map<string, string>>())\n\n/** 行节点 data 可能是响应式代理,统一取原始对象作为键 */\nconst errorRowKey = (rowData: Record<string, any>) => toRaw(rowData) as Record<string, any>\n\nfunction setCellError(rowData: Record<string, any>, key: string, message: string | undefined) {\n const row = errorRowKey(rowData)\n const rowErrors = cellErrors.value.get(row)\n\n if (!message) {\n if (!rowErrors?.delete(key)) return\n } else {\n if (rowErrors?.get(key) === message) return\n if (rowErrors) rowErrors.set(key, message)\n else cellErrors.value.set(row, new Map([[key, message]]))\n }\n\n triggerRef(cellErrors)\n}\n\n/** 丢弃同一单元格过期的异步校验结果 */\nconst validateSeqs = new WeakMap<Record<string, any>, Map<string, number>>()\n\n/** 单元格级校验:以行数据为 formData、列 key 为 field,结果同步到错误状态 */\nasync function validateCell(\n rowData: Record<string, any>,\n key: string,\n rules: TableEditorColumn['rules']\n) {\n if (!rules) return\n\n const row = errorRowKey(rowData)\n let seqs = validateSeqs.get(row)\n if (!seqs) {\n seqs = new Map()\n validateSeqs.set(row, seqs)\n }\n const seq = (seqs.get(key) ?? 0) + 1\n seqs.set(key, seq)\n\n const message = await validateField(rowData, key, rules)\n if (seqs.get(key) !== seq) return\n // 校验是异步的,期间行可能已被移出模型(整体替换/删除);\n // 把结果写回「死行」会绕过清理 watch 永久残留,直接丢弃\n if (!modelValue.value.some((item) => errorRowKey(item) === row)) return\n\n setCellError(row, key, message)\n}\n\n/**\n * 整表校验:自上而下逐行校验,某行存在未通过项即停止校验其后的行(懒校验)。\n * 全部通过 resolve true,否则 resolve false。\n */\nasync function validate() {\n const ruleColumns = columns.value.filter((column) => column.rules)\n\n for (const row of modelValue.value) {\n await Promise.all(ruleColumns.map((column) => validateCell(row, column.key, column.rules)))\n if (cellErrors.value.get(errorRowKey(row))?.size) return false\n }\n\n return true\n}\n\n// 行删除(或整体替换)后,同步清理已不存在的行数据上的错误\nwatch(modelValue, (rows) => {\n if (!cellErrors.value.size) return\n\n const aliveRows = new Set(rows.map(errorRowKey))\n const next = new Map<Record<string, any>, Map<string, string>>()\n let changed = false\n\n for (const [row, errors] of cellErrors.value) {\n if (aliveRows.has(row)) next.set(row, errors)\n else changed = true\n }\n\n if (changed) cellErrors.value = next\n})\n\n/** 列 key → 该列全部未通过信息(带行序号),驱动表头错误标识 */\nconst columnErrors = computed(() => {\n const map = new Map<string, string[]>()\n if (!cellErrors.value.size) return map\n\n for (const [row, errors] of cellErrors.value) {\n const index = modelValue.value.findIndex((item) => errorRowKey(item) === row)\n const label = index >= 0 ? `第 ${index + 1} 行:` : ''\n for (const [key, message] of errors) {\n const list = map.get(key) ?? []\n list.push(`${label}${message}`)\n map.set(key, list)\n }\n }\n return map\n})\n\n// --- 单元格渲染 ---\n\n/** 声明了 `#column:key` 插槽的列调用编辑插槽(注入 model),未声明的渲染字段原始值 */\nfunction editCell(column: TableEditorColumn, ctx: TableColumnRenderContext): RenderReturn {\n const editSlot = slots[`column:${column.key}`]\n // 内部列 key 带只读态后缀,u-table 按 key 取到的 val 失效,这里按原始列 key 重取\n const val = o(ctx.rowData).get(column.key)\n if (!editSlot) return val\n const scope = { ...ctx, val }\n return editSlot({ ...scope, model: createCellModel(column, scope) })\n}\n\n/**\n * 单元格编辑 model:值先原地写回行数据(行节点与 DOM 得以复用,输入不丢焦点),\n * 再以浅拷贝数组经 update:modelValue 通知宿主,维持 v-model 契约。\n * 只读下注入 readonly: true 且不提供写回通道,值不可修改;\n * 列配置了 rules 时,控件的 change 事件(如失焦提交)触发单元格级校验,输入过程不校验。\n */\nfunction createCellModel(column: TableEditorColumn, ctx: TableColumnRenderContext) {\n const { rowData, val } = ctx\n const key = column.key\n const rules = column.rules\n return {\n modelValue: val,\n ...(props.readonly\n ? { readonly: true }\n : {\n 'onUpdate:modelValue': (value: any) => {\n rowData[key] = value\n emit('update:modelValue', [...modelValue.value])\n }\n }),\n ...(rules ? { onChange: () => void validateCell(rowData, key, rules) } : {})\n }\n}\n\nfunction handleCreate(index?: number) {\n const at = index !== undefined ? index + 1 : modelValue.value.length\n emit('update:modelValue', [...modelValue.value.slice(0, at), {}, ...modelValue.value.slice(at)])\n}\n\nfunction handleCopy(row: TableRowNode) {\n emit('update:modelValue', [\n ...modelValue.value.slice(0, row.index + 1),\n JSON.parse(JSON.stringify(row.data)),\n ...modelValue.value.slice(row.index + 1)\n ])\n}\n\nfunction handleDelete(index: number) {\n emit(\n 'update:modelValue',\n modelValue.value.filter((_, i) => i !== index)\n )\n}\n\ndefineExpose<_TableEditorExposed>({ validate })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,UAAU,eAAe,MAAM,WAAW,CAAC,CAAC;EAClD,MAAM,aAAa,eAAe,MAAM,cAAc,CAAC,CAAC;;EAGxD,MAAM,aAAa,eAAe;GAChC,MAAM,OAA4B,EAAE,GAAG,MAAM;GAC7C,OAAO,KAAK;GACZ,OAAO,KAAK;GACZ,OAAO,KAAK;GACZ,OAAO;EACT,CAAC;EAED,MAAM,MAAM,IAAI,cAAc;EAE9B,MAAM,QAAQ,SAAS;EAEvB,MAAM,eAA4B;GAChC,KAAK;GACL,MAAM;GACN,OAAO;GACP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MACP,OAAM;MACL,UAAK,WAAE,aAAa,IAAI,KAAK;;KAEhC,YAME,MAAA,WAAA,GAAA;MALA,MAAA;MACA,MAAK;MACJ,MAAM,MAAA,IAAA;MACP,OAAM;MACL,UAAK,WAAE,aAAa,IAAI,KAAK;;KAEhC,YAAmF,MAAA,WAAA,GAAA;MAAzE,MAAA;MAAK,MAAK;MAAS,MAAM,MAAA,IAAA;MAAM,OAAM;MAAU,UAAK,WAAE,WAAW,GAAG;;;IAIvE,OAAK,cAYR,CAXN,mBAWM,OAXN,YAWM,CATK,CAAA,MAAM,YADf,UAAA,GAAA,YASW,MAAA,WAAA,GAAA;;KAPT,MAAA;KACA,MAAK;KACL,MAAK;KACJ,MAAM,MAAA,IAAA;KACN,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,aAAY;;KACrB,SAAA,cAED,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFC,gBAAA,QAED,EAAA,CAAA,EAAA,CAAA;;;;GApCqB,GAAA,CAAA,WAAA,MAAA,aAAA,IAAR,SAAI;;KAAgC;KACnD,IAAA,SAD2D,UAAK,CAChE,WAAoC,KAAA,QAAvB,MAAI,eAAA,mBAAU,KAAK,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -56,6 +56,69 @@
|
|
|
56
56
|
font-size: var(--u-font-size-main-large);
|
|
57
57
|
padding: var(--u-gap-large);
|
|
58
58
|
}
|
|
59
|
+
.u-tip--color-primary {
|
|
60
|
+
color: var(--u-text-color-white);
|
|
61
|
+
}
|
|
62
|
+
.u-tip--color-primary::after {
|
|
63
|
+
background-color: var(--u-color-primary);
|
|
64
|
+
}
|
|
65
|
+
.u-tip--color-primary .u-tip__arrow {
|
|
66
|
+
background-color: var(--u-color-primary);
|
|
67
|
+
}
|
|
68
|
+
.u-tip--color-success {
|
|
69
|
+
color: var(--u-text-color-white);
|
|
70
|
+
}
|
|
71
|
+
.u-tip--color-success::after {
|
|
72
|
+
background-color: var(--u-color-success);
|
|
73
|
+
}
|
|
74
|
+
.u-tip--color-success .u-tip__arrow {
|
|
75
|
+
background-color: var(--u-color-success);
|
|
76
|
+
}
|
|
77
|
+
.u-tip--color-warning {
|
|
78
|
+
color: var(--u-text-color-white);
|
|
79
|
+
}
|
|
80
|
+
.u-tip--color-warning::after {
|
|
81
|
+
background-color: var(--u-color-warning);
|
|
82
|
+
}
|
|
83
|
+
.u-tip--color-warning .u-tip__arrow {
|
|
84
|
+
background-color: var(--u-color-warning);
|
|
85
|
+
}
|
|
86
|
+
.u-tip--color-danger {
|
|
87
|
+
color: var(--u-text-color-white);
|
|
88
|
+
}
|
|
89
|
+
.u-tip--color-danger::after {
|
|
90
|
+
background-color: var(--u-color-danger);
|
|
91
|
+
}
|
|
92
|
+
.u-tip--color-danger .u-tip__arrow {
|
|
93
|
+
background-color: var(--u-color-danger);
|
|
94
|
+
}
|
|
95
|
+
.u-tip--color-info {
|
|
96
|
+
color: var(--u-text-color-white);
|
|
97
|
+
}
|
|
98
|
+
.u-tip--color-info::after {
|
|
99
|
+
background-color: var(--u-color-info);
|
|
100
|
+
}
|
|
101
|
+
.u-tip--color-info .u-tip__arrow {
|
|
102
|
+
background-color: var(--u-color-info);
|
|
103
|
+
}
|
|
104
|
+
.u-tip--color-disabled {
|
|
105
|
+
color: var(--u-text-color-white);
|
|
106
|
+
}
|
|
107
|
+
.u-tip--color-disabled::after {
|
|
108
|
+
background-color: var(--u-color-disabled);
|
|
109
|
+
}
|
|
110
|
+
.u-tip--color-disabled .u-tip__arrow {
|
|
111
|
+
background-color: var(--u-color-disabled);
|
|
112
|
+
}
|
|
113
|
+
.u-tip--color-default {
|
|
114
|
+
color: var(--u-text-color-white);
|
|
115
|
+
}
|
|
116
|
+
.u-tip--color-default::after {
|
|
117
|
+
background-color: var(--u-color-default);
|
|
118
|
+
}
|
|
119
|
+
.u-tip--color-default .u-tip__arrow {
|
|
120
|
+
background-color: var(--u-color-default);
|
|
121
|
+
}
|
|
59
122
|
|
|
60
123
|
.tip-enter-active,
|
|
61
124
|
.tip-leave-active {
|
|
@@ -13,6 +13,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
13
13
|
type: Boolean,
|
|
14
14
|
default: void 0
|
|
15
15
|
},
|
|
16
|
+
type: {},
|
|
16
17
|
content: { default: "" },
|
|
17
18
|
style: {},
|
|
18
19
|
class: {},
|
|
@@ -33,7 +34,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
33
34
|
const slots = useSlots();
|
|
34
35
|
const { size } = useFallbackProps([props], { size: "default" });
|
|
35
36
|
const contentClass = computed(() => {
|
|
36
|
-
const fixed = [
|
|
37
|
+
const fixed = [
|
|
38
|
+
cls.e("content"),
|
|
39
|
+
cls.m(size.value),
|
|
40
|
+
props.type && cls.m("color-" + props.type)
|
|
41
|
+
];
|
|
37
42
|
const className = props.class;
|
|
38
43
|
if (!Array.isArray(className)) return [...fixed, className];
|
|
39
44
|
return [...fixed, ...className];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tip.js","names":[],"sources":["../../../src/components/tip/tip.vue"],"sourcesContent":["<template>\n <!-- 触发 -->\n <UNodeRender v-bind=\"eventsHandlers\" :content=\"renderDefaultSlotTrigger()\" ref=\"triggerRef\" />\n\n <!-- 弹出内容 -->\n <teleport :to=\"`#${popperContainerId}`\">\n <transition name=\"tip\">\n <component\n v-if=\"tipVisible\"\n :is=\"contentTag\"\n :class=\"contentClass\"\n :style=\"[style, { zIndex: zIndex() }]\"\n ref=\"contentRef\"\n @mouseenter=\"eventsHandlers.onMouseenter\"\n @mouseleave=\"eventsHandlers.onMouseleave\"\n @click.stop\n v-click-outside=\"handleClickOutside\"\n >\n <UNodeRender v-if=\"externalNode\" :content=\"externalNode\" />\n\n <slot name=\"content\">{{ content }}</slot>\n\n <div :class=\"cls.e('arrow')\" v-if=\"!hideArrow\" ref=\"arrowRef\"></div>\n </component>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps, usePop } from '@veltra/compositions'\nimport { vClickOutside } from '@veltra/directives'\nimport { bem, extractNormalVNodes, zIndex } from '@veltra/utils'\nimport { shallowRef, computed, useSlots, onBeforeUnmount, toRef, watch, nextTick } from 'vue'\n\nimport type { TipProps, ComponentSize, TipEmits } from '../../types'\nimport { UNodeRender } from '../node-render'\nimport { useNest } from './use-nest'\n\ndefineOptions({ name: 'UTip' })\n\nconst props = withDefaults(defineProps<TipProps>(), {\n content: '',\n trigger: 'hover',\n direction: 'top',\n alignment: 'center',\n contentTag: 'div',\n visible: undefined,\n showDelay: 0\n})\n\nconst emit = defineEmits<TipEmits>()\n\nconst cls = bem('tip')\nconst slots = useSlots()\nconst { size } = useFallbackProps([props], { size: 'default' as ComponentSize })\n\nconst contentClass = computed(() => {\n const fixed = [cls.e('content'), cls.m(size.value)]\n const className = props.class\n if (!Array.isArray(className)) {\n return [...fixed, className]\n }\n return [...fixed, ...className]\n})\n\nconst triggerRef = shallowRef<InstanceType<typeof UNodeRender>>()\nconst contentRef = shallowRef<HTMLElement>()\nconst arrowRef = shallowRef<HTMLElement>()\n\nconst _visible = shallowRef(false)\n\nconst visible = computed(() => {\n return props.visible !== undefined ? props.visible : _visible.value\n})\n\nfunction updateVisible(v: boolean) {\n if (props.visible === undefined) {\n _visible.value = v\n } else {\n emit('update:visible', v)\n }\n}\n\nconst tipVisible = useNest(visible)\n\nfunction renderDefaultSlotTrigger() {\n const nodes = slots.default?.()\n if (!nodes?.length) return null\n return extractNormalVNodes(nodes)[0]\n}\n\nconst eventsHandlers = computed(() => {\n const { trigger, disabled } = props\n\n const handlers: Record<string, Function> = {}\n\n if (disabled) return handlers\n\n if (trigger === 'click') {\n handlers.onClick = open\n } else if (trigger === 'hover') {\n handlers.onMouseenter = open\n handlers.onMouseleave = close\n }\n\n return handlers\n})\n\nconst handleClickOutside = (e: MouseEvent) => {\n if (props.trigger === 'hover') return\n\n // 点击的元素在触发元素中则啥也\n if (props.trigger === 'click' && triggerDom.value.contains(e.target as Node)) {\n return\n }\n close()\n}\n\nlet openTimer: ReturnType<typeof setTimeout> | undefined\nlet closeTimer: ReturnType<typeof setTimeout> | undefined\n\nfunction clearOpenTimer() {\n if (openTimer !== undefined) {\n clearTimeout(openTimer)\n openTimer = undefined\n }\n}\n\nfunction clearCloseTimer() {\n if (closeTimer !== undefined) {\n clearTimeout(closeTimer)\n closeTimer = undefined\n }\n}\n\n/** 弹出 */\nconst open = (e?: PointerEvent) => {\n e?.stopPropagation()\n clearCloseTimer()\n\n const delay = props.trigger === 'hover' ? props.showDelay : 0\n if (delay <= 0) {\n clearOpenTimer()\n updateVisible(true)\n return\n }\n\n clearOpenTimer()\n openTimer = setTimeout(() => {\n openTimer = undefined\n updateVisible(true)\n }, delay)\n}\n/** 关闭 */\nconst close = () => {\n clearOpenTimer()\n\n if (props.trigger === 'hover') {\n closeTimer = setTimeout(() => {\n closeTimer = undefined\n updateVisible(false)\n }, 250)\n } else {\n updateVisible(false)\n }\n}\n\nconst triggerDom = computed(() => {\n return props.triggerDom || triggerRef.value?.$el\n})\n\nconst { update, popperContainerId } = usePop({\n triggerRef: triggerDom,\n contentRef,\n arrowRef,\n direction: toRef(() => props.direction),\n alignment: toRef(() => props.alignment),\n onTriggerPositionChange() {\n close()\n }\n})\n\nwatch(triggerDom, (dom) => {\n // TODO: 看起来不是很优雅\n if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) {\n nextTick(() => {\n void update()\n })\n }\n})\n\n/** 外部节点 */\nconst externalNode = shallowRef<any>()\n\nonBeforeUnmount(() => {\n clearOpenTimer()\n clearCloseTimer()\n})\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tip.js","names":[],"sources":["../../../src/components/tip/tip.vue"],"sourcesContent":["<template>\n <!-- 触发 -->\n <UNodeRender v-bind=\"eventsHandlers\" :content=\"renderDefaultSlotTrigger()\" ref=\"triggerRef\" />\n\n <!-- 弹出内容 -->\n <teleport :to=\"`#${popperContainerId}`\">\n <transition name=\"tip\">\n <component\n v-if=\"tipVisible\"\n :is=\"contentTag\"\n :class=\"contentClass\"\n :style=\"[style, { zIndex: zIndex() }]\"\n ref=\"contentRef\"\n @mouseenter=\"eventsHandlers.onMouseenter\"\n @mouseleave=\"eventsHandlers.onMouseleave\"\n @click.stop\n v-click-outside=\"handleClickOutside\"\n >\n <UNodeRender v-if=\"externalNode\" :content=\"externalNode\" />\n\n <slot name=\"content\">{{ content }}</slot>\n\n <div :class=\"cls.e('arrow')\" v-if=\"!hideArrow\" ref=\"arrowRef\"></div>\n </component>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps, usePop } from '@veltra/compositions'\nimport { vClickOutside } from '@veltra/directives'\nimport { bem, extractNormalVNodes, zIndex } from '@veltra/utils'\nimport { shallowRef, computed, useSlots, onBeforeUnmount, toRef, watch, nextTick } from 'vue'\n\nimport type { TipProps, ComponentSize, TipEmits } from '../../types'\nimport { UNodeRender } from '../node-render'\nimport { useNest } from './use-nest'\n\ndefineOptions({ name: 'UTip' })\n\nconst props = withDefaults(defineProps<TipProps>(), {\n content: '',\n trigger: 'hover',\n direction: 'top',\n alignment: 'center',\n contentTag: 'div',\n visible: undefined,\n showDelay: 0\n})\n\nconst emit = defineEmits<TipEmits>()\n\nconst cls = bem('tip')\nconst slots = useSlots()\nconst { size } = useFallbackProps([props], { size: 'default' as ComponentSize })\n\nconst contentClass = computed(() => {\n const fixed = [cls.e('content'), cls.m(size.value), props.type && cls.m('color-' + props.type)]\n const className = props.class\n if (!Array.isArray(className)) {\n return [...fixed, className]\n }\n return [...fixed, ...className]\n})\n\nconst triggerRef = shallowRef<InstanceType<typeof UNodeRender>>()\nconst contentRef = shallowRef<HTMLElement>()\nconst arrowRef = shallowRef<HTMLElement>()\n\nconst _visible = shallowRef(false)\n\nconst visible = computed(() => {\n return props.visible !== undefined ? props.visible : _visible.value\n})\n\nfunction updateVisible(v: boolean) {\n if (props.visible === undefined) {\n _visible.value = v\n } else {\n emit('update:visible', v)\n }\n}\n\nconst tipVisible = useNest(visible)\n\nfunction renderDefaultSlotTrigger() {\n const nodes = slots.default?.()\n if (!nodes?.length) return null\n return extractNormalVNodes(nodes)[0]\n}\n\nconst eventsHandlers = computed(() => {\n const { trigger, disabled } = props\n\n const handlers: Record<string, Function> = {}\n\n if (disabled) return handlers\n\n if (trigger === 'click') {\n handlers.onClick = open\n } else if (trigger === 'hover') {\n handlers.onMouseenter = open\n handlers.onMouseleave = close\n }\n\n return handlers\n})\n\nconst handleClickOutside = (e: MouseEvent) => {\n if (props.trigger === 'hover') return\n\n // 点击的元素在触发元素中则啥也\n if (props.trigger === 'click' && triggerDom.value.contains(e.target as Node)) {\n return\n }\n close()\n}\n\nlet openTimer: ReturnType<typeof setTimeout> | undefined\nlet closeTimer: ReturnType<typeof setTimeout> | undefined\n\nfunction clearOpenTimer() {\n if (openTimer !== undefined) {\n clearTimeout(openTimer)\n openTimer = undefined\n }\n}\n\nfunction clearCloseTimer() {\n if (closeTimer !== undefined) {\n clearTimeout(closeTimer)\n closeTimer = undefined\n }\n}\n\n/** 弹出 */\nconst open = (e?: PointerEvent) => {\n e?.stopPropagation()\n clearCloseTimer()\n\n const delay = props.trigger === 'hover' ? props.showDelay : 0\n if (delay <= 0) {\n clearOpenTimer()\n updateVisible(true)\n return\n }\n\n clearOpenTimer()\n openTimer = setTimeout(() => {\n openTimer = undefined\n updateVisible(true)\n }, delay)\n}\n/** 关闭 */\nconst close = () => {\n clearOpenTimer()\n\n if (props.trigger === 'hover') {\n closeTimer = setTimeout(() => {\n closeTimer = undefined\n updateVisible(false)\n }, 250)\n } else {\n updateVisible(false)\n }\n}\n\nconst triggerDom = computed(() => {\n return props.triggerDom || triggerRef.value?.$el\n})\n\nconst { update, popperContainerId } = usePop({\n triggerRef: triggerDom,\n contentRef,\n arrowRef,\n direction: toRef(() => props.direction),\n alignment: toRef(() => props.alignment),\n onTriggerPositionChange() {\n close()\n }\n})\n\nwatch(triggerDom, (dom) => {\n // TODO: 看起来不是很优雅\n if (dom?.nodeType === Node.ELEMENT_NODE && visible.value) {\n nextTick(() => {\n void update()\n })\n }\n})\n\n/** 外部节点 */\nconst externalNode = shallowRef<any>()\n\nonBeforeUnmount(() => {\n clearOpenTimer()\n clearCloseTimer()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCA,MAAM,QAAQ;EAUd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,KAAK;EACrB,MAAM,QAAQ,SAAS;EACvB,MAAM,EAAE,SAAS,iBAAiB,CAAC,KAAK,GAAG,EAAE,MAAM,UAA2B,CAAC;EAE/E,MAAM,eAAe,eAAe;GAClC,MAAM,QAAQ;IAAC,IAAI,EAAE,SAAS;IAAG,IAAI,EAAE,KAAK,KAAK;IAAG,MAAM,QAAQ,IAAI,EAAE,WAAW,MAAM,IAAI;GAAC;GAC9F,MAAM,YAAY,MAAM;GACxB,IAAI,CAAC,MAAM,QAAQ,SAAS,GAC1B,OAAO,CAAC,GAAG,OAAO,SAAS;GAE7B,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS;EAChC,CAAC;EAED,MAAM,aAAa,WAA6C;EAChE,MAAM,aAAa,WAAwB;EAC3C,MAAM,WAAW,WAAwB;EAEzC,MAAM,WAAW,WAAW,KAAK;EAEjC,MAAM,UAAU,eAAe;GAC7B,OAAO,MAAM,YAAY,KAAA,IAAY,MAAM,UAAU,SAAS;EAChE,CAAC;EAED,SAAS,cAAc,GAAY;GACjC,IAAI,MAAM,YAAY,KAAA,GACpB,SAAS,QAAQ;QAEjB,KAAK,kBAAkB,CAAC;EAE5B;EAEA,MAAM,aAAa,QAAQ,OAAO;EAElC,SAAS,2BAA2B;GAClC,MAAM,QAAQ,MAAM,UAAU;GAC9B,IAAI,CAAC,OAAO,QAAQ,OAAO;GAC3B,OAAO,oBAAoB,KAAK,CAAC,CAAC;EACpC;EAEA,MAAM,iBAAiB,eAAe;GACpC,MAAM,EAAE,SAAS,aAAa;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,CAAA,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ import { ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, _ScrollExposed
|
|
|
102
102
|
import { WatermarkEmits, WatermarkExposed, WatermarkProps, _WatermarkExposed } from "./types/watermark.js";
|
|
103
103
|
import { ProgressEmits, ProgressExposed, ProgressProps, _ProgressExposed } from "./types/progress.js";
|
|
104
104
|
import { ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, _ProgressNodesExposed } from "./types/progress-nodes.js";
|
|
105
|
-
import { TipAlign, TipDirection, TipEmits, TipExposed, TipProps, _TipExposed } from "./types/tip.js";
|
|
105
|
+
import { TipAlign, TipDirection, TipEmits, TipExposed, TipProps, TipType, _TipExposed } from "./types/tip.js";
|
|
106
106
|
import { PopConfirmEmits, PopConfirmExposed, PopConfirmProps, _PopConfirmExposed } from "./types/pop-confirm.js";
|
|
107
107
|
import { TabItem, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed } from "./types/tabs.js";
|
|
108
108
|
import { BarType, TextEditorEmits, TextEditorExposed, TextEditorProps, _TextEditorExposed } from "./types/text-editor.js";
|
|
@@ -136,7 +136,7 @@ import { MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, _Mu
|
|
|
136
136
|
import { CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, _CodeEditorExposed } from "./types/code-editor.js";
|
|
137
137
|
import { TextEmits, TextExposed, TextProps, _TextExposed } from "./types/text.js";
|
|
138
138
|
import { CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps } from "./types/checkbox-group.js";
|
|
139
|
-
import { TableEditorEmits, TableEditorExposed, TableEditorProps, _TableEditorExposed } from "./types/table-editor.js";
|
|
139
|
+
import { TableEditorColumn, TableEditorEmits, TableEditorExposed, TableEditorProps, _TableEditorExposed } from "./types/table-editor.js";
|
|
140
140
|
import { NavEmits, NavExposed, NavItem, NavProps, _NavExposed } from "./types/nav.js";
|
|
141
141
|
import { DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, _DualNavExposed } from "./types/dual-nav.js";
|
|
142
142
|
import { GroupNavEmits, GroupNavGroup, GroupNavProps } from "./types/group-nav.js";
|
|
@@ -185,4 +185,4 @@ import { defineBatchEditColumns } from "./components/batch-edit/helper.js";
|
|
|
185
185
|
import { defineTableColumns } from "./components/table/use-columns.js";
|
|
186
186
|
import "./components/index.js";
|
|
187
187
|
export * from "@veltra/utils";
|
|
188
|
-
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerDataType, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DateRangeValue, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type ImageCropperChangePayload, type ImageCropperCropTransform, type ImageCropperEmits, type ImageCropperExposed, type ImageCropperProps, type ImageCropperResult, type ImageCropperResultOptions, type ImageCropperSelection, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableColumnStyle, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, _sfc_main$42 as UImageCropper, input_default as UInput, _sfc_main$43 as UKbd, _sfc_main$44 as ULayout, _sfc_main$45 as UList, _sfc_main$46 as UListItem, _sfc_main$47 as ULoading, _sfc_main$48 as UMessage, _sfc_main$49 as UMessageConfirm, _sfc_main$50 as UMultiSelect, _sfc_main$51 as UMultiTreeSelect, _sfc_main$52 as UNav, _sfc_main$53 as UNavItem, _sfc_main$54 as UNavSub, NodeRender as UNodeRender, _sfc_main$55 as UNotification, _sfc_main$56 as UNumber, _sfc_main$57 as UNumberInput, _sfc_main$58 as UNumberRangeInput, _sfc_main$59 as UPaginator, _sfc_main$60 as UPalette, _sfc_main$61 as UPasswordInput, _sfc_main$62 as UPopConfirm, _sfc_main$63 as UProgress, _sfc_main$64 as UProgressNodes, _sfc_main$65 as URadio, _sfc_main$66 as URadioGroup, _sfc_main$67 as URichTextEditor, _sfc_main$68 as UScroll, _sfc_main$69 as USegment, _sfc_main$70 as USelect, _sfc_main$71 as USlider, _sfc_main$72 as USteps, _sfc_main$73 as USwitch, _sfc_main$74 as UTable, _sfc_main$75 as UTableEditor, _sfc_main$76 as UTabs, _sfc_main$77 as UTabsHorizontal, _sfc_main$78 as UTabsVertical, _sfc_main$79 as UTag, _sfc_main$80 as UText, _sfc_main$81 as UTextarea, _sfc_main$82 as UTheme, _sfc_main$83 as UTip, _sfc_main$84 as UTree, _sfc_main$85 as UTreeSelect, _sfc_main$86 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _ImageCropperExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
188
|
+
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerDataType, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DateRangeValue, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type ImageCropperChangePayload, type ImageCropperCropTransform, type ImageCropperEmits, type ImageCropperExposed, type ImageCropperProps, type ImageCropperResult, type ImageCropperResultOptions, type ImageCropperSelection, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableColumnStyle, type TableEditorColumn, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type TipType, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, _sfc_main$42 as UImageCropper, input_default as UInput, _sfc_main$43 as UKbd, _sfc_main$44 as ULayout, _sfc_main$45 as UList, _sfc_main$46 as UListItem, _sfc_main$47 as ULoading, _sfc_main$48 as UMessage, _sfc_main$49 as UMessageConfirm, _sfc_main$50 as UMultiSelect, _sfc_main$51 as UMultiTreeSelect, _sfc_main$52 as UNav, _sfc_main$53 as UNavItem, _sfc_main$54 as UNavSub, NodeRender as UNodeRender, _sfc_main$55 as UNotification, _sfc_main$56 as UNumber, _sfc_main$57 as UNumberInput, _sfc_main$58 as UNumberRangeInput, _sfc_main$59 as UPaginator, _sfc_main$60 as UPalette, _sfc_main$61 as UPasswordInput, _sfc_main$62 as UPopConfirm, _sfc_main$63 as UProgress, _sfc_main$64 as UProgressNodes, _sfc_main$65 as URadio, _sfc_main$66 as URadioGroup, _sfc_main$67 as URichTextEditor, _sfc_main$68 as UScroll, _sfc_main$69 as USegment, _sfc_main$70 as USelect, _sfc_main$71 as USlider, _sfc_main$72 as USteps, _sfc_main$73 as USwitch, _sfc_main$74 as UTable, _sfc_main$75 as UTableEditor, _sfc_main$76 as UTabs, _sfc_main$77 as UTabsHorizontal, _sfc_main$78 as UTabsVertical, _sfc_main$79 as UTag, _sfc_main$80 as UText, _sfc_main$81 as UTextarea, _sfc_main$82 as UTheme, _sfc_main$83 as UTip, _sfc_main$84 as UTree, _sfc_main$85 as UTreeSelect, _sfc_main$86 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _ImageCropperExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|