fit2cloud-ui-plus 1.1.18 → 1.2.0
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 +1 -1
- package/lib/fit2cloud-ui-plus.es.js +17 -10
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +2 -1
- package/src/components/table/table-column-select/FuTableColumnSelectPopover.vue +0 -7
- package/src/hooks/use-global-config/index.ts +1 -0
- package/src/hooks/use-locale/index.ts +23 -13
- package/src/index.ts +2 -1
- package/src/locale/index.ts +4 -0
- package/src/locale/lang/ja.ts +59 -0
- package/src/locale/lang/ms.ts +59 -0
- package/src/locale/lang/pt-br.ts +59 -0
- package/src/locale/lang/ru.ts +59 -0
- package/src/locale/lang/zh-cn.ts +1 -1
- package/src/locale/lang/zh-tw.ts +1 -1
- package/src/styles/components/filter-bar.scss +4 -2
- package/types/examples/locale/index.d.ts +416 -0
- package/types/src/hooks/use-global-config/index.d.ts +1 -0
- package/types/src/hooks/use-locale/index.d.ts +1 -0
- package/types/src/locale/index.d.ts +4 -0
- package/types/src/locale/lang/ja.d.ts +60 -0
- package/types/src/locale/lang/ms.d.ts +60 -0
- package/types/src/locale/lang/pt-br.d.ts +60 -0
- package/types/src/locale/lang/ru.d.ts +60 -0
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ app.mount('#app')
|
|
|
56
56
|
|
|
57
57
|
### License & Copyright
|
|
58
58
|
|
|
59
|
-
Copyright (c) 2014-
|
|
59
|
+
Copyright (c) 2014-2025 FIT2CLOUD 飞致云, All rights reserved.
|
|
60
60
|
|
|
61
61
|
Licensed under The GNU General Public License version 3 (GPLv3) (the "License"); you may not use this file except in
|
|
62
62
|
compliance with the License. You may obtain a copy of the License at
|
|
@@ -464,7 +464,7 @@ var Chinese = {
|
|
|
464
464
|
table: {
|
|
465
465
|
ok: "\u786E\u5B9A",
|
|
466
466
|
cancel: "\u53D6\u6D88",
|
|
467
|
-
custom_table_fields: "\
|
|
467
|
+
custom_table_fields: "\u9009\u62E9\u5B57\u6BB5",
|
|
468
468
|
custom_table_fields_desc: "\u56FA\u5B9A\u5B57\u6BB5\u4E0D\u5728\u9009\u62E9\u8303\u56F4\uFF0C\u53EF\u62D6\u62FD\u81EA\u5B9A\u4E49\u987A\u5E8F",
|
|
469
469
|
custom_table_rows: "\u9009\u9879\u5217",
|
|
470
470
|
more: "\u66F4\u591A"
|
|
@@ -478,10 +478,15 @@ var Chinese = {
|
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
481
|
-
const translate = (path, option, locale) =>
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
481
|
+
const translate = (path, option, locale) => {
|
|
482
|
+
if (!i18nHandler) {
|
|
483
|
+
return get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
|
|
484
|
+
var _a2;
|
|
485
|
+
return `${(_a2 = option == null ? void 0 : option[key]) != null ? _a2 : `{${key}}`}`;
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
return i18nHandler(path);
|
|
489
|
+
};
|
|
485
490
|
const buildLocaleContext = (locale) => {
|
|
486
491
|
const lang = computed(() => unref(locale).name);
|
|
487
492
|
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
@@ -495,6 +500,10 @@ const useLocale = () => {
|
|
|
495
500
|
const locale = useGlobalConfig("locale");
|
|
496
501
|
return buildLocaleContext(computed(() => locale.value || Chinese));
|
|
497
502
|
};
|
|
503
|
+
let i18nHandler;
|
|
504
|
+
const i18n = (fn) => {
|
|
505
|
+
i18nHandler = fn || i18nHandler;
|
|
506
|
+
};
|
|
498
507
|
const useProp = (name2) => {
|
|
499
508
|
const vm = getCurrentInstance();
|
|
500
509
|
return computed(() => {
|
|
@@ -4237,9 +4246,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4237
4246
|
var _a2;
|
|
4238
4247
|
return ((_a2 = props.columns) == null ? void 0 : _a2.length) > 0 && !isFixAll.value;
|
|
4239
4248
|
});
|
|
4240
|
-
const header = computed(() => {
|
|
4241
|
-
return props.title || t2("fu.table.custom_table_fields");
|
|
4242
|
-
});
|
|
4243
4249
|
return (_ctx, _cache) => {
|
|
4244
4250
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
4245
4251
|
const _component_el_button = resolveComponent("el-button");
|
|
@@ -4263,7 +4269,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4263
4269
|
}, 1032, ["icon"])
|
|
4264
4270
|
]),
|
|
4265
4271
|
default: withCtx(() => [
|
|
4266
|
-
createElementVNode("h3", null, toDisplayString(unref(header)), 1),
|
|
4267
4272
|
createElementVNode("div", _hoisted_1$2, [
|
|
4268
4273
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (c, i) => {
|
|
4269
4274
|
return openBlock(), createElementBlock("div", {
|
|
@@ -5024,7 +5029,7 @@ var __glob_2_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
5024
5029
|
"default": FuTabs
|
|
5025
5030
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5026
5031
|
const name = "fit2cloud-ui-plus";
|
|
5027
|
-
const version = "1.
|
|
5032
|
+
const version = "1.2.0";
|
|
5028
5033
|
const main = "./lib/fit2cloud-ui-plus.es.js";
|
|
5029
5034
|
const files = [
|
|
5030
5035
|
"lib",
|
|
@@ -5055,6 +5060,7 @@ const dependencies = {
|
|
|
5055
5060
|
"vite-plugin-markdown": "^2.0.2",
|
|
5056
5061
|
vue: "^3.2.37",
|
|
5057
5062
|
"vue-clipboard3": "^2.0.0",
|
|
5063
|
+
"vue-i18n": "^10.0.5",
|
|
5058
5064
|
"vue-router": "^4.0.14"
|
|
5059
5065
|
};
|
|
5060
5066
|
const devDependencies = {
|
|
@@ -5088,6 +5094,7 @@ const install = (app, config) => {
|
|
|
5088
5094
|
let component = components[key].default;
|
|
5089
5095
|
app.use(component);
|
|
5090
5096
|
});
|
|
5097
|
+
i18n(config.i18n);
|
|
5091
5098
|
provideGlobalConfig(config);
|
|
5092
5099
|
};
|
|
5093
5100
|
const plugin = {
|