page-schema-enginer-shun 1.0.10 → 1.0.12
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/index.cjs.js +103 -126
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.es.js +105 -128
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +103 -126
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +4 -7
- package/package.json +1 -1
- package/dist/wigdets/operation-panel/operation-panel.vue.d.ts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
export { default as SchemaView } from './schema-view/schema-view.vue';
|
|
2
|
-
export { useSchema } from './schema-view/hooks/useSchema';
|
|
3
2
|
export * from './schema-view/type';
|
|
4
3
|
export { setRouterClient, navigate, back } from './schema-view/router';
|
|
5
|
-
export { default as SchemaForm } from './wigdets/schema-form/schema-form.vue';
|
|
6
|
-
export { default as SchemaSearchBar } from './wigdets/schema-search/schema-search-bar.vue';
|
|
7
|
-
export { default as SchemaTable } from './wigdets/schema-table/schema-table.vue';
|
|
8
|
-
export { default as OperationPanel } from './wigdets/operation-panel/operation-panel.vue';
|
|
9
|
-
export { default as FormatDate } from './wigdets/schema-table/schema-view/format-date/format-date.vue';
|
|
10
|
-
export { default as FormatEnum } from './wigdets/schema-table/schema-view/format-enum/format-enum.vue';
|
|
11
|
-
export { default as Tag } from './wigdets/schema-table/schema-view/tag/tag.vue';
|
|
12
|
-
export * from './wigdets/schema-search/schema-item-config';
|
|
13
|
-
export * from './wigdets/schema-table/schema-view/schema-table-item-config';
|
|
14
|
-
export * from './wigdets/schema-form/complex-view/form-item-config';
|
|
15
|
-
export * from './wigdets/utls/date';
|
|
16
4
|
export type { RequestFn } from './http';
|
|
17
5
|
export { setRequestClient, request } from './http';
|
|
18
6
|
export { default as service, setRequestAdapter } from './utils/request';
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, ref as ref$1, watch, onMounted, resolveComponent as resolveComponent$1, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, toDisplayString, mergeProps, withCtx, Fragment, renderList, createBlock, createTextVNode, provide, resolveDynamicComponent, unref, toRefs, computed, resolveDirective, withDirectives,
|
|
1
|
+
import { defineComponent, inject, ref as ref$1, watch, onMounted, resolveComponent as resolveComponent$1, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, toDisplayString, mergeProps, withCtx, Fragment, renderList, createBlock, createTextVNode, provide, resolveDynamicComponent, unref, toRefs, computed, resolveDirective, withDirectives, nextTick, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import { defineStore } from "pinia";
|
|
4
4
|
import { ElNotification, ElMessage, ElMessageBox } from "element-plus";
|
|
@@ -26,15 +26,15 @@ const useUserStore = defineStore("user", {
|
|
|
26
26
|
name: "DemoUser"
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
|
-
const _hoisted_1$
|
|
29
|
+
const _hoisted_1$b = { class: "schema-form-input-container" };
|
|
30
30
|
const _hoisted_2$5 = { class: "schema-form-input" };
|
|
31
|
-
const _hoisted_3$
|
|
31
|
+
const _hoisted_3$4 = { class: "schema-form-input-item-label" };
|
|
32
32
|
const _hoisted_4$2 = { key: 0 };
|
|
33
33
|
const _hoisted_5 = {
|
|
34
34
|
key: 0,
|
|
35
35
|
style: { "color": "red", "margin-top": "10px" }
|
|
36
36
|
};
|
|
37
|
-
const _sfc_main$
|
|
37
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
38
38
|
__name: "input",
|
|
39
39
|
props: ["model", "ItemKey", "schema"],
|
|
40
40
|
setup(__props, { expose: __expose }) {
|
|
@@ -92,9 +92,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
92
92
|
return (_ctx, _cache) => {
|
|
93
93
|
var _a, _b;
|
|
94
94
|
const _component_el_input = resolveComponent$1("el-input");
|
|
95
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
95
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
96
96
|
createElementVNode("div", _hoisted_2$5, [
|
|
97
|
-
createElementVNode("span", _hoisted_3$
|
|
97
|
+
createElementVNode("span", _hoisted_3$4, toDisplayString((_a = __props.schema) == null ? void 0 : _a.label), 1),
|
|
98
98
|
((_b = __props.schema.option) == null ? void 0 : _b.required) ? (openBlock(), createElementBlock("span", _hoisted_4$2, "*")) : createCommentVNode("", true),
|
|
99
99
|
createVNode(_component_el_input, mergeProps({
|
|
100
100
|
modelValue: dataValue.value,
|
|
@@ -116,12 +116,12 @@ const _export_sfc = (sfc, props) => {
|
|
|
116
116
|
}
|
|
117
117
|
return target;
|
|
118
118
|
};
|
|
119
|
-
const input = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
120
|
-
const _hoisted_1$
|
|
119
|
+
const input = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-5d94c475"]]);
|
|
120
|
+
const _hoisted_1$a = { class: "schema-form-radio-container" };
|
|
121
121
|
const _hoisted_2$4 = { class: "schema-form-radio" };
|
|
122
|
-
const _hoisted_3$
|
|
122
|
+
const _hoisted_3$3 = { class: "schema-form-radio-label" };
|
|
123
123
|
const _hoisted_4$1 = { key: 0 };
|
|
124
|
-
const _sfc_main$
|
|
124
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
125
125
|
__name: "radio",
|
|
126
126
|
props: ["model", "ItemKey", "schema"],
|
|
127
127
|
setup(__props, { expose: __expose }) {
|
|
@@ -164,9 +164,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
164
164
|
return (_ctx, _cache) => {
|
|
165
165
|
const _component_el_radio = resolveComponent$1("el-radio");
|
|
166
166
|
const _component_el_radio_group = resolveComponent$1("el-radio-group");
|
|
167
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
167
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
168
168
|
createElementVNode("div", _hoisted_2$4, [
|
|
169
|
-
createElementVNode("span", _hoisted_3$
|
|
169
|
+
createElementVNode("span", _hoisted_3$3, toDisplayString(__props.schema.label), 1),
|
|
170
170
|
createVNode(_component_el_radio_group, {
|
|
171
171
|
modelValue: radioData.value,
|
|
172
172
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => radioData.value = $event)
|
|
@@ -193,11 +193,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
|
-
const radio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
197
|
-
const _hoisted_1$
|
|
196
|
+
const radio = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a791fef4"]]);
|
|
197
|
+
const _hoisted_1$9 = { class: "schema-form-input-number-container" };
|
|
198
198
|
const _hoisted_2$3 = { class: "schema-form-input-number" };
|
|
199
|
-
const _hoisted_3$
|
|
200
|
-
const _sfc_main$
|
|
199
|
+
const _hoisted_3$2 = { class: "schema-form-input-number-label" };
|
|
200
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
201
201
|
__name: "input-number",
|
|
202
202
|
props: ["model", "ItemKey", "schema"],
|
|
203
203
|
setup(__props, { expose: __expose }) {
|
|
@@ -233,9 +233,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
233
233
|
});
|
|
234
234
|
return (_ctx, _cache) => {
|
|
235
235
|
const _component_el_input_number = resolveComponent$1("el-input-number");
|
|
236
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
236
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
237
237
|
createElementVNode("div", _hoisted_2$3, [
|
|
238
|
-
createElementVNode("div", _hoisted_3$
|
|
238
|
+
createElementVNode("div", _hoisted_3$2, toDisplayString(__props.schema.label), 1),
|
|
239
239
|
createVNode(_component_el_input_number, mergeProps({
|
|
240
240
|
modelValue: num.value,
|
|
241
241
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => num.value = $event)
|
|
@@ -245,12 +245,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
|
-
const inputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
249
|
-
const _hoisted_1$
|
|
248
|
+
const inputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-44583072"]]);
|
|
249
|
+
const _hoisted_1$8 = { class: "schema-form-select-container" };
|
|
250
250
|
const _hoisted_2$2 = { class: "schema-form-select" };
|
|
251
|
-
const _hoisted_3 = { class: "schema-form-select-label" };
|
|
251
|
+
const _hoisted_3$1 = { class: "schema-form-select-label" };
|
|
252
252
|
const _hoisted_4 = { key: 0 };
|
|
253
|
-
const _sfc_main$
|
|
253
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
254
254
|
__name: "select",
|
|
255
255
|
props: ["model", "ItemKey", "schema"],
|
|
256
256
|
setup(__props, { expose: __expose }) {
|
|
@@ -293,9 +293,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
293
293
|
return (_ctx, _cache) => {
|
|
294
294
|
const _component_el_option = resolveComponent$1("el-option");
|
|
295
295
|
const _component_el_select = resolveComponent$1("el-select");
|
|
296
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
296
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
297
297
|
createElementVNode("div", _hoisted_2$2, [
|
|
298
|
-
createElementVNode("span", _hoisted_3, toDisplayString(__props.schema.label), 1),
|
|
298
|
+
createElementVNode("span", _hoisted_3$1, toDisplayString(__props.schema.label), 1),
|
|
299
299
|
createVNode(_component_el_select, {
|
|
300
300
|
modelValue: selectData.value,
|
|
301
301
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectData.value = $event),
|
|
@@ -318,7 +318,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
});
|
|
321
|
-
const select = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
321
|
+
const select = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-65d85e93"]]);
|
|
322
322
|
const formItemConfig = {
|
|
323
323
|
input: {
|
|
324
324
|
component: input
|
|
@@ -6480,11 +6480,11 @@ const AjvNS = /* @__PURE__ */ _mergeNamespaces({
|
|
|
6480
6480
|
__proto__: null,
|
|
6481
6481
|
default: ajv_default
|
|
6482
6482
|
}, [ajvExports]);
|
|
6483
|
-
const _hoisted_1$
|
|
6483
|
+
const _hoisted_1$7 = {
|
|
6484
6484
|
key: 0,
|
|
6485
6485
|
class: "schema-form-complex-view"
|
|
6486
6486
|
};
|
|
6487
|
-
const _sfc_main$
|
|
6487
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
6488
6488
|
__name: "schema-form",
|
|
6489
6489
|
props: {
|
|
6490
6490
|
schema: {},
|
|
@@ -6525,7 +6525,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6525
6525
|
});
|
|
6526
6526
|
provide("ajvInstance", ajvInstance);
|
|
6527
6527
|
return (_ctx, _cache) => {
|
|
6528
|
-
return __props.schema && __props.schema.properties ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6528
|
+
return __props.schema && __props.schema.properties ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
6529
6529
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.schema.properties, (value, key) => {
|
|
6530
6530
|
var _a, _b;
|
|
6531
6531
|
return openBlock(), createElementBlock(Fragment, { key }, [
|
|
@@ -6544,7 +6544,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6544
6544
|
};
|
|
6545
6545
|
}
|
|
6546
6546
|
});
|
|
6547
|
-
const schemaForm = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6547
|
+
const schemaForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-eb150555"]]);
|
|
6548
6548
|
let requestFn = null;
|
|
6549
6549
|
function setRequestClient(fn) {
|
|
6550
6550
|
requestFn = fn;
|
|
@@ -6554,8 +6554,8 @@ function request(options) {
|
|
|
6554
6554
|
console.log("requestrequestrequest");
|
|
6555
6555
|
return requestFn(options);
|
|
6556
6556
|
}
|
|
6557
|
-
const _hoisted_1$
|
|
6558
|
-
const _sfc_main$
|
|
6557
|
+
const _hoisted_1$6 = { class: "createForm" };
|
|
6558
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
6559
6559
|
__name: "createForm",
|
|
6560
6560
|
emits: ["command"],
|
|
6561
6561
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -6602,7 +6602,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6602
6602
|
return (_ctx, _cache) => {
|
|
6603
6603
|
const _component_el_button = resolveComponent$1("el-button");
|
|
6604
6604
|
const _component_el_dialog = resolveComponent$1("el-dialog");
|
|
6605
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6605
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
6606
6606
|
createVNode(_component_el_dialog, {
|
|
6607
6607
|
modelValue: isShow.value,
|
|
6608
6608
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isShow.value = $event),
|
|
@@ -6646,9 +6646,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6646
6646
|
};
|
|
6647
6647
|
}
|
|
6648
6648
|
});
|
|
6649
|
-
const createFormC = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6650
|
-
const _hoisted_1$
|
|
6651
|
-
const _sfc_main$
|
|
6649
|
+
const createFormC = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-cb04a018"]]);
|
|
6650
|
+
const _hoisted_1$5 = { class: "editForm" };
|
|
6651
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
6652
6652
|
__name: "editForm",
|
|
6653
6653
|
emits: ["command"],
|
|
6654
6654
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -6705,7 +6705,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6705
6705
|
return (_ctx, _cache) => {
|
|
6706
6706
|
const _component_el_button = resolveComponent$1("el-button");
|
|
6707
6707
|
const _component_el_dialog = resolveComponent$1("el-dialog");
|
|
6708
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6708
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
6709
6709
|
createVNode(_component_el_dialog, {
|
|
6710
6710
|
modelValue: isDrawer.value,
|
|
6711
6711
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isDrawer.value = $event),
|
|
@@ -6746,10 +6746,10 @@ const componentConfig = {
|
|
|
6746
6746
|
component: createFormC
|
|
6747
6747
|
},
|
|
6748
6748
|
editForm: {
|
|
6749
|
-
component: _sfc_main$
|
|
6749
|
+
component: _sfc_main$9
|
|
6750
6750
|
}
|
|
6751
6751
|
};
|
|
6752
|
-
const _sfc_main$
|
|
6752
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
6753
6753
|
__name: "tag",
|
|
6754
6754
|
props: {
|
|
6755
6755
|
row: {
|
|
@@ -6777,7 +6777,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
6777
6777
|
};
|
|
6778
6778
|
}
|
|
6779
6779
|
});
|
|
6780
|
-
const _sfc_main$
|
|
6780
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6781
6781
|
__name: "format-enum",
|
|
6782
6782
|
props: {
|
|
6783
6783
|
row: {
|
|
@@ -6858,20 +6858,7 @@ function formatDate(input2, pattern2 = "yyyy-MM-dd hh:mm:ss") {
|
|
|
6858
6858
|
}
|
|
6859
6859
|
return result;
|
|
6860
6860
|
}
|
|
6861
|
-
|
|
6862
|
-
return formatDate(times, pattern2 ?? "yyyy-MM-dd hh:mm:ss");
|
|
6863
|
-
}
|
|
6864
|
-
function computedAge(birthday) {
|
|
6865
|
-
const birthDate = new Date(birthday);
|
|
6866
|
-
const today = /* @__PURE__ */ new Date();
|
|
6867
|
-
let age = today.getFullYear() - birthDate.getFullYear();
|
|
6868
|
-
const monthDifference = today.getMonth() - birthDate.getMonth();
|
|
6869
|
-
if (monthDifference < 0 || monthDifference === 0 && today.getDate() < birthDate.getDate()) {
|
|
6870
|
-
age--;
|
|
6871
|
-
}
|
|
6872
|
-
return age;
|
|
6873
|
-
}
|
|
6874
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6861
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
6875
6862
|
__name: "format-date",
|
|
6876
6863
|
props: {
|
|
6877
6864
|
row: {
|
|
@@ -6912,18 +6899,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
6912
6899
|
});
|
|
6913
6900
|
const tableConfig = {
|
|
6914
6901
|
tag: {
|
|
6915
|
-
component: _sfc_main$
|
|
6902
|
+
component: _sfc_main$8
|
|
6916
6903
|
},
|
|
6917
6904
|
formatEnum: {
|
|
6918
|
-
component: _sfc_main$
|
|
6905
|
+
component: _sfc_main$7
|
|
6919
6906
|
},
|
|
6920
6907
|
formatDate: {
|
|
6921
|
-
component: _sfc_main$
|
|
6908
|
+
component: _sfc_main$6
|
|
6922
6909
|
}
|
|
6923
6910
|
};
|
|
6924
|
-
const _hoisted_1$
|
|
6925
|
-
const _hoisted_2$1 = {
|
|
6926
|
-
const
|
|
6911
|
+
const _hoisted_1$4 = { class: "schema-table" };
|
|
6912
|
+
const _hoisted_2$1 = { key: 1 };
|
|
6913
|
+
const _hoisted_3 = { class: "gva-pagination" };
|
|
6914
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
6927
6915
|
__name: "schema-table",
|
|
6928
6916
|
props: {
|
|
6929
6917
|
schema: {},
|
|
@@ -6955,23 +6943,28 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6955
6943
|
}
|
|
6956
6944
|
if (loading.value) return;
|
|
6957
6945
|
showLoding();
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6946
|
+
try {
|
|
6947
|
+
const res = await request({
|
|
6948
|
+
url: __props.api.getList,
|
|
6949
|
+
method: "get",
|
|
6950
|
+
params: {
|
|
6951
|
+
...__props.apiParms,
|
|
6952
|
+
page: currentPage.value,
|
|
6953
|
+
pageSize: pageSize.value
|
|
6954
|
+
}
|
|
6955
|
+
});
|
|
6956
|
+
if (!res || !res.data) {
|
|
6957
|
+
return;
|
|
6965
6958
|
}
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6959
|
+
tableData.value = buildTableData(res.data.list) || [];
|
|
6960
|
+
total.value = Number(
|
|
6961
|
+
((_a = res.data) == null ? void 0 : _a.total) ?? ((_b = res.data) == null ? void 0 : _b.count) ?? ((_d = (_c = res.data) == null ? void 0 : _c.pagination) == null ? void 0 : _d.total) ?? 0
|
|
6962
|
+
);
|
|
6963
|
+
} catch (err) {
|
|
6964
|
+
ElMessage.error((err == null ? void 0 : err.message) || "加载表格数据失败");
|
|
6965
|
+
} finally {
|
|
6966
|
+
hideLoding();
|
|
6970
6967
|
}
|
|
6971
|
-
tableData.value = buildTableData(res.data.list) || [];
|
|
6972
|
-
total.value = Number(
|
|
6973
|
-
((_a = res.data) == null ? void 0 : _a.total) ?? ((_b = res.data) == null ? void 0 : _b.count) ?? ((_d = (_c = res.data) == null ? void 0 : _c.pagination) == null ? void 0 : _d.total) ?? 0
|
|
6974
|
-
);
|
|
6975
6968
|
};
|
|
6976
6969
|
const initData = () => {
|
|
6977
6970
|
currentPage.value = 1;
|
|
@@ -7014,7 +7007,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7014
7007
|
timer = setTimeout(async () => {
|
|
7015
7008
|
await fetDatbleData();
|
|
7016
7009
|
timer = null;
|
|
7017
|
-
},
|
|
7010
|
+
}, 300);
|
|
7018
7011
|
};
|
|
7019
7012
|
const showLoding = () => {
|
|
7020
7013
|
loading.value = true;
|
|
@@ -7046,7 +7039,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7046
7039
|
const _component_el_table = resolveComponent$1("el-table");
|
|
7047
7040
|
const _component_el_pagination = resolveComponent$1("el-pagination");
|
|
7048
7041
|
const _directive_loading = resolveDirective("loading");
|
|
7049
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7042
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
7050
7043
|
__props.schema && __props.schema.properties ? withDirectives((openBlock(), createBlock(_component_el_table, {
|
|
7051
7044
|
key: 0,
|
|
7052
7045
|
data: tableData.value,
|
|
@@ -7057,26 +7050,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7057
7050
|
var _a;
|
|
7058
7051
|
return [
|
|
7059
7052
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.schema.properties, (value, keyItem) => {
|
|
7060
|
-
var _a2
|
|
7053
|
+
var _a2;
|
|
7061
7054
|
return openBlock(), createElementBlock(Fragment, { key: keyItem }, [
|
|
7062
7055
|
((_a2 = value.option) == null ? void 0 : _a2.visible) !== false ? (openBlock(), createBlock(_component_el_table_column, mergeProps({
|
|
7063
7056
|
key: 0,
|
|
7064
7057
|
prop: keyItem,
|
|
7065
7058
|
label: value.label
|
|
7066
|
-
}, { ref_for: true }, value.option),
|
|
7067
|
-
((
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
(openBlock(), createBlock(resolveDynamicComponent(buildComponetnName(value.option.comType)), {
|
|
7071
|
-
|
|
7059
|
+
}, { ref_for: true }, value.option), {
|
|
7060
|
+
default: withCtx((scope2) => {
|
|
7061
|
+
var _a3, _b;
|
|
7062
|
+
return [
|
|
7063
|
+
((_a3 = value.option) == null ? void 0 : _a3.comType) ? (openBlock(), createBlock(resolveDynamicComponent(buildComponetnName(value.option.comType)), {
|
|
7064
|
+
key: 0,
|
|
7065
|
+
row: (scope2 == null ? void 0 : scope2.row) || {},
|
|
7072
7066
|
column: value,
|
|
7073
|
-
index: scope2.$index,
|
|
7067
|
+
index: (scope2 == null ? void 0 : scope2.$index) ?? 0,
|
|
7074
7068
|
itemKey: keyItem
|
|
7075
|
-
}, null, 8, ["row", "column", "index", "itemKey"]))
|
|
7076
|
-
]
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7069
|
+
}, null, 8, ["row", "column", "index", "itemKey"])) : (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(((_b = scope2 == null ? void 0 : scope2.row) == null ? void 0 : _b[keyItem]) ?? ""), 1))
|
|
7070
|
+
];
|
|
7071
|
+
}),
|
|
7072
|
+
_: 2
|
|
7073
|
+
}, 1040, ["prop", "label"])) : createCommentVNode("", true)
|
|
7080
7074
|
], 64);
|
|
7081
7075
|
}), 128)),
|
|
7082
7076
|
((_a = __props.buttons) == null ? void 0 : _a.length) > 0 ? (openBlock(), createBlock(_component_el_table_column, {
|
|
@@ -7088,7 +7082,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7088
7082
|
default: withCtx((scope2) => [
|
|
7089
7083
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.buttons, (item, index) => {
|
|
7090
7084
|
return openBlock(), createBlock(_component_el_button, mergeProps({ key: index }, { ref_for: true }, item, {
|
|
7091
|
-
onClick: ($event) => operatetionHandler({ btnConfig: item, rowData: scope2.row })
|
|
7085
|
+
onClick: ($event) => operatetionHandler({ btnConfig: item, rowData: (scope2 == null ? void 0 : scope2.row) || {} })
|
|
7092
7086
|
}), {
|
|
7093
7087
|
default: withCtx(() => [
|
|
7094
7088
|
createTextVNode(toDisplayString(item.label), 1)
|
|
@@ -7105,7 +7099,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7105
7099
|
}, 8, ["data"])), [
|
|
7106
7100
|
[_directive_loading, loading.value]
|
|
7107
7101
|
]) : createCommentVNode("", true),
|
|
7108
|
-
createElementVNode("div",
|
|
7102
|
+
createElementVNode("div", _hoisted_3, [
|
|
7109
7103
|
createVNode(_component_el_pagination, {
|
|
7110
7104
|
layout: "total, prev, pager, next, sizes",
|
|
7111
7105
|
total: total.value,
|
|
@@ -7119,10 +7113,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7119
7113
|
};
|
|
7120
7114
|
}
|
|
7121
7115
|
});
|
|
7122
|
-
const SchemaTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7123
|
-
const _hoisted_1$
|
|
7116
|
+
const SchemaTable = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-5d41e7cf"]]);
|
|
7117
|
+
const _hoisted_1$3 = { class: "table-panel" };
|
|
7124
7118
|
const _hoisted_2 = { class: "operation-panel" };
|
|
7125
|
-
const _sfc_main$
|
|
7119
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
7126
7120
|
__name: "table-panel",
|
|
7127
7121
|
emits: ["operate"],
|
|
7128
7122
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -7164,7 +7158,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
7164
7158
|
var _a, _b;
|
|
7165
7159
|
const _component_el_button = resolveComponent$1("el-button");
|
|
7166
7160
|
const _component_el_row = resolveComponent$1("el-row");
|
|
7167
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7161
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
7168
7162
|
createElementVNode("div", _hoisted_2, [
|
|
7169
7163
|
((_a = unref(tableConfig2)) == null ? void 0 : _a.headerButtons.length) > 0 ? (openBlock(), createBlock(_component_el_row, { key: 0 }, {
|
|
7170
7164
|
default: withCtx(() => {
|
|
@@ -7204,8 +7198,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
7204
7198
|
};
|
|
7205
7199
|
}
|
|
7206
7200
|
});
|
|
7207
|
-
const tablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7208
|
-
const _sfc_main$
|
|
7201
|
+
const tablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-cef68da3"]]);
|
|
7202
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
7209
7203
|
__name: "input",
|
|
7210
7204
|
props: {
|
|
7211
7205
|
schemaKey: {
|
|
@@ -7247,11 +7241,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
7247
7241
|
});
|
|
7248
7242
|
const SearchConfig = {
|
|
7249
7243
|
input: {
|
|
7250
|
-
component: _sfc_main$
|
|
7244
|
+
component: _sfc_main$3
|
|
7251
7245
|
}
|
|
7252
7246
|
};
|
|
7253
|
-
const _hoisted_1$
|
|
7254
|
-
const _sfc_main$
|
|
7247
|
+
const _hoisted_1$2 = { class: "gva-search-box" };
|
|
7248
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7255
7249
|
__name: "schema-search-bar",
|
|
7256
7250
|
props: {
|
|
7257
7251
|
schema: {},
|
|
@@ -7306,7 +7300,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7306
7300
|
const _component_el_form_item = resolveComponent$1("el-form-item");
|
|
7307
7301
|
const _component_el_button = resolveComponent$1("el-button");
|
|
7308
7302
|
const _component_el_form = resolveComponent$1("el-form");
|
|
7309
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7303
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
7310
7304
|
createVNode(_component_el_form, {
|
|
7311
7305
|
inline: true,
|
|
7312
7306
|
class: "flex items-center justify-start flex-wrap"
|
|
@@ -7358,8 +7352,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7358
7352
|
};
|
|
7359
7353
|
}
|
|
7360
7354
|
});
|
|
7361
|
-
const _hoisted_1$
|
|
7362
|
-
const _sfc_main$
|
|
7355
|
+
const _hoisted_1$1 = { class: "search-panel" };
|
|
7356
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7363
7357
|
__name: "search-panel",
|
|
7364
7358
|
props: {},
|
|
7365
7359
|
emits: ["Search", "Reset"],
|
|
@@ -7372,8 +7366,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7372
7366
|
onMounted(() => {
|
|
7373
7367
|
});
|
|
7374
7368
|
return (_ctx, _cache) => {
|
|
7375
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7376
|
-
createVNode(_sfc_main$
|
|
7369
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
7370
|
+
createVNode(_sfc_main$2, {
|
|
7377
7371
|
schema: unref(searchSchema),
|
|
7378
7372
|
schemaConfig: unref(serachConfig),
|
|
7379
7373
|
onSearch: handleSearch
|
|
@@ -7382,7 +7376,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7382
7376
|
};
|
|
7383
7377
|
}
|
|
7384
7378
|
});
|
|
7385
|
-
const searchPanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7379
|
+
const searchPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-633fcc6e"]]);
|
|
7386
7380
|
const useSchema = (schemaConfigDoc) => {
|
|
7387
7381
|
const {
|
|
7388
7382
|
api,
|
|
@@ -7464,8 +7458,8 @@ const useSchema = (schemaConfigDoc) => {
|
|
|
7464
7458
|
components
|
|
7465
7459
|
};
|
|
7466
7460
|
};
|
|
7467
|
-
const _hoisted_1
|
|
7468
|
-
const _sfc_main
|
|
7461
|
+
const _hoisted_1 = { class: "schema-view" };
|
|
7462
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7469
7463
|
__name: "schema-view",
|
|
7470
7464
|
props: {
|
|
7471
7465
|
config: {}
|
|
@@ -7563,7 +7557,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7563
7557
|
components
|
|
7564
7558
|
});
|
|
7565
7559
|
return (_ctx, _cache) => {
|
|
7566
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
7560
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7567
7561
|
createVNode(searchPanel, {
|
|
7568
7562
|
onSearch: handleSearch,
|
|
7569
7563
|
onReset: handleReset
|
|
@@ -7586,7 +7580,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7586
7580
|
};
|
|
7587
7581
|
}
|
|
7588
7582
|
});
|
|
7589
|
-
const schemaView = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
7583
|
+
const schemaView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6aa05693"]]);
|
|
7590
7584
|
let routerClient = null;
|
|
7591
7585
|
function setRouterClient(client) {
|
|
7592
7586
|
routerClient = client;
|
|
@@ -7600,12 +7594,6 @@ function back() {
|
|
|
7600
7594
|
if (!routerClient || !routerClient.back) return;
|
|
7601
7595
|
return routerClient.back();
|
|
7602
7596
|
}
|
|
7603
|
-
const _sfc_main = {};
|
|
7604
|
-
const _hoisted_1 = { class: "operation-panel-placeholder" };
|
|
7605
|
-
function _sfc_render(_ctx, _cache) {
|
|
7606
|
-
return openBlock(), createElementBlock("div", _hoisted_1);
|
|
7607
|
-
}
|
|
7608
|
-
const operationPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e002ae22"]]);
|
|
7609
7597
|
let requestAdapter;
|
|
7610
7598
|
const setRequestAdapter = (adapter) => {
|
|
7611
7599
|
console.log("设置requestAdapter", adapter);
|
|
@@ -7616,24 +7604,13 @@ const service = async (config) => {
|
|
|
7616
7604
|
return requestAdapter(config);
|
|
7617
7605
|
};
|
|
7618
7606
|
export {
|
|
7619
|
-
_sfc_main$7 as FormatDate,
|
|
7620
|
-
_sfc_main$8 as FormatEnum,
|
|
7621
|
-
operationPanel as OperationPanel,
|
|
7622
|
-
schemaForm as SchemaForm,
|
|
7623
|
-
_sfc_main$3 as SchemaSearchBar,
|
|
7624
|
-
SchemaTable,
|
|
7625
7607
|
schemaView as SchemaView,
|
|
7626
|
-
_sfc_main$9 as Tag,
|
|
7627
7608
|
back,
|
|
7628
|
-
computedAge,
|
|
7629
|
-
formatDate,
|
|
7630
|
-
formatTimeToStr,
|
|
7631
7609
|
navigate,
|
|
7632
7610
|
request,
|
|
7633
7611
|
service,
|
|
7634
7612
|
setRequestAdapter,
|
|
7635
7613
|
setRequestClient,
|
|
7636
|
-
setRouterClient
|
|
7637
|
-
useSchema
|
|
7614
|
+
setRouterClient
|
|
7638
7615
|
};
|
|
7639
7616
|
//# sourceMappingURL=index.es.js.map
|