vue-devui 1.0.0-rc.13 → 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/input/index.es.js CHANGED
@@ -1082,10 +1082,10 @@ var lodash = { exports: {} };
1082
1082
  }();
1083
1083
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1084
1084
  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;
1085
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1085
+ 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");
1086
1086
  var metaMap = WeakMap2 && new WeakMap2();
1087
1087
  var realNames = {};
1088
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
1088
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1089
1089
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1090
1090
  function lodash2(value) {
1091
1091
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -2777,8 +2777,8 @@ var lodash = { exports: {} };
2777
2777
  return func(number4);
2778
2778
  };
2779
2779
  }
2780
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2781
- return new Set(values2);
2780
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2781
+ return new Set2(values2);
2782
2782
  };
2783
2783
  function createToPairs(keysFunc) {
2784
2784
  return function(object4) {
@@ -3077,7 +3077,7 @@ var lodash = { exports: {} };
3077
3077
  return result2;
3078
3078
  };
3079
3079
  var getTag = baseGetTag;
3080
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3080
+ 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) {
3081
3081
  getTag = function(value) {
3082
3082
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3083
3083
  if (ctorString) {
@@ -8015,6 +8015,155 @@ function useInputFunction(input2) {
8015
8015
  return { select, focus, blur };
8016
8016
  }
8017
8017
  var input = "";
8018
+ function deepAssign(...objects) {
8019
+ const isObject2 = (obj) => obj && typeof obj === "object";
8020
+ return objects.reduce((prev, from) => {
8021
+ Object.keys(from).forEach((key) => {
8022
+ const pVal = prev[key];
8023
+ const oVal = from[key];
8024
+ if (Array.isArray(pVal) && Array.isArray(oVal)) {
8025
+ prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
8026
+ } else if (isObject2(pVal) && isObject2(oVal)) {
8027
+ prev[key] = deepAssign(pVal, oVal);
8028
+ } else {
8029
+ prev[key] = oVal;
8030
+ }
8031
+ });
8032
+ return prev;
8033
+ }, {});
8034
+ }
8035
+ var zhCN = {
8036
+ pagination: {
8037
+ totalItemText: "\u6240\u6709\u6761\u76EE",
8038
+ goToText: "\u8DF3\u81F3"
8039
+ },
8040
+ accordion: {
8041
+ loading: "\u52A0\u8F7D\u4E2D",
8042
+ noData: "\u6CA1\u6709\u6570\u636E"
8043
+ },
8044
+ autoCompleteDropdown: {
8045
+ latestInput: "\u6700\u8FD1\u8F93\u5165"
8046
+ },
8047
+ cascaderList: {
8048
+ noData: "\u6CA1\u6709\u6570\u636E"
8049
+ },
8050
+ colorPicker: {
8051
+ foundationPanel: "\u57FA\u7840\u9762\u677F",
8052
+ advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
8053
+ },
8054
+ datePickerPro: {
8055
+ ok: "\u786E\u5B9A",
8056
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
8057
+ month1: "1\u6708",
8058
+ month2: "2\u6708",
8059
+ month3: "3\u6708",
8060
+ month4: "4\u6708",
8061
+ month5: "5\u6708",
8062
+ month6: "6\u6708",
8063
+ month7: "7\u6708",
8064
+ month8: "8\u6708",
8065
+ month9: "9\u6708",
8066
+ month10: "10\u6708",
8067
+ month11: "11\u6708",
8068
+ month12: "12\u6708",
8069
+ year: "\u5E74",
8070
+ startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
8071
+ endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
8072
+ getWeekDays() {
8073
+ return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
8074
+ },
8075
+ getTimeArr() {
8076
+ return ["\u65F6", "\u5206", "\u79D2"];
8077
+ },
8078
+ getYearMonthStr(year, month) {
8079
+ return `${year}\u5E74${month}\u6708`;
8080
+ }
8081
+ },
8082
+ editableSelect: {
8083
+ noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8084
+ noData: "\u6CA1\u6709\u6570\u636E"
8085
+ },
8086
+ input: {
8087
+ placeholder: "\u8BF7\u8F93\u5165"
8088
+ },
8089
+ splitterBar: {
8090
+ collapse: "\u6536\u8D77",
8091
+ expand: "\u5C55\u5F00"
8092
+ },
8093
+ stepsGuide: {
8094
+ previous: "\u4E0A\u4E00\u6B65",
8095
+ continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
8096
+ ok: "\u6211\u77E5\u9053\u5566"
8097
+ },
8098
+ table: {
8099
+ selectAll: "\u5168\u9009",
8100
+ ok: "\u786E\u5B9A"
8101
+ },
8102
+ timePopup: {
8103
+ ok: "\u786E\u5B9A"
8104
+ },
8105
+ transfer: {
8106
+ unit: "\u9879",
8107
+ panelUnit: "\u9879",
8108
+ headerUnit: "\u9879",
8109
+ noData: "\u6682\u65E0\u6570\u636E",
8110
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
8111
+ },
8112
+ tree: {
8113
+ loading: "\u52A0\u8F7D\u4E2D",
8114
+ newNode: "\u65B0\u8282\u70B9",
8115
+ selectPlaceholder: "\u8BF7\u9009\u62E9"
8116
+ },
8117
+ upload: {
8118
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
8119
+ getExistSameNameFilesMsg(sameNames) {
8120
+ return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
8121
+ },
8122
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
8123
+ 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`;
8124
+ },
8125
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
8126
+ 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`;
8127
+ },
8128
+ getNotAllowedFileTypeMsg(filename, scope) {
8129
+ 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`;
8130
+ }
8131
+ },
8132
+ search: {
8133
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
8134
+ },
8135
+ select: {
8136
+ placeholder: "\u8BF7\u9009\u62E9",
8137
+ noDataText: "\u65E0\u6570\u636E",
8138
+ noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8139
+ loadingText: "\u52A0\u8F7D\u4E2D..."
8140
+ },
8141
+ tagInput: {
8142
+ maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
8143
+ },
8144
+ timeSelect: {
8145
+ placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
8146
+ }
8147
+ };
8148
+ const lang = ref("zh-CN");
8149
+ let langMessages = reactive({
8150
+ [lang.value]: zhCN
8151
+ });
8152
+ const Locale = {
8153
+ messages() {
8154
+ return langMessages[lang.value];
8155
+ },
8156
+ lang() {
8157
+ return lang.value;
8158
+ },
8159
+ use(newLang, newMessages2) {
8160
+ lang.value = newLang;
8161
+ this.add({ [newLang]: newMessages2 });
8162
+ },
8163
+ add(newMessages2 = {}) {
8164
+ langMessages = deepAssign(langMessages, newMessages2);
8165
+ }
8166
+ };
8018
8167
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
8019
8168
  function get(object4, path) {
8020
8169
  const keys = path.split(".");
@@ -8028,7 +8177,8 @@ function get(object4, path) {
8028
8177
  function createI18nTranslate(name, app, newPrefix) {
8029
8178
  const prefix = newPrefix || camelize(name) + ".";
8030
8179
  return (path) => {
8031
- const messages2 = app == null ? void 0 : app.appContext.config.globalProperties.langMessages.value;
8180
+ var _a;
8181
+ const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
8032
8182
  const message = get(messages2, prefix + path) || get(messages2, path);
8033
8183
  return message;
8034
8184
  };