vue-devui 1.6.32 → 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.
package/table/index.es.js CHANGED
@@ -10202,23 +10202,6 @@ function useFilterSingle(ctx) {
10202
10202
  };
10203
10203
  return { selectedItem, handleSelect };
10204
10204
  }
10205
- function deepAssign(...objects) {
10206
- const isObject2 = (obj) => obj && typeof obj === "object";
10207
- return objects.reduce((prev, from) => {
10208
- Object.keys(from).forEach((key) => {
10209
- const pVal = prev[key];
10210
- const oVal = from[key];
10211
- if (Array.isArray(pVal) && Array.isArray(oVal)) {
10212
- prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
10213
- } else if (isObject2(pVal) && isObject2(oVal)) {
10214
- prev[key] = deepAssign(pVal, oVal);
10215
- } else {
10216
- prev[key] = oVal;
10217
- }
10218
- });
10219
- return prev;
10220
- }, {});
10221
- }
10222
10205
  var zhCN = {
10223
10206
  pagination: {
10224
10207
  totalItemText: "\u6240\u6709\u6761\u76EE",
@@ -10337,23 +10320,146 @@ var zhCN = {
10337
10320
  placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
10338
10321
  }
10339
10322
  };
10323
+ var enUS = {
10324
+ pagination: {
10325
+ totalItemText: "Total",
10326
+ goToText: "Go to"
10327
+ },
10328
+ accordion: {
10329
+ loading: "loading",
10330
+ noData: "No Data"
10331
+ },
10332
+ autoCompleteDropdown: {
10333
+ latestInput: "Latest input"
10334
+ },
10335
+ cascaderList: {
10336
+ noData: "No data"
10337
+ },
10338
+ colorPicker: {
10339
+ foundationPanel: "Foundation panel",
10340
+ advancedPanel: "Advanced panel"
10341
+ },
10342
+ datePickerPro: {
10343
+ ok: "OK",
10344
+ placeholder: "select date",
10345
+ month1: "Jan",
10346
+ month2: "Feb",
10347
+ month3: "Mar",
10348
+ month4: "Apr",
10349
+ month5: "May",
10350
+ month6: "June",
10351
+ month7: "July",
10352
+ month8: "Aug",
10353
+ month9: "Sep",
10354
+ month10: "Oct",
10355
+ month11: "Nov",
10356
+ month12: "Dec",
10357
+ year: "\u5E74",
10358
+ startPlaceholder: "select start date",
10359
+ endPlaceholder: "select end date",
10360
+ getWeekDays() {
10361
+ return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
10362
+ },
10363
+ getTimeArr() {
10364
+ return ["Hr", "Min", "Sec"];
10365
+ },
10366
+ getYearMonthStr(year, month) {
10367
+ return `${year} - ${month}`;
10368
+ }
10369
+ },
10370
+ editableSelect: {
10371
+ noRelatedRecords: "No related records found",
10372
+ noData: "No data"
10373
+ },
10374
+ input: {
10375
+ placeholder: "Please enter"
10376
+ },
10377
+ splitterBar: {
10378
+ collapse: "Collapse",
10379
+ expand: "Expand"
10380
+ },
10381
+ stepsGuide: {
10382
+ previous: "Previous",
10383
+ continue: "Continue",
10384
+ ok: "OK"
10385
+ },
10386
+ table: {
10387
+ selectAll: "Select all",
10388
+ ok: "OK"
10389
+ },
10390
+ dataGrid: {
10391
+ selectAll: "Select all",
10392
+ ok: "OK"
10393
+ },
10394
+ timePopup: {
10395
+ ok: "OK"
10396
+ },
10397
+ transfer: {
10398
+ unit: "",
10399
+ panelUnit: "",
10400
+ headerUnit: "",
10401
+ noData: "No Data",
10402
+ placeholder: "Please enter keywords"
10403
+ },
10404
+ tree: {
10405
+ loading: "Loading",
10406
+ newNode: "New node",
10407
+ selectPlaceholder: "Please select"
10408
+ },
10409
+ upload: {
10410
+ placeholder: "select file",
10411
+ getExistSameNameFilesMsg(sameNames) {
10412
+ return `Duplicate files exist : "${sameNames}" `;
10413
+ },
10414
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
10415
+ return `Maximum file size (MB): ${maximalSize}. The selected files exceed the maximum value`;
10416
+ },
10417
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
10418
+ return `Maximum file size (MB): ${maximalSize}. Files whose size exceeds the maximum value: ${filename}`;
10419
+ },
10420
+ getNotAllowedFileTypeMsg(filename, scope) {
10421
+ return `Files with unsupported types: ${filename}. Supported file types: ${scope}`;
10422
+ }
10423
+ },
10424
+ search: {
10425
+ placeholder: "Enter a keyword"
10426
+ },
10427
+ select: {
10428
+ placeholder: "Please select",
10429
+ noDataText: "No data",
10430
+ noMatchText: "No related records found",
10431
+ loadingText: "Loading..."
10432
+ },
10433
+ tagInput: {
10434
+ maxTagsText: "Maximum number reached: "
10435
+ },
10436
+ timeSelect: {
10437
+ placeholder: "Please select time"
10438
+ }
10439
+ };
10340
10440
  const lang = ref("zh-CN");
10441
+ const nowApp = ref();
10341
10442
  let langMessages = reactive({
10342
- [lang.value]: zhCN
10443
+ ["zh-CN"]: zhCN,
10444
+ ["en-US"]: enUS
10343
10445
  });
10344
10446
  const Locale = {
10345
- messages() {
10346
- return langMessages[lang.value];
10447
+ messages(language = lang.value) {
10448
+ return langMessages[language];
10347
10449
  },
10348
10450
  lang() {
10349
10451
  return lang.value;
10350
10452
  },
10351
- use(newLang, newMessages2) {
10453
+ use(newLang) {
10454
+ const app = nowApp.value;
10352
10455
  lang.value = newLang;
10353
- this.add({ [newLang]: newMessages2 });
10456
+ app.config.globalProperties.langMessages = Locale.messages();
10354
10457
  },
10355
- add(newMessages2 = {}) {
10356
- langMessages = deepAssign(langMessages, newMessages2);
10458
+ add(newMessages2) {
10459
+ langMessages = {
10460
+ ...langMessages,
10461
+ ...newMessages2
10462
+ };
10357
10463
  }
10358
10464
  };
10359
10465
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
@@ -10369,8 +10475,7 @@ function get(object4, path) {
10369
10475
  function createI18nTranslate(name, app, newPrefix) {
10370
10476
  const prefix = newPrefix || camelize(name) + ".";
10371
10477
  return (path) => {
10372
- var _a;
10373
- const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
10478
+ const messages2 = (app == null ? void 0 : app.appContext.config.globalProperties.langMessages) || Locale.messages();
10374
10479
  const message = get(messages2, prefix + path) || get(messages2, path);
10375
10480
  return message;
10376
10481
  };