@web-utils/component 3.0.2 → 3.0.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 (166) hide show
  1. package/address-input/index.mjs +14 -14
  2. package/chat/index.mjs +39 -40
  3. package/chunk-file-uploader/index.mjs +35 -594
  4. package/chunk-file-uploader/style.css +1 -1
  5. package/chunks/FormTemp.d079292b.mjs +139 -0
  6. package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
  7. package/chunks/detail.d6f8e347.mjs +29 -0
  8. package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
  9. package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
  10. package/chunks/form-input-mixin.78a567bc.mjs +24 -0
  11. package/chunks/form-item-mixin.57cb2019.mjs +140 -0
  12. package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
  13. package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
  14. package/chunks/input-number-mixin.41a066be.mjs +60 -0
  15. package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
  16. package/count-up/index.mjs +17 -14
  17. package/data-box/index.mjs +18 -19
  18. package/data-display/index.mjs +17 -18
  19. package/data-icons/index.mjs +16 -17
  20. package/data-panel/index.mjs +20 -21
  21. package/data-pay/index.mjs +15 -16
  22. package/data-progress/index.mjs +19 -20
  23. package/data-rotate/index.mjs +35 -36
  24. package/data-table-picker/index.mjs +23 -25
  25. package/data-tabs/index.mjs +15 -16
  26. package/dialog-form/index.mjs +24 -28
  27. package/dynamic-table/index.mjs +34 -35
  28. package/easy-popup/index.mjs +56 -29
  29. package/editable-tree/index.mjs +485 -134
  30. package/element-dialog/index.mjs +127 -37
  31. package/empty-view/index.mjs +31 -13
  32. package/flex-column/index.mjs +1 -1
  33. package/flex-item/index.mjs +1 -1
  34. package/flex-row/index.mjs +1 -1
  35. package/flow/index.mjs +40 -105
  36. package/flow-designer/index.mjs +555 -615
  37. package/flow-node/index.mjs +47 -15
  38. package/flow-viewer/index.mjs +78 -167
  39. package/form-cascader/index.mjs +24 -24
  40. package/form-checkbox-group/index.mjs +35 -79
  41. package/form-date-picker/index.mjs +22 -22
  42. package/form-holder/index.mjs +1 -1
  43. package/form-input/index.mjs +86 -28
  44. package/form-input-email/index.mjs +18 -18
  45. package/form-input-id-card/index.mjs +27 -27
  46. package/form-input-number/index.mjs +59 -219
  47. package/form-input-phone-number/index.mjs +27 -27
  48. package/form-input-tag/index.mjs +38 -160
  49. package/form-input-time/index.mjs +16 -16
  50. package/form-item/index.mjs +146 -15
  51. package/form-item-group/index.mjs +164 -14
  52. package/form-radio-group/index.mjs +41 -41
  53. package/form-select/index.mjs +20 -20
  54. package/form-switch/index.mjs +19 -19
  55. package/form-textarea/index.mjs +29 -29
  56. package/form-view/index.mjs +42 -46
  57. package/fy-array/index.mjs +2 -2
  58. package/fy-cascader/index.mjs +15 -15
  59. package/fy-checkbox/index.mjs +1 -1
  60. package/fy-code/index.mjs +1 -1
  61. package/fy-curd/index.mjs +2821 -210
  62. package/fy-date/index.mjs +59 -17
  63. package/fy-draggable/index.mjs +1 -1
  64. package/fy-dynamic/index.mjs +208 -64
  65. package/fy-empty/index.mjs +29 -12
  66. package/fy-form/index.mjs +743 -178
  67. package/fy-form-design/index.mjs +1013 -1540
  68. package/fy-input/index.mjs +105 -17
  69. package/fy-input-color/index.mjs +67 -16
  70. package/fy-input-icon/index.mjs +119 -23
  71. package/fy-input-map/index.mjs +14 -15
  72. package/fy-input-number/index.mjs +1 -1
  73. package/fy-input-table/index.mjs +19 -21
  74. package/fy-input-tree/index.mjs +3 -3
  75. package/fy-radio/index.mjs +1 -1
  76. package/fy-rate/index.mjs +50 -16
  77. package/fy-select/index.mjs +126 -29
  78. package/fy-slider/index.mjs +2 -2
  79. package/fy-switch/index.mjs +1 -1
  80. package/fy-tabs/index.mjs +51 -15
  81. package/fy-time/index.mjs +1 -1
  82. package/fy-title/index.mjs +1 -1
  83. package/fy-tree/index.mjs +23 -25
  84. package/fy-u-editor/index.mjs +1 -1
  85. package/fy-upload/index.mjs +2 -2
  86. package/highlight-j-s/index.mjs +29 -19
  87. package/icon-temp/index.mjs +30 -12
  88. package/iframe-window/index.mjs +18 -19
  89. package/image-cropper/index.mjs +22 -23
  90. package/image-preview/index.mjs +1 -1
  91. package/input-number/index.mjs +173 -63
  92. package/license/index.mjs +1 -1
  93. package/loading-view/index.mjs +33 -15
  94. package/login/index.mjs +1 -1
  95. package/nav-bar/index.mjs +31 -15
  96. package/package.json +1 -1
  97. package/page/index.mjs +20 -12
  98. package/page-header/index.mjs +34 -13
  99. package/page-index-top/index.mjs +53 -100
  100. package/page-skeleton/index.mjs +35 -18
  101. package/page-skeleton-new/index.mjs +15 -16
  102. package/pageable-table/index.mjs +228 -86
  103. package/pageable-view/index.mjs +1 -1
  104. package/present-view/index.mjs +71 -75
  105. package/record-video/index.mjs +1 -1
  106. package/resize-observer/index.mjs +29 -21
  107. package/search/index.mjs +9 -9
  108. package/search-popover/index.mjs +1 -1
  109. package/sign/index.mjs +1 -1
  110. package/split-pane/index.mjs +45 -40
  111. package/swiper/index.mjs +13 -14
  112. package/table-view/index.mjs +97 -631
  113. package/text-ellipsis/index.mjs +1 -1
  114. package/tinymce-editor/index.mjs +63 -63
  115. package/toolbar/index.mjs +208 -15
  116. package/toolbar-button/index.mjs +56 -30
  117. package/verify/index.mjs +1 -1
  118. package/watermark/index.mjs +1 -1
  119. package/web-types.json +1 -1
  120. package/x-input-tag/index.mjs +118 -49
  121. package/chunks/CountUp.f1a19f35.mjs +0 -124
  122. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
  123. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
  124. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
  125. package/chunks/ElementDialog.d8f3105c.mjs +0 -211
  126. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
  127. package/chunks/EmptyView.e2430422.mjs +0 -51
  128. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
  129. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
  130. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
  131. package/chunks/FormItem.2920ac0c.mjs +0 -45
  132. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
  133. package/chunks/FormItemGroup.41daddb6.mjs +0 -64
  134. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
  135. package/chunks/FyCurd.8acd2983.mjs +0 -548
  136. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
  137. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
  138. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
  139. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
  140. package/chunks/FyForm.0294e494.mjs +0 -439
  141. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
  142. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
  143. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
  144. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
  145. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
  146. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
  147. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
  148. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
  149. package/chunks/IconTemp.42c48e1f.mjs +0 -32
  150. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
  151. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
  152. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
  153. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
  154. package/chunks/Page.81f4b8d9.mjs +0 -32
  155. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
  156. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
  157. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
  158. package/chunks/PageableTable.333cbdc1.mjs +0 -335
  159. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
  160. package/chunks/ResizeObserver.60f728f0.mjs +0 -54
  161. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
  162. package/chunks/TableColumn.8503272e.mjs +0 -106
  163. package/chunks/Toolbar.5c539dbb.mjs +0 -24
  164. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
  165. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
  166. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
