@web-utils/component 1.2.5 → 1.2.7

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 (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/element-dialog/index.js +242 -1
  37. package/dist/components/empty-view/index.js +69 -1
  38. package/dist/components/error-view/index.js +61 -1
  39. package/dist/components/flex-column/index.js +50 -1
  40. package/dist/components/flex-item/index.js +66 -1
  41. package/dist/components/flex-row/index.js +50 -1
  42. package/dist/components/flex-scroller/index.js +47 -1
  43. package/dist/components/form-button/index.js +80 -1
  44. package/dist/components/form-cascader/index.js +151 -1
  45. package/dist/components/form-checkbox-group/index.js +192 -1
  46. package/dist/components/form-date-picker/index.js +182 -1
  47. package/dist/components/form-holder/index.js +90 -1
  48. package/dist/components/form-input/index.js +106 -1
  49. package/dist/components/form-input-email/index.js +97 -1
  50. package/dist/components/form-input-id-card/index.js +104 -1
  51. package/dist/components/form-input-number/index.js +123 -1
  52. package/dist/components/form-input-phone-number/index.js +98 -1
  53. package/dist/components/form-input-time/index.js +124 -1
  54. package/dist/components/form-item/index.js +120 -1
  55. package/dist/components/form-item-config-provider/index.js +63 -1
  56. package/dist/components/form-item-group/index.js +169 -1
  57. package/dist/components/form-radio-group/index.js +170 -1
  58. package/dist/components/form-select/index.js +154 -1
  59. package/dist/components/form-switch/index.js +97 -1
  60. package/dist/components/form-textarea/index.js +102 -1
  61. package/dist/components/form-view/index.js +343 -1
  62. package/dist/components/guide-steps/index.js +94 -1
  63. package/dist/components/icon-card/index.js +62 -1
  64. package/dist/components/iframe-window/index.js +99 -1
  65. package/dist/components/input-number/index.js +274 -1
  66. package/dist/components/input-number-range/index.js +110 -1
  67. package/dist/components/j-s-x-component/index.js +16 -1
  68. package/dist/components/keep-view-alive/index.js +119 -1
  69. package/dist/components/loading-view/index.js +61 -1
  70. package/dist/components/nav-bar/index.js +52 -1
  71. package/dist/components/not-implement/index.js +35 -1
  72. package/dist/components/page/index.js +40 -1
  73. package/dist/components/page-header/index.js +56 -1
  74. package/dist/components/page-index/index.js +151 -1
  75. package/dist/components/page-index-top/index.js +119 -1
  76. package/dist/components/page-skeleton/index.js +56 -1
  77. package/dist/components/page-skeleton-new/index.js +98 -1
  78. package/dist/components/pageable-table/index.js +429 -1
  79. package/dist/components/pageable-view/index.js +328 -2
  80. package/dist/components/photo-swipe/index.js +187 -1
  81. package/dist/components/resize-observer/index.js +62 -1
  82. package/dist/components/search-popover/index.js +391 -2
  83. package/dist/components/sign-panel/index.js +242 -1
  84. package/dist/components/split-pane/index.js +209 -1
  85. package/dist/components/stateful/index.js +84 -1
  86. package/dist/components/static-pageable-table/index.js +92 -1
  87. package/dist/components/swiper/index.js +158 -1
  88. package/dist/components/tab/index.js +145 -1
  89. package/dist/components/tab-item/index.js +73 -1
  90. package/dist/components/table-column/index.js +89 -1
  91. package/dist/components/table-view/index.js +363 -1
  92. package/dist/components/tag-render/index.js +97 -1
  93. package/dist/components/tinymce-editor/index.js +173 -1
  94. package/dist/components/tinymce-wrapper/index.js +618 -1
  95. package/dist/components/toolbar/index.js +217 -1
  96. package/dist/components/toolbar-button/index.js +90 -1
  97. package/dist/components/trigger/index.js +71 -1
  98. package/dist/components/vue-tags-input/index.js +439 -1
  99. package/dist/components/watermark/index.js +63 -1
  100. package/dist/components/x-dialog/index.js +173 -1
  101. package/dist/index.css +2102 -1
  102. package/dist/index.es.js +3097 -2347
  103. package/package.json +29 -29
  104. package/web-types.json +22 -55
  105. package/dist/chunks/23bd3525.js +0 -1
  106. package/dist/chunks/65f4f4f2.js +0 -1
  107. package/dist/chunks/8473fc69.js +0 -1
  108. package/dist/chunks/a125d16c.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/f15477c7.js +0 -1
  111. package/dist/components/el-color-picker-dropdown/index.js +0 -1
package/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # web-component
2
-
3
- ## usage
4
-
5
- ```js
6
- import { defineConfig } from 'vite'
7
- import styleImport from "vite-plugin-style-import";
8
-
9
- export default defineConfig({
10
- plugins: [
11
- styleImport({
12
- libs: [{
13
- libraryName: '@web-utils/component',
14
- base: '@web-utils/component/dist/base.css',
15
- ensureStyleFile: true,
16
- libraryNameChangeCase: 'pascalCase',
17
- resolveStyle: name => {
18
- return `@web-utils/component/dist/${name}.css`
19
- },
20
- resolveComponent: name => {
21
- return `@web-utils/component/dist/${name}.js`
22
- }
23
- }]
24
- })
25
- ]
26
- }
27
- ```
1
+ # web-component
2
+
3
+ ## usage
4
+
5
+ ```js
6
+ import { defineConfig } from 'vite'
7
+ import styleImport from "vite-plugin-style-import";
8
+
9
+ export default defineConfig({
10
+ plugins: [
11
+ styleImport({
12
+ libs: [{
13
+ libraryName: '@web-utils/component',
14
+ base: '@web-utils/component/dist/base.css',
15
+ ensureStyleFile: true,
16
+ libraryNameChangeCase: 'pascalCase',
17
+ resolveStyle: name => {
18
+ return `@web-utils/component/dist/${name}.css`
19
+ },
20
+ resolveComponent: name => {
21
+ return `@web-utils/component/dist/${name}.js`
22
+ }
23
+ }]
24
+ })
25
+ ]
26
+ }
27
+ ```
@@ -1 +1,16 @@
1
- const t={inject:["uploader"]},p={data(){return{support:!0}},mounted(){this.support=this.uploader.uploader.support}};export{p as s,t as u};
1
+ const t = {
2
+ inject: ["uploader"]
3
+ }, p = {
4
+ data() {
5
+ return {
6
+ support: !0
7
+ };
8
+ },
9
+ mounted() {
10
+ this.support = this.uploader.uploader.support;
11
+ }
12
+ };
13
+ export {
14
+ p as s,
15
+ t as u
16
+ };
@@ -0,0 +1,184 @@
1
+ import { isObject as u, isString as a, hasOwn as f, isPlainObject as p, isArray as h, camelize as g, isFunction as m } from "@web-utils/core";
2
+ import x from "vue";
3
+ const T = (e, r) => p(e) || a(e) ? [r, e] : h(e) ? [r, ...e] : [r];
4
+ function E() {
5
+ const e = window.navigator.userAgent, r = e.indexOf("MSIE ");
6
+ if (r > 0)
7
+ return parseInt(e.substring(r + 5, e.indexOf(".", r)), 10);
8
+ if (e.indexOf("Trident/") > 0) {
9
+ const o = e.indexOf("rv:");
10
+ return parseInt(e.substring(o + 3, e.indexOf(".", o)), 10);
11
+ }
12
+ const l = e.indexOf("Edge/");
13
+ return l > 0 ? parseInt(e.substring(l + 5, e.indexOf(".", l)), 10) : -1;
14
+ }
15
+ function z(e, r) {
16
+ for (const t in r)
17
+ x.set(e, t, r[t]);
18
+ return e;
19
+ }
20
+ const I = (e, r) => {
21
+ if (!e || !r)
22
+ return null;
23
+ let t = e;
24
+ for (; t && r(t); )
25
+ t = t.$parent;
26
+ return t;
27
+ }, w = [
28
+ "data",
29
+ "height",
30
+ "max-height",
31
+ "stripe",
32
+ "border",
33
+ "size",
34
+ "fit",
35
+ "show-header",
36
+ "highlight-current-row",
37
+ "current-row-key",
38
+ "row-class-name",
39
+ "row-style",
40
+ "cell-class-name",
41
+ "cell-style",
42
+ "header-row-class-name",
43
+ "header-row-style",
44
+ "header-cell-class-name",
45
+ "header-cell-style",
46
+ "row-key",
47
+ "empty-text",
48
+ "default-expand-all",
49
+ "expand-row-keys",
50
+ "default-sort",
51
+ "tooltip-effect",
52
+ "show-summary",
53
+ "sum-text",
54
+ "summary-method",
55
+ "span-method",
56
+ "select-on-indeterminate ",
57
+ "indent",
58
+ "lazy",
59
+ "load",
60
+ "tree-props"
61
+ ], b = [
62
+ "select",
63
+ "select-all",
64
+ "selection-change",
65
+ "cell-mouse-enter",
66
+ "cell-mouse-leave",
67
+ "cell-click",
68
+ "cell-dblclick",
69
+ "row-click",
70
+ "row-contextmenu",
71
+ "header-click",
72
+ "header-contextmenu",
73
+ "sort-change",
74
+ "filter-change",
75
+ "current-change",
76
+ "header-dragend",
77
+ "expand-change"
78
+ ], y = [
79
+ "type",
80
+ "index",
81
+ "column-key",
82
+ "label",
83
+ "prop",
84
+ "width",
85
+ "min-width",
86
+ "fixed",
87
+ "render-header",
88
+ "sortable",
89
+ "sort-method",
90
+ "sort-by",
91
+ "sort-orders",
92
+ "resizable",
93
+ "formatter",
94
+ "show-overflow-tooltip",
95
+ "align",
96
+ "header-align",
97
+ "class-name",
98
+ "label-class-name",
99
+ "selectable",
100
+ "reserve-selection",
101
+ "filters",
102
+ "filter-placement",
103
+ "filter-multiple",
104
+ "filter-method",
105
+ "filtered-value"
106
+ ], k = [
107
+ "data",
108
+ "empty-text",
109
+ "node-key",
110
+ "props",
111
+ "render-after-expand",
112
+ "load",
113
+ "render-content",
114
+ "highlight-current",
115
+ "default-expand-all",
116
+ "expand-on-click-node",
117
+ "check-on-click-node",
118
+ "auto-expand-parent",
119
+ "default-expanded-keys",
120
+ "show-checkbox",
121
+ "check-strictly",
122
+ "default-checked-keys",
123
+ "current-node-key",
124
+ "filter-node-method",
125
+ "accordion",
126
+ "indent",
127
+ "icon-class",
128
+ "lazy",
129
+ "draggable",
130
+ "allow-drag",
131
+ "allow-drop"
132
+ ], v = [
133
+ "node-click",
134
+ "node-contextmenu",
135
+ "check-change",
136
+ "check",
137
+ "current-change",
138
+ "node-expand",
139
+ "node-collapse",
140
+ "node-drag-start",
141
+ "node-drag-enter",
142
+ "node-drag-leave",
143
+ "node-drag-over",
144
+ "node-drag-end",
145
+ "node-drop"
146
+ ], s = (e, r, t = !0) => {
147
+ if (u(e)) {
148
+ let l = r;
149
+ a(r) && (l = l.split(","));
150
+ const o = {};
151
+ return l.forEach((n) => {
152
+ f(e, n) && (t ? o[n] = e[n] : l.includes(n) || (o[n] = e[n]));
153
+ }), o;
154
+ }
155
+ return e;
156
+ }, A = (e) => {
157
+ const r = {};
158
+ for (const t in e)
159
+ r[g(t)] = e[t];
160
+ return r;
161
+ }, V = (e) => s(e, w), K = (e) => s(e, y), R = (e) => s(e, b), S = (e) => s(e, k), F = (e) => s(e, v), c = (e = "", r) => {
162
+ const t = r || {};
163
+ return (e || "").replace(/{(.*?)}/g, (o, n) => {
164
+ if (n.indexOf(":")) {
165
+ const [i, d] = n.split(":");
166
+ return t[i] ? t[i] : d;
167
+ } else
168
+ return t[n] || "";
169
+ });
170
+ }, M = (e, r) => m(e) ? c(e(r), r) : a(e) ? c(e, r) : null;
171
+ export {
172
+ S as a,
173
+ F as b,
174
+ z as c,
175
+ V as d,
176
+ R as e,
177
+ K as f,
178
+ E as g,
179
+ T as h,
180
+ s as i,
181
+ I as j,
182
+ M as k,
183
+ A as n
184
+ };
@@ -1 +1,30 @@
1
- function v(r,a,d,h,i,t,f,u){var e=typeof r=="function"?r.options:r;a&&(e.render=a,e.staticRenderFns=d,e._compiled=!0),h&&(e.functional=!0),t&&(e._scopeId="data-v-"+t);var o;if(f?(o=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!n&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(n=__VUE_SSR_CONTEXT__),i&&i.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(f)},e._ssrRegister=o):i&&(o=u?function(){i.call(this,(e.functional?this.parent:this).$root.$options.shadowRoot)}:i),o)if(e.functional){e._injectStyles=o;var l=e.render;e.render=function(p,_){return o.call(_),l(p,_)}}else{var s=e.beforeCreate;e.beforeCreate=s?[].concat(s,o):[o]}return{exports:r,options:e}}export{v as n};
1
+ function v(r, a, d, h, i, t, f, u) {
2
+ var e = typeof r == "function" ? r.options : r;
3
+ a && (e.render = a, e.staticRenderFns = d, e._compiled = !0), h && (e.functional = !0), t && (e._scopeId = "data-v-" + t);
4
+ var o;
5
+ if (f ? (o = function(n) {
6
+ n = n || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !n && typeof __VUE_SSR_CONTEXT__ < "u" && (n = __VUE_SSR_CONTEXT__), i && i.call(this, n), n && n._registeredComponents && n._registeredComponents.add(f);
7
+ }, e._ssrRegister = o) : i && (o = u ? function() {
8
+ i.call(
9
+ this,
10
+ (e.functional ? this.parent : this).$root.$options.shadowRoot
11
+ );
12
+ } : i), o)
13
+ if (e.functional) {
14
+ e._injectStyles = o;
15
+ var l = e.render;
16
+ e.render = function(p, _) {
17
+ return o.call(_), l(p, _);
18
+ };
19
+ } else {
20
+ var s = e.beforeCreate;
21
+ e.beforeCreate = s ? [].concat(s, o) : [o];
22
+ }
23
+ return {
24
+ exports: r,
25
+ options: e
26
+ };
27
+ }
28
+ export {
29
+ v as n
30
+ };
@@ -0,0 +1,75 @@
1
+ import { MessageBox as b, Loading as w } from "element-ui";
2
+ import { isFunction as i } from "@web-utils/core";
3
+ async function S(t, e, n) {
4
+ const { stop: o, prevent: r, message: f, loadable: l, loadingText: d, confirmable: y, confirmType: m, confirmText: x } = e;
5
+ o && t.stopPropagation(), r && t.preventDefault();
6
+ const { before: c, click: u, cancel: g, after: p } = n;
7
+ if (i(u))
8
+ try {
9
+ let a = !0;
10
+ if (i(c) && (a = await c(t)), a === !1)
11
+ return;
12
+ y && await b.confirm(f || x, { type: m });
13
+ let s;
14
+ l && (s = w.service({ background: "rgba(0,0,0,0.3)", text: d }));
15
+ try {
16
+ await u(t);
17
+ } catch {
18
+ }
19
+ l && s.close(), i(p) && await p(t);
20
+ } catch (a) {
21
+ i(g) && await g(a);
22
+ }
23
+ }
24
+ const v = {
25
+ functional: !0,
26
+ props: {
27
+ stop: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ prevent: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ text: {
36
+ type: String,
37
+ default: ""
38
+ },
39
+ message: {
40
+ type: String,
41
+ default: "\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u8BB0\u5F55\u5417\uFF1F"
42
+ },
43
+ confirmable: {
44
+ type: Boolean,
45
+ default: !0
46
+ },
47
+ confirmText: {
48
+ type: String,
49
+ default: "\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u8BB0\u5F55\u5417\uFF1F"
50
+ },
51
+ confirmType: {
52
+ type: String,
53
+ default: "warning"
54
+ },
55
+ loadable: Boolean,
56
+ loadingText: {
57
+ type: String,
58
+ default: "\u6B63\u5728\u5904\u7406\u4E2D\u8BF7\u7A0D\u5019..."
59
+ },
60
+ tag: {
61
+ type: String,
62
+ default: "i"
63
+ }
64
+ },
65
+ render(t, { props: e, data: n, children: o, listeners: r }) {
66
+ return t(e.tag, {
67
+ ...n,
68
+ on: { click: (f) => S(f, e, r) },
69
+ props: e
70
+ }, o || e.text);
71
+ }
72
+ };
73
+ export {
74
+ v as c
75
+ };
@@ -0,0 +1,24 @@
1
+ import { f as e } from "./92404ceb.js";
2
+ import { i as r } from "./2bd4e340.js";
3
+ const o = {
4
+ mixins: [e],
5
+ props: {
6
+ value: [Boolean, String, Array, Number, Object, Date],
7
+ readonly: Boolean,
8
+ disabled: Boolean
9
+ },
10
+ computed: {
11
+ computePlaceholder() {
12
+ return this.placeholder === !0 ? this.message : this.placeholder;
13
+ },
14
+ listeners() {
15
+ return r(this.$listeners, "input", !1);
16
+ },
17
+ inputDisabled() {
18
+ return this.disabled;
19
+ }
20
+ }
21
+ };
22
+ export {
23
+ o as f
24
+ };
@@ -1 +1,81 @@
1
- const n={mounted(){this.value>=0&&(this.currentIndex=this.value),this.updateIndex()},methods:{updateIndex(){if(!this.$children||!this.$children.length)return;this.number=this.$children.length;const e=this.$children;for(let t=0;t<e.length;t++)e[t].currentIndex=t,e[t].currentSelected&&(this.index=t)}},props:{value:Number},watch:{currentIndex(e,t){t>-1&&this.$children[t]&&(this.$children[t].currentSelected=!1),e>-1&&this.$children[e]&&(this.$children[e].currentSelected=!0),this.$emit("input",e),this.$emit("on-index-change",e,t)},index(e){this.currentIndex=e},value(e){this.index=e}},data(){return{index:-1,currentIndex:this.index,number:this.$children.length}}},i={props:{selected:{type:Boolean,default:!1}},mounted(){this.$parent.updateIndex()},beforeDestroy(){const e=this.$parent;this.$nextTick(()=>{e.updateIndex()})},methods:{onItemClick(e){if(this.$parent.preventDefault){this.$parent.$emit("on-before-index-change",this.currentIndex);return}(typeof this.disabled=="undefined"||this.disabled===!1)&&(this.currentSelected=!0,this.$parent.currentIndex=this.currentIndex,this.$nextTick(()=>{this.$emit("on-item-click",this.currentIndex)}))}},watch:{currentSelected(e){e&&(this.$parent.index=this.currentIndex)},selected(e){this.currentSelected=e}},data(){return{currentIndex:-1,currentSelected:this.selected}}};export{i as c,n as p};
1
+ const n = {
2
+ mounted() {
3
+ this.value >= 0 && (this.currentIndex = this.value), this.updateIndex();
4
+ },
5
+ methods: {
6
+ updateIndex() {
7
+ if (!this.$children || !this.$children.length)
8
+ return;
9
+ this.number = this.$children.length;
10
+ const e = this.$children;
11
+ for (let t = 0; t < e.length; t++)
12
+ e[t].currentIndex = t, e[t].currentSelected && (this.index = t);
13
+ }
14
+ },
15
+ props: {
16
+ value: Number
17
+ },
18
+ watch: {
19
+ currentIndex(e, t) {
20
+ t > -1 && this.$children[t] && (this.$children[t].currentSelected = !1), e > -1 && this.$children[e] && (this.$children[e].currentSelected = !0), this.$emit("input", e), this.$emit("on-index-change", e, t);
21
+ },
22
+ index(e) {
23
+ this.currentIndex = e;
24
+ },
25
+ value(e) {
26
+ this.index = e;
27
+ }
28
+ },
29
+ data() {
30
+ return {
31
+ index: -1,
32
+ currentIndex: this.index,
33
+ number: this.$children.length
34
+ };
35
+ }
36
+ }, i = {
37
+ props: {
38
+ selected: {
39
+ type: Boolean,
40
+ default: !1
41
+ }
42
+ },
43
+ mounted() {
44
+ this.$parent.updateIndex();
45
+ },
46
+ beforeDestroy() {
47
+ const e = this.$parent;
48
+ this.$nextTick(() => {
49
+ e.updateIndex();
50
+ });
51
+ },
52
+ methods: {
53
+ onItemClick(e) {
54
+ if (this.$parent.preventDefault) {
55
+ this.$parent.$emit("on-before-index-change", this.currentIndex);
56
+ return;
57
+ }
58
+ (typeof this.disabled > "u" || this.disabled === !1) && (this.currentSelected = !0, this.$parent.currentIndex = this.currentIndex, this.$nextTick(() => {
59
+ this.$emit("on-item-click", this.currentIndex);
60
+ }));
61
+ }
62
+ },
63
+ watch: {
64
+ currentSelected(e) {
65
+ e && (this.$parent.index = this.currentIndex);
66
+ },
67
+ selected(e) {
68
+ this.currentSelected = e;
69
+ }
70
+ },
71
+ data() {
72
+ return {
73
+ currentIndex: -1,
74
+ currentSelected: this.selected
75
+ };
76
+ }
77
+ };
78
+ export {
79
+ i as c,
80
+ n as p
81
+ };
@@ -1 +1,26 @@
1
- function c(r){const n=Math.floor(r/31536e3);if(n)return`${n} \u5E74${o(n)}`;const t=Math.floor((r%=31536e3)/86400);if(t)return`${t} \u5929${o(t)}`;const s=Math.floor((r%=86400)/3600);if(s)return`${s} \u65F6${o(s)}`;const e=Math.floor((r%=3600)/60);if(e)return`${e} \u5206${o(e)}`;const u=r%60;return`${u} \u79D2${o(u)}`;function o(a){return a>1,""}}function f(r){return r.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}export{f as k,c as s};
1
+ function c(r) {
2
+ const n = Math.floor(r / 31536e3);
3
+ if (n)
4
+ return `${n} \u5E74${o(n)}`;
5
+ const t = Math.floor((r %= 31536e3) / 86400);
6
+ if (t)
7
+ return `${t} \u5929${o(t)}`;
8
+ const s = Math.floor((r %= 86400) / 3600);
9
+ if (s)
10
+ return `${s} \u65F6${o(s)}`;
11
+ const e = Math.floor((r %= 3600) / 60);
12
+ if (e)
13
+ return `${e} \u5206${o(e)}`;
14
+ const u = r % 60;
15
+ return `${u} \u79D2${o(u)}`;
16
+ function o(a) {
17
+ return a > 1, "";
18
+ }
19
+ }
20
+ function f(r) {
21
+ return r.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
22
+ }
23
+ export {
24
+ f as k,
25
+ c as s
26
+ };
@@ -0,0 +1,126 @@
1
+ import { i as r } from "./2bd4e340.js";
2
+ import { Col as i, FormItem as a } from "element-ui";
3
+ const u = ["span"], s = [...Object.keys(i.props)], n = s.filter((e) => !u.includes(e)), p = ["label", "prop", "rules", "labelWidth", "required"], l = [...Object.keys(a.props)], m = l.filter((e) => !p.includes(e)), f = [
4
+ "wrapCol",
5
+ "wrapFormItem",
6
+ "unwrap",
7
+ "prefixConfig",
8
+ "block",
9
+ "placeholder",
10
+ "prefixPick",
11
+ "half",
12
+ ...s,
13
+ ...l
14
+ ], h = {
15
+ inject: {
16
+ elForm: {
17
+ default: {}
18
+ },
19
+ formItemGroup: {
20
+ default: {}
21
+ }
22
+ },
23
+ props: {
24
+ disabled: Boolean,
25
+ wrapCol: {
26
+ type: Boolean,
27
+ default: !0
28
+ },
29
+ wrapFormItem: {
30
+ type: Boolean,
31
+ default: !0
32
+ },
33
+ unwrap: Boolean,
34
+ half: Boolean,
35
+ prefixConfig: Boolean,
36
+ block: Boolean,
37
+ placeholder: {
38
+ type: [Boolean, String],
39
+ default: !0
40
+ },
41
+ formItemClass: String,
42
+ prefixPick: Boolean,
43
+ label: String,
44
+ labelWidth: String,
45
+ prop: String,
46
+ required: Boolean,
47
+ rules: [Object, Array],
48
+ error: String,
49
+ validateStatus: String,
50
+ for: String,
51
+ inlineMessage: {
52
+ type: [String, Boolean],
53
+ default: ""
54
+ },
55
+ showMessage: {
56
+ type: Boolean,
57
+ default: !0
58
+ },
59
+ size: String,
60
+ span: {
61
+ type: Number,
62
+ default: 12
63
+ },
64
+ tag: {
65
+ type: String,
66
+ default: "div"
67
+ },
68
+ offset: Number,
69
+ pull: Number,
70
+ push: Number,
71
+ xs: [Number, Object],
72
+ sm: [Number, Object],
73
+ md: [Number, Object],
74
+ lg: [Number, Object],
75
+ xl: [Number, Object]
76
+ },
77
+ computed: {
78
+ prefix() {
79
+ return this.prefixConfig ? "\u8BF7\u914D\u7F6E" : this.prefixPick ? "\u8BF7\u9009\u62E9" : "\u8BF7\u8F93\u5165";
80
+ },
81
+ message() {
82
+ var e;
83
+ return `${this.prefix}${((e = this.label) == null ? void 0 : e.replace("\uFF1A", "")) || ""}`;
84
+ },
85
+ computeRules() {
86
+ const e = [...this.rules || []];
87
+ if (this.required) {
88
+ const t = e.find((o) => o.required);
89
+ t ? t.ref ? t.label = t.label || this.label : t.message = e.message || this.message : e.unshift(this.getRequireRule());
90
+ }
91
+ return e.concat(this.getRules());
92
+ },
93
+ computeSpan() {
94
+ return this.block ? 24 : this.span;
95
+ },
96
+ formItemProps() {
97
+ return r({ ...this.$props, ...this.$attrs }, f);
98
+ },
99
+ elFormItemProps() {
100
+ return r({ ...this.$props, ...this.$attrs }, m);
101
+ },
102
+ elColProps() {
103
+ return r({ ...this.$props, ...this.$attrs }, n);
104
+ }
105
+ },
106
+ watch: {
107
+ computeRules() {
108
+ var e, t;
109
+ (t = (e = this.elForm) == null ? void 0 : e.clearValidate) == null || t.call(e, this.prop);
110
+ }
111
+ },
112
+ methods: {
113
+ getRules() {
114
+ return [];
115
+ },
116
+ getRequireRule() {
117
+ return {
118
+ required: !0,
119
+ message: this.message
120
+ };
121
+ }
122
+ }
123
+ };
124
+ export {
125
+ h as f
126
+ };
@@ -0,0 +1,11 @@
1
+ const e = {
2
+ props: {
3
+ prefixPick: {
4
+ type: Boolean,
5
+ default: !0
6
+ }
7
+ }
8
+ };
9
+ export {
10
+ e as f
11
+ };
@@ -0,0 +1,60 @@
1
+ const t = {
2
+ props: {
3
+ suffixIcon: {
4
+ type: String
5
+ },
6
+ prefixIcon: {
7
+ type: String
8
+ },
9
+ step: {
10
+ type: Number,
11
+ default: 1
12
+ },
13
+ stepStrictly: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ max: {
18
+ type: Number,
19
+ default: 1 / 0
20
+ },
21
+ min: {
22
+ type: Number,
23
+ default: -1 / 0
24
+ },
25
+ value: {
26
+ type: [Number, String]
27
+ },
28
+ disabled: Boolean,
29
+ size: {
30
+ type: String
31
+ },
32
+ controls: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ controlsPosition: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ name: {
41
+ type: String
42
+ },
43
+ label: {
44
+ type: String
45
+ },
46
+ placeholder: {
47
+ type: String
48
+ },
49
+ precision: {
50
+ type: Number,
51
+ default: void 0,
52
+ validator(e) {
53
+ return e >= 0 && e === parseInt(e, 10);
54
+ }
55
+ }
56
+ }
57
+ };
58
+ export {
59
+ t as i
60
+ };