vue-devui 1.0.0-rc.13 → 1.0.0-rc.16
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 +161 -156
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +241 -82
- package/auto-complete/index.umd.js +28 -17
- 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/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 +1384 -220
- package/date-picker-pro/index.umd.js +25 -14
- 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 +254 -99
- 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/image-preview/style.css +1 -1
- package/input/index.es.js +239 -75
- package/input/index.umd.js +27 -16
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.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/message/index.d.ts +7 -0
- package/message/index.es.js +534 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.es.js +11 -43
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +16 -22
- package/notification/index.umd.js +1 -1
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +4 -2
- package/pagination/index.es.js +152 -2
- 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 +28 -17
- 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 +255 -78
- package/search/index.umd.js +27 -16
- package/search/style.css +1 -1
- package/select/index.es.js +283 -114
- package/select/index.umd.js +27 -16
- package/select/style.css +1 -1
- package/skeleton/index.es.js +87 -261
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +175 -32
- package/splitter/index.umd.js +13 -13
- 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/table/index.es.js +309 -96
- package/table/index.umd.js +25 -14
- 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 +248 -89
- package/time-picker/index.umd.js +25 -14
- package/time-select/index.es.js +283 -114
- package/time-select/index.umd.js +26 -15
- 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 +422 -110
- package/tree/index.umd.js +25 -14
- package/tree/style.css +1 -1
- package/upload/index.es.js +168 -49
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +13601 -13023
- package/vue-devui.umd.js +32 -21
- package/LICENSE +0 -23
package/time-picker/index.es.js
CHANGED
|
@@ -1,39 +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
|
-
var __publicField = (obj, key, value) => {
|
|
33
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
|
-
return value;
|
|
35
|
-
};
|
|
36
|
-
import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, ref, reactive, onMounted, onBeforeUnmount, onUnmounted, Fragment, h, render, inject, withDirectives, resolveDirective, provide, toRef, getCurrentInstance, watch, isVNode, Transition, unref, nextTick, Comment, Text, cloneVNode, Teleport, createTextVNode, shallowRef } from "vue";
|
|
1
|
+
import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, ref, reactive, onMounted, onBeforeUnmount, onUnmounted, Fragment, h, render, inject, withDirectives, resolveDirective, provide, toRef, getCurrentInstance, watch, isVNode, Transition, nextTick, unref, Comment, Text, cloneVNode, Teleport, createTextVNode, shallowRef } from "vue";
|
|
37
2
|
import { onClickOutside } from "@vueuse/core";
|
|
38
3
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
39
4
|
const timePickerProps = {
|
|
@@ -921,8 +886,8 @@ var TimeList = defineComponent({
|
|
|
921
886
|
});
|
|
922
887
|
class View {
|
|
923
888
|
constructor() {
|
|
924
|
-
|
|
925
|
-
|
|
889
|
+
this.top = "50%";
|
|
890
|
+
this.left = "50%";
|
|
926
891
|
}
|
|
927
892
|
}
|
|
928
893
|
const loadingProps = {
|
|
@@ -940,13 +905,9 @@ const loadingProps = {
|
|
|
940
905
|
};
|
|
941
906
|
class LoadingOptions {
|
|
942
907
|
constructor() {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
__publicField(this, "backdrop", true);
|
|
947
|
-
__publicField(this, "positionType", "relative");
|
|
948
|
-
__publicField(this, "view", new View());
|
|
949
|
-
__publicField(this, "zIndex");
|
|
908
|
+
this.backdrop = true;
|
|
909
|
+
this.positionType = "relative";
|
|
910
|
+
this.view = new View();
|
|
950
911
|
}
|
|
951
912
|
}
|
|
952
913
|
var loading = "";
|
|
@@ -1014,7 +975,7 @@ var Loading = defineComponent({
|
|
|
1014
975
|
});
|
|
1015
976
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
1016
977
|
function createComponent(component, props, children = null) {
|
|
1017
|
-
const vnode = h(component,
|
|
978
|
+
const vnode = h(component, { ...props }, children);
|
|
1018
979
|
const container = document.createElement("div");
|
|
1019
980
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
1020
981
|
render(vnode, container);
|
|
@@ -1101,9 +1062,12 @@ const removeAttribute = (el) => {
|
|
|
1101
1062
|
};
|
|
1102
1063
|
const handleProps = (el, vprops) => {
|
|
1103
1064
|
var _a;
|
|
1104
|
-
const props =
|
|
1065
|
+
const props = {
|
|
1066
|
+
...new LoadingOptions(),
|
|
1067
|
+
...vprops
|
|
1068
|
+
};
|
|
1105
1069
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
1106
|
-
const loadingInstance = createComponent(loadingConstructor,
|
|
1070
|
+
const loadingInstance = createComponent(loadingConstructor, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
1107
1071
|
el.style.position = props.positionType;
|
|
1108
1072
|
el.options = props;
|
|
1109
1073
|
el.instance = loadingInstance;
|
|
@@ -1870,7 +1834,7 @@ var lodash = { exports: {} };
|
|
|
1870
1834
|
var objectCtorString = funcToString.call(Object2);
|
|
1871
1835
|
var oldDash = root._;
|
|
1872
1836
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1873
|
-
var
|
|
1837
|
+
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;
|
|
1874
1838
|
var defineProperty = function() {
|
|
1875
1839
|
try {
|
|
1876
1840
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1880,11 +1844,11 @@ var lodash = { exports: {} };
|
|
|
1880
1844
|
}
|
|
1881
1845
|
}();
|
|
1882
1846
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
1883
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
1884
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"),
|
|
1885
|
-
var metaMap =
|
|
1847
|
+
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;
|
|
1848
|
+
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
1849
|
+
var metaMap = WeakMap && new WeakMap();
|
|
1886
1850
|
var realNames = {};
|
|
1887
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(
|
|
1851
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
1888
1852
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1889
1853
|
function lodash2(value) {
|
|
1890
1854
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -2339,7 +2303,7 @@ var lodash = { exports: {} };
|
|
|
2339
2303
|
if (typeof func != "function") {
|
|
2340
2304
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
2341
2305
|
}
|
|
2342
|
-
return
|
|
2306
|
+
return setTimeout2(function() {
|
|
2343
2307
|
func.apply(undefined$1, args);
|
|
2344
2308
|
}, wait);
|
|
2345
2309
|
}
|
|
@@ -3132,7 +3096,7 @@ var lodash = { exports: {} };
|
|
|
3132
3096
|
}
|
|
3133
3097
|
function cloneArrayBuffer(arrayBuffer) {
|
|
3134
3098
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
3135
|
-
new
|
|
3099
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
3136
3100
|
return result2;
|
|
3137
3101
|
}
|
|
3138
3102
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -3714,7 +3678,7 @@ var lodash = { exports: {} };
|
|
|
3714
3678
|
object4 = object4.buffer;
|
|
3715
3679
|
other = other.buffer;
|
|
3716
3680
|
case arrayBufferTag:
|
|
3717
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
3681
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
3718
3682
|
return false;
|
|
3719
3683
|
}
|
|
3720
3684
|
return true;
|
|
@@ -3876,7 +3840,7 @@ var lodash = { exports: {} };
|
|
|
3876
3840
|
return result2;
|
|
3877
3841
|
};
|
|
3878
3842
|
var getTag = baseGetTag;
|
|
3879
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag ||
|
|
3843
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
3880
3844
|
getTag = function(value) {
|
|
3881
3845
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
3882
3846
|
if (ctorString) {
|
|
@@ -4148,7 +4112,7 @@ var lodash = { exports: {} };
|
|
|
4148
4112
|
return object4[key];
|
|
4149
4113
|
}
|
|
4150
4114
|
var setData = shortOut(baseSetData);
|
|
4151
|
-
var
|
|
4115
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
4152
4116
|
return root.setTimeout(func, wait);
|
|
4153
4117
|
};
|
|
4154
4118
|
var setToString = shortOut(baseSetToString);
|
|
@@ -4940,7 +4904,7 @@ var lodash = { exports: {} };
|
|
|
4940
4904
|
}
|
|
4941
4905
|
function leadingEdge(time) {
|
|
4942
4906
|
lastInvokeTime = time;
|
|
4943
|
-
timerId =
|
|
4907
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4944
4908
|
return leading ? invokeFunc(time) : result2;
|
|
4945
4909
|
}
|
|
4946
4910
|
function remainingWait(time) {
|
|
@@ -4956,7 +4920,7 @@ var lodash = { exports: {} };
|
|
|
4956
4920
|
if (shouldInvoke(time)) {
|
|
4957
4921
|
return trailingEdge(time);
|
|
4958
4922
|
}
|
|
4959
|
-
timerId =
|
|
4923
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
4960
4924
|
}
|
|
4961
4925
|
function trailingEdge(time) {
|
|
4962
4926
|
timerId = undefined$1;
|
|
@@ -4987,12 +4951,12 @@ var lodash = { exports: {} };
|
|
|
4987
4951
|
}
|
|
4988
4952
|
if (maxing) {
|
|
4989
4953
|
clearTimeout(timerId);
|
|
4990
|
-
timerId =
|
|
4954
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4991
4955
|
return invokeFunc(lastCallTime);
|
|
4992
4956
|
}
|
|
4993
4957
|
}
|
|
4994
4958
|
if (timerId === undefined$1) {
|
|
4995
|
-
timerId =
|
|
4959
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4996
4960
|
}
|
|
4997
4961
|
return result2;
|
|
4998
4962
|
}
|
|
@@ -6667,6 +6631,155 @@ defineComponent({
|
|
|
6667
6631
|
}
|
|
6668
6632
|
});
|
|
6669
6633
|
var index$1 = "";
|
|
6634
|
+
function deepAssign(...objects) {
|
|
6635
|
+
const isObject2 = (obj) => obj && typeof obj === "object";
|
|
6636
|
+
return objects.reduce((prev, from) => {
|
|
6637
|
+
Object.keys(from).forEach((key) => {
|
|
6638
|
+
const pVal = prev[key];
|
|
6639
|
+
const oVal = from[key];
|
|
6640
|
+
if (Array.isArray(pVal) && Array.isArray(oVal)) {
|
|
6641
|
+
prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
|
|
6642
|
+
} else if (isObject2(pVal) && isObject2(oVal)) {
|
|
6643
|
+
prev[key] = deepAssign(pVal, oVal);
|
|
6644
|
+
} else {
|
|
6645
|
+
prev[key] = oVal;
|
|
6646
|
+
}
|
|
6647
|
+
});
|
|
6648
|
+
return prev;
|
|
6649
|
+
}, {});
|
|
6650
|
+
}
|
|
6651
|
+
var zhCN = {
|
|
6652
|
+
pagination: {
|
|
6653
|
+
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
6654
|
+
goToText: "\u8DF3\u81F3"
|
|
6655
|
+
},
|
|
6656
|
+
accordion: {
|
|
6657
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
6658
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
6659
|
+
},
|
|
6660
|
+
autoCompleteDropdown: {
|
|
6661
|
+
latestInput: "\u6700\u8FD1\u8F93\u5165"
|
|
6662
|
+
},
|
|
6663
|
+
cascaderList: {
|
|
6664
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
6665
|
+
},
|
|
6666
|
+
colorPicker: {
|
|
6667
|
+
foundationPanel: "\u57FA\u7840\u9762\u677F",
|
|
6668
|
+
advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
|
|
6669
|
+
},
|
|
6670
|
+
datePickerPro: {
|
|
6671
|
+
ok: "\u786E\u5B9A",
|
|
6672
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
6673
|
+
month1: "1\u6708",
|
|
6674
|
+
month2: "2\u6708",
|
|
6675
|
+
month3: "3\u6708",
|
|
6676
|
+
month4: "4\u6708",
|
|
6677
|
+
month5: "5\u6708",
|
|
6678
|
+
month6: "6\u6708",
|
|
6679
|
+
month7: "7\u6708",
|
|
6680
|
+
month8: "8\u6708",
|
|
6681
|
+
month9: "9\u6708",
|
|
6682
|
+
month10: "10\u6708",
|
|
6683
|
+
month11: "11\u6708",
|
|
6684
|
+
month12: "12\u6708",
|
|
6685
|
+
year: "\u5E74",
|
|
6686
|
+
startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
|
|
6687
|
+
endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
|
|
6688
|
+
getWeekDays() {
|
|
6689
|
+
return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
6690
|
+
},
|
|
6691
|
+
getTimeArr() {
|
|
6692
|
+
return ["\u65F6", "\u5206", "\u79D2"];
|
|
6693
|
+
},
|
|
6694
|
+
getYearMonthStr(year, month) {
|
|
6695
|
+
return `${year}\u5E74${month}\u6708`;
|
|
6696
|
+
}
|
|
6697
|
+
},
|
|
6698
|
+
editableSelect: {
|
|
6699
|
+
noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
6700
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
6701
|
+
},
|
|
6702
|
+
input: {
|
|
6703
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
6704
|
+
},
|
|
6705
|
+
splitterBar: {
|
|
6706
|
+
collapse: "\u6536\u8D77",
|
|
6707
|
+
expand: "\u5C55\u5F00"
|
|
6708
|
+
},
|
|
6709
|
+
stepsGuide: {
|
|
6710
|
+
previous: "\u4E0A\u4E00\u6B65",
|
|
6711
|
+
continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
|
|
6712
|
+
ok: "\u6211\u77E5\u9053\u5566"
|
|
6713
|
+
},
|
|
6714
|
+
table: {
|
|
6715
|
+
selectAll: "\u5168\u9009",
|
|
6716
|
+
ok: "\u786E\u5B9A"
|
|
6717
|
+
},
|
|
6718
|
+
timePopup: {
|
|
6719
|
+
ok: "\u786E\u5B9A"
|
|
6720
|
+
},
|
|
6721
|
+
transfer: {
|
|
6722
|
+
unit: "\u9879",
|
|
6723
|
+
panelUnit: "\u9879",
|
|
6724
|
+
headerUnit: "\u9879",
|
|
6725
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
6726
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
|
|
6727
|
+
},
|
|
6728
|
+
tree: {
|
|
6729
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
6730
|
+
newNode: "\u65B0\u8282\u70B9",
|
|
6731
|
+
selectPlaceholder: "\u8BF7\u9009\u62E9"
|
|
6732
|
+
},
|
|
6733
|
+
upload: {
|
|
6734
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
6735
|
+
getExistSameNameFilesMsg(sameNames) {
|
|
6736
|
+
return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
6737
|
+
},
|
|
6738
|
+
getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
|
|
6739
|
+
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`;
|
|
6740
|
+
},
|
|
6741
|
+
getBeyondMaximalFileSizeMsg(filename, maximalSize) {
|
|
6742
|
+
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`;
|
|
6743
|
+
},
|
|
6744
|
+
getNotAllowedFileTypeMsg(filename, scope) {
|
|
6745
|
+
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`;
|
|
6746
|
+
}
|
|
6747
|
+
},
|
|
6748
|
+
search: {
|
|
6749
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
6750
|
+
},
|
|
6751
|
+
select: {
|
|
6752
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
6753
|
+
noDataText: "\u65E0\u6570\u636E",
|
|
6754
|
+
noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
6755
|
+
loadingText: "\u52A0\u8F7D\u4E2D..."
|
|
6756
|
+
},
|
|
6757
|
+
tagInput: {
|
|
6758
|
+
maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
|
|
6759
|
+
},
|
|
6760
|
+
timeSelect: {
|
|
6761
|
+
placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
|
|
6762
|
+
}
|
|
6763
|
+
};
|
|
6764
|
+
const lang = ref("zh-CN");
|
|
6765
|
+
let langMessages = reactive({
|
|
6766
|
+
[lang.value]: zhCN
|
|
6767
|
+
});
|
|
6768
|
+
const Locale = {
|
|
6769
|
+
messages() {
|
|
6770
|
+
return langMessages[lang.value];
|
|
6771
|
+
},
|
|
6772
|
+
lang() {
|
|
6773
|
+
return lang.value;
|
|
6774
|
+
},
|
|
6775
|
+
use(newLang, newMessages2) {
|
|
6776
|
+
lang.value = newLang;
|
|
6777
|
+
this.add({ [newLang]: newMessages2 });
|
|
6778
|
+
},
|
|
6779
|
+
add(newMessages2 = {}) {
|
|
6780
|
+
langMessages = deepAssign(langMessages, newMessages2);
|
|
6781
|
+
}
|
|
6782
|
+
};
|
|
6670
6783
|
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
6671
6784
|
function get(object4, path) {
|
|
6672
6785
|
const keys = path.split(".");
|
|
@@ -6680,7 +6793,8 @@ function get(object4, path) {
|
|
|
6680
6793
|
function createI18nTranslate(name, app, newPrefix) {
|
|
6681
6794
|
const prefix = newPrefix || camelize(name) + ".";
|
|
6682
6795
|
return (path) => {
|
|
6683
|
-
|
|
6796
|
+
var _a;
|
|
6797
|
+
const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
|
|
6684
6798
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
|
6685
6799
|
return message;
|
|
6686
6800
|
};
|
|
@@ -6953,7 +7067,10 @@ function useFormValidation(itemContexts) {
|
|
|
6953
7067
|
try {
|
|
6954
7068
|
await field.validate("");
|
|
6955
7069
|
} catch (err) {
|
|
6956
|
-
errors =
|
|
7070
|
+
errors = {
|
|
7071
|
+
...errors,
|
|
7072
|
+
...err
|
|
7073
|
+
};
|
|
6957
7074
|
}
|
|
6958
7075
|
}
|
|
6959
7076
|
if (!Object.keys(errors).length) {
|
|
@@ -7010,11 +7127,12 @@ defineComponent({
|
|
|
7010
7127
|
}, {
|
|
7011
7128
|
deep: true
|
|
7012
7129
|
});
|
|
7013
|
-
provide(FORM_TOKEN, reactive(
|
|
7130
|
+
provide(FORM_TOKEN, reactive({
|
|
7131
|
+
...toRefs(props),
|
|
7014
7132
|
emit: ctx.emit,
|
|
7015
7133
|
addItemContext,
|
|
7016
7134
|
removeItemContext
|
|
7017
|
-
}))
|
|
7135
|
+
}));
|
|
7018
7136
|
ctx.expose({
|
|
7019
7137
|
validate,
|
|
7020
7138
|
validateFields,
|
|
@@ -7852,7 +7970,7 @@ var FormControl = defineComponent({
|
|
|
7852
7970
|
}
|
|
7853
7971
|
});
|
|
7854
7972
|
function _extends() {
|
|
7855
|
-
_extends = Object.assign
|
|
7973
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
7856
7974
|
for (var i = 1; i < arguments.length; i++) {
|
|
7857
7975
|
var source = arguments[i];
|
|
7858
7976
|
for (var key in source) {
|
|
@@ -7871,13 +7989,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
7871
7989
|
_setPrototypeOf(subClass, superClass);
|
|
7872
7990
|
}
|
|
7873
7991
|
function _getPrototypeOf(o) {
|
|
7874
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
7992
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
7875
7993
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
7876
7994
|
};
|
|
7877
7995
|
return _getPrototypeOf(o);
|
|
7878
7996
|
}
|
|
7879
7997
|
function _setPrototypeOf(o, p) {
|
|
7880
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
7998
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
7881
7999
|
o2.__proto__ = p2;
|
|
7882
8000
|
return o2;
|
|
7883
8001
|
};
|
|
@@ -7900,7 +8018,7 @@ function _isNativeReflectConstruct() {
|
|
|
7900
8018
|
}
|
|
7901
8019
|
function _construct(Parent, args, Class) {
|
|
7902
8020
|
if (_isNativeReflectConstruct()) {
|
|
7903
|
-
_construct = Reflect.construct;
|
|
8021
|
+
_construct = Reflect.construct.bind();
|
|
7904
8022
|
} else {
|
|
7905
8023
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
7906
8024
|
var a = [null];
|
|
@@ -8178,9 +8296,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
8178
8296
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
8179
8297
|
}
|
|
8180
8298
|
};
|
|
8299
|
+
var urlReg;
|
|
8300
|
+
var getUrlRegex = function() {
|
|
8301
|
+
if (urlReg) {
|
|
8302
|
+
return urlReg;
|
|
8303
|
+
}
|
|
8304
|
+
var word = "[a-fA-F\\d:]";
|
|
8305
|
+
var b = function b2(options) {
|
|
8306
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
8307
|
+
};
|
|
8308
|
+
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}";
|
|
8309
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
8310
|
+
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();
|
|
8311
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
8312
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
8313
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
8314
|
+
var ip = function ip2(options) {
|
|
8315
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
8316
|
+
};
|
|
8317
|
+
ip.v4 = function(options) {
|
|
8318
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
8319
|
+
};
|
|
8320
|
+
ip.v6 = function(options) {
|
|
8321
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
8322
|
+
};
|
|
8323
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
8324
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
8325
|
+
var ipv4 = ip.v4().source;
|
|
8326
|
+
var ipv6 = ip.v6().source;
|
|
8327
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
8328
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
8329
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
8330
|
+
var port = "(?::\\d{2,5})?";
|
|
8331
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
8332
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
8333
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
8334
|
+
return urlReg;
|
|
8335
|
+
};
|
|
8181
8336
|
var pattern$2 = {
|
|
8182
8337
|
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,}))$/,
|
|
8183
|
-
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"),
|
|
8184
8338
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
8185
8339
|
};
|
|
8186
8340
|
var types = {
|
|
@@ -8222,7 +8376,7 @@ var types = {
|
|
|
8222
8376
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
8223
8377
|
},
|
|
8224
8378
|
url: function url(value) {
|
|
8225
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
8379
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
8226
8380
|
},
|
|
8227
8381
|
hex: function hex(value) {
|
|
8228
8382
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -8797,7 +8951,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
8797
8951
|
if (rule.asyncValidator) {
|
|
8798
8952
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
8799
8953
|
} else if (rule.validator) {
|
|
8800
|
-
|
|
8954
|
+
try {
|
|
8955
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
8956
|
+
} catch (error) {
|
|
8957
|
+
console.error == null ? void 0 : console.error(error);
|
|
8958
|
+
if (!options.suppressValidatorError) {
|
|
8959
|
+
setTimeout(function() {
|
|
8960
|
+
throw error;
|
|
8961
|
+
}, 0);
|
|
8962
|
+
}
|
|
8963
|
+
cb(error.message);
|
|
8964
|
+
}
|
|
8801
8965
|
if (res === true) {
|
|
8802
8966
|
cb();
|
|
8803
8967
|
} else if (res === false) {
|
|
@@ -8918,10 +9082,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
8918
9082
|
} else {
|
|
8919
9083
|
return rule.trigger === triggerVal;
|
|
8920
9084
|
}
|
|
8921
|
-
}).map((
|
|
8922
|
-
var rule = __objRest(_a, []);
|
|
8923
|
-
return rule;
|
|
8924
|
-
});
|
|
9085
|
+
}).map(({ ...rule }) => rule);
|
|
8925
9086
|
};
|
|
8926
9087
|
const onValidateSuccess = () => {
|
|
8927
9088
|
validateState.value = "success";
|
|
@@ -8994,15 +9155,12 @@ defineComponent({
|
|
|
8994
9155
|
props: formItemProps,
|
|
8995
9156
|
setup(props, ctx) {
|
|
8996
9157
|
const formContext = inject(FORM_TOKEN);
|
|
8997
|
-
const
|
|
9158
|
+
const {
|
|
8998
9159
|
messageType: itemMessageType,
|
|
8999
9160
|
popPosition: itemPopPosition,
|
|
9000
|
-
showFeedback: itemShowFeedback
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
"popPosition",
|
|
9004
|
-
"showFeedback"
|
|
9005
|
-
]);
|
|
9161
|
+
showFeedback: itemShowFeedback,
|
|
9162
|
+
...otherProps
|
|
9163
|
+
} = toRefs(props);
|
|
9006
9164
|
const {
|
|
9007
9165
|
label,
|
|
9008
9166
|
helpTips,
|
|
@@ -9032,7 +9190,8 @@ defineComponent({
|
|
|
9032
9190
|
labelAlign: formContext.labelAlign
|
|
9033
9191
|
}));
|
|
9034
9192
|
provide(LABEL_DATA, labelData);
|
|
9035
|
-
const context = reactive(
|
|
9193
|
+
const context = reactive({
|
|
9194
|
+
...otherProps,
|
|
9036
9195
|
showFeedback,
|
|
9037
9196
|
messageType,
|
|
9038
9197
|
popPosition,
|
|
@@ -9042,7 +9201,7 @@ defineComponent({
|
|
|
9042
9201
|
validate,
|
|
9043
9202
|
resetField,
|
|
9044
9203
|
clearValidate
|
|
9045
|
-
})
|
|
9204
|
+
});
|
|
9046
9205
|
provide(FORM_ITEM_TOKEN, context);
|
|
9047
9206
|
ctx.expose({
|
|
9048
9207
|
resetField,
|
|
@@ -9067,8 +9226,8 @@ defineComponent({
|
|
|
9067
9226
|
"extra-info": extraInfo.value
|
|
9068
9227
|
}, {
|
|
9069
9228
|
default: () => {
|
|
9070
|
-
var
|
|
9071
|
-
return [(_b = (
|
|
9229
|
+
var _a, _b;
|
|
9230
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
9072
9231
|
}
|
|
9073
9232
|
})]);
|
|
9074
9233
|
}
|
|
@@ -9106,7 +9265,7 @@ function useInputRender(props, ctx) {
|
|
|
9106
9265
|
const slots = ctx.slots;
|
|
9107
9266
|
const inputDisabled = computed(() => disabled.value || (formContext == null ? void 0 : formContext.disabled));
|
|
9108
9267
|
const inputSize = computed(() => (size == null ? void 0 : size.value) || (formContext == null ? void 0 : formContext.size) || "");
|
|
9109
|
-
const
|
|
9268
|
+
const { style, class: customClass, ...otherAttrs } = ctx.attrs;
|
|
9110
9269
|
const customStyle = { style };
|
|
9111
9270
|
const wrapClasses = computed(() => ({
|
|
9112
9271
|
[ns2.e("wrapper")]: true,
|