@@ -1,23 +1,22 @@
1
1
  var l = Object.defineProperty;
2
- var s = Object.getOwnPropertySymbols;
2
+ var a = Object.getOwnPropertySymbols;
3
3
  var u = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
4
- var a = (e, t, o) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, p = (e, t) => {
4
+ var s = (e, t, o) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, p = (e, t) => {
5
5
  for (var o in t || (t = {}))
6
- u.call(t, o) && a(e, o, t[o]);
7
- if (s)
8
- for (var o of s(t))
9
- f.call(t, o) && a(e, o, t[o]);
6
+ u.call(t, o) && s(e, o, t[o]);
7
+ if (a)
8
+ for (var o of a(t))
9
+ f.call(t, o) && s(e, o, t[o]);
10
10
  return e;
11
11
  };
12
- import { B as m } from "../chunks/util.7844e2c2.mjs";
12
+ import { B as m } from "../chunks/util.ae730cde.mjs";
13
13
  import { VueCropper as d } from "vue-cropper";
14
14
  import h from "vue";
15
15
  import n from "element-ui/lib/button";
16
- import { _ as v } from "../chunks/ElementDialog.d8f3105c.mjs";
17
- import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
18
- var _ = function() {
16
+ import { n as v } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
17
+ var g = function() {
19
18
  var e = this, t = e.$createElement, o = e._self._c || t;
20
- return o(v, {
19
+ return o("ElementDialog", {
21
20
  staticClass: "avue-cropper",
22
21
  attrs: {
23
22
  visible: e.visible,
@@ -146,7 +145,7 @@ var _ = function() {
146
145
  alt: ""
147
146
  }
148
147
  })])])])]);
