@web-utils/component 2.7.3 → 2.7.4

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.
Files changed (127) hide show
  1. package/dist/chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js +302 -0
  2. package/dist/chunks/ConfigArray.vue_vue_type_template_lang.66483daa.js +51 -0
  3. package/dist/chunks/ConfigColor.vue_vue_type_template_lang.cd880091.js +24 -0
  4. package/dist/chunks/ConfigCustom.vue_vue_type_template_lang.6e03d7fd.js +52 -0
  5. package/dist/chunks/ConfigDate.vue_vue_type_template_lang.420fa897.js +104 -0
  6. package/dist/chunks/ConfigDynamic.vue_vue_type_template_lang.82d24ab0.js +133 -0
  7. package/dist/chunks/ConfigEvent.vue_vue_type_template_lang.5e8ed6cc.js +96 -0
  8. package/dist/chunks/ConfigGroup.vue_vue_type_template_lang.44117322.js +48 -0
  9. package/dist/chunks/ConfigInput.vue_vue_type_template_lang.cc1eb052.js +96 -0
  10. package/dist/chunks/ConfigMap.vue_vue_type_template_lang.daee4d38.js +31 -0
  11. package/dist/chunks/ConfigNumber.vue_vue_type_template_lang.d60231d7.js +130 -0
  12. package/dist/chunks/ConfigRate.vue_vue_type_style_index_0_scoped_true_lang.cf5d437d.js +125 -0
  13. package/dist/chunks/ConfigSelect.vue_vue_type_template_lang.7db7e57f.js +483 -0
  14. package/dist/chunks/ConfigSlider.vue_vue_type_template_lang.27b8cc7b.js +99 -0
  15. package/dist/chunks/ConfigSwitch.vue_vue_type_style_index_0_scoped_true_lang.4caf1bd0.js +54 -0
  16. package/dist/chunks/ConfigTable.vue_vue_type_template_lang.3e8136d9.js +341 -0
  17. package/dist/chunks/ConfigTextarea.vue_vue_type_template_lang.5cddf41c.js +88 -0
  18. package/dist/chunks/ConfigTitle.vue_vue_type_template_lang.57d9deb5.js +87 -0
  19. package/dist/chunks/ConfigTree.vue_vue_type_style_index_0_scoped_true_lang.3770c37e.js +464 -0
  20. package/dist/chunks/ConfigUEditor.vue_vue_type_template_lang.9726b4f5.js +240 -0
  21. package/dist/chunks/ConfigUpload.vue_vue_type_template_lang.531a9b2a.js +471 -0
  22. package/dist/chunks/FormConfig.vue_vue_type_template_lang.85b4ee87.js +232 -0
  23. package/dist/chunks/WidgetConfig.vue_vue_type_template_lang.f903c9b2.js +1765 -0
  24. package/dist/chunks/WidgetForm.vue_vue_type_template_lang.82248338.js +242 -0
  25. package/dist/chunks/WidgetFormGroup.vue_vue_type_template_lang.c636aabd.js +266 -0
  26. package/dist/chunks/WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js +24 -0
  27. package/dist/chunks/WidgetFormTable.vue_vue_type_template_lang.30625146.js +228 -0
  28. package/dist/chunks/{dataformat.3cfcf62c.js → dataformat.d3fd2d1b.js} +25 -24
  29. package/dist/chunks/{detail.a3249549.js → detail.ac4d421a.js} +7 -7
  30. package/dist/chunks/{dic.5f7e3523.js → dic.79d9f595.js} +28 -27
  31. package/dist/chunks/{event.b76c568a.js → event.43b42228.js} +7 -6
  32. package/dist/chunks/{init.352281f5.js → init.3b47bb80.js} +8 -7
  33. package/dist/chunks/{packages.5d7a86c4.js → packages.6f252850.js} +5 -61
  34. package/dist/chunks/{util.5053d54e.js → util.80e28481.js} +37 -51
  35. package/dist/components/afd-column/index.js +54 -0
  36. package/dist/components/chat/index.js +1 -1
  37. package/dist/components/code/index.js +1 -1
  38. package/dist/components/column/index.js +8 -7
  39. package/dist/components/column-default/index.js +1 -1
  40. package/dist/components/column-dynamic/index.js +1 -1
  41. package/dist/components/column-menu/index.js +1 -1
  42. package/dist/components/column-slot/index.js +27 -26
  43. package/dist/components/config-array/index.js +26 -0
  44. package/dist/components/config-color/index.js +26 -0
  45. package/dist/components/config-custom/index.js +60 -0
  46. package/dist/components/config-date/index.js +26 -0
  47. package/dist/components/config-dynamic/index.js +26 -0
  48. package/dist/components/config-event/index.js +72 -0
  49. package/dist/components/config-group/index.js +34 -0
  50. package/dist/components/config-input/index.js +26 -0
  51. package/dist/components/config-map/index.js +26 -0
  52. package/dist/components/config-number/index.js +26 -0
  53. package/dist/components/config-rate/index.js +69 -0
  54. package/dist/components/config-rate/style.css +1 -0
  55. package/dist/components/config-select/index.js +88 -0
  56. package/dist/components/config-slider/index.js +26 -0
  57. package/dist/components/config-switch/index.js +31 -0
  58. package/dist/components/config-switch/style.css +1 -0
  59. package/dist/components/config-table/index.js +120 -0
  60. package/dist/components/config-textarea/index.js +26 -0
  61. package/dist/components/config-title/index.js +31 -0
  62. package/dist/components/config-tree/index.js +120 -0
  63. package/dist/components/config-tree/style.css +1 -0
  64. package/dist/components/config-u-editor/index.js +32 -0
  65. package/dist/components/config-upload/index.js +56 -0
  66. package/dist/components/custom-scrollbar/index.js +6 -1
  67. package/dist/components/dialog-excel/index.js +2 -2
  68. package/dist/components/dialog-filter/index.js +1 -1
  69. package/dist/components/dialog-form/index.js +8 -7
  70. package/dist/components/flex-item/index.js +4 -1
  71. package/dist/components/flow/index.js +1 -1
  72. package/dist/components/flow-node/index.js +1 -1
  73. package/dist/components/form-config/index.js +26 -0
  74. package/dist/components/form-group/index.js +1 -1
  75. package/dist/components/form-temp/index.js +2 -2
  76. package/dist/components/{array → fy-array}/index.js +5 -5
  77. package/dist/components/{array → fy-array}/style.css +0 -0
  78. package/dist/components/fy-cascader/index.js +1 -1
  79. package/dist/components/fy-checkbox/index.js +1 -1
  80. package/dist/components/fy-curd/index.js +7 -6
  81. package/dist/components/fy-date/index.js +1 -1
  82. package/dist/components/fy-dialog-form/index.js +9 -8
  83. package/dist/components/{draggable → fy-draggable}/index.js +2 -2
  84. package/dist/components/{draggable → fy-draggable}/style.css +0 -0
  85. package/dist/components/fy-dynamic/index.js +2 -2
  86. package/dist/components/{empty → fy-empty}/index.js +6 -6
  87. package/dist/components/{empty → fy-empty}/style.css +0 -0
  88. package/dist/components/fy-form/index.js +9 -8
  89. package/dist/components/fy-form-design/index.js +1371 -0
  90. package/dist/components/fy-form-design/style.css +1 -0
  91. package/dist/components/fy-input/index.js +1 -1
  92. package/dist/components/fy-input-color/index.js +1 -1
  93. package/dist/components/fy-input-icon/index.js +1 -1
  94. package/dist/components/fy-input-map/index.js +4 -4
  95. package/dist/components/fy-input-number/index.js +1 -1
  96. package/dist/components/fy-input-table/index.js +4 -4
  97. package/dist/components/fy-input-tree/index.js +2 -2
  98. package/dist/components/fy-radio/index.js +1 -1
  99. package/dist/components/fy-rate/index.js +1 -1
  100. package/dist/components/fy-select/index.js +18 -17
  101. package/dist/components/fy-slider/index.js +2 -2
  102. package/dist/components/fy-switch/index.js +1 -1
  103. package/dist/components/fy-time/index.js +2 -2
  104. package/dist/components/fy-title/index.js +1 -1
  105. package/dist/components/fy-tree/index.js +7 -6
  106. package/dist/components/fy-upload/index.js +11 -10
  107. package/dist/components/header-menu/index.js +1 -1
  108. package/dist/components/header-search/index.js +2 -2
  109. package/dist/components/license/index.js +5 -5
  110. package/dist/components/login/index.js +9 -8
  111. package/dist/components/record-video/index.js +1 -1
  112. package/dist/components/search/index.js +10 -9
  113. package/dist/components/sign/index.js +1 -1
  114. package/dist/components/table-column/index.js +4 -1
  115. package/dist/components/table-page/index.js +1 -1
  116. package/dist/components/text-ellipsis/index.js +1 -1
  117. package/dist/components/verify/index.js +1 -1
  118. package/dist/components/watermark/index.js +5 -1
  119. package/dist/components/widget-config/index.js +107 -0
  120. package/dist/components/widget-form/index.js +68 -0
  121. package/dist/components/widget-form-group/index.js +91 -0
  122. package/dist/components/widget-form-item/index.js +70 -0
  123. package/dist/components/widget-form-table/index.js +90 -0
  124. package/dist/index.css +761 -201
  125. package/dist/index.es.js +23971 -16542
  126. package/package.json +5 -3
  127. package/web-types.json +1880 -1781
