vue-devui 1.0.0-rc.11 → 1.0.0-rc.14
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/README.md +160 -149
- package/auto-complete/index.es.js +182 -10
- package/auto-complete/index.umd.js +18 -18
- package/auto-complete/style.css +1 -1
- package/badge/index.es.js +3 -1
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +5 -3
- package/button/index.umd.js +6 -6
- package/button/style.css +1 -1
- package/checkbox/index.es.js +1 -1
- package/checkbox/index.umd.js +4 -4
- package/checkbox/style.css +1 -1
- package/collapse/index.es.js +20 -186
- package/collapse/index.umd.js +1 -1
- package/collapse/style.css +1 -1
- package/countdown/index.es.js +56 -13
- package/countdown/index.umd.js +1 -1
- package/{date-picker → date-picker-pro}/index.d.ts +0 -0
- package/date-picker-pro/index.es.js +12016 -0
- package/date-picker-pro/index.umd.js +27 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/dropdown/index.es.js +9 -2
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +248 -56
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1 -1
- package/form/index.umd.js +4 -4
- package/icon/index.es.js +5 -3
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +193 -15
- package/input/index.umd.js +14 -14
- package/input/style.css +1 -1
- package/input-number/index.es.js +1 -4
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/modal/index.es.js +5 -3
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +32 -34
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/OptionGroup.js +3 -0
- package/nuxt/components/Step.js +3 -0
- package/nuxt/components/Steps.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/datePickerProCommonProps.js +3 -0
- package/nuxt/components/datePickerProPanelProps.js +3 -0
- package/nuxt/components/datePickerProProps.js +3 -0
- package/nuxt/components/stepProps.js +3 -0
- package/nuxt/components/stepsProps.js +3 -0
- package/nuxt/components/timerPickerPanelProps.js +3 -0
- package/package.json +1 -1
- package/pagination/index.es.js +175 -7
- package/pagination/index.umd.js +1 -1
- package/radio/index.es.js +1 -1
- package/radio/index.umd.js +4 -4
- package/result/index.es.js +5 -3
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +198 -18
- package/search/index.umd.js +13 -13
- package/search/style.css +1 -1
- package/select/index.es.js +382 -258
- package/select/index.umd.js +15 -15
- package/select/style.css +1 -1
- package/splitter/index.es.js +182 -12
- package/splitter/index.umd.js +13 -13
- package/steps/index.d.ts +7 -0
- package/steps/index.es.js +386 -0
- package/steps/index.umd.js +1 -0
- package/{date-picker → steps}/package.json +1 -1
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.es.js +1 -1
- package/switch/index.umd.js +4 -4
- package/table/index.es.js +851 -294
- package/table/index.umd.js +16 -16
- package/table/style.css +1 -1
- package/tabs/index.es.js +22 -12
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/textarea/index.es.js +3 -2
- package/textarea/index.umd.js +6 -6
- package/time-picker/index.d.ts +7 -0
- package/{date-picker → time-picker}/index.es.js +1537 -1040
- package/time-picker/index.umd.js +27 -0
- package/time-picker/package.json +7 -0
- package/time-picker/style.css +1 -0
- package/time-select/index.es.js +383 -258
- package/time-select/index.umd.js +16 -16
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +5 -3
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +1 -1
- package/tree/index.es.js +551 -88
- package/tree/index.umd.js +15 -15
- package/tree/style.css +1 -1
- package/upload/index.es.js +230 -57
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +14310 -11217
- package/vue-devui.umd.js +23 -23
- package/date-picker/index.umd.js +0 -27
- package/date-picker/style.css +0 -1
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
package/result/index.es.js
CHANGED
|
@@ -140,7 +140,8 @@ function useIconDom(props, ctx) {
|
|
|
140
140
|
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
141
141
|
"style": {
|
|
142
142
|
width: iconSize.value || "",
|
|
143
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)
|
|
143
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
144
|
+
verticalAlign: "middle"
|
|
144
145
|
}
|
|
145
146
|
}, ctx.attrs), null);
|
|
146
147
|
};
|
|
@@ -176,6 +177,7 @@ function useIconDom(props, ctx) {
|
|
|
176
177
|
var Icon = defineComponent({
|
|
177
178
|
name: "DIcon",
|
|
178
179
|
props: iconProps,
|
|
180
|
+
emits: ["click"],
|
|
179
181
|
setup(props, ctx) {
|
|
180
182
|
const {
|
|
181
183
|
disabled,
|
|
@@ -191,10 +193,10 @@ var Icon = defineComponent({
|
|
|
191
193
|
[ns.m("operable")]: operable.value
|
|
192
194
|
}));
|
|
193
195
|
const onClick = (e) => {
|
|
194
|
-
e.stopImmediatePropagation();
|
|
195
196
|
if (disabled.value) {
|
|
196
|
-
|
|
197
|
+
return;
|
|
197
198
|
}
|
|
199
|
+
ctx.emit("click", e);
|
|
198
200
|
};
|
|
199
201
|
return () => {
|
|
200
202
|
var _a, _b, _c, _d;
|
package/result/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis!="undefined"?globalThis:u||self,e(u.index={},u.Vue))})(this,function(u,e){"use strict";const y={icon:{type:String,default:"info"},title:{type:String,default:""},desc:{type:String,default:""}},N={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},S={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function f(o,s,l){let n=o;return s&&(n+=`__${s}`),l&&(n+=`--${l}`),n}function v(o,s=!1){const l=s?`.devui-${o}`:`devui-${o}`;return{b:()=>f(l),e:t=>t?f(l,t):"",m:t=>t?f(l,"",t):"",em:(t,c)=>t&&c?f(l,t,c):""}}var z="",b=e.defineComponent({name:"DSvgIcon",props:S,setup(o){const{name:s,color:l,size:n}=e.toRefs(o),r=v("svg-icon"),i=e.computed(()=>`#icon-${s.value}`),a=e.computed(()=>typeof n.value=="number"?`${n.value}px`:n.value),t={width:a.value,height:a.value};return()=>e.createVNode("svg",{class:r.b(),style:t},[e.createVNode("use",{"xlink:href":i.value,fill:l.value},null)])}});function h(o){return/^((http|https):)?\/\//.test(o)}function D(o,s){const{component:l,name:n,size:r,color:i,classPrefix:a,rotate:t}=e.toRefs(o),c=v("icon"),d=e.computed(()=>typeof r.value=="number"?`${r.value}px`:r.value),p=l.value?e.resolveDynamicComponent(l.value):e.resolveDynamicComponent(b),m=()=>e.createVNode("img",e.mergeProps({src:n.value,alt:n.value.split("/")[n.value.split("/").length-1],class:[(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{width:d.value||"",transform:`rotate(${t==null?void 0:t.value}deg)`,verticalAlign:"middle"}},s.attrs),null),$=()=>e.createVNode(p,e.mergeProps({name:n.value,color:i.value,size:d.value,class:[(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null),C=()=>{const P=/^icon-/.test(n.value)?n.value:`${a.value}-${n.value}`;return e.createVNode("i",e.mergeProps({class:[a.value,P,(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{fontSize:d.value,color:i.value,transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null)};return{iconDom:()=>l.value?$():h(n.value)?m():C()}}var _=e.defineComponent({name:"DIcon",props:N,emits:["click"],setup(o,s){const{disabled:l,operable:n}=e.toRefs(o),{iconDom:r}=D(o,s),i=v("icon"),a=e.computed(()=>({[i.e("container")]:!0,[i.m("disabled")]:l.value,[i.m("operable")]:n.value})),t=c=>{l.value||s.emit("click",c)};return()=>{var c,d,p,m;return e.createVNode("div",{class:a.value,onClick:t},[(d=(c=s.slots).prefix)==null?void 0:d.call(c),r(),(m=(p=s.slots).suffix)==null?void 0:m.call(p)])}}}),R="",g=e.defineComponent({name:"DResult",props:y,setup(o,s){let l;return function(n){n.success="right-o",n.danger="error-o",n.warning="warning-o",n.info="info-o"}(l||(l={})),()=>{var n,r,i,a;return e.createVNode("div",{class:"devui-result"},[s.slots.icon?e.createVNode("div",null,[(n=s.slots)==null?void 0:n.icon()]):e.createVNode(_,{name:l[o.icon]||"",class:`devui-result__icon-${o.icon}`,size:"64px"},null),e.createVNode("div",{class:"devui-result__title"},[s.slots.title?(r=s.slots)==null?void 0:r.title():o.title]),e.createVNode("div",{class:"devui-result__desc"},[s.slots.desc?(i=s.slots)==null?void 0:i.desc():o.desc]),e.createVNode("div",{class:"devui-result__extra"},[s.slots.extra?(a=s.slots)==null?void 0:a.extra():""])])}}}),V={title:"Result \u7ED3\u679C",category:"\u53CD\u9988",status:"100%",install(o){o.component(g.name,g)}};u.Result=g,u.default=V,u.resultProps=y,Object.defineProperty(u,"__esModule",{value:!0}),u[Symbol.toStringTag]="Module"});
|
package/result/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-icon__container{display:inline-
|
|
1
|
+
.devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #adb0b8)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 4px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-result{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;padding:30px}.devui-result__icon-success:before{color:var(--devui-success, #50d4ab)}.devui-result__icon-danger:before{color:var(--devui-danger, #f66f6a)}.devui-result__icon-warning:before{color:var(--devui-warning, #fac20a)}.devui-result__icon-info:before{color:var(--devui-info, #5e7ce0)}.devui-result__title{margin-top:20px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size-lg, 14px)}.devui-result__desc{margin-top:10px;color:var(--devui-text-weak, #575d6c);font-size:var(--devui-font-size-md, 14px)}.devui-result__extra{margin-top:30px}
|
package/search/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { computed, ref, watch, defineComponent, toRefs, createVNode, resolveDynamicComponent, mergeProps, provide, reactive, onUnmounted, Transition, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, shallowRef, resolveComponent } from "vue";
|
|
32
|
+
import { computed, ref, watch, defineComponent, toRefs, createVNode, resolveDynamicComponent, mergeProps, provide, reactive, onUnmounted, Transition, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, getCurrentInstance, shallowRef, resolveComponent } from "vue";
|
|
33
33
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
34
|
const searchProps = {
|
|
35
35
|
size: {
|
|
@@ -38,7 +38,7 @@ const searchProps = {
|
|
|
38
38
|
},
|
|
39
39
|
placeholder: {
|
|
40
40
|
type: String,
|
|
41
|
-
default: "
|
|
41
|
+
default: ""
|
|
42
42
|
},
|
|
43
43
|
maxLength: {
|
|
44
44
|
type: Number,
|
|
@@ -863,10 +863,10 @@ var lodash = { exports: {} };
|
|
|
863
863
|
}();
|
|
864
864
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
865
865
|
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.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;
|
|
866
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"),
|
|
866
|
+
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
867
867
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
868
868
|
var realNames = {};
|
|
869
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(
|
|
869
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
|
870
870
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
871
871
|
function lodash2(value) {
|
|
872
872
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -1222,7 +1222,7 @@ var lodash = { exports: {} };
|
|
|
1222
1222
|
function baseAt(object4, paths) {
|
|
1223
1223
|
var index2 = -1, length = paths.length, result2 = Array2(length), skip = object4 == null;
|
|
1224
1224
|
while (++index2 < length) {
|
|
1225
|
-
result2[index2] = skip ? undefined$1 :
|
|
1225
|
+
result2[index2] = skip ? undefined$1 : get2(object4, paths[index2]);
|
|
1226
1226
|
}
|
|
1227
1227
|
return result2;
|
|
1228
1228
|
}
|
|
@@ -1667,7 +1667,7 @@ var lodash = { exports: {} };
|
|
|
1667
1667
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
1668
1668
|
}
|
|
1669
1669
|
return function(object4) {
|
|
1670
|
-
var objValue =
|
|
1670
|
+
var objValue = get2(object4, path);
|
|
1671
1671
|
return objValue === undefined$1 && objValue === srcValue ? hasIn(object4, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1672
1672
|
};
|
|
1673
1673
|
}
|
|
@@ -2558,8 +2558,8 @@ var lodash = { exports: {} };
|
|
|
2558
2558
|
return func(number4);
|
|
2559
2559
|
};
|
|
2560
2560
|
}
|
|
2561
|
-
var createSet = !(
|
|
2562
|
-
return new
|
|
2561
|
+
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
|
|
2562
|
+
return new Set2(values2);
|
|
2563
2563
|
};
|
|
2564
2564
|
function createToPairs(keysFunc) {
|
|
2565
2565
|
return function(object4) {
|
|
@@ -2858,7 +2858,7 @@ var lodash = { exports: {} };
|
|
|
2858
2858
|
return result2;
|
|
2859
2859
|
};
|
|
2860
2860
|
var getTag = baseGetTag;
|
|
2861
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag ||
|
|
2861
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
|
|
2862
2862
|
getTag = function(value) {
|
|
2863
2863
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2864
2864
|
if (ctorString) {
|
|
@@ -4400,7 +4400,7 @@ var lodash = { exports: {} };
|
|
|
4400
4400
|
function functionsIn(object4) {
|
|
4401
4401
|
return object4 == null ? [] : baseFunctions(object4, keysIn(object4));
|
|
4402
4402
|
}
|
|
4403
|
-
function
|
|
4403
|
+
function get2(object4, path, defaultValue) {
|
|
4404
4404
|
var result2 = object4 == null ? undefined$1 : baseGet(object4, path);
|
|
4405
4405
|
return result2 === undefined$1 ? defaultValue : result2;
|
|
4406
4406
|
}
|
|
@@ -5255,7 +5255,7 @@ var lodash = { exports: {} };
|
|
|
5255
5255
|
lodash2.forInRight = forInRight;
|
|
5256
5256
|
lodash2.forOwn = forOwn;
|
|
5257
5257
|
lodash2.forOwnRight = forOwnRight;
|
|
5258
|
-
lodash2.get =
|
|
5258
|
+
lodash2.get = get2;
|
|
5259
5259
|
lodash2.gt = gt;
|
|
5260
5260
|
lodash2.gte = gte;
|
|
5261
5261
|
lodash2.has = has;
|
|
@@ -5685,7 +5685,8 @@ function useIconDom(props, ctx) {
|
|
|
5685
5685
|
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
5686
5686
|
"style": {
|
|
5687
5687
|
width: iconSize.value || "",
|
|
5688
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)
|
|
5688
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
5689
|
+
verticalAlign: "middle"
|
|
5689
5690
|
}
|
|
5690
5691
|
}, ctx.attrs), null);
|
|
5691
5692
|
};
|
|
@@ -5721,6 +5722,7 @@ function useIconDom(props, ctx) {
|
|
|
5721
5722
|
var Icon = defineComponent({
|
|
5722
5723
|
name: "DIcon",
|
|
5723
5724
|
props: iconProps,
|
|
5725
|
+
emits: ["click"],
|
|
5724
5726
|
setup(props, ctx) {
|
|
5725
5727
|
const {
|
|
5726
5728
|
disabled,
|
|
@@ -5736,10 +5738,10 @@ var Icon = defineComponent({
|
|
|
5736
5738
|
[ns2.m("operable")]: operable.value
|
|
5737
5739
|
}));
|
|
5738
5740
|
const onClick = (e) => {
|
|
5739
|
-
e.stopImmediatePropagation();
|
|
5740
5741
|
if (disabled.value) {
|
|
5741
|
-
|
|
5742
|
+
return;
|
|
5742
5743
|
}
|
|
5744
|
+
ctx.emit("click", e);
|
|
5743
5745
|
};
|
|
5744
5746
|
return () => {
|
|
5745
5747
|
var _a, _b, _c, _d;
|
|
@@ -5785,6 +5787,10 @@ const inputProps = {
|
|
|
5785
5787
|
clearable: {
|
|
5786
5788
|
type: Boolean,
|
|
5787
5789
|
default: false
|
|
5790
|
+
},
|
|
5791
|
+
placeholder: {
|
|
5792
|
+
type: String,
|
|
5793
|
+
default: ""
|
|
5788
5794
|
}
|
|
5789
5795
|
};
|
|
5790
5796
|
const formItemProps = {
|
|
@@ -7869,7 +7875,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
7869
7875
|
return rule.trigger === triggerVal;
|
|
7870
7876
|
}
|
|
7871
7877
|
}).map((_a) => {
|
|
7872
|
-
var
|
|
7878
|
+
var rule = __objRest(_a, []);
|
|
7873
7879
|
return rule;
|
|
7874
7880
|
});
|
|
7875
7881
|
};
|
|
@@ -8091,6 +8097,7 @@ function useInputEvent(isFocus, props, ctx, focus) {
|
|
|
8091
8097
|
}
|
|
8092
8098
|
};
|
|
8093
8099
|
const onInput = (e) => {
|
|
8100
|
+
ctx.emit("input", e.target.value);
|
|
8094
8101
|
ctx.emit("update:modelValue", e.target.value);
|
|
8095
8102
|
};
|
|
8096
8103
|
const onChange = (e) => {
|
|
@@ -8123,12 +8130,182 @@ function useInputFunction(input2) {
|
|
|
8123
8130
|
return { select, focus, blur };
|
|
8124
8131
|
}
|
|
8125
8132
|
var input = "";
|
|
8133
|
+
function deepAssign(...objects) {
|
|
8134
|
+
const isObject2 = (obj) => obj && typeof obj === "object";
|
|
8135
|
+
return objects.reduce((prev, from) => {
|
|
8136
|
+
Object.keys(from).forEach((key) => {
|
|
8137
|
+
const pVal = prev[key];
|
|
8138
|
+
const oVal = from[key];
|
|
8139
|
+
if (Array.isArray(pVal) && Array.isArray(oVal)) {
|
|
8140
|
+
prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
|
|
8141
|
+
} else if (isObject2(pVal) && isObject2(oVal)) {
|
|
8142
|
+
prev[key] = deepAssign(pVal, oVal);
|
|
8143
|
+
} else {
|
|
8144
|
+
prev[key] = oVal;
|
|
8145
|
+
}
|
|
8146
|
+
});
|
|
8147
|
+
return prev;
|
|
8148
|
+
}, {});
|
|
8149
|
+
}
|
|
8150
|
+
var zhCN = {
|
|
8151
|
+
pagination: {
|
|
8152
|
+
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
8153
|
+
goToText: "\u8DF3\u81F3"
|
|
8154
|
+
},
|
|
8155
|
+
accordion: {
|
|
8156
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
8157
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8158
|
+
},
|
|
8159
|
+
autoCompleteDropdown: {
|
|
8160
|
+
latestInput: "\u6700\u8FD1\u8F93\u5165"
|
|
8161
|
+
},
|
|
8162
|
+
cascaderList: {
|
|
8163
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8164
|
+
},
|
|
8165
|
+
colorPicker: {
|
|
8166
|
+
foundationPanel: "\u57FA\u7840\u9762\u677F",
|
|
8167
|
+
advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
|
|
8168
|
+
},
|
|
8169
|
+
datePickerPro: {
|
|
8170
|
+
ok: "\u786E\u5B9A",
|
|
8171
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
8172
|
+
month1: "1\u6708",
|
|
8173
|
+
month2: "2\u6708",
|
|
8174
|
+
month3: "3\u6708",
|
|
8175
|
+
month4: "4\u6708",
|
|
8176
|
+
month5: "5\u6708",
|
|
8177
|
+
month6: "6\u6708",
|
|
8178
|
+
month7: "7\u6708",
|
|
8179
|
+
month8: "8\u6708",
|
|
8180
|
+
month9: "9\u6708",
|
|
8181
|
+
month10: "10\u6708",
|
|
8182
|
+
month11: "11\u6708",
|
|
8183
|
+
month12: "12\u6708",
|
|
8184
|
+
year: "\u5E74",
|
|
8185
|
+
startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
|
|
8186
|
+
endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
|
|
8187
|
+
getWeekDays() {
|
|
8188
|
+
return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
8189
|
+
},
|
|
8190
|
+
getTimeArr() {
|
|
8191
|
+
return ["\u65F6", "\u5206", "\u79D2"];
|
|
8192
|
+
},
|
|
8193
|
+
getYearMonthStr(year, month) {
|
|
8194
|
+
return `${year}\u5E74${month}\u6708`;
|
|
8195
|
+
}
|
|
8196
|
+
},
|
|
8197
|
+
editableSelect: {
|
|
8198
|
+
noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
8199
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8200
|
+
},
|
|
8201
|
+
input: {
|
|
8202
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
8203
|
+
},
|
|
8204
|
+
splitterBar: {
|
|
8205
|
+
collapse: "\u6536\u8D77",
|
|
8206
|
+
expand: "\u5C55\u5F00"
|
|
8207
|
+
},
|
|
8208
|
+
stepsGuide: {
|
|
8209
|
+
previous: "\u4E0A\u4E00\u6B65",
|
|
8210
|
+
continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
|
|
8211
|
+
ok: "\u6211\u77E5\u9053\u5566"
|
|
8212
|
+
},
|
|
8213
|
+
table: {
|
|
8214
|
+
selectAll: "\u5168\u9009",
|
|
8215
|
+
ok: "\u786E\u5B9A"
|
|
8216
|
+
},
|
|
8217
|
+
timePopup: {
|
|
8218
|
+
ok: "\u786E\u5B9A"
|
|
8219
|
+
},
|
|
8220
|
+
transfer: {
|
|
8221
|
+
unit: "\u9879",
|
|
8222
|
+
panelUnit: "\u9879",
|
|
8223
|
+
headerUnit: "\u9879",
|
|
8224
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
8225
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
|
|
8226
|
+
},
|
|
8227
|
+
tree: {
|
|
8228
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
8229
|
+
newNode: "\u65B0\u8282\u70B9",
|
|
8230
|
+
selectPlaceholder: "\u8BF7\u9009\u62E9"
|
|
8231
|
+
},
|
|
8232
|
+
upload: {
|
|
8233
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
8234
|
+
getExistSameNameFilesMsg(sameNames) {
|
|
8235
|
+
return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
8236
|
+
},
|
|
8237
|
+
getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
|
|
8238
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
8239
|
+
},
|
|
8240
|
+
getBeyondMaximalFileSizeMsg(filename, maximalSize) {
|
|
8241
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
8242
|
+
},
|
|
8243
|
+
getNotAllowedFileTypeMsg(filename, scope) {
|
|
8244
|
+
return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
8245
|
+
}
|
|
8246
|
+
},
|
|
8247
|
+
search: {
|
|
8248
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
8249
|
+
},
|
|
8250
|
+
select: {
|
|
8251
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
8252
|
+
noDataText: "\u65E0\u6570\u636E",
|
|
8253
|
+
noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
8254
|
+
loadingText: "\u52A0\u8F7D\u4E2D..."
|
|
8255
|
+
},
|
|
8256
|
+
tagInput: {
|
|
8257
|
+
maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
|
|
8258
|
+
},
|
|
8259
|
+
timeSelect: {
|
|
8260
|
+
placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
|
|
8261
|
+
}
|
|
8262
|
+
};
|
|
8263
|
+
const lang = ref("zh-CN");
|
|
8264
|
+
let langMessages = reactive({
|
|
8265
|
+
[lang.value]: zhCN
|
|
8266
|
+
});
|
|
8267
|
+
const Locale = {
|
|
8268
|
+
messages() {
|
|
8269
|
+
return langMessages[lang.value];
|
|
8270
|
+
},
|
|
8271
|
+
lang() {
|
|
8272
|
+
return lang.value;
|
|
8273
|
+
},
|
|
8274
|
+
use(newLang, newMessages2) {
|
|
8275
|
+
lang.value = newLang;
|
|
8276
|
+
this.add({ [newLang]: newMessages2 });
|
|
8277
|
+
},
|
|
8278
|
+
add(newMessages2 = {}) {
|
|
8279
|
+
langMessages = deepAssign(langMessages, newMessages2);
|
|
8280
|
+
}
|
|
8281
|
+
};
|
|
8282
|
+
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
8283
|
+
function get(object4, path) {
|
|
8284
|
+
const keys = path.split(".");
|
|
8285
|
+
let result = object4;
|
|
8286
|
+
keys.forEach((key) => {
|
|
8287
|
+
var _a;
|
|
8288
|
+
result = (_a = result[key]) != null ? _a : "";
|
|
8289
|
+
});
|
|
8290
|
+
return result;
|
|
8291
|
+
}
|
|
8292
|
+
function createI18nTranslate(name, app, newPrefix) {
|
|
8293
|
+
const prefix = newPrefix || camelize(name) + ".";
|
|
8294
|
+
return (path) => {
|
|
8295
|
+
var _a;
|
|
8296
|
+
const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
|
|
8297
|
+
const message = get(messages2, prefix + path) || get(messages2, path);
|
|
8298
|
+
return message;
|
|
8299
|
+
};
|
|
8300
|
+
}
|
|
8126
8301
|
var DInput = defineComponent({
|
|
8127
8302
|
name: "DInput",
|
|
8128
8303
|
inheritAttrs: false,
|
|
8129
8304
|
props: inputProps,
|
|
8130
8305
|
emits: ["update:modelValue", "focus", "blur", "input", "change", "keydown", "clear"],
|
|
8131
8306
|
setup(props, ctx) {
|
|
8307
|
+
const app = getCurrentInstance();
|
|
8308
|
+
const t = createI18nTranslate("DInput", app);
|
|
8132
8309
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
8133
8310
|
const {
|
|
8134
8311
|
modelValue
|
|
@@ -8194,7 +8371,8 @@ var DInput = defineComponent({
|
|
|
8194
8371
|
"ref": input2,
|
|
8195
8372
|
"value": modelValue.value,
|
|
8196
8373
|
"disabled": inputDisabled.value,
|
|
8197
|
-
"class": ns2.e("inner")
|
|
8374
|
+
"class": ns2.e("inner"),
|
|
8375
|
+
"placeholder": props.placeholder || t("placeholder")
|
|
8198
8376
|
}, otherAttrs, {
|
|
8199
8377
|
"type": props.showPassword ? passwordVisible.value ? "text" : "password" : "text",
|
|
8200
8378
|
"onInput": onInput,
|
|
@@ -8229,6 +8407,8 @@ var Search = defineComponent({
|
|
|
8229
8407
|
props: searchProps,
|
|
8230
8408
|
emits: ["update:modelValue", "search"],
|
|
8231
8409
|
setup(props, ctx) {
|
|
8410
|
+
const app = getCurrentInstance();
|
|
8411
|
+
const t = createI18nTranslate("DSearch", app);
|
|
8232
8412
|
const ns2 = useNamespace("search");
|
|
8233
8413
|
const isFocus = ref(false);
|
|
8234
8414
|
const rootClasses = getRootClass(props, isFocus);
|
|
@@ -8261,13 +8441,13 @@ var Search = defineComponent({
|
|
|
8261
8441
|
disabled: props.disabled,
|
|
8262
8442
|
autoFocus: props.autoFocus,
|
|
8263
8443
|
modelValue: keywords.value,
|
|
8264
|
-
placeholder: props.placeholder,
|
|
8444
|
+
placeholder: props.placeholder || t("placeholder"),
|
|
8265
8445
|
onKeydown: onInputKeydown,
|
|
8266
8446
|
"onUpdate:modelValue": onInputUpdate,
|
|
8267
8447
|
onFocus,
|
|
8268
8448
|
onBlur
|
|
8269
8449
|
};
|
|
8270
|
-
return createVNode("
|
|
8450
|
+
return createVNode("label", {
|
|
8271
8451
|
"class": rootClasses.value
|
|
8272
8452
|
}, [props.iconPosition === "left" && createVNode("div", {
|
|
8273
8453
|
"class": ns2.e("icon"),
|