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.
@@ -9078,23 +9078,6 @@ const gridTdProps = {
9078
9078
  default: () => ({})
9079
9079
  }
9080
9080
  };
9081
- function deepAssign(...objects) {
9082
- const isObject2 = (obj) => obj && typeof obj === "object";
9083
- return objects.reduce((prev, from) => {
9084
- Object.keys(from).forEach((key) => {
9085
- const pVal = prev[key];
9086
- const oVal = from[key];
9087
- if (Array.isArray(pVal) && Array.isArray(oVal)) {
9088
- prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
9089
- } else if (isObject2(pVal) && isObject2(oVal)) {
9090
- prev[key] = deepAssign(pVal, oVal);
9091
- } else {
9092
- prev[key] = oVal;
9093
- }
9094
- });
9095
- return prev;
9096
- }, {});
9097
- }
9098
9081
  var zhCN = {
9099
9082
  pagination: {
9100
9083
  totalItemText: "\u6240\u6709\u6761\u76EE",
@@ -9213,23 +9196,146 @@ var zhCN = {
9213
9196
  placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
9214
9197
  }
9215
9198
  };
9199
+ var enUS = {
9200
+ pagination: {
9201
+ totalItemText: "Total",
9202
+ goToText: "Go to"
9203
+ },
9204
+ accordion: {
9205
+ loading: "loading",
9206
+ noData: "No Data"
9207
+ },
9208
+ autoCompleteDropdown: {
9209
+ latestInput: "Latest input"
9210
+ },
9211
+ cascaderList: {
9212
+ noData: "No data"
9213
+ },
9214
+ colorPicker: {
9215
+ foundationPanel: "Foundation panel",
9216
+ advancedPanel: "Advanced panel"
9217
+ },
9218
+ datePickerPro: {
9219
+ ok: "OK",
9220
+ placeholder: "select date",
9221
+ month1: "Jan",
9222
+ month2: "Feb",
9223
+ month3: "Mar",
9224
+ month4: "Apr",
9225
+ month5: "May",
9226
+ month6: "June",
9227
+ month7: "July",
9228
+ month8: "Aug",
9229
+ month9: "Sep",
9230
+ month10: "Oct",
9231
+ month11: "Nov",
9232
+ month12: "Dec",
9233
+ year: "\u5E74",
9234
+ startPlaceholder: "select start date",
9235
+ endPlaceholder: "select end date",
9236
+ getWeekDays() {
9237
+ return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
9238
+ },
9239
+ getTimeArr() {
9240
+ return ["Hr", "Min", "Sec"];
9241
+ },
9242
+ getYearMonthStr(year, month) {
9243
+ return `${year} - ${month}`;
9244
+ }
9245
+ },
9246
+ editableSelect: {
9247
+ noRelatedRecords: "No related records found",
9248
+ noData: "No data"
9249
+ },
9250
+ input: {
9251
+ placeholder: "Please enter"
9252
+ },
9253
+ splitterBar: {
9254
+ collapse: "Collapse",
9255
+ expand: "Expand"
9256
+ },
9257
+ stepsGuide: {
9258
+ previous: "Previous",
9259
+ continue: "Continue",
9260
+ ok: "OK"
9261
+ },
9262
+ table: {
9263
+ selectAll: "Select all",
9264
+ ok: "OK"
9265
+ },
9266
+ dataGrid: {
9267
+ selectAll: "Select all",
9268
+ ok: "OK"
9269
+ },
9270
+ timePopup: {
9271
+ ok: "OK"
9272
+ },
9273
+ transfer: {
9274
+ unit: "",
9275
+ panelUnit: "",
9276
+ headerUnit: "",
9277
+ noData: "No Data",
9278
+ placeholder: "Please enter keywords"
9279
+ },
9280
+ tree: {
9281
+ loading: "Loading",
9282
+ newNode: "New node",
9283
+ selectPlaceholder: "Please select"
9284
+ },
9285
+ upload: {
9286
+ placeholder: "select file",
9287
+ getExistSameNameFilesMsg(sameNames) {
9288
+ return `Duplicate files exist : "${sameNames}" `;
9289
+ },
9290
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
9291
+ return `Maximum file size (MB): ${maximalSize}. The selected files exceed the maximum value`;
9292
+ },
9293
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
9294
+ return `Maximum file size (MB): ${maximalSize}. Files whose size exceeds the maximum value: ${filename}`;
9295
+ },
9296
+ getNotAllowedFileTypeMsg(filename, scope) {
9297
+ return `Files with unsupported types: ${filename}. Supported file types: ${scope}`;
9298
+ }
9299
+ },
9300
+ search: {
9301
+ placeholder: "Enter a keyword"
9302
+ },
9303
+ select: {
9304
+ placeholder: "Please select",
9305
+ noDataText: "No data",
9306
+ noMatchText: "No related records found",
9307
+ loadingText: "Loading..."
9308
+ },
9309
+ tagInput: {
9310
+ maxTagsText: "Maximum number reached: "
9311
+ },
9312
+ timeSelect: {
9313
+ placeholder: "Please select time"
9314
+ }
9315
+ };
9216
9316
  const lang = ref("zh-CN");
9317
+ const nowApp = ref();
9217
9318
  let langMessages = reactive({
9218
- [lang.value]: zhCN
9319
+ ["zh-CN"]: zhCN,
9320
+ ["en-US"]: enUS
9219
9321
  });
9220
9322
  const Locale = {
9221
- messages() {
9222
- return langMessages[lang.value];
9323
+ messages(language = lang.value) {
9324
+ return langMessages[language];
9223
9325
  },
9224
9326
  lang() {
9225
9327
  return lang.value;
9226
9328
  },
9227
- use(newLang, newMessages2) {
9329
+ use(newLang) {
9330
+ const app = nowApp.value;
9228
9331
  lang.value = newLang;
9229
- this.add({ [newLang]: newMessages2 });
9332
+ app.config.globalProperties.langMessages = Locale.messages();
9230
9333
  },
9231
- add(newMessages2 = {}) {
9232
- langMessages = deepAssign(langMessages, newMessages2);
9334
+ add(newMessages2) {
9335
+ langMessages = {
9336
+ ...langMessages,
9337
+ ...newMessages2
9338
+ };
9233
9339
  }
9234
9340
  };
9235
9341
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
@@ -9245,8 +9351,7 @@ function get(object4, path) {
9245
9351
  function createI18nTranslate(name, app, newPrefix) {
9246
9352
  const prefix = newPrefix || camelize(name) + ".";
9247
9353
  return (path) => {
9248
- var _a;
9249
- const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
9354
+ const messages2 = (app == null ? void 0 : app.appContext.config.globalProperties.langMessages) || Locale.messages();
9250
9355
  const message = get(messages2, prefix + path) || get(messages2, path);
9251
9356
  return message;
9252
9357
  };