@@ -0,0 +1,228 @@
1
+ import { d as s } from "./util.80e28481.js";
2
+ import { s as o, r as c } from "./WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js";
3
+ import { n as d } from "./vueComponentNormalizer.71e2aa87.js";
4
+ const u = {
5
+ name: "WidgetFormItem",
6
+ props: {
7
+ item: {
8
+ type: Object,
9
+ default: () => ({})
10
+ },
11
+ params: {
12
+ type: Object,
13
+ default: () => ({})
14
+ }
15
+ },
16
+ data() {
17
+ return {
18
+ form: {}
19
+ };
20
+ },
21
+ computed: {
22
+ vBind() {
23
+ const e = Object.assign(s(this.item), this.params, {
24
+ size: this.item.size || "small",
25
+ dic: this.item.dicData ? this.item.dicData.map((i) => {
26
+ if (!this.item.props)
27
+ return i;
28
+ const { label: t, value: a, desc: l } = this.item.props;
29
+ return !t || !a ? i : {
30
+ [t]: i.label,
31
+ [a]: i.value,
32
+ [l]: i.desc
33
+ };
34
+ }) : void 0,
35
+ rules: this.item.pattern ? this.item.rules.map((i) => (i.pattern && (i.pattern = new RegExp(this.item.pattern)), i)) : this.item.rules
36
+ });
37
+ return ["change", "blur", "click", "focus"].forEach((i) => delete e[i]), e.event && delete e.event, e;
38
+ }
39
+ },
40
+ methods: {
41
+ getComponent(e, n) {
42
+ let i = "fy-", t = "input";
43
+ return n || (["array", "img", "url"].includes(e) ? t = "array" : e === "select" ? t = "select" : e === "radio" ? t = "radio" : e === "checkbox" ? t = "checkbox" : ["time", "timerange"].includes(e) ? t = "time" : ["dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year"].includes(e) ? t = "date" : e === "cascader" ? t = "cascader" : e === "number" ? t = "input-number" : e === "password" ? t = "input" : e === "switch" ? t = "switch" : e === "rate" ? t = "rate" : e === "upload" ? t = "upload" : e === "slider" ? t = "slider" : e === "dynamic" ? t = "dynamic" : e === "icon" ? t = "input-icon" : e === "color" ? t = "input-color" : e === "map" && (t = "input-map"), i + t);
44
+ },
45
+ getPlaceholder(e) {
46
+ const n = e.label;
47
+ return ["select", "checkbox", "radio", "tree", "color", "dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year", "map", "icon"].includes(e.type) ? `请选择 ${n}` : `请输入 ${n}`;
48
+ }
49
+ }
50
+ }, r = {};
51
+ var p = /* @__PURE__ */ d(
52
+ u,
53
+ c,
54
+ o,
55
+ !1,
56
+ m,
57
+ null,
58
+ null,
59
+ null
60
+ );
61
+ function m(e) {
62
+ for (let n in r)
63
+ this[n] = r[n];
64
+ }
65
+ const _ = /* @__PURE__ */ function() {
66
+ return p.exports;
67
+ }();
68
+ var b = function() {
69
+ var e = this, n = e.$createElement, i = e._self._c || n;
70
+ return i("div", [i("h3", {
71
+ directives: [{
72
+ name: "show",
73
+ rawName: "v-show",
74
+ value: e.column.label,
75
+ expression: "column.label"
76
+ }],
77
+ staticStyle: {
78
+ margin: "10px"
79
+ }
80
+ }, [e._v(" " + e._s(e.column.label) + " ")]), i("Draggable", {
81
+ staticClass: "widget-form-table__content",
82
+ attrs: {
83
+ list: e.column.children.column,
84
+ group: {
85
+ name: "form"
86
+ },
87
+ "ghost-class": "ghost",
88
+ animation: 200,
89
+ handle: ".widget-form-table__item"
90
+ },
91
+ on: {
92
+ add: function(t) {
93
+ return e.handleWidgetTableAdd(t, e.column);
94
+ },
95
+ end: function(t) {
96
+ return e.$emit("change");
97
+ }
98
+ }
99
+ }, [e.column.children.column.length > 0 ? e._l(e.column.children.column, function(t, a) {
100
+ return i("div", {
101
+ key: a,
102
+ staticClass: "widget-form-table__item",
103
+ class: {
104
+ active: e.selectWidget.prop === t.prop,
105
+ required: t.required
106
+ },
107
+ style: {
108
+ minWidth: t.width ? `${t.width}px` : "33.3%",
109
+ width: t.width ? `${t.width}px` : "33.3%"
110
+ },
111
+ on: {
112
+ click: function(l) {
113
+ return l.stopPropagation(), e.handleWidgetTableSelect(t);
114
+ }
115
+ }
116
+ }, [i("ElTable", {
117
+ attrs: {
118
+ data: [t],
119
+ border: ""
120
+ }
121
+ }, [i("ElTableColumn", {
122
+ attrs: {
123
+ prop: t.prop,
124
+ label: t.label,
125
+ align: e.column.children.align,
126
+ "header-align": e.column.children.headerAlign
127
+ }
128
+ }, [i("WidgetFormItem", {
129
+ attrs: {
130
+ item: t,
131
+ params: e.column.params
132
+ }
133
+ }), e.selectWidget.prop === t.prop ? i("ElButton", {
134
+ staticClass: "widget-table-action-delete",
135
+ attrs: {
136
+ title: "删除",
137
+ circle: "",
138
+ plain: "",
139
+ size: "small",
140
+ type: "danger"
141
+ },
142
+ on: {
143
+ click: function(l) {
144
+ return l.stopPropagation(), e.handleWidgetTableDelete(e.column, a);
145
+ }
146
+ }
147
+ }, [i("i", {
148
+ staticClass: "iconfont icon-delete"
149
+ })]) : e._e(), e.selectWidget.prop === t.prop ? i("ElButton", {
150
+ staticClass: "widget-table-action-clone",
151
+ attrs: {
152
+ title: "复制",
153
+ circle: "",
154
+ plain: "",
155
+ size: "small",
156
+ type: "primary"
157
+ },
158
+ on: {
159
+ click: function(l) {
160
+ return l.stopPropagation(), e.handleWidgetTableClone(e.column, t);
161
+ }
162
+ }
163
+ }, [i("i", {
164
+ staticClass: "iconfont icon-copy"
165
+ })]) : e._e()], 1)], 1)], 1);
166
+ }) : [i("FyEmpty", {
167
+ staticStyle: {
168
+ width: "100%"
169
+ },
170
+ attrs: {
171
+ size: "50",
172
+ description: "拖拽字段至此"
173
+ }
174
+ })]], 2), e.selectWidget.prop === e.column.prop ? i("ElButton", {
175
+ staticClass: "widget-action-delete",
176
+ attrs: {
177
+ title: "删除",
178
+ circle: "",
179
+ plain: "",
180
+ size: "small",
181
+ type: "danger"
182
+ },
183
+ on: {
184
+ click: function(t) {
185
+ return t.stopPropagation(), e.handleWidgetDelete(e.index);
186
+ }
187
+ }
188
+ }, [i("i", {
189
+ staticClass: "iconfont icon-delete"
190
+ })]) : e._e(), e.selectWidget.prop === e.column.prop ? i("ElButton", {
191
+ staticClass: "widget-action-clear",
192
+ attrs: {
193
+ title: "清空",
194
+ circle: "",
195
+ plain: "",
196
+ size: "small",
197
+ type: "warning"
198
+ },
199
+ on: {
200
+ click: function(t) {
201
+ return t.stopPropagation(), e.handleWidgetClear(e.index);
202
+ }
203
+ }
204
+ }, [i("i", {
205
+ staticClass: "iconfont icon-clear"
206
+ })]) : e._e(), e.selectWidget.prop === e.column.prop ? i("ElButton", {
207
+ staticClass: "widget-action-clone",
208
+ attrs: {
209
+ title: "复制",
210
+ circle: "",
211
+ plain: "",
212
+ size: "small",
213
+ type: "primary"
214
+ },
215
+ on: {
216
+ click: function(t) {
217
+ return t.stopPropagation(), e.handleWidgetCloneTable(e.index);
218
+ }
219
+ }
220
+ }, [i("i", {
221
+ staticClass: "iconfont icon-copy"
222
+ })]) : e._e()], 1);
223
+ }, v = [];
224
+ export {
225
+ _ as W,
226
+ b as r,
227
+ v as s
228
+ };
@@ -1,4 +1,5 @@
1
- import { c, f as E, M as f, A as h, R as T, d as o, e as B, K as A, g as I, S as L, b as S, h as m, I as _ } from "./util.5053d54e.js";
1
+ import { isBlank as c } from "@web-utils/core";
2
+ import { f as E, M as f, A as h, R as T, a as u, b as m, K as A, c as I, S as L, D as S, e as B, I as _ } from "./util.80e28481.js";
2
3
  const P = {
3
4
  common: {
4
5
  condition: "条件",
@@ -83,17 +84,17 @@ const P = {
83
84
  const t = n.split(".");
84
85
  let a = e, s = null;
85
86
  for (let l = 0, d = t.length; l < d; l++) {
86
- const u = t[l];
87
+ const o = t[l];
87
88
  if (!a)
88
89
  break;
89
90
  if (l === d - 1) {
90
- s = a[u];
91
+ s = a[o];
91
92
  break;
92
93
  }
93
- a = a[u];
94
+ a = a[o];
94
95
  }
95
96
  return s;
96
- }, p = (e) => k(P, e), x = (e = []) => (e.forEach((n) => {
97
+ }, p = (e) => k(P, e), R = (e = []) => (e.forEach((n) => {
97
98
  let t = n.cascader;
98
99
  if (!c(t)) {
99
100
  let a = n.prop;
@@ -104,53 +105,53 @@ const P = {
104
105
  }
105
106
  }), e);
106
107
  let r = 0;
107
- const R = (e, n = 12, t = !1) => {
108
+ const C = (e, n = 12, t = !1) => {
108
109
  t && (r = 0);
109
110
  const a = 24;
110
111
  return r = r + (e.span || n) + (e.offset || 0), r === a ? r = 0 : r > a ? r = (e.span || n) + (e.offset || 0) : e.row && r !== a && (e.count = a - r, r = 0), e;
111
- }, C = (e, n) => {
112
- let { type: t, multiple: a, dataType: s, separator: l = S, alone: d, emitPath: u, range: y } = n, i = e;
113
- return f.includes(t) && a === !0 || h.includes(t) && u !== !1 || T.includes(t) && y === !0 ? (Array.isArray(i) || (c(i) ? i = [] : i = (i + "").split(l) || []), i.forEach((b, g) => {
114
- i[g] = o(b, s);
115
- }), B.includes(t) && c(i) && d && (i = [""])) : i = o(i, s), i;
116
- }, v = (e) => {
112
+ }, v = (e, n) => {
113
+ let { type: t, multiple: a, dataType: s, separator: l = S, alone: d, emitPath: o, range: y } = n, i = e;
114
+ return f.includes(t) && a === !0 || h.includes(t) && o !== !1 || T.includes(t) && y === !0 ? (Array.isArray(i) || (c(i) ? i = [] : i = (i + "").split(l) || []), i.forEach((b, g) => {
115
+ i[g] = u(b, s);
116
+ }), m.includes(t) && c(i) && d && (i = [""])) : i = u(i, s), i;
117
+ }, N = (e) => {
117
118
  const n = e.type, t = e.searchRange;
118
119
  let a = n;
119
120
  if (e.searchType)
120
121
  return e.searchType;
121
122
  if (["radio", "checkbox", "switch"].includes(n))
122
123
  a = "select";
123
- else if (m.includes(n)) {
124
+ else if (B.includes(n)) {
124
125
  let s = "range";
125
126
  t ? n.includes(s) ? a = n : a = n + s : a = n.replace(s, "");
126
127
  } else
127
128
  ["textarea"].includes(n) && (a = "input");
128
129
  return a;
129
- }, N = (e, n) => {
130
+ }, M = (e, n) => {
130
131
  let t = e || "input";
131
132
  if (c(n))
132
- B.includes(e) ? t = "array" : ["time", "timerange"].includes(e) ? t = "time" : m.includes(e) ? t = "date" : ["password", "textarea", "search"].includes(e) ? t = "input" : _.includes(e) && (t = "input-" + e);
133
+ m.includes(e) ? t = "array" : ["time", "timerange"].includes(e) ? t = "time" : B.includes(e) ? t = "date" : ["password", "textarea", "search"].includes(e) ? t = "input" : _.includes(e) && (t = "input-" + e);
133
134
  else
134
135
  return n;
135
136
  return A + t;
136
- }, M = (e = []) => {
137
+ }, O = (e = []) => {
137
138
  let n = {};
138
139
  return e.forEach((t) => {
139
140
  h.includes(t.type) && t.emitPath !== !1 || f.includes(t.type) && t.multiple || t.dataType === "array" ? n[t.prop] = [] : T.includes(t.type) && t.range === !0 ? n[t.prop] = [0, 0] : ["rate", "slider", "number"].includes(t.type) || t.dataType === "number" ? n[t.prop] = void 0 : n[t.prop] = "", t.bind && (n = I(n, t.bind)), c(t.value) || (n[t.prop] = t.value);
140
141
  }), {
141
142
  tableForm: n
142
143
  };
143
- }, O = function(e) {
144
+ }, V = function(e) {
144
145
  const n = e.placeholder, t = e.label;
145
146
  return c(n) ? L.includes(e.type) ? `${p("tip.select")} ${t}` : `${p("tip.input")} ${t}` : n;
146
147
  };
147
148
  export {
148
- O as a,
149
- x as b,
150
- R as c,
151
- v as d,
152
- M as f,
153
- N as g,
154
- C as i,
149
+ V as a,
150
+ R as b,
151
+ C as c,
152
+ N as d,
153
+ O as f,
154
+ M as g,
155
+ v as i,
155
156
  p as t
156
157
  };
@@ -1,12 +1,12 @@
1
- import { m as n, c as D, M as I, A as L, b as y, q as _, e as S, t as A, v as $, h as b, w as h } from "./util.5053d54e.js";
2
- import { formatDate as f } from "@web-utils/core";
3
- const P = (r = {}, t = {}, g = {}, o = []) => {
1
+ import { isBlank as T, formatDate as f } from "@web-utils/core";
2
+ import { i as Y, M as I, A as L, D as y, m as _, b as S, n as A, p as $, e as b, q as h } from "./util.80e28481.js";
3
+ const P = (r = {}, t = {}, g = {}, n = []) => {
4
4
  let e = r[t.prop], a = t.type, s = t.separator;
5
- if (t.bind && (e = n(r, t.bind)), D(e))
5
+ if (t.bind && (e = Y(r, t.bind)), T(e))
6
6
  e = "";
7
7
  else {
8
- let T = I.includes(t.type) && t.multiple, Y = L.includes(t.type);
9
- if ((["string", "number"].includes(t.dataType) || T || Y) && !Array.isArray(e) && (e = (e + "").split(s || y), t.dataType === "number" && (e = _(e))), S.includes(a))
8
+ let o = I.includes(t.type) && t.multiple, D = L.includes(t.type);
9
+ if ((["string", "number"].includes(t.dataType) || o || D) && !Array.isArray(e) && (e = (e + "").split(s || y), t.dataType === "number" && (e = _(e))), S.includes(a))
10
10
  Array.isArray(e) ? e = e.join(s || A) : e = e.split(s || y).join(s || A);
11
11
  else if (a === "password")
12
12
  e = $(e, "*");
@@ -19,7 +19,7 @@ const P = (r = {}, t = {}, g = {}, o = []) => {
19
19
  } else
20
20
  a === "time" && e.length <= 8 && (e = `${l} ${e}`), e = f(e, d);
21
21
  }
22
- e = h(o, e, t.props || g.props);
22
+ e = h(n, e, t.props || g.props);
23
23
  }
24
24
  return t.formatter && typeof t.formatter == "function" && (e = t.formatter(r, r[t.prop], e, t)), e;
25
25
  };
@@ -1,40 +1,41 @@
1
- import { c as w, x as D, y as x } from "./util.5053d54e.js";
2
- const b = (p, t = []) => new Promise((o, i) => {
1
+ import { isBlank as w } from "@web-utils/core";
2
+ import { t as D, v as x } from "./util.80e28481.js";
3
+ const F = (p, t = []) => new Promise((o, i) => {
3
4
  let e = [], a = [], c = {};
4
- p.forEach((s) => {
5
- s.parentProp && e.push(s);
6
- }), t.forEach((s, d) => {
5
+ p.forEach((d) => {
6
+ d.parentProp && e.push(d);
7
+ }), t.forEach((d, s) => {
7
8
  e.forEach((r) => {
8
9
  r.hide !== !0 && r.dicFlag !== !1 && a.push(
9
10
  new Promise((h) => {
10
- w(s[r.parentProp]) ? h({
11
+ w(d[r.parentProp]) ? h({
11
12
  prop: r.prop,
12
13
  data: [],
13
- index: d
14
+ index: s
14
15
  }) : r.dicUrl && g({
15
- url: `${r.dicUrl.replace("{{key}}", s[r.parentProp])}`,
16
+ url: `${r.dicUrl.replace("{{key}}", d[r.parentProp])}`,
16
17
  props: r.props,
17
18
  method: r.dicMethod,
18
19
  headers: r.dicHeaders,
19
20
  formatter: r.dicFormatter,
20
21
  query: r.dicQuery,
21
- form: s
22
+ form: d
22
23
  }).then((m) => {
23
24
  h({
24
25
  prop: r.prop,
25
26
  data: m,
26
- index: d
27
+ index: s
27
28
  });
28
29
  });
29
30
  })
30
31
  );
31
32
  });
32
- }), Promise.all(a).then((s) => {
33
- s.forEach((d) => {
34
- w(c[d.index]) && (c[d.index] = {}), c[d.index][d.prop] = d.data;
33
+ }), Promise.all(a).then((d) => {
34
+ d.forEach((s) => {
35
+ w(c[s.index]) && (c[s.index] = {}), c[s.index][s.prop] = s.data;
35
36
  }), o(c);
36
37
  });
37
- }), F = (p) => {
38
+ }), U = (p) => {
38
39
  let t = [];
39
40
  return new Promise((o, i) => {
40
41
  t = E(p).ajaxdic, k(t).then((a) => {
@@ -43,7 +44,7 @@ const b = (p, t = []) => new Promise((o, i) => {
43
44
  i(a);
44
45
  });
45
46
  });
46
- }, U = (p) => {
47
+ }, K = (p) => {
47
48
  let t = {}, o = p.dicData || {};
48
49
  return p.column.forEach((i) => {
49
50
  i.dicData && (t[i.prop] = D(i.dicData, i.props, i.dataType));
@@ -52,10 +53,10 @@ const b = (p, t = []) => new Promise((o, i) => {
52
53
  function E(p) {
53
54
  let t = p.column || [], o = [], i = {}, e = [];
54
55
  return t.forEach((a) => {
55
- let c = a.dicData, s = a.dicUrl, d = a.prop, r = a.parentProp;
56
- e = e.concat(a.cascader || []), Array.isArray(c) && (i[d] = c), !(a.dicFlag === !1 || a.lazy === !0 || e.includes(d)) && s && !r && o.push({
57
- url: s,
58
- name: d,
56
+ let c = a.dicData, d = a.dicUrl, s = a.prop, r = a.parentProp;
57
+ e = e.concat(a.cascader || []), Array.isArray(c) && (i[s] = c), !(a.dicFlag === !1 || a.lazy === !0 || e.includes(s)) && d && !r && o.push({
58
+ url: d,
59
+ name: s,
59
60
  method: a.dicMethod,
60
61
  headers: t.dicHeaders,
61
62
  formatter: a.dicFormatter,
@@ -92,14 +93,14 @@ function k(p) {
92
93
  });
93
94
  }
94
95
  const g = (p) => {
95
- let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers: s = {}, value: d = "", column: r, form: h = {} } = p;
96
- r && (t = r.dicUrl, i = r.dicMethod, s = r.headers || {}, o = r.dicQuery || {}, c = r.dicFormatter, a = r.props);
96
+ let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers: d = {}, value: s = "", column: r, form: h = {} } = p;
97
+ r && (t = r.dicUrl, i = r.dicMethod, d = r.headers || {}, o = r.dicQuery || {}, c = r.dicFormatter, a = r.props);
97
98
  let m = "key";
98
99
  t = t || "";
99
100
  let u = [], y = {};
100
101
  return u = t.match(/[^\{\}]+(?=\})/g) || [], u.forEach((n) => {
101
102
  let f = `{{${n}}}`, l = h[n];
102
- n === m ? t = t.replace(f, d) : t = t.replace(f, l);
103
+ n === m ? t = t.replace(f, s) : t = t.replace(f, l);
103
104
  }), i === "post" && (u = Object.keys(o), u.forEach((n) => {
104
105
  let f = o[n];
105
106
  typeof f == "string" && f.match(/\{{|}}/g) ? y[n] = h[f.replace(/\{{|}}/g, "")] : y[n] = f;
@@ -109,14 +110,14 @@ const g = (p) => {
109
110
  typeof c == "function" ? P = c(l.data) : P = x(l.data, e), n(P);
110
111
  };
111
112
  i === "post" ? window.axios.post(t, y, {
112
- headers: s
113
+ headers: d
113
114
  }).then(function(l) {
114
115
  f(l);
115
116
  }).catch(() => [
116
117
  n([])
117
118
  ]) : window.axios.get(t, {
118
119
  params: o,
119
- headers: s
120
+ headers: d
120
121
  }).then(function(l) {
121
122
  f(l);
122
123
  }).catch(() => [
@@ -125,8 +126,8 @@ const g = (p) => {
125
126
  });
126
127
  };
127
128
  export {
128
- F as a,
129
- b,
130
- U as l,
129
+ U as a,
130
+ F as b,
131
+ K as l,
131
132
  g as s
132
133
  };
@@ -1,7 +1,8 @@
1
- import { D as r, a as i, b as a, c as s } from "./util.5053d54e.js";
1
+ import { y as r, k as i, D as a } from "./util.80e28481.js";
2
2
  import { s as l } from "./slot.1b8d2b1b.js";
3
- import { i as p } from "./dataformat.3cfcf62c.js";
4
- const d = {
3
+ import { isBlank as s } from "@web-utils/core";
4
+ import { i as p } from "./dataformat.d3fd2d1b.js";
5
+ const f = {
5
6
  mixins: [l],
6
7
  data() {
7
8
  return {
@@ -203,7 +204,7 @@ const d = {
203
204
  created() {
204
205
  this.initVal();
205
206
  }
206
- }, f = {
207
+ }, y = {
207
208
  methods: {
208
209
  bindEvent(t, e) {
209
210
  e = Object.assign(e, { column: this.column }, this.tableData), typeof this[t] == "function" && (t === "change" ? this.column.cell !== !0 && this[t](e) : this[t](e)), this.$emit(t, e);
@@ -230,6 +231,6 @@ const d = {
230
231
  }
231
232
  };
232
233
  export {
233
- f as e,
234
- d as p
234
+ y as e,
235
+ f as p
235
236
  };
@@ -1,7 +1,8 @@
1
- import { s as o, l as n, a as h, b as r } from "./dic.5f7e3523.js";
2
- import { k as d, a as l, c as s } from "./util.5053d54e.js";
1
+ import { s as a, l as n, a as h, b as r } from "./dic.79d9f595.js";
2
+ import { d, k as l } from "./util.80e28481.js";
3
3
  import { s as c } from "./slot.1b8d2b1b.js";
4
- const O = {
4
+ import { isBlank as s } from "@web-utils/core";
5
+ const f = {
5
6
  mixins: [c],
6
7
  props: {
7
8
  defaults: {
@@ -91,10 +92,10 @@ const O = {
91
92
  },
92
93
  updateDic(t, i) {
93
94
  let e = this.findObject(this.propOption, t);
94
- s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ? o({
95
+ s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ? a({
95
96
  column: e
96
- }).then((a) => {
97
- this.$set(this.DIC, t, a);
97
+ }).then((o) => {
98
+ this.$set(this.DIC, t, o);
98
99
  }) : this.$set(this.DIC, t, i);
99
100
  },
100
101
  handleSetDic(t, i = {}) {
@@ -117,5 +118,5 @@ const O = {
117
118
  }
118
119
  };
119
120
  export {
120
- O as i
121
+ f as i
121
122
  };
@@ -1,57 +1,5 @@
1
- const s = {};
2
- function l(t = "default") {
3
- let i = "";
4
- switch (t) {
5
- case "default":
6
- i = "#35495E";
7
- break;
8
- case "primary":
9
- i = "#3488ff";
10
- break;
11
- case "success":
12
- i = "#43B883";
13
- break;
14
- case "warning":
15
- i = "#e6a23c";
16
- break;
17
- case "danger":
18
- i = "#f56c6c";
19
- break;
20
- }
21
- return i;
22
- }
23
- s.capsule = function(t, i, a = "primary") {
24
- console.log(
25
- `%c ${t} %c ${i} %c`,
26
- "background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",
27
- `background:${l(
28
- a
29
- )}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`,
30
- "background:transparent"
31
- );
32
- };
33
- s.colorful = function(t) {
34
- console.log(
35
- `%c${t.map((i) => i.text || "").join("%c")}`,
36
- ...t.map((i) => `color: ${l(i.type)};`)
37
- );
38
- };
39
- s.default = function(t) {
40
- s.colorful([{ text: t }]);
41
- };
42
- s.primary = function(t) {
43
- s.colorful([{ text: t, type: "primary" }]);
44
- };
45
- s.success = function(t) {
46
- s.colorful([{ text: t, type: "success" }]);
47
- };
48
- s.warning = function(t) {
49
- s.colorful([{ text: t, type: "warning" }]);
50
- };
51
- s.danger = function(t) {
52
- s.colorful([{ text: t, type: "danger" }]);
53
- };
54
- const c = {
1
+ import { createLogger as l } from "@web-utils/core";
2
+ const a = {
55
3
  AliOSS: {
56
4
  url: "https://cdn.staticfile.org/ali-oss/6.17.1/aliyun-oss-sdk.min.js",
57
5
  title: "阿里云云图片上传,需引入OSS的sdk",
@@ -100,13 +48,9 @@ const c = {
100
48
  github: "https://github.com/Colingo/mock"
101
49
  }
102
50
  }, o = (() => ({
103
- logs: function(t) {
104
- const i = c[t];
105
- s.capsule(
106
- t,
107
- i.title,
108
- "warning"
109
- ), s.warning("CDN:" + (i.url || "-")), s.warning("GITHUB:" + (i.github || "-"));
51
+ logs: function(s) {
52
+ const t = a[s], i = l(s);
53
+ i.warning(t.title), i.warning("CDN:" + (t.url || "-")), i.warning("GITHUB:" + (t.github || "-"));
110
54
  }
111
55
  }))();
112
56
  export {