@web-utils/component 3.0.6 → 3.1.0

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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,51 +1,37 @@
1
1
  var f = Object.defineProperty;
2
- var c = Object.getOwnPropertySymbols;
3
- var m = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
- var h = (e, i, t) => i in e ? f(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, u = (e, i) => {
2
+ var h = Object.getOwnPropertySymbols;
3
+ var v = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable;
4
+ var c = (e, i, t) => i in e ? f(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, u = (e, i) => {
5
5
  for (var t in i || (i = {}))
6
- m.call(i, t) && h(e, t, i[t]);
7
- if (c)
8
- for (var t of c(i))
9
- g.call(i, t) && h(e, t, i[t]);
6
+ v.call(i, t) && c(e, t, i[t]);
7
+ if (h)
8
+ for (var t of h(i))
9
+ m.call(i, t) && c(e, t, i[t]);
10
10
  return e;
11
11
  };
12
- var d = (e, i, t) => new Promise((a, n) => {
13
- var r = (s) => {
12
+ var d = (e, i, t) => new Promise((o, r) => {
13
+ var n = (s) => {
14
14
  try {
15
- o(t.next(s));
15
+ a(t.next(s));
16
16
  } catch (p) {
17
- n(p);
17
+ r(p);
18
18
  }
19
19
  }, l = (s) => {
20
20
  try {
21
- o(t.throw(s));
21
+ a(t.throw(s));
22
22
  } catch (p) {
23
- n(p);
23
+ r(p);
24
24
  }
25
- }, o = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(r, l);
26
- o((t = t.apply(e, i)).next());
25
+ }, a = (s) => s.done ? o(s.value) : Promise.resolve(s.value).then(n, l);
26
+ a((t = t.apply(e, i)).next());
27
27
  });
28
28
  import "video.js/dist/video-js.min.css";
29
- import v from "video.js";
30
- import _ from "video.js/dist/lang/zh-CN.json";
31
- import { defaults as b } from "lodash-es";
32
- import { n as O } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
33
- var $ = function() {
34
- var e = this, i = e.$createElement, t = e._self._c || i;
35
- return t("div", {
36
- staticClass: "video-player video-player-box"
37
- }, [t("video", {
38
- ref: "video",
39
- staticClass: "video-js",
40
- on: {
41
- contextmenu: function(a) {
42
- a.preventDefault(), a.stopPropagation();
43
- }
44
- }
45
- })]);
46
- }, x = [];
47
- v.addLanguage("zh", _);
48
- const A = [
29
+ import y from "video.js";
30
+ import g from "video.js/dist/lang/zh-CN.json";
31
+ import { defaults as _ } from "lodash-es";
32
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
33
+ y.addLanguage("zh", g);
34
+ const O = [
49
35
  "loadeddata",
50
36
  "canplay",
51
37
  "canplaythrough",
@@ -55,7 +41,7 @@ const A = [
55
41
  "playing",
56
42
  "ended",
57
43
  "error"
58
- ], T = {
44
+ ], $ = {
59
45
  name: "VueVideoPlayer",
60
46
  props: {
61
47
  crossOrigin: {
@@ -115,7 +101,7 @@ const A = [
115
101
  },
116
102
  computed: {
117
103
  videoOptions() {
118
- return b(
104
+ return _(
119
105
  {
120
106
  language: "zh",
121
107
  autoplay: this.autoplay,
@@ -146,22 +132,22 @@ const A = [
146
132
  methods: {
147
133
  initialize() {
148
134
  return d(this, null, function* () {
149
- var r, l;
150
- if (yield this.$nextTick(), !((l = (r = this.videoOptions) == null ? void 0 : r.sources) != null && l.length))
135
+ var n, l;
136
+ if (yield this.$nextTick(), !((l = (n = this.videoOptions) == null ? void 0 : n.sources) != null && l.length))
151
137
  return;
152
138
  if (this.player) {
153
139
  this.player.options(this.videoOptions);
154
140
  return;
155
141
  }
156
142
  this.playsInline && (this.$refs.video.setAttribute("playsinline", this.playsInline), this.$refs.video.setAttribute("webkit-playsinline", this.playsInline), this.$refs.video.setAttribute("x5-playsinline", this.playsInline), this.$refs.video.setAttribute("x5-video-player-type", "h5"), this.$refs.video.setAttribute("x5-video-player-fullscreen", !1)), this.crossOrigin && (this.$refs.video.crossOrigin = this.crossOrigin, this.$refs.video.setAttribute("crossOrigin", this.crossOrigin));
157
- const { events: e, globalEvents: i, volume: t } = this, a = (...o) => this.$emit(...o), n = A.concat(e).concat(i);
158
- this.player = v(this.$refs.video, this.videoOptions, function() {
143
+ const { events: e, globalEvents: i, volume: t } = this, o = (...a) => this.$emit(...a), r = O.concat(e).concat(i);
144
+ this.player = y(this.$refs.video, this.videoOptions, function() {
159
145
  this.volume(t);
160
- for (let o = 0; o < n.length; o++) {
161
- const s = n[o];
162
- this.on(s, () => a(s, this));
146
+ for (let a = 0; a < r.length; a++) {
147
+ const s = r[a];
148
+ this.on(s, () => o(s, this));
163
149
  }
164
- this.on("timeupdate", () => a("timeupdate", this.currentTime(), this)), a("ready", this);
150
+ this.on("timeupdate", () => o("timeupdate", this.currentTime(), this)), o("ready", this);
165
151
  });
166
152
  });
167
153
  },
@@ -172,24 +158,23 @@ const A = [
172
158
  });
173
159
  }
174
160
  }
175
- }, y = {};
176
- var V = /* @__PURE__ */ O(
177
- T,
161
+ };
162
+ var x = function() {
163
+ var i = this, t = i._self._c;
164
+ return t("div", { staticClass: "video-player video-player-box" }, [t("video", { ref: "video", staticClass: "video-js", on: { contextmenu: function(o) {
165
+ o.preventDefault(), o.stopPropagation();
166
+ } } })]);
167
+ }, A = [], T = /* @__PURE__ */ b(
178
168
  $,
179
169
  x,
170
+ A,
180
171
  !1,
181
- z,
172
+ null,
182
173
  null,
183
174
  null,
184
175
  null
185
176
  );
186
- function z(e) {
187
- for (let i in y)
188
- this[i] = y[i];
189
- }
190
- const B = /* @__PURE__ */ function() {
191
- return V.exports;
192
- }();
177
+ const w = T.exports;
193
178
  export {
194
- B as default
179
+ w as default
195
180
  };
@@ -1,18 +1,18 @@
1
- var d = Object.defineProperty, g = Object.defineProperties;
2
- var y = Object.getOwnPropertyDescriptors;
3
- var s = Object.getOwnPropertySymbols;
4
- var x = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
5
- var u = (n, t, e) => t in n ? d(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, o = (n, t) => {
1
+ var _ = Object.defineProperty, d = Object.defineProperties;
2
+ var g = Object.getOwnPropertyDescriptors;
3
+ var o = Object.getOwnPropertySymbols;
4
+ var y = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
5
+ var c = (l, t, e) => t in l ? _(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e, s = (l, t) => {
6
6
  for (var e in t || (t = {}))
7
- x.call(t, e) && u(n, e, t[e]);
8
- if (s)
9
- for (var e of s(t))
10
- v.call(t, e) && u(n, e, t[e]);
11
- return n;
12
- }, c = (n, t) => g(n, y(t));
7
+ y.call(t, e) && c(l, e, t[e]);
8
+ if (o)
9
+ for (var e of o(t))
10
+ x.call(t, e) && c(l, e, t[e]);
11
+ return l;
12
+ }, u = (l, t) => d(l, g(t));
13
13
  import { g as b } from "../chunks/index.57f871af.mjs";
14
- import { n as S } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
15
- const k = {
14
+ import { n as k } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
15
+ const v = {
16
16
  name: "Watermark",
17
17
  functional: !0,
18
18
  props: {
@@ -59,37 +59,29 @@ const k = {
59
59
  default: "rgba(0,0,0,0)"
60
60
  }
61
61
  },
62
- render(n, { props: { width: t, height: e, text: _, backgroundColor: p, rotate: f, color: m }, data: l }) {
63
- const a = document.createElement("canvas");
64
- a.width = t, a.height = e;
65
- const r = a.getContext("2d");
66
- return r.font = "15px Verdana", r.fillStyle = p, r.fillRect(0, 0, t, e), r.translate(t / 2, e / 2), r.rotate(f * Math.PI / 180), r.fillStyle = m, r.textAlign = "center", r.textBaseline = "middle", r.fillText(_, 0, 0), n("div", {
67
- class: b(l.class, `watermark ${l.staticClass || ""}`),
68
- style: c(o(o({}, l.style || {}), l.staticStyle || {}), {
69
- background: `url(${a.toDataURL("image/png")}) left top repeat`
62
+ render(l, { props: { width: t, height: e, text: i, backgroundColor: p, rotate: f, color: m }, data: a }) {
63
+ const r = document.createElement("canvas");
64
+ r.width = t, r.height = e;
65
+ const n = r.getContext("2d");
66
+ return n.font = "15px Verdana", n.fillStyle = p, n.fillRect(0, 0, t, e), n.translate(t / 2, e / 2), n.rotate(f * Math.PI / 180), n.fillStyle = m, n.textAlign = "center", n.textBaseline = "middle", n.fillText(i, 0, 0), l("div", {
67
+ class: b(a.class, `watermark ${a.staticClass || ""}`),
68
+ style: u(s(s({}, a.style || {}), a.staticStyle || {}), {
69
+ background: `url(${r.toDataURL("image/png")}) left top repeat`
70
70
  })
71
71
  });
72
72
  }
73
- };
74
- let C, N;
75
- const i = {};
76
- var R = /* @__PURE__ */ S(
77
- k,
73
+ }, S = null, C = null;
74
+ var N = /* @__PURE__ */ k(
75
+ v,
76
+ S,
78
77
  C,
79
- N,
80
78
  !1,
81
- W,
79
+ null,
82
80
  null,
83
81
  null,
84
82
  null
85
83
  );
86
- function W(n) {
87
- for (let t in i)
88
- this[t] = i[t];
89
- }
90
- const $ = /* @__PURE__ */ function() {
91
- return R.exports;
92
- }();
84
+ const $ = N.exports;
93
85
  export {
94
86
  $ as default
95
87
  };
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "3.0.6",
5
+ "version": "3.1.0",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -1,100 +1,33 @@
1
- var f = Object.defineProperty, _ = Object.defineProperties;
2
- var b = Object.getOwnPropertyDescriptors;
1
+ var g = Object.defineProperty, f = Object.defineProperties;
2
+ var _ = Object.getOwnPropertyDescriptors;
3
3
  var p = Object.getOwnPropertySymbols;
4
- var v = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
- var h = (t, s, e) => s in t ? f(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e, d = (t, s) => {
6
- for (var e in s || (s = {}))
7
- v.call(s, e) && h(t, e, s[e]);
4
+ var b = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
5
+ var h = (a, t, e) => t in a ? g(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, d = (a, t) => {
6
+ for (var e in t || (t = {}))
7
+ b.call(t, e) && h(a, e, t[e]);
8
8
  if (p)
9
- for (var e of p(s))
10
- y.call(s, e) && h(t, e, s[e]);
11
- return t;
12
- }, c = (t, s) => _(t, b(s));
13
- var r = (t, s, e) => new Promise((a, i) => {
14
- var o = (n) => {
9
+ for (var e of p(t))
10
+ v.call(t, e) && h(a, e, t[e]);
11
+ return a;
12
+ }, m = (a, t) => f(a, _(t));
13
+ var r = (a, t, e) => new Promise((s, n) => {
14
+ var o = (i) => {
15
15
  try {
16
- l(e.next(n));
16
+ l(e.next(i));
17
17
  } catch (u) {
18
- i(u);
18
+ n(u);
19
19
  }
20
- }, g = (n) => {
20
+ }, c = (i) => {
21
21
  try {
22
- l(e.throw(n));
22
+ l(e.throw(i));
23
23
  } catch (u) {
24
- i(u);
24
+ n(u);
25
25
  }
26
- }, l = (n) => n.done ? a(n.value) : Promise.resolve(n.value).then(o, g);
27
- l((e = e.apply(t, s)).next());
26
+ }, l = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, c);
27
+ l((e = e.apply(a, t)).next());
28
28
  });
29
- import { n as V } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
30
- var w = function() {
31
- var t = this, s = t.$createElement, e = t._self._c || s;
32
- return e("div", {
33
- staticClass: "x-input-tag"
34
- }, [t.tags && t.tags.length && t.tags[0] ? t._l(t.tags, function(a, i) {
35
- return e("ElTag", {
36
- key: a.id || a,
37
- attrs: {
38
- size: "medium",
39
- "disable-transitions": "",
40
- closable: !t.inputDisabled
41
- },
42
- on: {
43
- close: function(o) {
44
- return t.handleClose(a, i);
45
- }
46
- }
47
- }, [t._v(" " + t._s(a.name || a) + " ")]);
48
- }) : t.inputDisabled ? [e("span", {
49
- staticStyle: {
50
- color: "#b5b5b5"
51
- }
52
- }, [t._v("无")])] : t._e(), t.inputDisabled ? t._e() : e("ElInput", {
53
- directives: [{
54
- name: "show",
55
- rawName: "v-show",
56
- value: t.inputVisible,
57
- expression: "inputVisible"
58
- }],
59
- ref: "saveTagInput",
60
- staticClass: "input-new-tag",
61
- attrs: {
62
- size: "mini"
63
- },
64
- on: {
65
- blur: t.handleInputConfirm
66
- },
67
- nativeOn: {
68
- keyup: function(a) {
69
- return !a.type.indexOf("key") && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : t.handleInputConfirm.apply(null, arguments);
70
- }
71
- },
72
- model: {
73
- value: t.inputValue,
74
- callback: function(a) {
75
- t.inputValue = a;
76
- },
77
- expression: "inputValue"
78
- }
79
- }), !t.inputDisabled && !t.inputVisible ? e("ElButton", {
80
- directives: [{
81
- name: "show",
82
- rawName: "v-show",
83
- value: t.tags.length < t.maxTag,
84
- expression: "tags.length < maxTag"
85
- }],
86
- staticClass: "button-new-tag",
87
- attrs: {
88
- size: "mini"
89
- },
90
- on: {
91
- click: t.showInput
92
- }
93
- }, [t._v(" + 添加 ")]) : t._e(), t.count ? e("span", {
94
- staticClass: "tags-count"
95
- }, [t._v(t._s(t.tags.length && t.tags[0] ? t.tags.length : ""))]) : t._e()], 2);
96
- }, x = [];
97
- const C = {
29
+ import { n as y } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
30
+ const V = {
98
31
  name: "XInputTag",
99
32
  inject: {
100
33
  elForm: {
@@ -140,12 +73,12 @@ const C = {
140
73
  },
141
74
  tags: {
142
75
  get() {
143
- var t, s;
76
+ var a, t;
144
77
  if (this.arrayMode)
145
- return (t = this.value) != null && t.length ? this.objectMode ? this.value.map((e) => e.id > 0 ? e : c(d({}, e), { id: Math.random() })) : this.value : [];
78
+ return (a = this.value) != null && a.length ? this.objectMode ? this.value.map((e) => e.id > 0 ? e : m(d({}, e), { id: Math.random() })) : this.value : [];
146
79
  {
147
- const e = ((s = this.value) == null ? void 0 : s.split(this.separator)) || [];
148
- return e.length && e[0] ? e.map((a) => this.objectMode ? { name: a, id: Math.random() } : a) : [];
80
+ const e = ((t = this.value) == null ? void 0 : t.split(this.separator)) || [];
81
+ return e.length && e[0] ? e.map((s) => this.objectMode ? { name: s, id: Math.random() } : s) : [];
149
82
  }
150
83
  }
151
84
  }
@@ -156,48 +89,53 @@ const C = {
156
89
  this.inputVisible = !0, yield this.$nextTick(), this.$refs.saveTagInput.$refs.input.focus();
157
90
  });
158
91
  },
159
- handleClose(t) {
160
- const s = this.tags.filter((e) => e !== t);
161
- this.$emit("input", this.arrayMode ? s : s.map((e) => e.name || e).join(this.separator));
92
+ handleClose(a) {
93
+ const t = this.tags.filter((e) => e !== a);
94
+ this.$emit("input", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
162
95
  },
163
96
  handleInputConfirm() {
164
97
  return r(this, null, function* () {
165
- var s;
98
+ var t;
166
99
  if (this.tags.length >= this.maxTag) {
167
100
  this.$message.warning({ message: "标签已达上限,请删除一些标签再添加!", showClose: !0 }), this.inputVisible = !1, this.inputValue = "";
168
101
  return;
169
102
  }
170
- const t = this.inputValue;
171
- if (t) {
172
- if (this.tags.some((a) => (a.name || a) === t)) {
103
+ const a = this.inputValue;
104
+ if (a) {
105
+ if (this.tags.some((s) => (s.name || s) === a)) {
173
106
  this.inputVisible = !1, this.inputValue = "", this.$message.warning({ message: "标签已存在!", showClose: !0 });
174
107
  return;
175
108
  }
176
109
  const e = [...this.tags];
177
- e.push(this.objectMode ? { id: Date.now(), name: this.inputValue } : this.inputValue), this.$emit("input", this.arrayMode ? e : e.map((a) => a.name || a).join(this.separator)), yield this.$nextTick(), (s = this.elFormItem) == null || s.clearValidate();
110
+ e.push(this.objectMode ? { id: Date.now(), name: this.inputValue } : this.inputValue), this.$emit("input", this.arrayMode ? e : e.map((s) => s.name || s).join(this.separator)), yield this.$nextTick(), (t = this.elFormItem) == null || t.clearValidate();
178
111
  }
179
112
  this.inputVisible = !1, this.inputValue = "";
180
113
  });
181
114
  }
182
115
  }
183
- }, m = {};
184
- var I = /* @__PURE__ */ V(
185
- C,
116
+ };
117
+ var w = function() {
118
+ var t = this, e = t._self._c;
119
+ return e("div", { staticClass: "x-input-tag" }, [t.tags && t.tags.length && t.tags[0] ? t._l(t.tags, function(s, n) {
120
+ return e("ElTag", { key: s.id || s, attrs: { size: "medium", "disable-transitions": "", closable: !t.inputDisabled }, on: { close: function(o) {
121
+ return t.handleClose(s, n);
122
+ } } }, [t._v(" " + t._s(s.name || s) + " ")]);
123
+ }) : t.inputDisabled ? [e("span", { staticStyle: { color: "#b5b5b5" } }, [t._v("无")])] : t._e(), t.inputDisabled ? t._e() : e("ElInput", { directives: [{ name: "show", rawName: "v-show", value: t.inputVisible, expression: "inputVisible" }], ref: "saveTagInput", staticClass: "input-new-tag", attrs: { size: "mini" }, on: { blur: t.handleInputConfirm }, nativeOn: { keyup: function(s) {
124
+ return !s.type.indexOf("key") && t._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : t.handleInputConfirm.apply(null, arguments);
125
+ } }, model: { value: t.inputValue, callback: function(s) {
126
+ t.inputValue = s;
127
+ }, expression: "inputValue" } }), !t.inputDisabled && !t.inputVisible ? e("ElButton", { directives: [{ name: "show", rawName: "v-show", value: t.tags.length < t.maxTag, expression: "tags.length < maxTag" }], staticClass: "button-new-tag", attrs: { size: "mini" }, on: { click: t.showInput } }, [t._v(" + 添加 ")]) : t._e(), t.count ? e("span", { staticClass: "tags-count" }, [t._v(t._s(t.tags.length && t.tags[0] ? t.tags.length : ""))]) : t._e()], 2);
128
+ }, x = [], C = /* @__PURE__ */ y(
129
+ V,
186
130
  w,
187
131
  x,
188
132
  !1,
189
- T,
133
+ null,
190
134
  null,
191
135
  null,
192
136
  null
193
137
  );
194
- function T(t) {
195
- for (let s in m)
196
- this[s] = m[s];
197
- }
198
- const j = /* @__PURE__ */ function() {
199
- return I.exports;
200
- }();
138
+ const k = C.exports;
201
139
  export {
202
- j as default
140
+ k as default
203
141
  };
@@ -1,165 +0,0 @@
1
- import { isBlank as h } from "@web-utils/core";
2
- import { formatDate as i } from "@web-utils/integrations/dayjs";
3
- import { p as g, M as b, A as v, b as c, q as A, e as S, k as d, t as T, h as x, v as C, u as j } from "./util.ae730cde.mjs";
4
- import "@web-utils/component/fy-u-editor/style.css";
5
- import { a as D, b as O } from "./dataformat.f995e2f9.mjs";
6
- import { s as L } from "./slot.4b391395.mjs";
7
- import { n as Y } from "./vueComponentNormalizer.446f5dc4.mjs";
8
- const U = (e = {}, r = {}, o = {}, n = []) => {
9
- let t = e[r.prop];
10
- const a = r.type, s = r.separator;
11
- if (r.bind && (t = g(e, r.bind)), h(t))
12
- t = "";
13
- else {
14
- const y = b.includes(r.type) && r.multiple, _ = v.includes(r.type);
15
- if ((["string", "number"].includes(r.dataType) || y || _) && !Array.isArray(t) && (t = `${t}`.split(s || c), r.dataType === "number" && (t = A(t))), S.includes(a))
16
- Array.isArray(t) ? t = t.join(s || d) : t = t.split(s || c).join(s || d);
17
- else if (a === "password")
18
- t = T(t, "*");
19
- else if (x.includes(a) && r.format) {
20
- const u = r.format.replace("dd", "DD").replace("yyyy", "YYYY"), m = i(Date.now(), "YYYY-MM-DD");
21
- if (a.indexOf("range") !== -1) {
22
- let l = t[0] || "", p = t[1] || "";
23
- a === "timerange" && l.length <= 8 && p.length < 8 && (l = `${m} ${l}`, p = `${m} ${p}`), t = [i(l, u), i(p, u)].join(r.separator || "~");
24
- } else
25
- a === "time" && t.length <= 8 && (t = `${m} ${t}`), t = i(t, u);
26
- }
27
- t = C(n, t, r.props || o.props);
28
- }
29
- return r.formatter && typeof r.formatter == "function" && (t = r.formatter(e, e[r.prop], t, r)), t;
30
- };
31
- var k = function() {
32
- var e = this, r = e.$createElement, o = e._self._c || r;
33
- return o(e.getComponent(e.column.type, e.column.component), e._g(e._b({
34
- ref: "temp",
35
- tag: "Component",
36
- attrs: {
37
- column: Object.assign(e.column, e.params),
38
- dic: e.dic,
39
- disabled: e.column.disabled || e.disabled,
40
- readonly: e.column.readonly || e.readonly,
41
- placeholder: e.getPlaceholder(e.column),
42
- props: e.column.props || e.props,
43
- "props-http": e.column.propsHttp || e.propsHttp,
44
- size: e.column.size || e.size,
45
- "table-data": e.tableData,
46
- type: e.type || e.column.type,
47
- "column-slot": e.columnSlot
48
- },
49
- nativeOn: {
50
- keyup: function(n) {
51
- return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.enterChange.apply(null, arguments);
52
- }
53
- },
54
- scopedSlots: e._u([e._l(e.columnSlot, function(n) {
55
- return {
56
- key: n,
57
- fn: function(t) {
58
- return [e._t(n, null, null, t)];
59
- }
60
- };
61
- })], null, !0),
62
- model: {
63
- value: e.text,
64
- callback: function(n) {
65
- e.text = n;
66
- },
67
- expression: "text"
68
- }
69
- }, "Component", Object.assign(e.column, e.uploadFun(e.column)), !1), e.event), [e.params.html ? o("span", {
70
- domProps: {
71
- innerHTML: e._s(e.params.html)
72
- }
73
- }) : e._e()]);
74
- }, F = [];
75
- const I = {
76
- name: "FormTemp",
77
- components: { FyUEditor: () => import("@web-utils/component/fy-u-editor") },
78
- mixins: [L],
79
- props: {
80
- value: [String, Object, Number, Boolean, Array],
81
- columnSlot: {
82
- type: Array,
83
- default: () => []
84
- },
85
- tableData: {
86
- type: Object,
87
- default: () => ({})
88
- },
89
- enter: {
90
- type: Boolean,
91
- default: !1
92
- },
93
- type: {
94
- type: String
95
- },
96
- propsHttp: {
97
- type: Object,
98
- default: () => ({})
99
- },
100
- props: {
101
- type: Object
102
- },
103
- dic: {
104
- type: Array
105
- },
106
- size: {
107
- type: String
108
- },
109
- disabled: {
110
- type: Boolean
111
- },
112
- readonly: {
113
- type: Boolean
114
- },
115
- column: {
116
- type: Object,
117
- default: () => ({})
118
- }
119
- },
120
- computed: {
121
- params() {
122
- return this.column.params || {};
123
- },
124
- event() {
125
- return this.column.event || {};
126
- },
127
- text: {
128
- get() {
129
- return this.value;
130
- },
131
- set(e) {
132
- this.$emit("input", e), this.$emit("change", e);
133
- }
134
- }
135
- },
136
- methods: {
137
- uploadFun: j,
138
- getComponent: D,
139
- getPlaceholder: O,
140
- enterChange() {
141
- typeof this.column.enter == "function" ? this.column.enter({ value: this.text, column: this.column }) : this.enter && this.$emit("enter");
142
- }
143
- }
144
- }, f = {};
145
- var $ = /* @__PURE__ */ Y(
146
- I,
147
- k,
148
- F,
149
- !1,
150
- P,
151
- null,
152
- null,
153
- null
154
- );
155
- function P(e) {
156
- for (let r in f)
157
- this[r] = f[r];
158
- }
159
- const N = /* @__PURE__ */ function() {
160
- return $.exports;
161
- }();
162
- export {
163
- N as F,
164
- U as d
165
- };