@web-utils/component 1.2.5 → 1.2.6

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/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2992 -2075
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/a125d16c.js +0 -1
  110. package/dist/chunks/addb6ed5.js +0 -1
  111. package/dist/chunks/f15477c7.js +0 -1
@@ -1 +1,99 @@
1
- import{dialog as n}from"@web-utils/core/dist/mixin/index";import{n as o}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("ElDialog",{directives:[{name:"dialog-drag",rawName:"v-dialog-drag:[fullScreen]",arg:e.fullScreen}],attrs:{"close-on-click-modal":!1,title:e.title,visible:e.show,top:"5vh","custom-class":"el-dialog-resizeable iframe-window",center:"",fullscreen:e.fullScreen,"append-to-body":"",width:"60%"},on:{"update:visible":function(r){e.show=r},close:e.close,closed:e.closed},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.title)+" "),l("ElButton",{staticClass:"fullscreen-btn",attrs:{type:"text",icon:e.fullScreen?"el-icon-copy-document":"el-icon-full-screen",size:"medium",title:e.fullScreen?"\u8FD8\u539F":"\u6700\u5927\u5316"},on:{click:e.toggleFullScreen}})]},proxy:!0},{key:"default",fn:function(){return[l("div",{staticClass:"drag-mask"}),l("iframe",{staticClass:"iframe-window-iframe",style:{height:e.fullScreen?"100%":"70vh"},attrs:{src:e.url,frameborder:"0"}})]},proxy:!0}])})},s=[];const c={name:"IframeWindow",mixins:[n],props:{title:{type:String,default:"iframe\u7A97\u53E3"},url:{type:String,default:"https://www.baidu.com"}}},i={};var u=o(c,a,s,!1,d,null,null,null);function d(e){for(let t in i)this[t]=i[t]}var f=function(){return u.exports}();export{f as default};
1
+ import { dialog as o } from "@web-utils/core/dist/mixin/index";
2
+ import { n as i } from "../../chunks/6499de3a.js";
3
+ var s = function() {
4
+ var e = this, t = e.$createElement, l = e._self._c || t;
5
+ return l("ElDialog", {
6
+ directives: [{
7
+ name: "dialog-drag",
8
+ rawName: "v-dialog-drag:[fullScreen]",
9
+ arg: e.fullScreen
10
+ }],
11
+ attrs: {
12
+ "close-on-click-modal": !1,
13
+ title: e.title,
14
+ visible: e.show,
15
+ top: "5vh",
16
+ "custom-class": "el-dialog-resizeable iframe-window",
17
+ center: "",
18
+ fullscreen: e.fullScreen,
19
+ "append-to-body": "",
20
+ width: "60%"
21
+ },
22
+ on: {
23
+ "update:visible": function(r) {
24
+ e.show = r;
25
+ },
26
+ close: e.close,
27
+ closed: e.closed
28
+ },
29
+ scopedSlots: e._u([{
30
+ key: "title",
31
+ fn: function() {
32
+ return [e._v(" " + e._s(e.title) + " "), l("ElButton", {
33
+ staticClass: "fullscreen-btn",
34
+ attrs: {
35
+ type: "text",
36
+ icon: e.fullScreen ? "el-icon-copy-document" : "el-icon-full-screen",
37
+ size: "medium",
38
+ title: e.fullScreen ? "\u8FD8\u539F" : "\u6700\u5927\u5316"
39
+ },
40
+ on: {
41
+ click: e.toggleFullScreen
42
+ }
43
+ })];
44
+ },
45
+ proxy: !0
46
+ }, {
47
+ key: "default",
48
+ fn: function() {
49
+ return [l("div", {
50
+ staticClass: "drag-mask"
51
+ }), l("iframe", {
52
+ staticClass: "iframe-window-iframe",
53
+ style: {
54
+ height: e.fullScreen ? "100%" : "70vh"
55
+ },
56
+ attrs: {
57
+ src: e.url,
58
+ frameborder: "0"
59
+ }
60
+ })];
61
+ },
62
+ proxy: !0
63
+ }])
64
+ });
65
+ }, a = [];
66
+ const c = {
67
+ name: "IframeWindow",
68
+ mixins: [o],
69
+ props: {
70
+ title: {
71
+ type: String,
72
+ default: "iframe\u7A97\u53E3"
73
+ },
74
+ url: {
75
+ type: String,
76
+ default: "https://www.baidu.com"
77
+ }
78
+ }
79
+ }, n = {};
80
+ var u = /* @__PURE__ */ i(
81
+ c,
82
+ s,
83
+ a,
84
+ !1,
85
+ f,
86
+ null,
87
+ null,
88
+ null
89
+ );
90
+ function f(e) {
91
+ for (let t in n)
92
+ this[t] = n[t];
93
+ }
94
+ const _ = /* @__PURE__ */ function() {
95
+ return u.exports;
96
+ }();
97
+ export {
98
+ _ as default
99
+ };
@@ -1 +1,274 @@
1
- import u from"element-ui/src/mixins/focus";import o from"element-ui/src/directives/repeat-click";import{i as a}from"../../chunks/addb6ed5.js";import{n as l}from"../../chunks/6499de3a.js";var p=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["input-number","el-input-number",e.inputNumberSize?`el-input-number--${e.inputNumberSize}`:"",{"is-disabled":e.inputNumberDisabled,"is-without-controls":!e.controls,"is-controls-right":e.controlsAtRight}],on:{dragstart:function(i){i.preventDefault()}}},[e.controls?n("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:e.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":e.minDisabled},attrs:{role:"button"},on:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.decrease.apply(null,arguments)}}},[n("i",{class:`el-icon-${e.controlsAtRight?"arrow-down":"minus"}`})]):e._e(),e.controls?n("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:e.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":e.maxDisabled},attrs:{role:"button"},on:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.increase.apply(null,arguments)}}},[n("i",{class:`el-icon-${e.controlsAtRight?"arrow-up":"plus"}`})]):e._e(),n("ElInput",{ref:"input",attrs:{value:e.displayValue,placeholder:e.placeholder,disabled:e.inputNumberDisabled,size:e.inputNumberSize,max:e.max,"prefix-icon":e.prefixIcon,"suffix-icon":e.suffixIcon,min:e.min,name:e.name,label:e.label},on:{blur:e.handleBlur,focus:e.handleFocus,input:e.handleInput,change:e.handleInputChange},nativeOn:{keydown:[function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"up",38,i.key,["Up","ArrowUp"])?null:(i.preventDefault(),e.increase.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"down",40,i.key,["Down","ArrowDown"])?null:(i.preventDefault(),e.decrease.apply(null,arguments))}]},scopedSlots:e._u([{key:"append",fn:function(){return[e._t("append")]},proxy:!0},{key:"prefix",fn:function(){return[e._t("prefix")]},proxy:!0},{key:"prepend",fn:function(){return[e._t("prepend")]},proxy:!0},{key:"suffix",fn:function(){return[e._t("suffix")]},proxy:!0}],null,!0)})],1)},c=[];const h={name:"InputNumber",directives:{repeatClick:o},mixins:[u("input"),a],inject:{elForm:{default:""},elFormItem:{default:""}},data(){return{currentValue:0,userInput:null}},computed:{minDisabled(){return this._decrease(this.value,this.step)<this.min},maxDisabled(){return this._increase(this.value,this.step)>this.max},numPrecision(){const{value:e,step:t,getPrecision:n,precision:i}=this,r=n(t);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)},controlsAtRight(){return this.controls&&this.controlsPosition==="right"},_elFormItemSize(){return(this.elFormItem||{}).elFormItemSize},inputNumberSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputNumberDisabled(){return this.disabled||!!(this.elForm||{}).disabled},displayValue(){if(this.userInput!==null)return this.userInput;let e=this.currentValue;if(typeof e=="number"){if(this.stepStrictly){const t=this.getPrecision(this.step),n=Math.pow(10,t);e=Math.round(e/this.step)*n*this.step/n}this.precision!==void 0&&(e=e.toFixed(this.precision))}return e}},watch:{value:{immediate:!0,handler(e){let t=e===void 0?e:Number(e);if(t!==void 0){if(isNaN(t))return;if(this.stepStrictly){const n=this.getPrecision(this.step),i=Math.pow(10,n);t=Math.round(t/this.step)*i*this.step/i}this.precision!==void 0&&(t=this.toPrecision(t,this.precision))}t>=this.max&&(t=this.max),t<=this.min&&(t=this.min),this.currentValue=t,this.userInput=null,this.$emit("input",t)}}},mounted(){const e=this.$refs.input.$refs.input;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)},updated(){if(!this.$refs||!this.$refs.input)return;this.$refs.input.$refs.input.setAttribute("aria-valuenow",this.currentValue)},methods:{toPrecision(e,t){return t===void 0&&(t=this.numPrecision),parseFloat(Math.round(e*Math.pow(10,t))/Math.pow(10,t))},getPrecision(e){if(e===void 0)return 0;const t=e.toString(),n=t.indexOf(".");let i=0;return n!==-1&&(i=t.length-n-1),i},_increase(e,t){if(typeof e!="number"&&e!==void 0)return this.currentValue;const n=Math.pow(10,this.numPrecision);return this.toPrecision((n*e+n*t)/n)},_decrease(e,t){if(typeof e!="number"&&e!==void 0)return this.currentValue;const n=Math.pow(10,this.numPrecision);return this.toPrecision((n*e-n*t)/n)},increase(){if(this.inputNumberDisabled||this.maxDisabled)return;const e=this.value||0,t=this._increase(e,this.step);this.setCurrentValue(t)},decrease(){if(this.inputNumberDisabled||this.minDisabled)return;const e=this.value||0,t=this._decrease(e,this.step);this.setCurrentValue(t)},handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},setCurrentValue(e){const t=this.currentValue;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)},handleInput(e){this.userInput=e},handleInputChange(e){const t=e===""?void 0:Number(e);(!isNaN(t)||e==="")&&this.setCurrentValue(t),this.userInput=null},select(){this.$refs.input.select()}}},s={};var d=l(h,p,c,!1,m,null,null,null);function m(e){for(let t in s)this[t]=s[t]}var f=function(){return d.exports}();export{f as default};
1
+ import u from "element-ui/src/mixins/focus";
2
+ import o from "element-ui/src/directives/repeat-click";
3
+ import { i as a } from "../../chunks/df803484.js";
4
+ import { n as l } from "../../chunks/6499de3a.js";
5
+ var c = function() {
6
+ var e = this, t = e.$createElement, n = e._self._c || t;
7
+ return n("div", {
8
+ class: ["input-number", "el-input-number", e.inputNumberSize ? `el-input-number--${e.inputNumberSize}` : "", {
9
+ "is-disabled": e.inputNumberDisabled,
10
+ "is-without-controls": !e.controls,
11
+ "is-controls-right": e.controlsAtRight
12
+ }],
13
+ on: {
14
+ dragstart: function(i) {
15
+ i.preventDefault();
16
+ }
17
+ }
18
+ }, [e.controls ? n("span", {
19
+ directives: [{
20
+ name: "repeat-click",
21
+ rawName: "v-repeat-click",
22
+ value: e.decrease,
23
+ expression: "decrease"
24
+ }],
25
+ staticClass: "el-input-number__decrease",
26
+ class: {
27
+ "is-disabled": e.minDisabled
28
+ },
29
+ attrs: {
30
+ role: "button"
31
+ },
32
+ on: {
33
+ keydown: function(i) {
34
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.decrease.apply(null, arguments);
35
+ }
36
+ }
37
+ }, [n("i", {
38
+ class: `el-icon-${e.controlsAtRight ? "arrow-down" : "minus"}`
39
+ })]) : e._e(), e.controls ? n("span", {
40
+ directives: [{
41
+ name: "repeat-click",
42
+ rawName: "v-repeat-click",
43
+ value: e.increase,
44
+ expression: "increase"
45
+ }],
46
+ staticClass: "el-input-number__increase",
47
+ class: {
48
+ "is-disabled": e.maxDisabled
49
+ },
50
+ attrs: {
51
+ role: "button"
52
+ },
53
+ on: {
54
+ keydown: function(i) {
55
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.increase.apply(null, arguments);
56
+ }
57
+ }
58
+ }, [n("i", {
59
+ class: `el-icon-${e.controlsAtRight ? "arrow-up" : "plus"}`
60
+ })]) : e._e(), n("ElInput", {
61
+ ref: "input",
62
+ attrs: {
63
+ value: e.displayValue,
64
+ placeholder: e.placeholder,
65
+ disabled: e.inputNumberDisabled,
66
+ size: e.inputNumberSize,
67
+ max: e.max,
68
+ "prefix-icon": e.prefixIcon,
69
+ "suffix-icon": e.suffixIcon,
70
+ min: e.min,
71
+ name: e.name,
72
+ label: e.label
73
+ },
74
+ on: {
75
+ blur: e.handleBlur,
76
+ focus: e.handleFocus,
77
+ input: e.handleInput,
78
+ change: e.handleInputChange
79
+ },
80
+ nativeOn: {
81
+ keydown: [function(i) {
82
+ return !i.type.indexOf("key") && e._k(i.keyCode, "up", 38, i.key, ["Up", "ArrowUp"]) ? null : (i.preventDefault(), e.increase.apply(null, arguments));
83
+ }, function(i) {
84
+ return !i.type.indexOf("key") && e._k(i.keyCode, "down", 40, i.key, ["Down", "ArrowDown"]) ? null : (i.preventDefault(), e.decrease.apply(null, arguments));
85
+ }]
86
+ },
87
+ scopedSlots: e._u([{
88
+ key: "append",
89
+ fn: function() {
90
+ return [e._t("append")];
91
+ },
92
+ proxy: !0
93
+ }, {
94
+ key: "prefix",
95
+ fn: function() {
96
+ return [e._t("prefix")];
97
+ },
98
+ proxy: !0
99
+ }, {
100
+ key: "prepend",
101
+ fn: function() {
102
+ return [e._t("prepend")];
103
+ },
104
+ proxy: !0
105
+ }, {
106
+ key: "suffix",
107
+ fn: function() {
108
+ return [e._t("suffix")];
109
+ },
110
+ proxy: !0
111
+ }], null, !0)
112
+ })], 1);
113
+ }, p = [];
114
+ const h = {
115
+ name: "InputNumber",
116
+ directives: {
117
+ repeatClick: o
118
+ },
119
+ mixins: [u("input"), a],
120
+ inject: {
121
+ elForm: {
122
+ default: ""
123
+ },
124
+ elFormItem: {
125
+ default: ""
126
+ }
127
+ },
128
+ data() {
129
+ return {
130
+ currentValue: 0,
131
+ userInput: null
132
+ };
133
+ },
134
+ computed: {
135
+ minDisabled() {
136
+ return this._decrease(this.value, this.step) < this.min;
137
+ },
138
+ maxDisabled() {
139
+ return this._increase(this.value, this.step) > this.max;
140
+ },
141
+ numPrecision() {
142
+ const { value: e, step: t, getPrecision: n, precision: i } = this, r = n(t);
143
+ 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);
144
+ },
145
+ controlsAtRight() {
146
+ return this.controls && this.controlsPosition === "right";
147
+ },
148
+ _elFormItemSize() {
149
+ return (this.elFormItem || {}).elFormItemSize;
150
+ },
151
+ inputNumberSize() {
152
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
153
+ },
154
+ inputNumberDisabled() {
155
+ return this.disabled || !!(this.elForm || {}).disabled;
156
+ },
157
+ displayValue() {
158
+ if (this.userInput !== null)
159
+ return this.userInput;
160
+ let e = this.currentValue;
161
+ if (typeof e == "number") {
162
+ if (this.stepStrictly) {
163
+ const t = this.getPrecision(this.step), n = Math.pow(10, t);
164
+ e = Math.round(e / this.step) * n * this.step / n;
165
+ }
166
+ this.precision !== void 0 && (e = e.toFixed(this.precision));
167
+ }
168
+ return e;
169
+ }
170
+ },
171
+ watch: {
172
+ value: {
173
+ immediate: !0,
174
+ handler(e) {
175
+ let t = e === void 0 ? e : Number(e);
176
+ if (t !== void 0) {
177
+ if (isNaN(t))
178
+ return;
179
+ if (this.stepStrictly) {
180
+ const n = this.getPrecision(this.step), i = Math.pow(10, n);
181
+ t = Math.round(t / this.step) * i * this.step / i;
182
+ }
183
+ this.precision !== void 0 && (t = this.toPrecision(t, this.precision));
184
+ }
185
+ t >= this.max && (t = this.max), t <= this.min && (t = this.min), this.currentValue = t, this.userInput = null, this.$emit("input", t);
186
+ }
187
+ }
188
+ },
189
+ mounted() {
190
+ const e = this.$refs.input.$refs.input;
191
+ 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);
192
+ },
193
+ updated() {
194
+ if (!this.$refs || !this.$refs.input)
195
+ return;
196
+ this.$refs.input.$refs.input.setAttribute("aria-valuenow", this.currentValue);
197
+ },
198
+ methods: {
199
+ toPrecision(e, t) {
200
+ return t === void 0 && (t = this.numPrecision), parseFloat(Math.round(e * Math.pow(10, t)) / Math.pow(10, t));
201
+ },
202
+ getPrecision(e) {
203
+ if (e === void 0)
204
+ return 0;
205
+ const t = e.toString(), n = t.indexOf(".");
206
+ let i = 0;
207
+ return n !== -1 && (i = t.length - n - 1), i;
208
+ },
209
+ _increase(e, t) {
210
+ if (typeof e != "number" && e !== void 0)
211
+ return this.currentValue;
212
+ const n = Math.pow(10, this.numPrecision);
213
+ return this.toPrecision((n * e + n * t) / n);
214
+ },
215
+ _decrease(e, t) {
216
+ if (typeof e != "number" && e !== void 0)
217
+ return this.currentValue;
218
+ const n = Math.pow(10, this.numPrecision);
219
+ return this.toPrecision((n * e - n * t) / n);
220
+ },
221
+ increase() {
222
+ if (this.inputNumberDisabled || this.maxDisabled)
223
+ return;
224
+ const e = this.value || 0, t = this._increase(e, this.step);
225
+ this.setCurrentValue(t);
226
+ },
227
+ decrease() {
228
+ if (this.inputNumberDisabled || this.minDisabled)
229
+ return;
230
+ const e = this.value || 0, t = this._decrease(e, this.step);
231
+ this.setCurrentValue(t);
232
+ },
233
+ handleBlur(e) {
234
+ this.$emit("blur", e);
235
+ },
236
+ handleFocus(e) {
237
+ this.$emit("focus", e);
238
+ },
239
+ setCurrentValue(e) {
240
+ const t = this.currentValue;
241
+ 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);
242
+ },
243
+ handleInput(e) {
244
+ this.userInput = e;
245
+ },
246
+ handleInputChange(e) {
247
+ const t = e === "" ? void 0 : Number(e);
248
+ (!isNaN(t) || e === "") && this.setCurrentValue(t), this.userInput = null;
249
+ },
250
+ select() {
251
+ this.$refs.input.select();
252
+ }
253
+ }
254
+ }, s = {};
255
+ var d = /* @__PURE__ */ l(
256
+ h,
257
+ c,
258
+ p,
259
+ !1,
260
+ m,
261
+ null,
262
+ null,
263
+ null
264
+ );
265
+ function m(e) {
266
+ for (let t in s)
267
+ this[t] = s[t];
268
+ }
269
+ const x = /* @__PURE__ */ function() {
270
+ return d.exports;
271
+ }();
272
+ export {
273
+ x as default
274
+ };
@@ -1 +1,110 @@
1
- import{isNotEmpty as a}from"@web-utils/core";import{n as r}from"../../chunks/6499de3a.js";var l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"input-number-range"},[n("ElInputNumber",{staticClass:"flex-item",staticStyle:{width:"auto"},attrs:{controls:t.controls,disabled:t.disabled,size:"mini"},on:{input:t.emitInput},model:{value:t.val[0],callback:function(i){t.$set(t.val,0,i)},expression:"val[0]"}}),n("span",{staticStyle:{padding:"0 6px","font-size":"12px"}},[t._v(t._s(t.separator))]),n("ElInputNumber",{staticClass:"flex-item",staticStyle:{width:"auto"},attrs:{controls:t.controls,disabled:t.disabled,size:"mini"},on:{input:t.emitInput},model:{value:t.val[1],callback:function(i){t.$set(t.val,1,i)},expression:"val[1]"}})],1)},o=[];const u={name:"InputNumberRange",props:{value:{type:Array,default:()=>[]},disabled:Boolean,separator:{type:String,default:"\u81F3"},controls:{type:Boolean,default:!0}},data(){return{val:[void 0,void 0]}},watch:{value:{immediate:!0,handler(t){const e=[void 0,void 0];a(t==null?void 0:t[0])&&(e[0]=t[0]),a(t==null?void 0:t[1])&&(e[1]=t[1]),this.val=e}}},methods:{emitInput(){this.$emit("input",this.val)}}},s={};var d=r(u,l,o,!1,p,null,null,null);function p(t){for(let e in s)this[e]=s[e]}var c=function(){return d.exports}();export{c as default};
1
+ import { isNotEmpty as i } from "@web-utils/core";
2
+ import { n as o } from "../../chunks/6499de3a.js";
3
+ var r = function() {
4
+ var t = this, e = t.$createElement, n = t._self._c || e;
5
+ return n("div", {
6
+ staticClass: "input-number-range"
7
+ }, [n("ElInputNumber", {
8
+ staticClass: "flex-item",
9
+ staticStyle: {
10
+ width: "auto"
11
+ },
12
+ attrs: {
13
+ controls: t.controls,
14
+ disabled: t.disabled,
15
+ size: "mini"
16
+ },
17
+ on: {
18
+ input: t.emitInput
19
+ },
20
+ model: {
21
+ value: t.val[0],
22
+ callback: function(s) {
23
+ t.$set(t.val, 0, s);
24
+ },
25
+ expression: "val[0]"
26
+ }
27
+ }), n("span", {
28
+ staticStyle: {
29
+ padding: "0 6px",
30
+ "font-size": "12px"
31
+ }
32
+ }, [t._v(t._s(t.separator))]), n("ElInputNumber", {
33
+ staticClass: "flex-item",
34
+ staticStyle: {
35
+ width: "auto"
36
+ },
37
+ attrs: {
38
+ controls: t.controls,
39
+ disabled: t.disabled,
40
+ size: "mini"
41
+ },
42
+ on: {
43
+ input: t.emitInput
44
+ },
45
+ model: {
46
+ value: t.val[1],
47
+ callback: function(s) {
48
+ t.$set(t.val, 1, s);
49
+ },
50
+ expression: "val[1]"
51
+ }
52
+ })], 1);
53
+ }, l = [];
54
+ const u = {
55
+ name: "InputNumberRange",
56
+ props: {
57
+ value: {
58
+ type: Array,
59
+ default: () => []
60
+ },
61
+ disabled: Boolean,
62
+ separator: {
63
+ type: String,
64
+ default: "\u81F3"
65
+ },
66
+ controls: {
67
+ type: Boolean,
68
+ default: !0
69
+ }
70
+ },
71
+ data() {
72
+ return {
73
+ val: [void 0, void 0]
74
+ };
75
+ },
76
+ watch: {
77
+ value: {
78
+ immediate: !0,
79
+ handler(t) {
80
+ const e = [void 0, void 0];
81
+ i(t == null ? void 0 : t[0]) && (e[0] = t[0]), i(t == null ? void 0 : t[1]) && (e[1] = t[1]), this.val = e;
82
+ }
83
+ }
84
+ },
85
+ methods: {
86
+ emitInput() {
87
+ this.$emit("input", this.val);
88
+ }
89
+ }
90
+ }, a = {};
91
+ var d = /* @__PURE__ */ o(
92
+ u,
93
+ r,
94
+ l,
95
+ !1,
96
+ c,
97
+ null,
98
+ null,
99
+ null
100
+ );
101
+ function c(t) {
102
+ for (let e in a)
103
+ this[e] = a[e];
104
+ }
105
+ const v = /* @__PURE__ */ function() {
106
+ return d.exports;
107
+ }();
108
+ export {
109
+ v as default
110
+ };
@@ -1 +1,16 @@
1
- var e={name:"JSXComponent",props:{msg:{type:String,default:""}},render(){return arguments[0]("div",[this.msg])}};export{e as default};
1
+ const e = {
2
+ name: "JSXComponent",
3
+ props: {
4
+ msg: {
5
+ type: String,
6
+ default: ""
7
+ }
8
+ },
9
+ render() {
10
+ const t = arguments[0];
11
+ return t("div", [this.msg]);
12
+ }
13
+ };
14
+ export {
15
+ e as default
16
+ };
@@ -1 +1,119 @@
1
- import{n as _}from"../../chunks/6499de3a.js";const C=Object.prototype.toString;function d(e){return e!=null}function g(e){return e.isComment&&e.asyncFactory}function v(e){if(Array.isArray(e))for(let t=0;t<e.length;t++){const n=e[t];if(d(n)&&(d(n.componentOptions)||g(n)))return n}}function x(e){return C.call(e)==="[object RegExp]"}function f(e){return e&&(e.Ctor.options.name||e.tag)}function l(e,t){return Array.isArray(e)?e.indexOf(t)>-1:typeof e=="string"?e.split(",").indexOf(t)>-1:x(e)?e.test(t):!1}function y(e,t){if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function p(e,t){const{cache:n,keys:o,_vnode:c}=e;for(const i in n){const s=n[i];if(s){const a=s.name;a&&!t(a)&&h(n,i,o,c)}}}function h(e,t,n,o){const c=e[t];c&&(!o||c.tag!==o.tag)&&c.componentInstance.$destroy(),e[t]=null,y(n,t)}const k={name:"KeepViewAlive",abstract:!0,props:{include:Array,exclude:Array,max:[String,Number]},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const e in this.cache)h(this.cache,e,this.keys)},mounted(){this.cacheVNode(),this.$watch("include",e=>{p(this,t=>l(e,t))}),this.$watch("exclude",e=>{p(this,t=>!l(e,t))})},updated(){this.cacheVNode()},methods:{cacheVNode(){const{cache:e,keys:t,vnodeToCache:n,keyToCache:o}=this;if(n){const{tag:c,componentInstance:i,componentOptions:s}=n;e[o]={name:f(s),tag:c,cid:s.Ctor.cid,componentInstance:i},t.push(o),this.max&&t.length>parseInt(this.max)&&h(e,t[0],t,this._vnode),this.vnodeToCache=null}}},render(){const e=this.$slots.default,t=v(e),n=t&&t.componentOptions;if(n){const o=f(n),{include:c,exclude:i}=this;if(c&&(!o||!l(c,o))||i&&o&&l(i,o))return t;const{cache:s,keys:a}=this,r=t.key==null?n.Ctor.cid+(n.tag?`::${n.tag}`:""):t.key,u=s[r];u?u.cid===n.Ctor.cid?(t.componentInstance=u.componentInstance,y(a,r),a.push(r)):(u.componentInstance.$destroy(),s[r]=null,this.vnodeToCache=t,this.keyToCache=r):(this.vnodeToCache=t,this.keyToCache=r),t.data.keepAlive=!0}return t||e&&e[0]}};let A,O;const m={};var T=_(k,A,O,!1,I,null,null,null);function I(e){for(let t in m)this[t]=m[t]}var $=function(){return T.exports}();export{$ as default};
1
+ import { n as _ } from "../../chunks/6499de3a.js";
2
+ const C = Object.prototype.toString;
3
+ function d(e) {
4
+ return e != null;
5
+ }
6
+ function g(e) {
7
+ return e.isComment && e.asyncFactory;
8
+ }
9
+ function v(e) {
10
+ if (Array.isArray(e))
11
+ for (let t = 0; t < e.length; t++) {
12
+ const n = e[t];
13
+ if (d(n) && (d(n.componentOptions) || g(n)))
14
+ return n;
15
+ }
16
+ }
17
+ function x(e) {
18
+ return C.call(e) === "[object RegExp]";
19
+ }
20
+ function f(e) {
21
+ return e && (e.Ctor.options.name || e.tag);
22
+ }
23
+ function l(e, t) {
24
+ return Array.isArray(e) ? e.indexOf(t) > -1 : typeof e == "string" ? e.split(",").indexOf(t) > -1 : x(e) ? e.test(t) : !1;
25
+ }
26
+ function y(e, t) {
27
+ if (e.length) {
28
+ const n = e.indexOf(t);
29
+ if (n > -1)
30
+ return e.splice(n, 1);
31
+ }
32
+ }
33
+ function p(e, t) {
34
+ const { cache: n, keys: o, _vnode: c } = e;
35
+ for (const i in n) {
36
+ const s = n[i];
37
+ if (s) {
38
+ const a = s.name;
39
+ a && !t(a) && h(n, i, o, c);
40
+ }
41
+ }
42
+ }
43
+ function h(e, t, n, o) {
44
+ const c = e[t];
45
+ c && (!o || c.tag !== o.tag) && c.componentInstance.$destroy(), e[t] = null, y(n, t);
46
+ }
47
+ const k = {
48
+ name: "KeepViewAlive",
49
+ abstract: !0,
50
+ props: {
51
+ include: Array,
52
+ exclude: Array,
53
+ max: [String, Number]
54
+ },
55
+ created() {
56
+ this.cache = /* @__PURE__ */ Object.create(null), this.keys = [];
57
+ },
58
+ destroyed() {
59
+ for (const e in this.cache)
60
+ h(this.cache, e, this.keys);
61
+ },
62
+ mounted() {
63
+ this.cacheVNode(), this.$watch("include", (e) => {
64
+ p(this, (t) => l(e, t));
65
+ }), this.$watch("exclude", (e) => {
66
+ p(this, (t) => !l(e, t));
67
+ });
68
+ },
69
+ updated() {
70
+ this.cacheVNode();
71
+ },
72
+ methods: {
73
+ cacheVNode() {
74
+ const { cache: e, keys: t, vnodeToCache: n, keyToCache: o } = this;
75
+ if (n) {
76
+ const { tag: c, componentInstance: i, componentOptions: s } = n;
77
+ e[o] = {
78
+ name: f(s),
79
+ tag: c,
80
+ cid: s.Ctor.cid,
81
+ componentInstance: i
82
+ }, t.push(o), this.max && t.length > parseInt(this.max) && h(e, t[0], t, this._vnode), this.vnodeToCache = null;
83
+ }
84
+ }
85
+ },
86
+ render() {
87
+ const e = this.$slots.default, t = v(e), n = t && t.componentOptions;
88
+ if (n) {
89
+ const o = f(n), { include: c, exclude: i } = this;
90
+ if (c && (!o || !l(c, o)) || i && o && l(i, o))
91
+ return t;
92
+ const { cache: s, keys: a } = this, r = t.key == null ? n.Ctor.cid + (n.tag ? `::${n.tag}` : "") : t.key, u = s[r];
93
+ u ? u.cid === n.Ctor.cid ? (t.componentInstance = u.componentInstance, y(a, r), a.push(r)) : (u.componentInstance.$destroy(), s[r] = null, this.vnodeToCache = t, this.keyToCache = r) : (this.vnodeToCache = t, this.keyToCache = r), t.data.keepAlive = !0;
94
+ }
95
+ return t || e && e[0];
96
+ }
97
+ };
98
+ let A, O;
99
+ const m = {};
100
+ var T = /* @__PURE__ */ _(
101
+ k,
102
+ A,
103
+ O,
104
+ !1,
105
+ I,
106
+ null,
107
+ null,
108
+ null
109
+ );
110
+ function I(e) {
111
+ for (let t in m)
112
+ this[t] = m[t];
113
+ }
114
+ const b = /* @__PURE__ */ function() {
115
+ return T.exports;
116
+ }();
117
+ export {
118
+ b as default
119
+ };