149
- }, x = [];
148
+ }, _ = [];
150
149
  const r = {
151
150
  name: "ImageCropper",
152
151
  components: {
@@ -189,7 +188,7 @@ const r = {
189
188
  e && e(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
190
189
  }
191
190
  }
192
- }, b = (e = {}) => {
191
+ }, x = (e = {}) => {
193
192
  const t = h.extend(r), o = p({
194
193
  outputSize: 1,
195
194
  // 裁剪生成图片的质量(可选0.1 - 1)
@@ -227,25 +226,25 @@ const r = {
227
226
  }).$mount();
228
227
  return document.body.appendChild(i.$el), i.show(), i;
229
228
  };
230
- r.imageCropper = b;
231
- const C = r, c = {};
232
- var y = /* @__PURE__ */ g(
233
- C,
229
+ r.imageCropper = x;
230
+ const b = r, c = {};
231
+ var C = /* @__PURE__ */ v(
232
+ b,
233
+ g,
234
234
  _,
235
- x,
236
235
  !1,
237
- $,
236
+ y,
238
237
  null,
239
238
  null,
240
239
  null
241
240
  );
242
- function $(e) {
241
+ function y(e) {
243
242
  for (let t in c)
244
243
  this[t] = c[t];
245
244
  }
246
- const M = /* @__PURE__ */ function() {
247
- return y.exports;
245
+ const B = /* @__PURE__ */ function() {
246
+ return C.exports;
248
247
  }();
249
248
  export {
250
- M as default
249
+ B as default
251
250
  };
@@ -9,7 +9,7 @@ var r = (e, i, t) => i in e ? d(e, i, { enumerable: !0, configurable: !0, writab
9
9
  h.call(i, t) && r(e, t, i[t]);
10
10
  return e;
11
11
  };
12
- import { v as p } from "../chunks/util.7844e2c2.mjs";
12
+ import { i as p } from "../chunks/util.ae730cde.mjs";
13
13
  import { setPx as u } from "@web-utils/core";
14
14
  import f from "vue";
15
15
  import g from "element-ui/lib/carousel-item";
@@ -1,13 +1,123 @@
1
1
  import u from "element-ui/src/mixins/focus";
2
2
  import o from "element-ui/src/directives/repeat-click";
3
- import { i as h, s as a, r as c } from "../chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs";
4
- import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
5
- const p = {
3
+ import { i as a } from "../chunks/input-number-mixin.41a066be.mjs";
4
+ import l from "element-ui/lib/input";
5
+ import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
6
+ var p = function() {
7
+ var e = this, t = e.$createElement, n = e._self._c || t;
8
+ return n("div", {
9
+ class: ["input-number", "el-input-number", e.inputNumberSize ? `el-input-number--${e.inputNumberSize}` : "", {
10
+ "is-disabled": e.inputNumberDisabled,
11
+ "is-without-controls": !e.controls,
12
+ "is-controls-right": e.controlsAtRight
13
+ }],
14
+ on: {
15
+ dragstart: function(i) {
16
+ i.preventDefault();
17
+ }
18
+ }
19
+ }, [e.controls ? n("span", {
20
+ directives: [{
21
+ name: "repeat-click",
22
+ rawName: "v-repeat-click",
23
+ value: e.decrease,
24
+ expression: "decrease"
25
+ }],
26
+ staticClass: "el-input-number__decrease",
27
+ class: {
28
+ "is-disabled": e.minDisabled
29
+ },
30
+ attrs: {
31
+ role: "button"
32
+ },
33
+ on: {
34
+ keydown: function(i) {
35
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.decrease.apply(null, arguments);
36
+ }
37
+ }
38
+ }, [n("i", {
39
+ class: `el-icon-${e.controlsAtRight ? "arrow-down" : "minus"}`
40
+ })]) : e._e(), e.controls ? n("span", {
41
+ directives: [{
42
+ name: "repeat-click",
43
+ rawName: "v-repeat-click",
44
+ value: e.increase,
45
+ expression: "increase"
46
+ }],
47
+ staticClass: "el-input-number__increase",
48
+ class: {
49
+ "is-disabled": e.maxDisabled
50
+ },
51
+ attrs: {
52
+ role: "button"
53
+ },
54
+ on: {
55
+ keydown: function(i) {
56
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.increase.apply(null, arguments);
57
+ }
58
+ }
59
+ }, [n("i", {
60
+ class: `el-icon-${e.controlsAtRight ? "arrow-up" : "plus"}`
61
+ })]) : e._e(), n(l, {
62
+ ref: "input",
63
+ attrs: {
64
+ value: e.displayValue,
65
+ placeholder: e.placeholder,
66
+ disabled: e.inputNumberDisabled,
67
+ size: e.inputNumberSize,
68
+ max: e.max,
69
+ "prefix-icon": e.prefixIcon,
70
+ "suffix-icon": e.suffixIcon,
71
+ min: e.min,
72
+ name: e.name,
73
+ label: e.label
74
+ },
75
+ on: {
76
+ blur: e.handleBlur,
77
+ focus: e.handleFocus,
78
+ input: e.handleInput,
79
+ change: e.handleInputChange
80
+ },
81
+ nativeOn: {
82
+ keydown: [function(i) {
83
+ return !i.type.indexOf("key") && e._k(i.keyCode, "up", 38, i.key, ["Up", "ArrowUp"]) ? null : (i.preventDefault(), e.increase.apply(null, arguments));
84
+ }, function(i) {
85
+ return !i.type.indexOf("key") && e._k(i.keyCode, "down", 40, i.key, ["Down", "ArrowDown"]) ? null : (i.preventDefault(), e.decrease.apply(null, arguments));
86
+ }]
87
+ },
88
+ scopedSlots: e._u([{
89
+ key: "append",
90
+ fn: function() {
91
+ return [e._t("append")];
92
+ },
93
+ proxy: !0
94
+ }, {
95
+ key: "prefix",
96
+ fn: function() {
97
+ return [e._t("prefix")];
98
+ },
99
+ proxy: !0
100
+ }, {
101
+ key: "prepend",
102
+ fn: function() {
103
+ return [e._t("prepend")];
104
+ },
105
+ proxy: !0
106
+ }, {
107
+ key: "suffix",
108
+ fn: function() {
109
+ return [e._t("suffix")];
110
+ },
111
+ proxy: !0
112
+ }], null, !0)
113
+ })], 1);
114
+ }, h = [];
115
+ const d = {
6
116
  name: "InputNumber",
7
117
  directives: {
8
118
  repeatClick: o
9
119
  },
10
- mixins: [u("input"), h],
120
+ mixins: [u("input"), a],
11
121
  inject: {
12
122
  elForm: {
13
123
  default: ""
@@ -30,8 +140,8 @@ const p = {
30
140
  return this._increase(this.value, this.step) > this.max;
31
141
  },
32
142
  numPrecision() {
33
- const { value: t, step: e, getPrecision: i, precision: s } = this, n = i(e);
34
- return s !== void 0 ? (n > s && console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"), s) : Math.max(i(t), n);
143
+ const { value: e, step: t, getPrecision: n, precision: i } = this, r = n(t);
144
+ return i !== void 0 ? (r > i && console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"), i) : Math.max(n(e), r);
35
145
  },
36
146
  controlsAtRight() {
37
147
  return this.controls && this.controlsPosition === "right";
@@ -48,38 +158,38 @@ const p = {
48
158
  displayValue() {
49
159
  if (this.userInput !== null)
50
160
  return this.userInput;
51
- let t = this.currentValue;
52
- if (typeof t == "number") {
161
+ let e = this.currentValue;
162
+ if (typeof e == "number") {
53
163
  if (this.stepStrictly) {
54
- const e = this.getPrecision(this.step), i = Math.pow(10, e);
55
- t = Math.round(t / this.step) * i * this.step / i;
164
+ const t = this.getPrecision(this.step), n = Math.pow(10, t);
165
+ e = Math.round(e / this.step) * n * this.step / n;
56
166
  }
57
- this.precision !== void 0 && (t = t.toFixed(this.precision));
167
+ this.precision !== void 0 && (e = e.toFixed(this.precision));
58
168
  }
59
- return t;
169
+ return e;
60
170
  }
61
171
  },
62
172
  watch: {
63
173
  value: {
64
174
  immediate: !0,
65
- handler(t) {
66
- let e = t === void 0 ? t : Number(t);
67
- if (e !== void 0) {
68
- if (isNaN(e))
175
+ handler(e) {
176
+ let t = e === void 0 ? e : Number(e);
177
+ if (t !== void 0) {
178
+ if (isNaN(t))
69
179
  return;
70
180
  if (this.stepStrictly) {
71
- const i = this.getPrecision(this.step), s = Math.pow(10, i);
72
- e = Math.round(e / this.step) * s * this.step / s;
181
+ const n = this.getPrecision(this.step), i = Math.pow(10, n);
182
+ t = Math.round(t / this.step) * i * this.step / i;
73
183
  }
74
- this.precision !== void 0 && (e = this.toPrecision(e, this.precision));
184
+ this.precision !== void 0 && (t = this.toPrecision(t, this.precision));
75
185
  }
76
- e >= this.max && (e = this.max), e <= this.min && (e = this.min), this.currentValue = e, this.userInput = null, this.$emit("input", e);
186
+ t >= this.max && (t = this.max), t <= this.min && (t = this.min), this.currentValue = t, this.userInput = null, this.$emit("input", t);
77
187
  }
78
188
  }
79
189
  },
80
190
  mounted() {
81
- const t = this.$refs.input.$refs.input;
82
- t.setAttribute("role", "spinbutton"), t.setAttribute("aria-valuemax", this.max), t.setAttribute("aria-valuemin", this.min), t.setAttribute("aria-valuenow", this.currentValue), t.setAttribute("aria-disabled", this.inputNumberDisabled);
191
+ const e = this.$refs.input.$refs.input;
192
+ e.setAttribute("role", "spinbutton"), e.setAttribute("aria-valuemax", this.max), e.setAttribute("aria-valuemin", this.min), e.setAttribute("aria-valuenow", this.currentValue), e.setAttribute("aria-disabled", this.inputNumberDisabled);
83
193
  },
84
194
  updated() {
85
195
  if (!this.$refs || !this.$refs.input)
@@ -87,79 +197,79 @@ const p = {
87
197
  this.$refs.input.$refs.input.setAttribute("aria-valuenow", this.currentValue);
88
198
  },
89
199
  methods: {
90
- toPrecision(t, e) {
91
- return e === void 0 && (e = this.numPrecision), parseFloat(Math.round(t * Math.pow(10, e)) / Math.pow(10, e));
200
+ toPrecision(e, t) {
201
+ return t === void 0 && (t = this.numPrecision), parseFloat(Math.round(e * Math.pow(10, t)) / Math.pow(10, t));
92
202
  },
93
- getPrecision(t) {
94
- if (t === void 0)
203
+ getPrecision(e) {
204
+ if (e === void 0)
95
205
  return 0;
96
- const e = t.toString(), i = e.indexOf(".");
97
- let s = 0;
98
- return i !== -1 && (s = e.length - i - 1), s;
206
+ const t = e.toString(), n = t.indexOf(".");
207
+ let i = 0;
208
+ return n !== -1 && (i = t.length - n - 1), i;
99
209
  },
100
- _increase(t, e) {
101
- if (typeof t != "number" && t !== void 0)
210
+ _increase(e, t) {
211
+ if (typeof e != "number" && e !== void 0)
102
212
  return this.currentValue;
103
- const i = Math.pow(10, this.numPrecision);
104
- return this.toPrecision((i * t + i * e) / i);
213
+ const n = Math.pow(10, this.numPrecision);
214
+ return this.toPrecision((n * e + n * t) / n);
105
215
  },
106
- _decrease(t, e) {
107
- if (typeof t != "number" && t !== void 0)
216
+ _decrease(e, t) {
217
+ if (typeof e != "number" && e !== void 0)
108
218
  return this.currentValue;
109
- const i = Math.pow(10, this.numPrecision);
110
- return this.toPrecision((i * t - i * e) / i);
219
+ const n = Math.pow(10, this.numPrecision);
220
+ return this.toPrecision((n * e - n * t) / n);
111
221
  },
112
222
  increase() {
113
223
  if (this.inputNumberDisabled || this.maxDisabled)
114
224
  return;
115
- const t = this.value || 0, e = this._increase(t, this.step);
116
- this.setCurrentValue(e);
225
+ const e = this.value || 0, t = this._increase(e, this.step);
226
+ this.setCurrentValue(t);
117
227
  },
118
228
  decrease() {
119
229
  if (this.inputNumberDisabled || this.minDisabled)
120
230
  return;
121
- const t = this.value || 0, e = this._decrease(t, this.step);
122
- this.setCurrentValue(e);
231
+ const e = this.value || 0, t = this._decrease(e, this.step);
232
+ this.setCurrentValue(t);
123
233
  },
124
- handleBlur(t) {
125
- this.$emit("blur", t);
234
+ handleBlur(e) {
235
+ this.$emit("blur", e);
126
236
  },
127
- handleFocus(t) {
128
- this.$emit("focus", t);
237
+ handleFocus(e) {
238
+ this.$emit("focus", e);
129
239
  },
130
- setCurrentValue(t) {
131
- const e = this.currentValue;
132
- typeof t == "number" && this.precision !== void 0 && (t = this.toPrecision(t, this.precision)), t >= this.max && (t = this.max), t <= this.min && (t = this.min), e !== t && (this.userInput = null, this.$emit("input", t), this.$emit("change", t, e), this.currentValue = t);
240
+ setCurrentValue(e) {
241
+ const t = this.currentValue;
242
+ typeof e == "number" && this.precision !== void 0 && (e = this.toPrecision(e, this.precision)), e >= this.max && (e = this.max), e <= this.min && (e = this.min), t !== e && (this.userInput = null, this.$emit("input", e), this.$emit("change", e, t), this.currentValue = e);
133
243
  },
134
- handleInput(t) {
135
- this.userInput = t;
244
+ handleInput(e) {
245
+ this.userInput = e;
136
246
  },
137
- handleInputChange(t) {
138
- const e = t === "" ? void 0 : Number(t);
139
- (!isNaN(e) || t === "") && this.setCurrentValue(e), this.userInput = null;
247
+ handleInputChange(e) {
248
+ const t = e === "" ? void 0 : Number(e);
249
+ (!isNaN(t) || e === "") && this.setCurrentValue(t), this.userInput = null;
140
250
  },
141
251
  select() {
142
252
  this.$refs.input.select();
143
253
  }
144
254
  }
145
- }, r = {};
146
- var m = /* @__PURE__ */ l(
255
+ }, s = {};
256
+ var m = /* @__PURE__ */ c(
257
+ d,
147
258
  p,
148
- c,
149
- a,
259
+ h,
150
260
  !1,
151
- d,
261
+ f,
152
262
  null,
153
263
  null,
154
264
  null
155
265
  );
156
- function d(t) {
157
- for (let e in r)
158
- this[e] = r[e];
266
+ function f(e) {
267
+ for (let t in s)
268
+ this[t] = s[t];
159
269
  }
160
- const P = /* @__PURE__ */ function() {
270
+ const I = /* @__PURE__ */ function() {
161
271
  return m.exports;
162
272
  }();
163
273
  export {
164
- P as default
274
+ I as default
165
275
  };
package/license/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as l } from "../chunks/util.7844e2c2.mjs";
1
+ import { C as l } from "../chunks/util.ae730cde.mjs";
2
2
  import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
3
  var m = function() {
4
4
  var t = this, e = t.$createElement, s = t._self._c || e;
@@ -1,6 +1,24 @@
1
- import { s as n, r as o } from "../chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs";
2
- import { n as i } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
- const r = {
1
+ import { n as o } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
+ var s = function() {
3
+ var t = this, e = t.$createElement, n = t._self._c || e;
4
+ return n("div", {
5
+ staticClass: "loading-view",
6
+ style: {
7
+ fontSize: t.fontSize,
8
+ height: t.height
9
+ }
10
+ }, [t._t("default", function() {
11
+ return [n("div", {
12
+ staticClass: "flex-column horizon-center"
13
+ }, [n("i", {
14
+ staticClass: "el-icon-loading",
15
+ style: {
16
+ fontSize: t.iconSize
17
+ }
18
+ }), n("p", [t._v(t._s(t.loadingTips))])])];
19
+ })], 2);
20
+ }, a = [];
21
+ const l = {
4
22
  name: "LoadingView",
5
23
  props: {
6
24
  loadingTips: {
@@ -20,24 +38,24 @@ const r = {
20
38
  default: "100%"
21
39
  }
22
40
  }
23
- }, e = {};
24
- var s = /* @__PURE__ */ i(
25
- r,
26
- o,
27
- n,
28
- !1,
41
+ }, i = {};
42
+ var r = /* @__PURE__ */ o(
43
+ l,
44
+ s,
29
45
  a,
46
+ !1,
47
+ _,
30
48
  null,
31
49
  null,
32
50
  null
33
51
  );
34
- function a(l) {
35
- for (let t in e)
36
- this[t] = e[t];
52
+ function _(t) {
53
+ for (let e in i)
54
+ this[e] = i[e];
37
55
  }
38
- const c = /* @__PURE__ */ function() {
39
- return s.exports;
56
+ const u = /* @__PURE__ */ function() {
57
+ return r.exports;
40
58
  }();
41
59
  export {
42
- c as default
60
+ u as default
43
61
  };
package/login/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { s as m } from "../chunks/util.7844e2c2.mjs";
1
+ import { s as m } from "../chunks/util.ae730cde.mjs";
2
2
  import { isBlank as d } from "@web-utils/core";
3
3
  import l from "element-ui/lib/button";
4
4
  import r from "element-ui/lib/form-item";
package/nav-bar/index.mjs CHANGED
@@ -1,6 +1,22 @@
1
- import { s as n, r as e } from "../chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs";
2
- import { n as s } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
- const a = {
1
+ import a from "element-ui/lib/button";
2
+ import { n as r } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
+ var s = function() {
4
+ var t = this, e = t.$createElement, n = t._self._c || e;
5
+ return n("div", {
6
+ staticClass: "nav-bar"
7
+ }, [t.showBack ? n(a, {
8
+ attrs: {
9
+ type: "text",
10
+ icon: "el-icon-arrow-left"
11
+ },
12
+ on: {
13
+ click: t.goBack
14
+ }
15
+ }, [t._v(" 返回 ")]) : t._e(), t.$slots.right ? n("div", {
16
+ staticClass: "flex-item flex-row-column vertical-center"
17
+ }, [t._t("right")], 2) : t._e()], 1);
18
+ }, c = [];
19
+ const _ = {
4
20
  name: "NavBar",
5
21
  props: {
6
22
  onGoBack: Function,
@@ -14,24 +30,24 @@ const a = {
14
30
  this.onGoBack ? this.onGoBack() : this.$router.back();
15
31
  }
16
32
  }
17
- }, t = {};
18
- var r = /* @__PURE__ */ s(
19
- a,
20
- e,
21
- n,
22
- !1,
33
+ }, o = {};
34
+ var i = /* @__PURE__ */ r(
35
+ _,
36
+ s,
23
37
  c,
38
+ !1,
39
+ l,
24
40
  null,
25
41
  null,
26
42
  null
27
43
  );
28
- function c(i) {
29
- for (let o in t)
30
- this[o] = t[o];
44
+ function l(t) {
45
+ for (let e in o)
46
+ this[e] = o[e];
31
47
  }
32
- const _ = /* @__PURE__ */ function() {
33
- return r.exports;
48
+ const f = /* @__PURE__ */ function() {
49
+ return i.exports;
34
50
  }();
35
51
  export {
36
- _ as default
52
+ f as default
37
53
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "3.0.2",
4
+ "version": "3.0.4",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
package/page/index.mjs CHANGED
@@ -1,5 +1,13 @@
1
- import { s as o, r as t } from "../chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs";
2
- import { n as r } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
1
+ import { n as o } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
+ var l = function() {
3
+ var e = this, t = e.$createElement, a = e._self._c || t;
4
+ return a("div", {
5
+ staticClass: "page flex-row flex-item",
6
+ class: {
7
+ vertical: e.vertical && !e.horizontal
8
+ }
9
+ }, [e._t("default")], 2);
10
+ }, r = [];
3
11
  const s = {
4
12
  name: "Page",
5
13
  props: {
@@ -10,23 +18,23 @@ const s = {
10
18
  horizontal: Boolean
11
19
  }
12
20
  }, n = {};
13
- var a = /* @__PURE__ */ r(
21
+ var _ = /* @__PURE__ */ o(
14
22
  s,
15
- t,
16
- o,
17
- !1,
18
23
  l,
24
+ r,
25
+ !1,
26
+ c,
19
27
  null,
20
28
  null,
21
29
  null
22
30
  );
23
- function l(c) {
24
- for (let e in n)
25
- this[e] = n[e];
31
+ function c(e) {
32
+ for (let t in n)
33
+ this[t] = n[t];
26
34
  }
27
- const _ = /* @__PURE__ */ function() {
28
- return a.exports;
35
+ const u = /* @__PURE__ */ function() {
36
+ return _.exports;
29
37
  }();
30
38
  export {
31
- _ as default
39
+ u as default
32
40
  };