vue-devui 1.0.0-beta.220801 → 1.0.0-beta.220808
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.
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +90 -81
- package/auto-complete/index.umd.js +24 -13
- package/auto-complete/style.css +1 -1
- package/avatar/index.umd.js +1 -1
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +21 -42
- package/button/index.umd.js +9 -9
- package/button/style.css +1 -1
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +94 -77
- package/checkbox/index.umd.js +26 -15
- package/collapse/index.es.js +3 -21
- package/collapse/index.umd.js +1 -1
- package/countdown/index.umd.js +1 -1
- package/date-picker-pro/index.es.js +131 -114
- package/date-picker-pro/index.umd.js +23 -12
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +4 -17
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +4 -22
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +15 -38
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +85 -71
- package/form/index.umd.js +22 -11
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +7 -20
- package/grid/index.umd.js +1 -1
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +12 -23
- package/image-preview/index.umd.js +1 -1
- package/input/index.es.js +86 -72
- package/input/index.umd.js +24 -13
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +15 -38
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/mention/index.es.js +82 -66
- package/mention/index.umd.js +25 -14
- package/menu/index.es.js +144 -123
- package/menu/index.umd.js +1 -1
- package/menu/style.css +1 -1
- package/message/index.es.js +29 -34
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +12 -44
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +4 -21
- package/notification/index.umd.js +1 -1
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +1 -1
- package/pagination/index.umd.js +1 -1
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +1 -1
- package/popover/index.umd.js +4 -4
- package/progress/index.umd.js +3 -3
- package/radio/index.es.js +91 -75
- package/radio/index.umd.js +27 -16
- package/radio/style.css +1 -1
- package/rate/index.umd.js +1 -1
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +5 -18
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +86 -72
- package/search/index.umd.js +26 -15
- package/select/index.es.js +104 -83
- package/select/index.umd.js +26 -15
- package/select/style.css +1 -1
- package/skeleton/index.umd.js +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +22 -29
- package/splitter/index.umd.js +9 -9
- package/statistic/index.es.js +0 -21
- package/statistic/index.umd.js +1 -1
- package/status/index.umd.js +1 -1
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +85 -71
- package/switch/index.umd.js +25 -14
- package/switch/style.css +1 -1
- package/table/index.es.js +106 -91
- package/table/index.umd.js +21 -10
- package/table/style.css +1 -1
- package/tabs/index.umd.js +1 -1
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +88 -72
- package/textarea/index.umd.js +26 -15
- package/time-picker/index.es.js +97 -88
- package/time-picker/index.umd.js +25 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +104 -83
- package/time-select/index.umd.js +25 -14
- package/time-select/style.css +1 -1
- package/timeline/index.umd.js +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +4 -4
- package/tree/index.es.js +132 -104
- package/tree/index.umd.js +26 -15
- package/tree/style.css +1 -1
- package/upload/index.es.js +5 -47
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +413 -354
- package/vue-devui.umd.js +32 -21
package/input-number/index.es.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var __objRest = (source, exclude) => {
|
|
5
|
-
var target = {};
|
|
6
|
-
for (var prop in source)
|
|
7
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8
|
-
target[prop] = source[prop];
|
|
9
|
-
if (source != null && __getOwnPropSymbols)
|
|
10
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
11
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
12
|
-
target[prop] = source[prop];
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
1
|
import { createVNode, computed, ref, toRefs, reactive, watch, defineComponent, mergeProps } from "vue";
|
|
17
2
|
const inputNumberProps = {
|
|
18
3
|
placeholder: {
|
|
@@ -110,7 +95,7 @@ const isUndefined = (value) => value === void 0;
|
|
|
110
95
|
const isNull = (value) => value === null;
|
|
111
96
|
const ns = useNamespace("input-number");
|
|
112
97
|
function useRender(props, ctx) {
|
|
113
|
-
const
|
|
98
|
+
const { style, class: customClass, ...otherAttrs } = ctx.attrs;
|
|
114
99
|
const customStyle = { style };
|
|
115
100
|
const wrapClass = computed(() => [
|
|
116
101
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(d,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(d=typeof globalThis!="undefined"?globalThis:d||self,t(d.index={},d.Vue))})(this,function(d,t){"use strict";const L={placeholder:{type:String},disabled:{type:Boolean,default:!1},step:{type:Number,default:1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},size:{type:String,default:""},modelValue:{type:Number},precision:{type:Number}};function v(e,o,r){let s=e;return o&&(s+=`__${o}`),r&&(s+=`--${r}`),s}function B(e,o=!1){const r=o?`.devui-${e}`:`devui-${e}`;return{b:()=>v(r),e:n=>n?v(r,n):"",m:n=>n?v(r,"",n):"",em:(n,i)=>n&&i?v(r,n,i):""}}const P=B("input-number");function k(){return t.createVNode("svg",{class:P.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}function z(){return t.createVNode("svg",{class:P.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}const N=e=>typeof e=="number",h=e=>e===void 0,F=e=>e===null,f=B("input-number");function M(e,o){const{style:r,class:s,...c}=o.attrs,m={style:r},p=t.computed(()=>[{[f.b()]:!0},s]),n=t.computed(()=>({[f.e("control-buttons")]:!0,disabled:e.disabled,[f.m(e.size)]:!0})),i=t.computed(()=>({[f.e("input-wrap")]:!0,[f.m(e.size)]:!0})),V=t.computed(()=>({[f.e("input-box")]:!0,disabled:e.disabled}));return{wrapClass:p,customStyle:m,otherAttrs:c,controlButtonsClass:n,inputWrapClass:i,inputInnerClass:V}}function $(e){const o=t.ref(),r=()=>{o.value.focus()},s=()=>{o.value.blur()},c=()=>{o.value.select()};return e.expose({focus:r,blur:s,select:c}),{inputRef:o}}function D(e){let o=0;if(h(e))return o;const r=e.toString(),s=r.indexOf(".");return s!==-1&&(o=r.length-s-1),o}function A(e,o,r){const{min:s,max:c,step:m,disabled:p}=t.toRefs(e),n=t.reactive({currentValue:e.modelValue||"",userInputValue:void 0}),i=t.computed(()=>h(e.precision)?Math.max(D(e.modelValue),D(m.value)):e.precision),V=t.computed(()=>{if(!h(n.userInputValue))return n.userInputValue;let u=n.currentValue;return u===""||h(u)||Number.isNaN(u)?"":(N(u)&&(u=u.toFixed(i.value)),u)}),C=u=>Number.parseFloat(u.toFixed(i.value)),b=(u,a=1)=>N(u)?C(u+m.value*a):n.currentValue,w=(u,a)=>{if(u===""||h(u)||F(u)||Number.isNaN(u))return;let l=Number(u);return l=C(l),(l>c.value||l<s.value)&&(l=l>c.value?c.value:s.value,a&&o.emit("update:modelValue",l)),l},g=u=>{const a=n.currentValue,l=w(u);a!==l&&(n.userInputValue=void 0,o.emit("update:modelValue",l),o.emit("input",l),o.emit("change",l,a),n.currentValue=l)},I=t.computed(()=>N(n.currentValue)&&b(n.currentValue,-1)<e.min),y=t.computed(()=>N(n.currentValue)&&b(n.currentValue)>e.max),S=()=>{if(p.value||y.value)return;r.value.focus();const u=b(n.currentValue||0);g(u)},_=()=>{if(p.value||I.value)return;r.value.focus();const u=b(n.currentValue||0,-1);g(u)};return t.watch(()=>e.modelValue,u=>{n.currentValue=w(u,!0),n.userInputValue=void 0},{immediate:!0}),{inputVal:V,minDisabled:I,maxDisabled:y,onAdd:S,onSubtract:_,onInput:u=>{const a=u.target.value;n.userInputValue=a},onChange:u=>{const a=u.target.value,l=a!==""?Number(a):"";(N(l)&&!Number.isNaN(l)||a==="")&&g(l),n.userInputValue=void 0}}}var E="",x=t.defineComponent({name:"DInputNumber",props:L,emits:["update:modelValue","change","input"],setup(e,o){const{disabled:r}=t.toRefs(e),{wrapClass:s,customStyle:c,otherAttrs:m,controlButtonsClass:p,inputWrapClass:n,inputInnerClass:i}=M(e,o),{inputRef:V}=$(o),{inputVal:C,minDisabled:b,maxDisabled:w,onAdd:g,onSubtract:I,onInput:y,onChange:S}=A(e,o,V);return()=>t.createVNode("div",t.mergeProps({class:s.value},c),[t.createVNode("div",{class:p.value},[t.createVNode("span",{class:["control-button control-inc",{disabled:w.value}],onClick:g},[t.createVNode(k,null,null)]),t.createVNode("span",{class:["control-button control-dec",{disabled:b.value}],onClick:I},[t.createVNode(z,null,null)])]),t.createVNode("div",{class:n.value},[t.createVNode("input",t.mergeProps({type:"number",ref:V,value:C.value,placeholder:e.placeholder,disabled:r.value,class:i.value},m,{onInput:y,onChange:S}),null)])])}}),R={title:"InputNumber \u6570\u5B57\u8F93\u5165\u6846",category:"\u6570\u636E\u5F55\u5165",status:"50%",install(e){e.component(x.name,x)}};d.InputNumber=x,d.default=R,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/layout/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(r=typeof globalThis!="undefined"?globalThis:r||self,o(r.index={},r.Vue))})(this,function(r,o){"use strict";function i(a,e,t){let n=a;return e&&(n+=`__${e}`),t&&(n+=`--${t}`),n}function u(a,e=!1){const t=e?`.devui-${a}`:`devui-${a}`;return{b:()=>i(t),e:d=>d?i(t,d):"",m:d=>d?i(t,"",d):"",em:(d,C)=>d&&C?i(t,d,C):""}}var N="",c=o.defineComponent({name:"DLayout",emits:[],setup(a,{slots:e}){const t=u("layout");return()=>{var y;const n=(y=e.default)==null?void 0:y.call(e),v=`${n.some(d=>d.type.name==="DAside")?t.e("aside"):""} ${t.b()}`;return o.createVNode("div",{class:v},[n])}}}),A="",m=o.defineComponent({name:"DContent",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("content")},[(n=e.default)==null?void 0:n.call(e)])}}}),V="",f=o.defineComponent({name:"DHeader",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("header")},[(n=e.default)==null?void 0:n.call(e)])}}}),$="",s=o.defineComponent({name:"DFooter",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("footer")},[(n=e.default)==null?void 0:n.call(e)])}}}),p=o.defineComponent({name:"DAside",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.em("aside","inner")},[(n=e.default)==null?void 0:n.call(e)])}}}),l={title:"Layout \u5E03\u5C40",category:"\u5E03\u5C40",status:"100%",install(a){a.component(c.name,c),a.component(m.name,m),a.component(f.name,f),a.component(s.name,s),a.component(p.name,p)}};r.Aside=p,r.Content=m,r.Footer=s,r.Header=f,r.Layout=c,r.default=l,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/loading/index.es.js
CHANGED
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
1
|
import { defineComponent, ref, createVNode, h, render } from "vue";
|
|
25
2
|
class View {
|
|
26
3
|
constructor() {
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
this.top = "50%";
|
|
5
|
+
this.left = "50%";
|
|
29
6
|
}
|
|
30
7
|
}
|
|
31
8
|
const loadingProps = {
|
|
@@ -43,13 +20,9 @@ const loadingProps = {
|
|
|
43
20
|
};
|
|
44
21
|
class LoadingOptions {
|
|
45
22
|
constructor() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
__publicField(this, "backdrop", true);
|
|
50
|
-
__publicField(this, "positionType", "relative");
|
|
51
|
-
__publicField(this, "view", new View());
|
|
52
|
-
__publicField(this, "zIndex");
|
|
23
|
+
this.backdrop = true;
|
|
24
|
+
this.positionType = "relative";
|
|
25
|
+
this.view = new View();
|
|
53
26
|
}
|
|
54
27
|
}
|
|
55
28
|
function createBem(namespace, element, modifier) {
|
|
@@ -140,7 +113,7 @@ var Loading = defineComponent({
|
|
|
140
113
|
});
|
|
141
114
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
142
115
|
function createComponent(component, props, children = null) {
|
|
143
|
-
const vnode = h(component,
|
|
116
|
+
const vnode = h(component, { ...props }, children);
|
|
144
117
|
const container = document.createElement("div");
|
|
145
118
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
146
119
|
render(vnode, container);
|
|
@@ -227,9 +200,12 @@ const removeAttribute = (el) => {
|
|
|
227
200
|
};
|
|
228
201
|
const handleProps = (el, vprops) => {
|
|
229
202
|
var _a;
|
|
230
|
-
const props =
|
|
203
|
+
const props = {
|
|
204
|
+
...new LoadingOptions(),
|
|
205
|
+
...vprops
|
|
206
|
+
};
|
|
231
207
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
232
|
-
const loadingInstance = createComponent(loadingConstructor$1,
|
|
208
|
+
const loadingInstance = createComponent(loadingConstructor$1, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
233
209
|
el.style.position = props.positionType;
|
|
234
210
|
el.options = props;
|
|
235
211
|
el.instance = loadingInstance;
|
|
@@ -263,10 +239,11 @@ const loading = {
|
|
|
263
239
|
parent.style.position = options.positionType;
|
|
264
240
|
}
|
|
265
241
|
const isFull = document.body === parent;
|
|
266
|
-
options =
|
|
267
|
-
const instance = createComponent(loadingConstructor,
|
|
242
|
+
options = { ...new LoadingOptions(), ...options };
|
|
243
|
+
const instance = createComponent(loadingConstructor, {
|
|
244
|
+
...options,
|
|
268
245
|
isFull
|
|
269
|
-
}
|
|
246
|
+
}, options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
270
247
|
cacheTarget.set(parent, instance);
|
|
271
248
|
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
272
249
|
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
package/loading/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(d,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(d=typeof globalThis!="undefined"?globalThis:d||self,r(d.index={},d.Vue))})(this,function(d,r){"use strict";class y{constructor(){this.top="50%",this.left="50%"}}const h={message:String,backdrop:Boolean,view:{type:Object,default:()=>new y},zIndex:Number,isFull:{type:Boolean,default:!1}};class m{constructor(){this.backdrop=!0,this.positionType="relative",this.view=new y}}function u(e,o,n){let t=e;return o&&(t+=`__${o}`),n&&(t+=`--${n}`),t}function P(e,o=!1){const n=o?`.devui-${e}`:`devui-${e}`;return{b:()=>u(n),e:c=>c?u(n,c):"",m:c=>c?u(n,"",c):"",em:(c,f)=>c&&f?u(n,c,f):""}}var j="",b=r.defineComponent({name:"DLoading",inheritAttrs:!1,props:h,setup(e){const o={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(o.background="none");const n=r.ref(!1);return{style:o,isShow:n,open:()=>{n.value=!0},close:()=>{n.value=!1}}},render(){var c;const{isShow:e,isFull:o,backdrop:n,style:t,message:s,$slots:a}=this,i=P("loading");return e&&r.createVNode("div",{class:[i.b(),o?i.m("full"):""]},[((c=a.default)==null?void 0:c.call(a))||r.createVNode("div",{class:i.e("wrapper")},[n?r.createVNode("div",{class:i.e("mask")},null):null,r.createVNode("div",{style:t,class:i.e("area")},[r.createVNode("div",{class:i.e("busy-default-spinner")},[r.createVNode("div",{class:i.e("bar1")},null),r.createVNode("div",{class:i.e("bar2")},null),r.createVNode("div",{class:i.e("bar3")},null),r.createVNode("div",{class:i.e("bar4")},null)]),s?r.createVNode("span",{class:i.e("text")},[s]):null])])])}});const v=Symbol("dev_component_container");function w(e,o,n=null){const t=r.h(e,{...o},n),s=document.createElement("div");return t[v]=s,r.render(t,s),t.component}function k(e){r.render(null,e==null?void 0:e.vnode[v])}const O=r.defineComponent(b),l=new WeakSet,g=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},N=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),C=e=>{switch(N(e)){case"promise":return[e];case"array":return e.some(n=>N(n)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},T=e=>{l.delete(e),e.instance.proxy.close(),k(e.instance)},A=(e,o)=>{var n,t,s;if(o.value){const a=C(o.value);if(a==="error")return;(s=(t=(n=e==null?void 0:e.instance)==null?void 0:n.proxy)==null?void 0:t.open)==null||s.call(t),e.appendChild(e.mask),l.add(e),a&&Promise.all(a).catch(i=>{console.error(new Error("Promise handling errors"),i)}).finally(()=>{T(e)})}else T(e)},x=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},S=(e,o)=>{var a;const n={...new m,...o},t=n.loadingTemplateRef,s=w(O,{...n},t?()=>t:null);e.style.position=n.positionType,e.options=n,e.instance=s,e.mask=(a=s==null?void 0:s.proxy)==null?void 0:a.$el},V={mounted:function(e,o,n){S(e,n.props),x(e),!g(o.value)&&A(e,o)},updated:function(e,o,n){!g(o.value)&&l.has(e)||g(o.value)&&!l.has(e)||(!l.has(e)&&S(e,n.props),x(e),A(e,o))}},_=r.defineComponent(b),p=new WeakMap,L={open(e={}){var a,i,c;const o=e.target||document.body;if(p.has(o))return p.get(o);o.style&&(o.style.position=e.positionType);const n=document.body===o;e={...new m,...e};const t=w(_,{...e,isFull:n},e.loadingTemplateRef?()=>e.loadingTemplateRef:null);p.set(o,t),(a=t==null?void 0:t.proxy)==null||a.open(),o.appendChild((i=t==null?void 0:t.proxy)==null?void 0:i.$el);const s=(c=t==null?void 0:t.proxy)==null?void 0:c.close;return t&&(t.loadingInstance=t==null?void 0:t.proxy,t.loadingInstance&&(t.loadingInstance.close=(...f)=>{p.delete(o),s==null||s(...f)})),t}};var $={title:"Loading \u52A0\u8F7D\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(e){e.directive("dLoading",V),e.config.globalProperties.$loadingService=L}};d.Loading=V,d.LoadingOptions=m,d.LoadingService=L,d.default=$,d.loadingProps=h,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/loading/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{z-index:var(--devui-z-index-full-page-overlay, 1080);position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:var(--devui-z-index-full-page-overlay, 1080)}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}
|
package/mention/index.es.js
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, withModifiers, createTextVNode, onBeforeUnmount, shallowRef, resolveDynamicComponent, getCurrentInstance, resolveComponent } from "vue";
|
|
1
|
+
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, nextTick, unref, Comment, Text, Fragment, h, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, withModifiers, createTextVNode, onBeforeUnmount, shallowRef, resolveDynamicComponent, getCurrentInstance, resolveComponent } from "vue";
|
|
33
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
3
|
const mentionProps = {
|
|
35
4
|
position: {
|
|
@@ -846,7 +815,7 @@ var lodash = { exports: {} };
|
|
|
846
815
|
var objectCtorString = funcToString.call(Object2);
|
|
847
816
|
var oldDash = root._;
|
|
848
817
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
849
|
-
var
|
|
818
|
+
var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
850
819
|
var defineProperty = function() {
|
|
851
820
|
try {
|
|
852
821
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -856,11 +825,11 @@ var lodash = { exports: {} };
|
|
|
856
825
|
}
|
|
857
826
|
}();
|
|
858
827
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
859
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
860
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"),
|
|
861
|
-
var metaMap =
|
|
828
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
829
|
+
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
830
|
+
var metaMap = WeakMap && new WeakMap();
|
|
862
831
|
var realNames = {};
|
|
863
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(
|
|
832
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
864
833
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
865
834
|
function lodash2(value) {
|
|
866
835
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -2108,7 +2077,7 @@ var lodash = { exports: {} };
|
|
|
2108
2077
|
}
|
|
2109
2078
|
function cloneArrayBuffer(arrayBuffer) {
|
|
2110
2079
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2111
|
-
new
|
|
2080
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
2112
2081
|
return result2;
|
|
2113
2082
|
}
|
|
2114
2083
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -2690,7 +2659,7 @@ var lodash = { exports: {} };
|
|
|
2690
2659
|
object4 = object4.buffer;
|
|
2691
2660
|
other = other.buffer;
|
|
2692
2661
|
case arrayBufferTag:
|
|
2693
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
2662
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
2694
2663
|
return false;
|
|
2695
2664
|
}
|
|
2696
2665
|
return true;
|
|
@@ -2852,7 +2821,7 @@ var lodash = { exports: {} };
|
|
|
2852
2821
|
return result2;
|
|
2853
2822
|
};
|
|
2854
2823
|
var getTag = baseGetTag;
|
|
2855
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag ||
|
|
2824
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
2856
2825
|
getTag = function(value) {
|
|
2857
2826
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2858
2827
|
if (ctorString) {
|
|
@@ -5569,7 +5538,10 @@ function useFormValidation(itemContexts) {
|
|
|
5569
5538
|
try {
|
|
5570
5539
|
await field.validate("");
|
|
5571
5540
|
} catch (err) {
|
|
5572
|
-
errors =
|
|
5541
|
+
errors = {
|
|
5542
|
+
...errors,
|
|
5543
|
+
...err
|
|
5544
|
+
};
|
|
5573
5545
|
}
|
|
5574
5546
|
}
|
|
5575
5547
|
if (!Object.keys(errors).length) {
|
|
@@ -5626,11 +5598,12 @@ defineComponent({
|
|
|
5626
5598
|
}, {
|
|
5627
5599
|
deep: true
|
|
5628
5600
|
});
|
|
5629
|
-
provide(FORM_TOKEN, reactive(
|
|
5601
|
+
provide(FORM_TOKEN, reactive({
|
|
5602
|
+
...toRefs(props),
|
|
5630
5603
|
emit: ctx.emit,
|
|
5631
5604
|
addItemContext,
|
|
5632
5605
|
removeItemContext
|
|
5633
|
-
}))
|
|
5606
|
+
}));
|
|
5634
5607
|
ctx.expose({
|
|
5635
5608
|
validate,
|
|
5636
5609
|
validateFields,
|
|
@@ -6509,7 +6482,7 @@ var FormControl = defineComponent({
|
|
|
6509
6482
|
}
|
|
6510
6483
|
});
|
|
6511
6484
|
function _extends() {
|
|
6512
|
-
_extends = Object.assign
|
|
6485
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
6513
6486
|
for (var i = 1; i < arguments.length; i++) {
|
|
6514
6487
|
var source = arguments[i];
|
|
6515
6488
|
for (var key in source) {
|
|
@@ -6528,13 +6501,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6528
6501
|
_setPrototypeOf(subClass, superClass);
|
|
6529
6502
|
}
|
|
6530
6503
|
function _getPrototypeOf(o) {
|
|
6531
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
6504
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
6532
6505
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
6533
6506
|
};
|
|
6534
6507
|
return _getPrototypeOf(o);
|
|
6535
6508
|
}
|
|
6536
6509
|
function _setPrototypeOf(o, p) {
|
|
6537
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
6510
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
6538
6511
|
o2.__proto__ = p2;
|
|
6539
6512
|
return o2;
|
|
6540
6513
|
};
|
|
@@ -6557,7 +6530,7 @@ function _isNativeReflectConstruct() {
|
|
|
6557
6530
|
}
|
|
6558
6531
|
function _construct(Parent, args, Class) {
|
|
6559
6532
|
if (_isNativeReflectConstruct()) {
|
|
6560
|
-
_construct = Reflect.construct;
|
|
6533
|
+
_construct = Reflect.construct.bind();
|
|
6561
6534
|
} else {
|
|
6562
6535
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
6563
6536
|
var a = [null];
|
|
@@ -6835,9 +6808,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
6835
6808
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
6836
6809
|
}
|
|
6837
6810
|
};
|
|
6811
|
+
var urlReg;
|
|
6812
|
+
var getUrlRegex = function() {
|
|
6813
|
+
if (urlReg) {
|
|
6814
|
+
return urlReg;
|
|
6815
|
+
}
|
|
6816
|
+
var word = "[a-fA-F\\d:]";
|
|
6817
|
+
var b = function b2(options) {
|
|
6818
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
6819
|
+
};
|
|
6820
|
+
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
6821
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
6822
|
+
var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
6823
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
6824
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
6825
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
6826
|
+
var ip = function ip2(options) {
|
|
6827
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
6828
|
+
};
|
|
6829
|
+
ip.v4 = function(options) {
|
|
6830
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
6831
|
+
};
|
|
6832
|
+
ip.v6 = function(options) {
|
|
6833
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
6834
|
+
};
|
|
6835
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
6836
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
6837
|
+
var ipv4 = ip.v4().source;
|
|
6838
|
+
var ipv6 = ip.v6().source;
|
|
6839
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
6840
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
6841
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
6842
|
+
var port = "(?::\\d{2,5})?";
|
|
6843
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
6844
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
6845
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
6846
|
+
return urlReg;
|
|
6847
|
+
};
|
|
6838
6848
|
var pattern$2 = {
|
|
6839
6849
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
6840
|
-
url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
|
|
6841
6850
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
6842
6851
|
};
|
|
6843
6852
|
var types = {
|
|
@@ -6879,7 +6888,7 @@ var types = {
|
|
|
6879
6888
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
6880
6889
|
},
|
|
6881
6890
|
url: function url(value) {
|
|
6882
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
6891
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
6883
6892
|
},
|
|
6884
6893
|
hex: function hex(value) {
|
|
6885
6894
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -7454,7 +7463,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
7454
7463
|
if (rule.asyncValidator) {
|
|
7455
7464
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
7456
7465
|
} else if (rule.validator) {
|
|
7457
|
-
|
|
7466
|
+
try {
|
|
7467
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
7468
|
+
} catch (error) {
|
|
7469
|
+
console.error == null ? void 0 : console.error(error);
|
|
7470
|
+
if (!options.suppressValidatorError) {
|
|
7471
|
+
setTimeout(function() {
|
|
7472
|
+
throw error;
|
|
7473
|
+
}, 0);
|
|
7474
|
+
}
|
|
7475
|
+
cb(error.message);
|
|
7476
|
+
}
|
|
7458
7477
|
if (res === true) {
|
|
7459
7478
|
cb();
|
|
7460
7479
|
} else if (res === false) {
|
|
@@ -7575,10 +7594,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
7575
7594
|
} else {
|
|
7576
7595
|
return rule.trigger === triggerVal;
|
|
7577
7596
|
}
|
|
7578
|
-
}).map((
|
|
7579
|
-
var rule = __objRest(_a, []);
|
|
7580
|
-
return rule;
|
|
7581
|
-
});
|
|
7597
|
+
}).map(({ ...rule }) => rule);
|
|
7582
7598
|
};
|
|
7583
7599
|
const onValidateSuccess = () => {
|
|
7584
7600
|
validateState.value = "success";
|
|
@@ -7651,15 +7667,12 @@ defineComponent({
|
|
|
7651
7667
|
props: formItemProps,
|
|
7652
7668
|
setup(props, ctx) {
|
|
7653
7669
|
const formContext = inject(FORM_TOKEN);
|
|
7654
|
-
const
|
|
7670
|
+
const {
|
|
7655
7671
|
messageType: itemMessageType,
|
|
7656
7672
|
popPosition: itemPopPosition,
|
|
7657
|
-
showFeedback: itemShowFeedback
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
"popPosition",
|
|
7661
|
-
"showFeedback"
|
|
7662
|
-
]);
|
|
7673
|
+
showFeedback: itemShowFeedback,
|
|
7674
|
+
...otherProps
|
|
7675
|
+
} = toRefs(props);
|
|
7663
7676
|
const {
|
|
7664
7677
|
label,
|
|
7665
7678
|
helpTips,
|
|
@@ -7689,7 +7702,8 @@ defineComponent({
|
|
|
7689
7702
|
labelAlign: formContext.labelAlign
|
|
7690
7703
|
}));
|
|
7691
7704
|
provide(LABEL_DATA, labelData);
|
|
7692
|
-
const context = reactive(
|
|
7705
|
+
const context = reactive({
|
|
7706
|
+
...otherProps,
|
|
7693
7707
|
showFeedback,
|
|
7694
7708
|
messageType,
|
|
7695
7709
|
popPosition,
|
|
@@ -7699,7 +7713,7 @@ defineComponent({
|
|
|
7699
7713
|
validate,
|
|
7700
7714
|
resetField,
|
|
7701
7715
|
clearValidate
|
|
7702
|
-
})
|
|
7716
|
+
});
|
|
7703
7717
|
provide(FORM_ITEM_TOKEN, context);
|
|
7704
7718
|
ctx.expose({
|
|
7705
7719
|
resetField,
|
|
@@ -7724,8 +7738,8 @@ defineComponent({
|
|
|
7724
7738
|
"extra-info": extraInfo.value
|
|
7725
7739
|
}, {
|
|
7726
7740
|
default: () => {
|
|
7727
|
-
var
|
|
7728
|
-
return [(_b = (
|
|
7741
|
+
var _a, _b;
|
|
7742
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
7729
7743
|
}
|
|
7730
7744
|
})]);
|
|
7731
7745
|
}
|
|
@@ -7918,7 +7932,9 @@ function useTextareaAutosize(props, textarea2) {
|
|
|
7918
7932
|
const { autosize } = props;
|
|
7919
7933
|
if (autosize) {
|
|
7920
7934
|
const { minRows, maxRows } = lodash.exports.isObject(autosize) ? autosize : { minRows: void 0, maxRows: void 0 };
|
|
7921
|
-
textareaHeightStyle.value =
|
|
7935
|
+
textareaHeightStyle.value = {
|
|
7936
|
+
...computeTextareaHeight(textarea2.value, minRows, maxRows)
|
|
7937
|
+
};
|
|
7922
7938
|
} else {
|
|
7923
7939
|
textareaHeightStyle.value = {
|
|
7924
7940
|
minHeight: computeTextareaHeight(textarea2.value).minHeight
|