vue-devui 1.6.33 → 1.6.34

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.
@@ -1138,10 +1138,10 @@ var lodash = { exports: {} };
1138
1138
  }();
1139
1139
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1140
1140
  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 = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
1141
- var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1141
+ var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1142
1142
  var metaMap = WeakMap && new WeakMap();
1143
1143
  var realNames = {};
1144
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
1144
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
1145
1145
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1146
1146
  function lodash2(value) {
1147
1147
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -2855,8 +2855,8 @@ var lodash = { exports: {} };
2855
2855
  return func(number);
2856
2856
  };
2857
2857
  }
2858
- var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2859
- return new Set2(values2);
2858
+ var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2859
+ return new Set(values2);
2860
2860
  };
2861
2861
  function createToPairs(keysFunc) {
2862
2862
  return function(object) {
@@ -3155,7 +3155,7 @@ var lodash = { exports: {} };
3155
3155
  return result2;
3156
3156
  };
3157
3157
  var getTag = baseGetTag;
3158
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3158
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3159
3159
  getTag = function(value) {
3160
3160
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3161
3161
  if (ctorString) {
@@ -6098,23 +6098,6 @@ const splitterBarProps = {
6098
6098
  };
6099
6099
  const isHTMLElement = (value) => inBrowser && "HTMLElement" in window && value instanceof HTMLElement;
6100
6100
  var splitterBar = "";
6101
- function deepAssign(...objects) {
6102
- const isObject2 = (obj) => obj && typeof obj === "object";
6103
- return objects.reduce((prev, from) => {
6104
- Object.keys(from).forEach((key) => {
6105
- const pVal = prev[key];
6106
- const oVal = from[key];
6107
- if (Array.isArray(pVal) && Array.isArray(oVal)) {
6108
- prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
6109
- } else if (isObject2(pVal) && isObject2(oVal)) {
6110
- prev[key] = deepAssign(pVal, oVal);
6111
- } else {
6112
- prev[key] = oVal;
6113
- }
6114
- });
6115
- return prev;
6116
- }, {});
6117
- }
6118
6101
  var zhCN = {
6119
6102
  pagination: {
6120
6103
  totalItemText: "\u6240\u6709\u6761\u76EE",
@@ -6233,23 +6216,146 @@ var zhCN = {
6233
6216
  placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
6234
6217
  }
6235
6218
  };
6219
+ var enUS = {
6220
+ pagination: {
6221
+ totalItemText: "Total",
6222
+ goToText: "Go to"
6223
+ },
6224
+ accordion: {
6225
+ loading: "loading",
6226
+ noData: "No Data"
6227
+ },
6228
+ autoCompleteDropdown: {
6229
+ latestInput: "Latest input"
6230
+ },
6231
+ cascaderList: {
6232
+ noData: "No data"
6233
+ },
6234
+ colorPicker: {
6235
+ foundationPanel: "Foundation panel",
6236
+ advancedPanel: "Advanced panel"
6237
+ },
6238
+ datePickerPro: {
6239
+ ok: "OK",
6240
+ placeholder: "select date",
6241
+ month1: "Jan",
6242
+ month2: "Feb",
6243
+ month3: "Mar",
6244
+ month4: "Apr",
6245
+ month5: "May",
6246
+ month6: "June",
6247
+ month7: "July",
6248
+ month8: "Aug",
6249
+ month9: "Sep",
6250
+ month10: "Oct",
6251
+ month11: "Nov",
6252
+ month12: "Dec",
6253
+ year: "\u5E74",
6254
+ startPlaceholder: "select start date",
6255
+ endPlaceholder: "select end date",
6256
+ getWeekDays() {
6257
+ return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
6258
+ },
6259
+ getTimeArr() {
6260
+ return ["Hr", "Min", "Sec"];
6261
+ },
6262
+ getYearMonthStr(year, month) {
6263
+ return `${year} - ${month}`;
6264
+ }
6265
+ },
6266
+ editableSelect: {
6267
+ noRelatedRecords: "No related records found",
6268
+ noData: "No data"
6269
+ },
6270
+ input: {
6271
+ placeholder: "Please enter"
6272
+ },
6273
+ splitterBar: {
6274
+ collapse: "Collapse",
6275
+ expand: "Expand"
6276
+ },
6277
+ stepsGuide: {
6278
+ previous: "Previous",
6279
+ continue: "Continue",
6280
+ ok: "OK"
6281
+ },
6282
+ table: {
6283
+ selectAll: "Select all",
6284
+ ok: "OK"
6285
+ },
6286
+ dataGrid: {
6287
+ selectAll: "Select all",
6288
+ ok: "OK"
6289
+ },
6290
+ timePopup: {
6291
+ ok: "OK"
6292
+ },
6293
+ transfer: {
6294
+ unit: "",
6295
+ panelUnit: "",
6296
+ headerUnit: "",
6297
+ noData: "No Data",
6298
+ placeholder: "Please enter keywords"
6299
+ },
6300
+ tree: {
6301
+ loading: "Loading",
6302
+ newNode: "New node",
6303
+ selectPlaceholder: "Please select"
6304
+ },
6305
+ upload: {
6306
+ placeholder: "select file",
6307
+ getExistSameNameFilesMsg(sameNames) {
6308
+ return `Duplicate files exist : "${sameNames}" `;
6309
+ },
6310
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
6311
+ return `Maximum file size (MB): ${maximalSize}. The selected files exceed the maximum value`;
6312
+ },
6313
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
6314
+ return `Maximum file size (MB): ${maximalSize}. Files whose size exceeds the maximum value: ${filename}`;
6315
+ },
6316
+ getNotAllowedFileTypeMsg(filename, scope) {
6317
+ return `Files with unsupported types: ${filename}. Supported file types: ${scope}`;
6318
+ }
6319
+ },
6320
+ search: {
6321
+ placeholder: "Enter a keyword"
6322
+ },
6323
+ select: {
6324
+ placeholder: "Please select",
6325
+ noDataText: "No data",
6326
+ noMatchText: "No related records found",
6327
+ loadingText: "Loading..."
6328
+ },
6329
+ tagInput: {
6330
+ maxTagsText: "Maximum number reached: "
6331
+ },
6332
+ timeSelect: {
6333
+ placeholder: "Please select time"
6334
+ }
6335
+ };
6236
6336
  const lang = ref("zh-CN");
6337
+ const nowApp = ref();
6237
6338
  let langMessages = reactive({
6238
- [lang.value]: zhCN
6339
+ ["zh-CN"]: zhCN,
6340
+ ["en-US"]: enUS
6239
6341
  });
6240
6342
  const Locale = {
6241
- messages() {
6242
- return langMessages[lang.value];
6343
+ messages(language = lang.value) {
6344
+ return langMessages[language];
6243
6345
  },
6244
6346
  lang() {
6245
6347
  return lang.value;
6246
6348
  },
6247
- use(newLang, newMessages) {
6349
+ use(newLang) {
6350
+ const app = nowApp.value;
6248
6351
  lang.value = newLang;
6249
- this.add({ [newLang]: newMessages });
6352
+ app.config.globalProperties.langMessages = Locale.messages();
6250
6353
  },
6251
- add(newMessages = {}) {
6252
- langMessages = deepAssign(langMessages, newMessages);
6354
+ add(newMessages) {
6355
+ langMessages = {
6356
+ ...langMessages,
6357
+ ...newMessages
6358
+ };
6253
6359
  }
6254
6360
  };
6255
6361
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
@@ -6265,8 +6371,7 @@ function get(object, path) {
6265
6371
  function createI18nTranslate(name, app, newPrefix) {
6266
6372
  const prefix = newPrefix || camelize(name) + ".";
6267
6373
  return (path) => {
6268
- var _a;
6269
- const messages = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
6374
+ const messages = (app == null ? void 0 : app.appContext.config.globalProperties.langMessages) || Locale.messages();
6270
6375
  const message = get(messages, prefix + path) || get(messages, path);
6271
6376
  return message;
6272
6377
  };