@fangzhongya/fang-ui 0.0.58 → 0.0.60
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/array/src/data.cjs +3 -3
- package/dist/components/array/src/data.d.ts +0 -3
- package/dist/components/array/src/data.js +3 -3
- package/dist/components/array/src/index2.cjs +27 -11
- package/dist/components/array/src/index2.js +23 -7
- package/dist/components/common/use.cjs +1 -1
- package/dist/components/common/use.js +1 -1
- package/dist/components/dialogs/src/data.cjs +2 -4
- package/dist/components/dialogs/src/data.d.ts +0 -2
- package/dist/components/dialogs/src/data.js +2 -4
- package/dist/components/dialogs/src/index2.cjs +24 -12
- package/dist/components/dialogs/src/index2.js +17 -5
- package/dist/components/forms/index.css +3 -0
- package/dist/components/forms/index.scss +3 -0
- package/dist/components/forms/src/index2.cjs +16 -14
- package/dist/components/forms/src/index2.js +3 -1
- package/dist/components/forms/src/setup.cjs +11 -5
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +11 -5
- package/dist/components/forms/src/util.cjs +5 -4
- package/dist/components/forms/src/util.d.ts +1 -1
- package/dist/components/forms/src/util.js +5 -4
- package/dist/components/forms-drag/src/index2.cjs +96 -45
- package/dist/components/forms-drag/src/index2.js +91 -40
- package/dist/components/icon-picker/index.css +1 -0
- package/dist/components/icon-picker/index.scss +1 -0
- package/dist/components/iframe/index.css +4 -0
- package/dist/components/iframe/index.scss +4 -0
- package/dist/components/iframe/src/index2.cjs +19 -7
- package/dist/components/iframe/src/index2.js +20 -8
- package/dist/components/iframe/style/index2.scss +3 -0
- package/dist/components/index.cjs +110 -108
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +2 -1
- package/dist/components/index2.scss +3 -2
- package/dist/components/input-history/index.css +7 -17
- package/dist/components/input-history/index.scss +34 -42
- package/dist/components/input-history/src/index2.cjs +3 -12
- package/dist/components/input-history/src/index2.js +3 -12
- package/dist/components/inputs/src/index2.cjs +11 -9
- package/dist/components/inputs/src/index2.js +3 -1
- package/dist/components/keep-com/src/data.d.ts +3 -0
- package/dist/components/lists/index.css +0 -5
- package/dist/components/lists/index.scss +0 -5
- package/dist/components/lists/src/index2.cjs +2 -5
- package/dist/components/lists/src/index2.js +3 -6
- package/dist/components/listsp/index.css +1 -5
- package/dist/components/listsp/src/index2.cjs +11 -9
- package/dist/components/listsp/src/index2.js +3 -1
- package/dist/components/no-data/index.cjs +9 -0
- package/dist/components/no-data/index.css +19 -0
- package/dist/components/no-data/index.d.ts +4 -0
- package/dist/components/no-data/index.js +9 -0
- package/dist/components/no-data/index.scss +8 -0
- package/dist/components/no-data/src/data.cjs +24 -0
- package/dist/components/no-data/src/data.d.ts +26 -0
- package/dist/components/no-data/src/data.js +24 -0
- package/dist/components/no-data/src/index.cjs +4 -0
- package/dist/components/no-data/src/index.js +4 -0
- package/dist/components/no-data/src/index2.cjs +34 -0
- package/dist/components/no-data/src/index2.js +34 -0
- package/dist/components/page/index.css +4 -0
- package/dist/components/page/set-column.css +8 -8
- package/dist/components/page/src/index2.cjs +41 -39
- package/dist/components/page/src/index2.js +15 -13
- package/dist/components/page/src/set-column.cjs +1 -1
- package/dist/components/page/src/set-column.js +1 -1
- package/dist/components/page/src/set-column2.cjs +3 -6
- package/dist/components/page/src/set-column2.js +4 -7
- package/dist/components/paging/index.css +1 -0
- package/dist/components/paging/index.scss +1 -0
- package/dist/components/paging/src/index2.cjs +18 -10
- package/dist/components/paging/src/index2.js +12 -4
- package/dist/components/selector/src/index2.cjs +17 -15
- package/dist/components/selector/src/index2.js +8 -6
- package/dist/components/tables/common/pagin.cjs +3 -3
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +3 -3
- package/dist/components/tables/src/index2.cjs +4 -7
- package/dist/components/tables/src/index2.js +3 -6
- package/dist/components/tablesp/index.css +1 -0
- package/dist/components/tablesp/src/index2.cjs +11 -9
- package/dist/components/tablesp/src/index2.js +3 -1
- package/dist/components/tabless/src/index2.cjs +11 -9
- package/dist/components/tabless/src/index2.js +3 -1
- package/dist/components/tablesv/src/index2.cjs +2 -5
- package/dist/components/tablesv/src/index2.js +3 -6
- package/dist/components/tablesvp/index.css +1 -0
- package/dist/components/tablesvp/src/index2.cjs +9 -7
- package/dist/components/tablesvp/src/index2.js +3 -1
- package/dist/css/forms.css +3 -0
- package/dist/css/icon-picker.css +1 -0
- package/dist/css/iframe.css +4 -0
- package/dist/css/index.css +44 -22
- package/dist/css/input-history.css +7 -17
- package/dist/css/lists.css +0 -5
- package/dist/css/listsp.css +1 -5
- package/dist/css/no-data.css +19 -0
- package/dist/css/page/set-column.css +8 -8
- package/dist/css/page.css +4 -0
- package/dist/css/paging.css +1 -0
- package/dist/css/tablesp.css +1 -0
- package/dist/css/tablesvp.css +1 -0
- package/dist/expand/{chunk-ID2WVA6N.js → chunk-3HYUAX6P.js} +2 -0
- package/dist/expand/{chunk-NEHCZ3EJ.cjs → chunk-IPHLXLMM.cjs} +2 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/locale/index.cjs +51 -2
- package/dist/hooks/locale/index.d.ts +64 -3
- package/dist/hooks/locale/index.js +51 -2
- package/dist/icons/index.css +31 -31
- package/dist/icons/index.json +7 -7
- package/dist/index.cjs +128 -126
- package/dist/index.css +44 -22
- package/dist/index.js +2 -0
- package/dist/locale/en.cjs +38 -15
- package/dist/locale/en.d.ts +27 -4
- package/dist/locale/en.js +38 -15
- package/dist/locale/zh-cn.cjs +24 -3
- package/dist/locale/zh-cn.d.ts +23 -2
- package/dist/locale/zh-cn.js +24 -3
- package/dist/types/locale.d.ts +1 -1
- package/package.json +11 -11
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{option → keep-com}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{option.css → keep-com.css} +0 -0
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index = require("../../../hooks/cssname/index.cjs");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
4
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
5
|
+
const index$5 = require("../../forms/index.cjs");
|
|
6
|
+
const index$8 = require("../../tablesp/index.cjs");
|
|
7
|
+
const index$6 = require("../../list/index.cjs");
|
|
8
|
+
const index$4 = require("../../dialogs/index.cjs");
|
|
9
|
+
const index$7 = require("element-plus/es/components/button/index");
|
|
10
|
+
const index$3 = require("element-plus/es/components/message/index");
|
|
11
|
+
const index$2 = require("element-plus/es/components/message-box/index");
|
|
12
12
|
const data = require("./data.cjs");
|
|
13
13
|
const setColumn = require("./set-column.cjs");
|
|
14
14
|
const urls = require("../../common/urls.cjs");
|
|
15
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
15
16
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
17
|
__name: "index",
|
|
17
18
|
props: data.dataProps,
|
|
18
19
|
emits: data.dataEmits,
|
|
19
20
|
setup(__props, { emit: __emit }) {
|
|
21
|
+
const { getLocale, getLocaleAdd } = index.useLocale();
|
|
20
22
|
const props = __props;
|
|
21
23
|
const emit = __emit;
|
|
22
|
-
const cs = index.useCssName("page");
|
|
24
|
+
const cs = index$1.useCssName("page");
|
|
23
25
|
const slots = vue.useSlots();
|
|
24
26
|
const tableRef = vue.ref();
|
|
25
27
|
let listObj = {};
|
|
@@ -128,9 +130,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
128
130
|
const onSenior = (obj) => {
|
|
129
131
|
isSenior.value = !isSenior.value;
|
|
130
132
|
if (isSenior.value) {
|
|
131
|
-
obj.label = "
|
|
133
|
+
obj.label = getLocale("page.put");
|
|
132
134
|
} else {
|
|
133
|
-
obj.label = "
|
|
135
|
+
obj.label = getLocale("page.senior");
|
|
134
136
|
}
|
|
135
137
|
setListQuery();
|
|
136
138
|
};
|
|
@@ -140,19 +142,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
142
|
const arr = [
|
|
141
143
|
{
|
|
142
144
|
_id: "1",
|
|
143
|
-
label: "
|
|
145
|
+
label: getLocale("page.query"),
|
|
144
146
|
type: "primary"
|
|
145
147
|
},
|
|
146
148
|
{
|
|
147
149
|
_id: "2",
|
|
148
|
-
label: "
|
|
150
|
+
label: getLocale("page.reset"),
|
|
149
151
|
type: "default"
|
|
150
152
|
}
|
|
151
153
|
];
|
|
152
154
|
if ((_a = props.config.query) == null ? void 0 : _a.senior) {
|
|
153
155
|
const obj = {
|
|
154
156
|
_id: "3",
|
|
155
|
-
label: "
|
|
157
|
+
label: getLocale("page.senior"),
|
|
156
158
|
type: "primary",
|
|
157
159
|
click: onSenior
|
|
158
160
|
};
|
|
@@ -190,7 +192,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
190
192
|
if (((_a = props.config.table) == null ? void 0 : _a.operation) !== false) {
|
|
191
193
|
arr.push({
|
|
192
194
|
prop: "operation",
|
|
193
|
-
label: "
|
|
195
|
+
label: getLocale("page.operation"),
|
|
194
196
|
width: 156,
|
|
195
197
|
fixed: true
|
|
196
198
|
});
|
|
@@ -205,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
205
207
|
if (((_a = props.config.edit) == null ? void 0 : _a.is) !== false) {
|
|
206
208
|
array.push({
|
|
207
209
|
prop: 2,
|
|
208
|
-
label: "
|
|
210
|
+
label: getLocale("page.edit"),
|
|
209
211
|
type: "primary",
|
|
210
212
|
text: true
|
|
211
213
|
});
|
|
@@ -213,7 +215,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
213
215
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false) {
|
|
214
216
|
array.push({
|
|
215
217
|
prop: 4,
|
|
216
|
-
label: "
|
|
218
|
+
label: getLocale("page.delete"),
|
|
217
219
|
type: "danger",
|
|
218
220
|
text: true
|
|
219
221
|
});
|
|
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
221
223
|
if (((_c = props.config.details) == null ? void 0 : _c.is) !== false) {
|
|
222
224
|
array.push({
|
|
223
225
|
prop: 9,
|
|
224
|
-
label: "
|
|
226
|
+
label: getLocale("page.details"),
|
|
225
227
|
type: "info",
|
|
226
228
|
text: true
|
|
227
229
|
});
|
|
@@ -235,14 +237,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
235
237
|
if (((_a = props.config.add) == null ? void 0 : _a.is) !== false) {
|
|
236
238
|
array.push({
|
|
237
239
|
prop: 1,
|
|
238
|
-
label: "
|
|
240
|
+
label: getLocale("page.add"),
|
|
239
241
|
type: "primary"
|
|
240
242
|
});
|
|
241
243
|
}
|
|
242
244
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false && ((_c = tableConfig.value.config) == null ? void 0 : _c.ischecked)) {
|
|
243
245
|
array.push({
|
|
244
246
|
prop: 8,
|
|
245
|
-
label: "
|
|
247
|
+
label: getLocaleAdd("page.batch", "page.delete"),
|
|
246
248
|
type: "danger"
|
|
247
249
|
});
|
|
248
250
|
}
|
|
@@ -257,7 +259,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
257
259
|
array.forEach((obj) => {
|
|
258
260
|
ts.push(name + ":" + (obj[label] ?? ""));
|
|
259
261
|
});
|
|
260
|
-
index$
|
|
262
|
+
index$2.ElMessageBox.confirm(ts.join("<br>"), "提示", {
|
|
261
263
|
confirmButtonText: "确认",
|
|
262
264
|
cancelButtonText: "取消",
|
|
263
265
|
type: "warning",
|
|
@@ -282,10 +284,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
282
284
|
}
|
|
283
285
|
urls.comHandle(param, value).then((res) => {
|
|
284
286
|
if (res.result) {
|
|
285
|
-
index$
|
|
287
|
+
index$3.ElMessage.success(res.info || "删除成功");
|
|
286
288
|
onRefresh();
|
|
287
289
|
} else {
|
|
288
|
-
index$
|
|
290
|
+
index$3.ElMessage.error(res.info || "删除失败");
|
|
289
291
|
}
|
|
290
292
|
}).catch((err) => {
|
|
291
293
|
console.error("删除失败", err);
|
|
@@ -316,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
316
318
|
} else if (item.prop === 8) {
|
|
317
319
|
console.log("批量删除", selection.value);
|
|
318
320
|
if (selection.value.length === 0) {
|
|
319
|
-
index$
|
|
321
|
+
index$3.ElMessage.warning("请至少选择一条记录");
|
|
320
322
|
return;
|
|
321
323
|
}
|
|
322
324
|
onDelete(selection.value);
|
|
@@ -341,7 +343,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
341
343
|
details.value = res.data || row;
|
|
342
344
|
details.visible = true;
|
|
343
345
|
} else {
|
|
344
|
-
index$
|
|
346
|
+
index$3.ElMessage.error(res.info || "查询详情失败");
|
|
345
347
|
}
|
|
346
348
|
}).catch((err) => {
|
|
347
349
|
console.error("查询详情失败", err);
|
|
@@ -417,13 +419,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
417
419
|
}
|
|
418
420
|
urls.comHandle(param, data2).then((res) => {
|
|
419
421
|
if (res.result) {
|
|
420
|
-
index$
|
|
422
|
+
index$3.ElMessage.success(
|
|
421
423
|
res.info || "添加成功"
|
|
422
424
|
);
|
|
423
425
|
dialog.visible = false;
|
|
424
426
|
onRefresh();
|
|
425
427
|
} else {
|
|
426
|
-
index$
|
|
428
|
+
index$3.ElMessage.error(res.info || "添加失败");
|
|
427
429
|
}
|
|
428
430
|
}).catch((err) => {
|
|
429
431
|
console.error("添加失败", err);
|
|
@@ -451,13 +453,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
451
453
|
}
|
|
452
454
|
urls.comHandle(param, data2).then((res) => {
|
|
453
455
|
if (res.result) {
|
|
454
|
-
index$
|
|
456
|
+
index$3.ElMessage.success(
|
|
455
457
|
res.info || "编辑成功"
|
|
456
458
|
);
|
|
457
459
|
dialog.visible = false;
|
|
458
460
|
onRefresh();
|
|
459
461
|
} else {
|
|
460
|
-
index$
|
|
462
|
+
index$3.ElMessage.error(res.info || "编辑失败");
|
|
461
463
|
}
|
|
462
464
|
}).catch((err) => {
|
|
463
465
|
console.error("编辑失败", err);
|
|
@@ -570,14 +572,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
570
572
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
571
573
|
class: vue.normalizeClass(vue.unref(cs).z())
|
|
572
574
|
}, [
|
|
573
|
-
vue.createVNode(vue.unref(index$
|
|
574
|
-
title: (dialog.type == "add" ? "
|
|
575
|
+
vue.createVNode(vue.unref(index$4.Dialogs), {
|
|
576
|
+
title: (dialog.type == "add" ? vue.unref(getLocale)("page.add") : vue.unref(getLocale)("page.edit")) + props.config.name,
|
|
575
577
|
modelValue: dialog.visible,
|
|
576
578
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialog.visible = $event),
|
|
577
579
|
onConfirm
|
|
578
580
|
}, {
|
|
579
581
|
default: vue.withCtx(() => [
|
|
580
|
-
dialog.visible ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
582
|
+
dialog.visible ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.Forms), vue.mergeProps({ key: 0 }, props.config.form, {
|
|
581
583
|
ref_key: "formRef",
|
|
582
584
|
ref: formRef,
|
|
583
585
|
modelValue: dialog.value,
|
|
@@ -599,8 +601,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
599
601
|
]),
|
|
600
602
|
_: 3
|
|
601
603
|
}, 8, ["title", "modelValue"]),
|
|
602
|
-
vue.createVNode(vue.unref(index$
|
|
603
|
-
title: props.config.name + "
|
|
604
|
+
vue.createVNode(vue.unref(index$4.Dialogs), {
|
|
605
|
+
title: props.config.name + vue.unref(getLocale)("page.details"),
|
|
604
606
|
modelValue: details.visible,
|
|
605
607
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
606
608
|
"no-footer": ""
|
|
@@ -608,7 +610,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
608
610
|
default: vue.withCtx(() => {
|
|
609
611
|
var _a2;
|
|
610
612
|
return [
|
|
611
|
-
vue.createVNode(vue.unref(index$
|
|
613
|
+
vue.createVNode(vue.unref(index$6.List), vue.mergeProps((_a2 = props.config.details) == null ? void 0 : _a2.config, {
|
|
612
614
|
value: details.value,
|
|
613
615
|
options: props.options,
|
|
614
616
|
compons: props.compons,
|
|
@@ -635,7 +637,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
635
637
|
key: 0,
|
|
636
638
|
class: vue.normalizeClass(vue.unref(cs).z("query"))
|
|
637
639
|
}, [
|
|
638
|
-
vue.createVNode(vue.unref(index$
|
|
640
|
+
vue.createVNode(vue.unref(index$5.Forms), vue.mergeProps((_b = props.config.query) == null ? void 0 : _b.config, {
|
|
639
641
|
query: "",
|
|
640
642
|
"label-position": "auto",
|
|
641
643
|
"model-value": props.value,
|
|
@@ -671,7 +673,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
671
673
|
class: vue.normalizeClass(vue.unref(cs).z("top-operation"))
|
|
672
674
|
}, [
|
|
673
675
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationTop), (item, index2) => {
|
|
674
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
676
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
|
|
675
677
|
key: index2,
|
|
676
678
|
type: item.type,
|
|
677
679
|
onClick: vue.withModifiers(($event) => onOperation(item), ["stop"])
|
|
@@ -691,7 +693,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
691
693
|
list: props.list
|
|
692
694
|
}, null, 8, ["modelValue", "list"])) : vue.createCommentVNode("", true)
|
|
693
695
|
], 2),
|
|
694
|
-
vue.createVNode(vue.unref(index$
|
|
696
|
+
vue.createVNode(vue.unref(index$8.Tablesp), {
|
|
695
697
|
ref_key: "tableRef",
|
|
696
698
|
ref: tableRef,
|
|
697
699
|
load: ((_c = props.config.query) == null ? void 0 : _c.is) === false,
|
|
@@ -709,7 +711,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
709
711
|
class: vue.normalizeClass(vue.unref(cs).z("operations"))
|
|
710
712
|
}, [
|
|
711
713
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(operationColumn), (item, index2) => {
|
|
712
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
714
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElButton), {
|
|
713
715
|
key: index2,
|
|
714
716
|
type: item.type,
|
|
715
717
|
text: item.text,
|
|
@@ -10,11 +10,13 @@ import { ElMessageBox } from "element-plus/es/components/message-box/index";
|
|
|
10
10
|
import { dataEmits, dataProps } from "./data.js";
|
|
11
11
|
import SetColumn from "./set-column.js";
|
|
12
12
|
import { comHandle } from "../../common/urls.js";
|
|
13
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
13
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
15
|
__name: "index",
|
|
15
16
|
props: dataProps,
|
|
16
17
|
emits: dataEmits,
|
|
17
18
|
setup(__props, { emit: __emit }) {
|
|
19
|
+
const { getLocale, getLocaleAdd } = useLocale();
|
|
18
20
|
const props = __props;
|
|
19
21
|
const emit = __emit;
|
|
20
22
|
const cs = useCssName("page");
|
|
@@ -126,9 +128,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
128
|
const onSenior = (obj) => {
|
|
127
129
|
isSenior.value = !isSenior.value;
|
|
128
130
|
if (isSenior.value) {
|
|
129
|
-
obj.label = "
|
|
131
|
+
obj.label = getLocale("page.put");
|
|
130
132
|
} else {
|
|
131
|
-
obj.label = "
|
|
133
|
+
obj.label = getLocale("page.senior");
|
|
132
134
|
}
|
|
133
135
|
setListQuery();
|
|
134
136
|
};
|
|
@@ -138,19 +140,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
140
|
const arr = [
|
|
139
141
|
{
|
|
140
142
|
_id: "1",
|
|
141
|
-
label: "
|
|
143
|
+
label: getLocale("page.query"),
|
|
142
144
|
type: "primary"
|
|
143
145
|
},
|
|
144
146
|
{
|
|
145
147
|
_id: "2",
|
|
146
|
-
label: "
|
|
148
|
+
label: getLocale("page.reset"),
|
|
147
149
|
type: "default"
|
|
148
150
|
}
|
|
149
151
|
];
|
|
150
152
|
if ((_a = props.config.query) == null ? void 0 : _a.senior) {
|
|
151
153
|
const obj = {
|
|
152
154
|
_id: "3",
|
|
153
|
-
label: "
|
|
155
|
+
label: getLocale("page.senior"),
|
|
154
156
|
type: "primary",
|
|
155
157
|
click: onSenior
|
|
156
158
|
};
|
|
@@ -188,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
190
|
if (((_a = props.config.table) == null ? void 0 : _a.operation) !== false) {
|
|
189
191
|
arr.push({
|
|
190
192
|
prop: "operation",
|
|
191
|
-
label: "
|
|
193
|
+
label: getLocale("page.operation"),
|
|
192
194
|
width: 156,
|
|
193
195
|
fixed: true
|
|
194
196
|
});
|
|
@@ -203,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
203
205
|
if (((_a = props.config.edit) == null ? void 0 : _a.is) !== false) {
|
|
204
206
|
array.push({
|
|
205
207
|
prop: 2,
|
|
206
|
-
label: "
|
|
208
|
+
label: getLocale("page.edit"),
|
|
207
209
|
type: "primary",
|
|
208
210
|
text: true
|
|
209
211
|
});
|
|
@@ -211,7 +213,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
213
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false) {
|
|
212
214
|
array.push({
|
|
213
215
|
prop: 4,
|
|
214
|
-
label: "
|
|
216
|
+
label: getLocale("page.delete"),
|
|
215
217
|
type: "danger",
|
|
216
218
|
text: true
|
|
217
219
|
});
|
|
@@ -219,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
221
|
if (((_c = props.config.details) == null ? void 0 : _c.is) !== false) {
|
|
220
222
|
array.push({
|
|
221
223
|
prop: 9,
|
|
222
|
-
label: "
|
|
224
|
+
label: getLocale("page.details"),
|
|
223
225
|
type: "info",
|
|
224
226
|
text: true
|
|
225
227
|
});
|
|
@@ -233,14 +235,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
233
235
|
if (((_a = props.config.add) == null ? void 0 : _a.is) !== false) {
|
|
234
236
|
array.push({
|
|
235
237
|
prop: 1,
|
|
236
|
-
label: "
|
|
238
|
+
label: getLocale("page.add"),
|
|
237
239
|
type: "primary"
|
|
238
240
|
});
|
|
239
241
|
}
|
|
240
242
|
if (((_b = props.config.delete) == null ? void 0 : _b.is) !== false && ((_c = tableConfig.value.config) == null ? void 0 : _c.ischecked)) {
|
|
241
243
|
array.push({
|
|
242
244
|
prop: 8,
|
|
243
|
-
label: "
|
|
245
|
+
label: getLocaleAdd("page.batch", "page.delete"),
|
|
244
246
|
type: "danger"
|
|
245
247
|
});
|
|
246
248
|
}
|
|
@@ -569,7 +571,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
569
571
|
class: normalizeClass(unref(cs).z())
|
|
570
572
|
}, [
|
|
571
573
|
createVNode(unref(Dialogs), {
|
|
572
|
-
title: (dialog.type == "add" ? "
|
|
574
|
+
title: (dialog.type == "add" ? unref(getLocale)("page.add") : unref(getLocale)("page.edit")) + props.config.name,
|
|
573
575
|
modelValue: dialog.visible,
|
|
574
576
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialog.visible = $event),
|
|
575
577
|
onConfirm
|
|
@@ -598,7 +600,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
598
600
|
_: 3
|
|
599
601
|
}, 8, ["title", "modelValue"]),
|
|
600
602
|
createVNode(unref(Dialogs), {
|
|
601
|
-
title: props.config.name + "
|
|
603
|
+
title: props.config.name + unref(getLocale)("page.details"),
|
|
602
604
|
modelValue: details.visible,
|
|
603
605
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
604
606
|
"no-footer": ""
|
|
@@ -3,5 +3,5 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const setColumn_vue_vue_type_script_setup_true_lang = require("./set-column2.cjs");
|
|
4
4
|
;/* empty css */
|
|
5
5
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
|
-
const SetColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(setColumn_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-
|
|
6
|
+
const SetColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(setColumn_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-f43f186a"]]);
|
|
7
7
|
exports.default = SetColumn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./set-column2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SetColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SetColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f43f186a"]]);
|
|
5
5
|
export {
|
|
6
6
|
SetColumn as default
|
|
7
7
|
};
|
|
@@ -3,16 +3,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Draggable = require("vuedraggable");
|
|
5
5
|
const index$1 = require("../../dialogs/index.cjs");
|
|
6
|
+
const index$2 = require("../../no-data/index.cjs");
|
|
6
7
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
7
8
|
const elementPlus = require("element-plus");
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "no-data"
|
|
11
12
|
};
|
|
12
|
-
const _hoisted_2 = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "no-data"
|
|
15
|
-
};
|
|
16
13
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
14
|
__name: "set-column",
|
|
18
15
|
props: {
|
|
@@ -108,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
108
105
|
checked: isChecked(item),
|
|
109
106
|
onChange: (is) => onChange(item, Boolean(is))
|
|
110
107
|
}, null, 8, ["class", "label", "value", "checked", "onChange"]);
|
|
111
|
-
}), 128)) : (vue.openBlock(), vue.
|
|
108
|
+
}), 128)) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.NoData), { key: 1 }))
|
|
112
109
|
], 2))
|
|
113
110
|
], 2),
|
|
114
111
|
vue.createElementVNode("div", {
|
|
@@ -149,7 +146,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
149
146
|
], 2)
|
|
150
147
|
]),
|
|
151
148
|
_: 1
|
|
152
|
-
}, 16, ["modelValue", "item-key"])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
149
|
+
}, 16, ["modelValue", "item-key"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, "未选字段"))
|
|
153
150
|
], 2)
|
|
154
151
|
], 2)
|
|
155
152
|
], 2)
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeClass, unref, createVNode, withCtx, createTextVNode, createElementVNode, Fragment, renderList,
|
|
1
|
+
import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeClass, unref, createVNode, withCtx, createTextVNode, createElementVNode, createBlock, Fragment, renderList, mergeProps, toDisplayString, withModifiers } from "vue";
|
|
2
2
|
import Draggable from "vuedraggable";
|
|
3
3
|
import { Dialogs } from "../../dialogs/index.js";
|
|
4
|
+
import { NoData } from "../../no-data/index.js";
|
|
4
5
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
5
6
|
import { ElButton, ElCheckbox } from "element-plus";
|
|
6
7
|
const _hoisted_1 = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "no-data"
|
|
9
10
|
};
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "no-data"
|
|
13
|
-
};
|
|
14
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
12
|
__name: "set-column",
|
|
16
13
|
props: {
|
|
@@ -106,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
103
|
checked: isChecked(item),
|
|
107
104
|
onChange: (is) => onChange(item, Boolean(is))
|
|
108
105
|
}, null, 8, ["class", "label", "value", "checked", "onChange"]);
|
|
109
|
-
}), 128)) : (openBlock(),
|
|
106
|
+
}), 128)) : (openBlock(), createBlock(unref(NoData), { key: 1 }))
|
|
110
107
|
], 2))
|
|
111
108
|
], 2),
|
|
112
109
|
createElementVNode("div", {
|
|
@@ -147,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
147
144
|
], 2)
|
|
148
145
|
]),
|
|
149
146
|
_: 1
|
|
150
|
-
}, 16, ["modelValue", "item-key"])) : (openBlock(), createElementBlock("div",
|
|
147
|
+
}, 16, ["modelValue", "item-key"])) : (openBlock(), createElementBlock("div", _hoisted_1, "未选字段"))
|
|
151
148
|
], 2)
|
|
152
149
|
], 2)
|
|
153
150
|
], 2)
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index$
|
|
4
|
+
const index$3 = require("element-plus/es/components/pagination/index");
|
|
5
5
|
require("../../../hooks/index.cjs");
|
|
6
|
-
const index = require("../../../hooks/
|
|
7
|
-
const index$1 = require("../../../hooks/
|
|
6
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
7
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
8
|
+
const index$2 = require("../../../hooks/inherit/index.cjs");
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: {
|
|
11
12
|
ispag: Boolean,
|
|
12
13
|
total: Number,
|
|
13
14
|
layout: String,
|
|
14
|
-
paginat: {
|
|
15
|
+
paginat: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
},
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
15
22
|
},
|
|
16
23
|
emits: ["size-change", "current-change"],
|
|
17
24
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
25
|
+
const { getLocale } = index.useLocale();
|
|
26
|
+
const cs = index$1.useCssName("paging");
|
|
27
|
+
const attrs = index$2.useInherit(vue.useAttrs());
|
|
20
28
|
const props = __props;
|
|
21
29
|
const emit = __emit;
|
|
22
30
|
const layout = vue.computed(() => {
|
|
@@ -40,7 +48,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
48
|
};
|
|
41
49
|
__expose({});
|
|
42
50
|
return (_ctx, _cache) => {
|
|
43
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
51
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElPagination), vue.mergeProps(vue.unref(attrs).assem, {
|
|
44
52
|
class: vue.unref(cs).z(),
|
|
45
53
|
"current-page": props.paginat.current,
|
|
46
54
|
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => props.paginat.current = $event),
|
|
@@ -55,9 +63,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
63
|
vue.createElementVNode("span", {
|
|
56
64
|
class: vue.normalizeClass(vue.unref(cs).z("slot"))
|
|
57
65
|
}, [
|
|
58
|
-
vue.createElementVNode("span", null,
|
|
59
|
-
vue.createElementVNode("span", null,
|
|
60
|
-
vue.createElementVNode("span", null,
|
|
66
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.total", props.paginat.current)), 1),
|
|
67
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.cur", ysalue.value)), 1),
|
|
68
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(getLocale)("pag.per", props.paginat.pageSize)), 1)
|
|
61
69
|
], 2)
|
|
62
70
|
]),
|
|
63
71
|
_: 1
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
2
|
import { ElPagination } from "element-plus/es/components/pagination/index";
|
|
3
3
|
import "../../../hooks/index.js";
|
|
4
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
4
5
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
5
6
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,10 +10,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
10
|
ispag: Boolean,
|
|
10
11
|
total: Number,
|
|
11
12
|
layout: String,
|
|
12
|
-
paginat: {
|
|
13
|
+
paginat: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default() {
|
|
16
|
+
return {};
|
|
17
|
+
},
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
13
20
|
},
|
|
14
21
|
emits: ["size-change", "current-change"],
|
|
15
22
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { getLocale } = useLocale();
|
|
16
24
|
const cs = useCssName("paging");
|
|
17
25
|
const attrs = useInherit(useAttrs());
|
|
18
26
|
const props = __props;
|
|
@@ -53,9 +61,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
61
|
createElementVNode("span", {
|
|
54
62
|
class: normalizeClass(unref(cs).z("slot"))
|
|
55
63
|
}, [
|
|
56
|
-
createElementVNode("span", null, "
|
|
57
|
-
createElementVNode("span", null, "
|
|
58
|
-
createElementVNode("span", null, "
|
|
64
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.total", props.paginat.current)), 1),
|
|
65
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.cur", ysalue.value)), 1),
|
|
66
|
+
createElementVNode("span", null, toDisplayString(unref(getLocale)("pag.per", props.paginat.pageSize)), 1)
|
|
59
67
|
], 2)
|
|
60
68
|
]),
|
|
61
69
|
_: 1
|