hy-dispatch-ui-v3 0.2.32 → 0.2.34
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/tailwind.css +186 -454
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -5
- package/es/components/hyAudioPlayer/js/index.mjs +1 -1
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
- package/es/components/hyButton/button.vue.mjs +50 -35
- package/es/components/hyButton/style/button.scss +16 -3
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +2 -2
- package/es/components/hyConfirmDialog/confirmMethod.mjs +1 -1
- package/es/components/hyConfirmDialog/index.mjs +1 -1
- package/es/components/hyCutter/cutter.vue.mjs +1 -1
- package/es/components/hyDatePicker/datePicker.vue.mjs +1 -1
- package/es/components/hyDialog/dialog.vue.mjs +178 -137
- package/es/components/hyDialog/style/dialog.scss +13 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +3 -4
- package/es/components/hyForm/form.vue.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +1 -1
- package/es/components/hyForm/style/form.scss +56 -54
- package/es/components/hyIcon/style/icon.scss +1 -1
- package/es/components/hyIconBox/style/iconBox.scss +19 -18
- package/es/components/hyInput/input.vue.mjs +4 -1
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +1 -1
- package/es/components/hySearch/cpns/searchItem.vue.mjs +3 -9
- package/es/components/hySearch/js/index.mjs +4 -4
- package/es/components/hySearch/style/search.scss +51 -50
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +39 -42
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +5 -8
- package/es/components/hyTable/cpns/headerItem.vue.mjs +1 -1
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +18 -11
- package/es/components/hyTable/js/index.mjs +12 -0
- package/es/components/hyTable/js/useAppTable.mjs +1 -1
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +43 -23
- package/es/components/hyTableForm/batchTableForm.vue.mjs +478 -0
- package/es/components/hyTableForm/index.mjs +4 -1
- package/es/components/hyTableForm/js/index.mjs +123 -0
- package/es/components/hyTableForm/js/useAppTableForm.mjs +47 -0
- package/es/components/hyTableForm/style/batchTableForm.scss +127 -0
- package/es/components/hyTableForm/style/tableForm.scss +42 -0
- package/es/components/hyTableForm/tableForm.vue.mjs +452 -7
- package/es/components/hyTooltip/tooltip.vue.mjs +6 -6
- package/es/components/hyTree/style/index.css +1 -0
- package/es/components/hyTree/tree.vue.mjs +2 -0
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +2 -2
- package/es/components/hyVideoPlayer/cpns/mediaLoading.vue.mjs +1 -1
- package/es/components/hyVideoPlayer/js/index.mjs +1 -1
- package/es/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +6 -6
- package/es/components/index.mjs +2 -1
- package/es/index.mjs +2 -1
- package/es/locale/en.mjs +1 -1
- package/es/locale/zh_CN.mjs +1 -1
- package/es/style/element/hy-element.scss +3 -2
- package/es/style/tailwind.scss +133 -1
- package/es/version.mjs +1 -1
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +4 -4
- package/lib/components/hyAudioPlayer/js/index.js +1 -1
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
- package/lib/components/hyButton/button.vue.js +50 -35
- package/lib/components/hyButton/style/button.scss +16 -3
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +2 -2
- package/lib/components/hyConfirmDialog/confirmMethod.js +1 -1
- package/lib/components/hyConfirmDialog/index.js +1 -1
- package/lib/components/hyCutter/cutter.vue.js +1 -1
- package/lib/components/hyDatePicker/datePicker.vue.js +1 -1
- package/lib/components/hyDialog/dialog.vue.js +177 -136
- package/lib/components/hyDialog/style/dialog.scss +13 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +3 -4
- package/lib/components/hyForm/form.vue.js +2 -1
- package/lib/components/hyForm/js/useAppForm.js +1 -1
- package/lib/components/hyForm/style/form.scss +56 -54
- package/lib/components/hyIcon/style/icon.scss +1 -1
- package/lib/components/hyIconBox/style/iconBox.scss +19 -18
- package/lib/components/hyInput/input.vue.js +4 -1
- package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
- package/lib/components/hyOrgCascader/orgCascader.vue.js +1 -1
- package/lib/components/hySearch/cpns/searchItem.vue.js +3 -9
- package/lib/components/hySearch/js/index.js +4 -4
- package/lib/components/hySearch/style/search.scss +51 -50
- package/lib/components/hyTable/cpns/columnSelect.vue.js +43 -46
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +4 -7
- package/lib/components/hyTable/cpns/headerItem.vue.js +1 -1
- package/lib/components/hyTable/cpns/virtualTable.vue.js +18 -11
- package/lib/components/hyTable/js/index.js +12 -0
- package/lib/components/hyTable/js/useAppTable.js +1 -1
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +42 -22
- package/lib/components/hyTableForm/batchTableForm.vue.js +482 -0
- package/lib/components/hyTableForm/index.js +5 -0
- package/lib/components/hyTableForm/js/index.js +127 -0
- package/lib/components/hyTableForm/js/useAppTableForm.js +49 -0
- package/lib/components/hyTableForm/style/batchTableForm.scss +127 -0
- package/lib/components/hyTableForm/style/tableForm.scss +42 -0
- package/lib/components/hyTableForm/tableForm.vue.js +451 -6
- package/lib/components/hyTooltip/tooltip.vue.js +6 -6
- package/lib/components/hyTree/style/index.css +1 -0
- package/lib/components/hyTree/tree.vue.js +2 -0
- package/lib/components/hyUserAvatar/userAvatar.vue.js +2 -2
- package/lib/components/hyVideoPlayer/cpns/mediaLoading.vue.js +1 -1
- package/lib/components/hyVideoPlayer/js/index.js +1 -1
- package/lib/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +6 -6
- package/lib/components/index.js +33 -30
- package/lib/index.js +33 -30
- package/lib/locale/en.js +1 -1
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/element/hy-element.scss +3 -2
- package/lib/style/tailwind.scss +133 -1
- package/lib/version.js +1 -1
- package/package.json +5 -3
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
var index$3 = require('./js/index.js');
|
|
9
|
+
var useAppTable = require('../hyTable/js/useAppTable.js');
|
|
10
|
+
var is = require('../../utils/is.js');
|
|
11
|
+
var handler = require('../../utils/handler.js');
|
|
12
|
+
var index = require('../hyButton/index.js');
|
|
13
|
+
var index$1 = require('../hyTable/index.js');
|
|
14
|
+
var index$2 = require('../hyForm/index.js');
|
|
15
|
+
var useAppForm = require('../hyForm/js/useAppForm.js');
|
|
6
16
|
|
|
7
17
|
import "./style/tableForm.scss";
|
|
8
18
|
|
|
@@ -10,14 +20,449 @@ const __default__ = vue.defineComponent({
|
|
|
10
20
|
name: "HyTableForm"
|
|
11
21
|
});
|
|
12
22
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
13
|
-
props: {
|
|
14
|
-
|
|
23
|
+
props: {
|
|
24
|
+
// 表格配置项
|
|
25
|
+
tableColumns: {
|
|
26
|
+
// 表格的列
|
|
27
|
+
type: Array,
|
|
28
|
+
required: true,
|
|
29
|
+
default: () => []
|
|
30
|
+
},
|
|
31
|
+
formColumns: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
rules: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => ({})
|
|
38
|
+
},
|
|
39
|
+
emptyText: {
|
|
40
|
+
// 空数据时显示的文本内容
|
|
41
|
+
type: String
|
|
42
|
+
},
|
|
43
|
+
fontSize: {
|
|
44
|
+
// 字体大小
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 14
|
|
47
|
+
},
|
|
48
|
+
rowClickExpand: {
|
|
49
|
+
// 点击行展开
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
// 表单配置项
|
|
55
|
+
columnNum: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: 2
|
|
58
|
+
},
|
|
59
|
+
size: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "default"
|
|
62
|
+
// 'large' | 'default' | 'small'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
emits: ["validate"],
|
|
15
66
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
16
|
-
|
|
67
|
+
const props = __props;
|
|
68
|
+
const emits = __emit;
|
|
69
|
+
const tableRef = vue.useTemplateRef("tableRef");
|
|
70
|
+
const formRef = vue.useTemplateRef("formRef");
|
|
71
|
+
const dataSource = vue.ref([]);
|
|
72
|
+
const tabList = vue.ref([
|
|
73
|
+
{ label: "\u5168\u90E8\u6570\u636E", value: "all" },
|
|
74
|
+
{ label: "\u4EC5\u663E\u793A\u5F02\u5E38\u6570\u636E", value: "abnormal" }
|
|
75
|
+
]);
|
|
76
|
+
const tabValue = vue.ref("all");
|
|
77
|
+
const { tableColumns: operatorColumn } = useAppTable.useAppTable({
|
|
78
|
+
columns: [
|
|
79
|
+
{
|
|
80
|
+
type: "operator",
|
|
81
|
+
// prop 改为 type
|
|
82
|
+
width: 64,
|
|
83
|
+
operator: [
|
|
84
|
+
{
|
|
85
|
+
label: "\u5220\u9664",
|
|
86
|
+
desc: "\u5220\u9664",
|
|
87
|
+
svgName: "ops-linear-delete",
|
|
88
|
+
className: "text-danger-2",
|
|
89
|
+
handler: onDeleteRowHandler
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
const isExpandValidate = vue.ref(false);
|
|
96
|
+
const tableFormColumns = vue.computed(() => {
|
|
97
|
+
if (!props.tableColumns) return [];
|
|
98
|
+
return [...props.tableColumns, ...operatorColumn.value];
|
|
99
|
+
});
|
|
100
|
+
const expandColumn = vue.computed(() => {
|
|
101
|
+
return props.tableColumns.find((item) => item.type === "expand");
|
|
102
|
+
});
|
|
103
|
+
const statistics = vue.computed(() => {
|
|
104
|
+
return dataSource.value.reduce(
|
|
105
|
+
({ success, failed, total }, data) => {
|
|
106
|
+
if (!data.errorMsg) {
|
|
107
|
+
success++;
|
|
108
|
+
} else {
|
|
109
|
+
failed++;
|
|
110
|
+
}
|
|
111
|
+
return { success, failed, total };
|
|
112
|
+
},
|
|
113
|
+
{ success: 0, failed: 0, total: dataSource.value.length }
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
function setData(dataSource2) {
|
|
117
|
+
if (!tableRef.value) return;
|
|
118
|
+
tableRef.value.setData(dataSource2);
|
|
119
|
+
}
|
|
120
|
+
function rowClassName({ row, rowIndex }) {
|
|
121
|
+
if (row.errorMsg) {
|
|
122
|
+
return "hy-el-table-v2__row-error";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function onTabChange(value) {
|
|
126
|
+
if (tabValue.value === value) return;
|
|
127
|
+
tabValue.value = value;
|
|
128
|
+
if (tabValue.value === "all") {
|
|
129
|
+
setData(dataSource.value);
|
|
130
|
+
} else {
|
|
131
|
+
const data = dataSource.value.filter((data2) => {
|
|
132
|
+
return !!data2.errorMsg;
|
|
133
|
+
});
|
|
134
|
+
setData(data);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async function onExpandRowChange(row) {
|
|
138
|
+
await vue.nextTick();
|
|
139
|
+
if (!formRef.value) return;
|
|
140
|
+
const valid = await initValidateHandler([row]);
|
|
141
|
+
if (valid) return;
|
|
142
|
+
formRef.value.validate();
|
|
143
|
+
isExpandValidate.value = true;
|
|
144
|
+
}
|
|
145
|
+
function onDeleteRowHandler(params) {
|
|
146
|
+
const { $index } = params;
|
|
147
|
+
dataSource.value.splice($index, 1);
|
|
148
|
+
}
|
|
149
|
+
async function onAddRowHandler() {
|
|
150
|
+
const data = useAppForm.resetAppFormValue(props.formColumns, {
|
|
151
|
+
onlyId: /* @__PURE__ */ Symbol("onlyId")
|
|
152
|
+
});
|
|
153
|
+
await initValidateHandler([data]);
|
|
154
|
+
dataSource.value.push(data);
|
|
155
|
+
}
|
|
156
|
+
async function initValidateHandler(dataSource2) {
|
|
157
|
+
let promiseList = [];
|
|
158
|
+
for (const data of dataSource2) {
|
|
159
|
+
promiseList.push(
|
|
160
|
+
new Promise(async (resolve, reject) => {
|
|
161
|
+
try {
|
|
162
|
+
const res = await index$3.doValidate(data, props.formColumns, props.rules);
|
|
163
|
+
data.errorMsg = data.errorMsg && !data.errorMsg.prop ? data.errorMsg : null;
|
|
164
|
+
data.errorMap = /* @__PURE__ */ new Map();
|
|
165
|
+
resolve();
|
|
166
|
+
} catch (error) {
|
|
167
|
+
const errorMap = /* @__PURE__ */ new Map();
|
|
168
|
+
error.forEach((item, index) => {
|
|
169
|
+
const errData = {
|
|
170
|
+
prop: item.field,
|
|
171
|
+
message: item.message || `${item.field} is required`
|
|
172
|
+
};
|
|
173
|
+
if (!data.errorMsg) {
|
|
174
|
+
data.errorMsg = errData;
|
|
175
|
+
}
|
|
176
|
+
errorMap.set(errData.prop, errData.message);
|
|
177
|
+
});
|
|
178
|
+
data.errorMap = errorMap;
|
|
179
|
+
reject();
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
if (!promiseList.length) return true;
|
|
185
|
+
const result = await Promise.allSettled(promiseList);
|
|
186
|
+
return result.every((res) => res.status === "fulfilled");
|
|
187
|
+
}
|
|
188
|
+
async function onValidateHandler(row, { prop, isValid, message }) {
|
|
189
|
+
if (!row.errorMap) {
|
|
190
|
+
row.errorMap = /* @__PURE__ */ new Map();
|
|
191
|
+
}
|
|
192
|
+
if (isValid) {
|
|
193
|
+
row.errorMap.delete(prop);
|
|
194
|
+
if (row.errorMsg && (row.errorMsg.prop === prop || !row.errorMap.has(prop))) {
|
|
195
|
+
if (row.errorMap.size) {
|
|
196
|
+
const [prop2, message2] = Array.from(row.errorMap.entries())[0];
|
|
197
|
+
row.errorMsg = { prop: prop2, message: message2 };
|
|
198
|
+
} else {
|
|
199
|
+
row.errorMsg = null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
row.errorMap.set(prop, message);
|
|
204
|
+
if (!row.errorMsg || !row.errorMsg.prop) {
|
|
205
|
+
row.errorMsg = {
|
|
206
|
+
prop,
|
|
207
|
+
message
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const { onlyId, errorMsg, errorMap, children, ...data } = row;
|
|
212
|
+
emits("validate", {
|
|
213
|
+
row: data,
|
|
214
|
+
prop,
|
|
215
|
+
isValid,
|
|
216
|
+
message,
|
|
217
|
+
...statistics.value
|
|
218
|
+
});
|
|
219
|
+
console.log("validate", row, { prop, isValid, message });
|
|
220
|
+
}
|
|
221
|
+
__expose({
|
|
222
|
+
setData(data) {
|
|
223
|
+
dataSource.value = handler.cloneDeep(data, true);
|
|
224
|
+
dataSource.value.forEach((item) => {
|
|
225
|
+
item.onlyId = /* @__PURE__ */ Symbol("onlyId");
|
|
226
|
+
});
|
|
227
|
+
initValidateHandler(dataSource.value);
|
|
228
|
+
setData(dataSource.value);
|
|
229
|
+
},
|
|
230
|
+
deleteData(data) {
|
|
231
|
+
if (!is.isArray(data)) {
|
|
232
|
+
data = is.isObject(data) ? [data] : [];
|
|
233
|
+
}
|
|
234
|
+
const keySet = data.reduce((set, item) => {
|
|
235
|
+
if (item.onlyId) set.add(item.onlyId);
|
|
236
|
+
return set;
|
|
237
|
+
}, /* @__PURE__ */ new Set());
|
|
238
|
+
console.log("keySet", Array.from(keySet.values()));
|
|
239
|
+
if (!keySet.size) return;
|
|
240
|
+
for (let i = 0; i < dataSource.value.length; i++) {
|
|
241
|
+
const target = dataSource.value[i];
|
|
242
|
+
if (keySet.has(target.onlyId)) {
|
|
243
|
+
keySet.delete(target.onlyId);
|
|
244
|
+
onDeleteRowHandler({ $index: i });
|
|
245
|
+
i--;
|
|
246
|
+
}
|
|
247
|
+
if (keySet.size === 0) break;
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
getTableDataSource() {
|
|
251
|
+
return dataSource.value.reduce((list, item) => {
|
|
252
|
+
const { onlyId, errorMsg, errorMap, children, ...data } = item;
|
|
253
|
+
list.push(data);
|
|
254
|
+
return list;
|
|
255
|
+
}, []);
|
|
256
|
+
},
|
|
257
|
+
getStatistics() {
|
|
258
|
+
return { ...statistics.value };
|
|
259
|
+
},
|
|
260
|
+
validate() {
|
|
261
|
+
return {
|
|
262
|
+
...statistics.value,
|
|
263
|
+
dataSource: dataSource.value
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
});
|
|
17
267
|
return (_ctx, _cache) => {
|
|
18
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
19
|
-
|
|
20
|
-
|
|
268
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
ref: "containerRef",
|
|
272
|
+
class: "hy-table-form"
|
|
273
|
+
},
|
|
274
|
+
[
|
|
275
|
+
vue.createElementVNode("div", { class: "flex items-center justify-between mb-3 text-sm" }, [
|
|
276
|
+
vue.createElementVNode("div", { class: "flex items-center gap-5" }, [
|
|
277
|
+
vue.createElementVNode("div", { class: "text-auxiliary" }, [
|
|
278
|
+
vue.createElementVNode("span", { class: "mr-1" }, "\u89E3\u6790\u603B\u6570"),
|
|
279
|
+
vue.createElementVNode(
|
|
280
|
+
"span",
|
|
281
|
+
null,
|
|
282
|
+
vue.toDisplayString(dataSource.value.length),
|
|
283
|
+
1
|
|
284
|
+
/* TEXT */
|
|
285
|
+
)
|
|
286
|
+
]),
|
|
287
|
+
statistics.value.success ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
288
|
+
key: 0,
|
|
289
|
+
class: "flex items-center text-success"
|
|
290
|
+
}, [
|
|
291
|
+
vue.createElementVNode("div", { class: "w-1.5 h-1.5 mr-1.5 rounded-full bg-success" }),
|
|
292
|
+
vue.createElementVNode("span", null, "\u5C31\u7EEA"),
|
|
293
|
+
vue.createElementVNode(
|
|
294
|
+
"span",
|
|
295
|
+
null,
|
|
296
|
+
vue.toDisplayString(statistics.value.success),
|
|
297
|
+
1
|
|
298
|
+
/* TEXT */
|
|
299
|
+
)
|
|
300
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
301
|
+
statistics.value.failed ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
302
|
+
key: 1,
|
|
303
|
+
class: "flex items-center text-danger-2"
|
|
304
|
+
}, [
|
|
305
|
+
vue.createElementVNode("div", { class: "w-1.5 h-1.5 mr-1.5 rounded-full bg-danger-2" }),
|
|
306
|
+
vue.createElementVNode("span", null, "\u5F02\u5E38"),
|
|
307
|
+
vue.createElementVNode(
|
|
308
|
+
"span",
|
|
309
|
+
null,
|
|
310
|
+
vue.toDisplayString(statistics.value.failed),
|
|
311
|
+
1
|
|
312
|
+
/* TEXT */
|
|
313
|
+
)
|
|
314
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
315
|
+
]),
|
|
316
|
+
vue.createElementVNode("div", { class: "flex items-center gap-3" }, [
|
|
317
|
+
vue.createVNode(vue.unref(index.HyButton), {
|
|
318
|
+
type: "success",
|
|
319
|
+
size: "small",
|
|
320
|
+
"svg-name": "ops-button-add",
|
|
321
|
+
onClick: onAddRowHandler
|
|
322
|
+
}, {
|
|
323
|
+
default: vue.withCtx(() => [
|
|
324
|
+
vue.createTextVNode("\u6DFB\u52A0\u6570\u636E")
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
/* STABLE */
|
|
328
|
+
}),
|
|
329
|
+
vue.createElementVNode("div", { class: "hy-table-form-tabs" }, [
|
|
330
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
331
|
+
vue.Fragment,
|
|
332
|
+
null,
|
|
333
|
+
vue.renderList(tabList.value, (item) => {
|
|
334
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
335
|
+
key: item.value,
|
|
336
|
+
class: vue.normalizeClass(["hy-table-form-tab-button", { "is-select": item.value === tabValue.value }]),
|
|
337
|
+
onClick: ($event) => onTabChange(item.value)
|
|
338
|
+
}, vue.toDisplayString(item.label), 11, ["onClick"]);
|
|
339
|
+
}),
|
|
340
|
+
128
|
|
341
|
+
/* KEYED_FRAGMENT */
|
|
342
|
+
))
|
|
343
|
+
])
|
|
344
|
+
])
|
|
345
|
+
]),
|
|
346
|
+
vue.createVNode(vue.unref(index$1.HyTable), vue.mergeProps({
|
|
347
|
+
ref_key: "tableRef",
|
|
348
|
+
ref: tableRef
|
|
349
|
+
}, _ctx.$attrs, {
|
|
350
|
+
type: "virtual",
|
|
351
|
+
"row-key": "onlyId",
|
|
352
|
+
tableColumns: tableFormColumns.value,
|
|
353
|
+
rowClassName,
|
|
354
|
+
showHeader: true,
|
|
355
|
+
emptyText: __props.emptyText,
|
|
356
|
+
fontSize: __props.fontSize,
|
|
357
|
+
rowClickExpand: __props.rowClickExpand,
|
|
358
|
+
showEditable: false,
|
|
359
|
+
showOperate: false,
|
|
360
|
+
showPagination: false,
|
|
361
|
+
expandMode: "accordion",
|
|
362
|
+
onExpandChange: onExpandRowChange
|
|
363
|
+
}), vue.createSlots({
|
|
364
|
+
validateStatus: vue.withCtx(({ row }) => [
|
|
365
|
+
vue.createElementVNode(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
class: vue.normalizeClass(["flex items-center gap-1.5", [row.errorMsg ? "text-danger-2" : "text-success"]])
|
|
369
|
+
},
|
|
370
|
+
[
|
|
371
|
+
vue.createElementVNode(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
class: vue.normalizeClass(["w-1.5 h-1.5 rounded-full", [row.errorMsg ? "bg-danger-2" : "bg-success"]])
|
|
375
|
+
},
|
|
376
|
+
null,
|
|
377
|
+
2
|
|
378
|
+
/* CLASS */
|
|
379
|
+
),
|
|
380
|
+
vue.createElementVNode(
|
|
381
|
+
"div",
|
|
382
|
+
{ class: "text-sm" },
|
|
383
|
+
vue.toDisplayString(!row.errorMsg ? "\u51C6\u5907\u5C31\u7EEA" : row.errorMsg.prop ? "\u5185\u5BB9\u6709\u8BEF" : "\u6821\u9A8C\u5931\u8D25"),
|
|
384
|
+
1
|
|
385
|
+
/* TEXT */
|
|
386
|
+
)
|
|
387
|
+
],
|
|
388
|
+
2
|
|
389
|
+
/* CLASS */
|
|
390
|
+
)
|
|
391
|
+
]),
|
|
392
|
+
_: 2
|
|
393
|
+
/* DYNAMIC */
|
|
394
|
+
}, [
|
|
395
|
+
vue.renderList(_ctx.$slots, (_, slotName) => {
|
|
396
|
+
return {
|
|
397
|
+
name: slotName,
|
|
398
|
+
fn: vue.withCtx((scope) => [
|
|
399
|
+
vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
400
|
+
])
|
|
401
|
+
};
|
|
402
|
+
}),
|
|
403
|
+
expandColumn.value && !_ctx.$slots[expandColumn.value.slot] && __props.formColumns ? {
|
|
404
|
+
name: expandColumn.value.slot,
|
|
405
|
+
fn: vue.withCtx(({ row }) => [
|
|
406
|
+
vue.createElementVNode("div", { class: "w-full pl-[52px] pr-[62px] pb-2" }, [
|
|
407
|
+
vue.createElementVNode("div", { class: "h-[32px]" }, [
|
|
408
|
+
vue.createElementVNode(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
class: vue.normalizeClass(["flex items-center gap-1.5 text-danger-2 transition-all duration-300 overflow-hidden", [row.errorMsg ? "h-full" : "h-0"]])
|
|
412
|
+
},
|
|
413
|
+
[
|
|
414
|
+
row.errorMsg ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), { key: 0 }, {
|
|
415
|
+
default: vue.withCtx(() => [
|
|
416
|
+
vue.createVNode(vue.unref(iconsVue.Warning))
|
|
417
|
+
]),
|
|
418
|
+
_: 1
|
|
419
|
+
/* STABLE */
|
|
420
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
421
|
+
vue.createElementVNode(
|
|
422
|
+
"span",
|
|
423
|
+
null,
|
|
424
|
+
vue.toDisplayString(row.errorMsg ? row.errorMsg.message : ""),
|
|
425
|
+
1
|
|
426
|
+
/* TEXT */
|
|
427
|
+
)
|
|
428
|
+
],
|
|
429
|
+
2
|
|
430
|
+
/* CLASS */
|
|
431
|
+
)
|
|
432
|
+
]),
|
|
433
|
+
vue.createVNode(vue.unref(index$2.HyForm), {
|
|
434
|
+
ref_key: "formRef",
|
|
435
|
+
ref: formRef,
|
|
436
|
+
model: row,
|
|
437
|
+
columns: __props.formColumns,
|
|
438
|
+
rules: __props.rules,
|
|
439
|
+
"show-message": false,
|
|
440
|
+
class: "px-0",
|
|
441
|
+
columnNum: __props.columnNum,
|
|
442
|
+
size: __props.size,
|
|
443
|
+
onValidate: (prop, isValid, message) => onValidateHandler(row, { prop, isValid, message })
|
|
444
|
+
}, vue.createSlots({
|
|
445
|
+
_: 2
|
|
446
|
+
/* DYNAMIC */
|
|
447
|
+
}, [
|
|
448
|
+
vue.renderList(_ctx.$slots, (_, slotName) => {
|
|
449
|
+
return {
|
|
450
|
+
name: slotName,
|
|
451
|
+
fn: vue.withCtx((scope) => [
|
|
452
|
+
vue.renderSlot(_ctx.$slots, slotName, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
453
|
+
])
|
|
454
|
+
};
|
|
455
|
+
})
|
|
456
|
+
]), 1032, ["model", "columns", "rules", "columnNum", "size", "onValidate"])
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
key: "0"
|
|
460
|
+
} : void 0
|
|
461
|
+
]), 1040, ["tableColumns", "emptyText", "fontSize", "rowClickExpand"])
|
|
462
|
+
],
|
|
463
|
+
512
|
|
464
|
+
/* NEED_PATCH */
|
|
465
|
+
);
|
|
21
466
|
};
|
|
22
467
|
}
|
|
23
468
|
});
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
|
-
var useTooltipConfig = require('../../hooks/useTooltipConfig.js');
|
|
8
7
|
var is = require('../../utils/is.js');
|
|
8
|
+
var useTooltipConfig = require('../../hooks/useTooltipConfig.js');
|
|
9
9
|
|
|
10
10
|
import "./style/tooltip.scss";
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
19
19
|
default: () => {
|
|
20
20
|
const { tooltipConfig } = useTooltipConfig.useTooltipConfig();
|
|
21
21
|
const { isAlways } = tooltipConfig.value;
|
|
22
|
-
return is.isBoolean(isAlways) ? isAlways :
|
|
22
|
+
return is.isBoolean(isAlways) ? isAlways : true;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
disabled: {
|
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
content: {
|
|
41
|
-
type: String
|
|
41
|
+
type: [String, Number]
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
setup(__props) {
|
|
@@ -70,16 +70,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
70
70
|
"popper-class": "max-w-[300px]"
|
|
71
71
|
}, _ctx.$attrs, {
|
|
72
72
|
disabled: isDisabled.value,
|
|
73
|
-
content: _ctx.$slots.content ? void 0 : __props.content
|
|
73
|
+
content: _ctx.$slots.content ? void 0 : vue.unref(is.isNumber)(__props.content) ? `${__props.content}` : __props.content
|
|
74
74
|
}), vue.createSlots({
|
|
75
75
|
default: vue.withCtx(() => [
|
|
76
|
-
__props.isAlways ? vue.renderSlot(_ctx.$slots, "default", {
|
|
76
|
+
__props.isAlways ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
77
77
|
vue.createTextVNode(
|
|
78
78
|
vue.toDisplayString(__props.content),
|
|
79
79
|
1
|
|
80
80
|
/* TEXT */
|
|
81
81
|
)
|
|
82
|
-
]) : (vue.openBlock(), vue.createElementBlock(
|
|
82
|
+
], void 0, 0) : (vue.openBlock(), vue.createElementBlock(
|
|
83
83
|
"span",
|
|
84
84
|
{
|
|
85
85
|
key: 1,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('hy-virtual-tree/style');
|
|
@@ -10,6 +10,8 @@ var treeConfig = require('./config/tree-config.js');
|
|
|
10
10
|
var useMixins = require('../../hooks/useMixins.js');
|
|
11
11
|
var index$1 = require('../hyIcon/index.js');
|
|
12
12
|
|
|
13
|
+
import "./style/index.css";
|
|
14
|
+
|
|
13
15
|
const __default__ = vue.defineComponent({
|
|
14
16
|
name: "HyTree"
|
|
15
17
|
});
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var useUserAvatarMap = require('../../hooks/useUserAvatarMap.js');
|
|
7
|
-
var adaptive = require('../../utils/adaptive.js');
|
|
8
6
|
var useLocale = require('../../hooks/useLocale.js');
|
|
7
|
+
var useUserAvatarMap = require('../../hooks/useUserAvatarMap.js');
|
|
9
8
|
var index = require('../hyIcon/index.js');
|
|
9
|
+
var adaptive = require('../../utils/adaptive.js');
|
|
10
10
|
|
|
11
11
|
import "./style/userAvatar.scss";
|
|
12
12
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var elementPlus = require('element-plus');
|
|
5
|
+
var useLocale = require('../../../hooks/useLocale.js');
|
|
5
6
|
var useVideoPlayerConfig = require('../../../hooks/useVideoPlayerConfig.js');
|
|
6
7
|
var date = require('../../../utils/date.js');
|
|
7
8
|
var index = require('../../hyConfirmDialog/index.js');
|
|
8
9
|
var handler = require('../../../utils/handler.js');
|
|
9
10
|
var is = require('../../../utils/is.js');
|
|
10
|
-
var useLocale = require('../../../hooks/useLocale.js');
|
|
11
11
|
|
|
12
12
|
const useVideoPlayer = (hy) => {
|
|
13
13
|
const { props, emits, videoRef, videoWrapperRef } = hy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* 动效组件保持不变 */
|
|
2
|
-
.tech-loader {
|
|
2
|
+
.hy-tech-loader {
|
|
3
3
|
position: relative;
|
|
4
4
|
z-index: 2;
|
|
5
5
|
&::before {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
border-top-color: #00ffff;
|
|
25
25
|
border-right-color: #00ffff;
|
|
26
26
|
box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
|
|
27
|
-
animation: spin 1s linear infinite;
|
|
27
|
+
animation: hy-tech-loader-spin 1s linear infinite;
|
|
28
28
|
}
|
|
29
29
|
.tech-center-dot {
|
|
30
30
|
position: absolute;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
background-color: #00ffff;
|
|
37
37
|
border-radius: 50%;
|
|
38
38
|
box-shadow: 0 0 10px #00ffff;
|
|
39
|
-
animation: pulse 1.5s ease-in-out infinite;
|
|
39
|
+
animation: hy-tech-loader-pulse 1.5s ease-in-out infinite;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
@keyframes spin {
|
|
43
|
+
@keyframes hy-tech-loader-spin {
|
|
44
44
|
0% {
|
|
45
45
|
transform: rotate(0deg);
|
|
46
46
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@keyframes pulse {
|
|
52
|
+
@keyframes hy-tech-loader-pulse {
|
|
53
53
|
0%,
|
|
54
54
|
100% {
|
|
55
55
|
opacity: 0.5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.video-player-content {
|
|
1
|
+
.hy-video-player-content {
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 400px;
|
|
4
4
|
border: 1px solid rgba(var(--hy-border));
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
video {
|
|
13
13
|
width: 100%;
|
|
14
14
|
}
|
|
15
|
-
&.video-player-content-pick-up {
|
|
15
|
+
&.hy-video-player-content-pick-up {
|
|
16
16
|
height: 60px !important;
|
|
17
17
|
}
|
|
18
18
|
// 全屏播放器样式
|
|
19
|
-
&.full-video-player-content {
|
|
19
|
+
&.hy-full-video-player-content {
|
|
20
20
|
height: 100% !important;
|
|
21
21
|
position: fixed;
|
|
22
22
|
left: 0;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
&:not(.video-player-content-pick-up) {
|
|
75
|
+
&:not(.hy-video-player-content-pick-up) {
|
|
76
76
|
video {
|
|
77
77
|
height: 0;
|
|
78
78
|
flex-grow: 1;
|
|
@@ -238,15 +238,16 @@
|
|
|
238
238
|
rgba(28, 51, 74, 0) 100%
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
|
+
|
|
241
242
|
}
|
|
242
243
|
|
|
243
|
-
.popover-volume-slider {
|
|
244
|
+
.hy-video-player-popover-volume-slider {
|
|
244
245
|
min-width: auto !important;
|
|
245
246
|
width: 40px !important;
|
|
246
247
|
padding: 16px 0;
|
|
247
248
|
}
|
|
248
249
|
|
|
249
|
-
.popover-speed {
|
|
250
|
+
.hy-video-player-popover-speed {
|
|
250
251
|
min-width: auto !important;
|
|
251
252
|
width: 62px !important;
|
|
252
253
|
padding: 0px !important;
|