@kengic/vue 0.28.1-beta.2 → 0.28.1-beta.3

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.
Files changed (2) hide show
  1. package/dist/kengic-vue.js +66 -66
  2. package/package.json +1 -1
@@ -59010,7 +59010,7 @@ Object.defineProperty(zh_CN$5, "__esModule", {
59010
59010
  });
59011
59011
  zh_CN$5.default = void 0;
59012
59012
  var _zh_CN$2 = _interopRequireDefault$2(zh_CN$4), _zh_CN2$1 = _interopRequireDefault$2(zh_CN$3);
59013
- const locale$x = {
59013
+ const locale = {
59014
59014
  lang: Object.assign({
59015
59015
  placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
59016
59016
  yearPlaceholder: "\u8BF7\u9009\u62E9\u5E74\u4EFD",
@@ -59025,8 +59025,8 @@ const locale$x = {
59025
59025
  }, _zh_CN$2.default),
59026
59026
  timePickerLocale: Object.assign({}, _zh_CN2$1.default)
59027
59027
  };
59028
- locale$x.lang.ok = "\u786E\u5B9A";
59029
- zh_CN$5.default = locale$x;
59028
+ locale.lang.ok = "\u786E\u5B9A";
59029
+ zh_CN$5.default = locale;
59030
59030
  var _interopRequireDefault$1 = interopRequireDefaultExports.default;
59031
59031
  Object.defineProperty(zh_CN$6, "__esModule", {
59032
59032
  value: !0
@@ -70091,7 +70091,7 @@ function fi(e) {
70091
70091
  })
70092
70092
  );
70093
70093
  }
70094
- const version = "0.28.1-beta.2", en$1 = {
70094
+ const version = "0.28.1-beta.3", en$1 = {
70095
70095
  kg: {
70096
70096
  KgAppSelect: {
70097
70097
  businessManager: "Business Manager",
@@ -75802,6 +75802,60 @@ function useLocale() {
75802
75802
  };
75803
75803
  }
75804
75804
  const useKgStore = defineStore("Kg", {
75805
+ state: () => ({
75806
+ I18N: {},
75807
+ descriptionMap: /* @__PURE__ */ new Map(),
75808
+ i18n: null,
75809
+ isDescriptionsRequestingMap: /* @__PURE__ */ new Map(),
75810
+ locale: null,
75811
+ option: {},
75812
+ pFunction: null,
75813
+ router: null,
75814
+ tFunction: null,
75815
+ usePermissionStore: null,
75816
+ useUserStore: null
75817
+ }),
75818
+ getters: {
75819
+ getDescription() {
75820
+ return (e) => {
75821
+ var te, ne;
75822
+ const { codeName: G, codeValue: U } = e != null ? e : {};
75823
+ return !G || !U ? null : (ne = (te = this.descriptionMap.get(G)) == null ? void 0 : te.get(U)) != null ? ne : null;
75824
+ };
75825
+ },
75826
+ getDescriptions() {
75827
+ return (e) => {
75828
+ var U, te;
75829
+ const { codeName: G } = e != null ? e : {};
75830
+ return G ? [...(te = (U = this.descriptionMap.get(G)) == null ? void 0 : U.values()) != null ? te : []] : [];
75831
+ };
75832
+ },
75833
+ getI18N() {
75834
+ var e;
75835
+ return (e = this.I18N) != null ? e : {};
75836
+ },
75837
+ getI18n() {
75838
+ var e;
75839
+ return (e = this.i18n) != null ? e : {};
75840
+ },
75841
+ getOption() {
75842
+ var e;
75843
+ return (e = this.option) != null ? e : {};
75844
+ },
75845
+ getPublicPath() {
75846
+ var e;
75847
+ return ((e = this.option) == null ? void 0 : e.publicPath) || "/kengic-boot";
75848
+ },
75849
+ getRouter() {
75850
+ return this.router;
75851
+ },
75852
+ getUsePermissionStore() {
75853
+ return this.usePermissionStore;
75854
+ },
75855
+ getUseUserStore() {
75856
+ return this.useUserStore;
75857
+ }
75858
+ },
75805
75859
  actions: {
75806
75860
  p(e) {
75807
75861
  return this.pFunction ? this.pFunction(e) : (Ne("\u68C0\u67E5\u6743\u9650\u7684\u65B9\u6CD5\u4E3A\u7A7A.", { permissionCode: e }), !0);
@@ -75879,61 +75933,7 @@ const useKgStore = defineStore("Kg", {
75879
75933
  let U = e != null ? e : "";
75880
75934
  return (U.startsWith("t('") && U.endsWith("')") || U.startsWith('t("') && U.endsWith('")')) && (U = (ne = (te = U.match(/^t\(['|"](.*)?['|"]\)$/)) == null ? void 0 : te[1]) != null ? ne : U), this.tFunction(U, ...G);
75881
75935
  }
75882
- },
75883
- getters: {
75884
- getDescription() {
75885
- return (e) => {
75886
- var te, ne;
75887
- const { codeName: G, codeValue: U } = e != null ? e : {};
75888
- return !G || !U ? null : (ne = (te = this.descriptionMap.get(G)) == null ? void 0 : te.get(U)) != null ? ne : null;
75889
- };
75890
- },
75891
- getDescriptions() {
75892
- return (e) => {
75893
- var U, te;
75894
- const { codeName: G } = e != null ? e : {};
75895
- return G ? [...(te = (U = this.descriptionMap.get(G)) == null ? void 0 : U.values()) != null ? te : []] : [];
75896
- };
75897
- },
75898
- getI18N() {
75899
- var e;
75900
- return (e = this.I18N) != null ? e : {};
75901
- },
75902
- getI18n() {
75903
- var e;
75904
- return (e = this.i18n) != null ? e : {};
75905
- },
75906
- getOption() {
75907
- var e;
75908
- return (e = this.option) != null ? e : {};
75909
- },
75910
- getPublicPath() {
75911
- var e;
75912
- return ((e = this.option) == null ? void 0 : e.publicPath) || "/kengic-boot";
75913
- },
75914
- getRouter() {
75915
- return this.router;
75916
- },
75917
- getUsePermissionStore() {
75918
- return this.usePermissionStore;
75919
- },
75920
- getUseUserStore() {
75921
- return this.useUserStore;
75922
- }
75923
- },
75924
- state: () => ({
75925
- I18N: {},
75926
- descriptionMap: /* @__PURE__ */ new Map(),
75927
- i18n: null,
75928
- isDescriptionsRequestingMap: /* @__PURE__ */ new Map(),
75929
- locale: null,
75930
- option: {},
75931
- pFunction: null,
75932
- router: null,
75933
- tFunction: null,
75934
- usePermissionStore: null,
75935
- useUserStore: null
75936
- })
75936
+ }
75937
75937
  });
75938
75938
  function useKg() {
75939
75939
  const e = useKgStore(pinia);
@@ -91851,19 +91851,19 @@ if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
91851
91851
  e.__INTLIFY__ = !0, setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
91852
91852
  }
91853
91853
  process.env.NODE_ENV;
91854
- const { fallback, availableLocales, locale } = localeSetting;
91854
+ const { fallback, availableLocales } = localeSetting;
91855
91855
  let i18n;
91856
91856
  async function createI18nOptions() {
91857
- var U, te;
91858
- const G = (te = (U = (await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({}), `./lang/${locale}.ts`)).default) == null ? void 0 : U.message) != null ? te : {};
91859
- return setHtmlPageLang(locale), setLoadLocalePool((ne) => {
91860
- ne.push(locale);
91857
+ var ne, oe;
91858
+ const G = useLocaleStore().getLocale, te = (oe = (ne = (await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({}), `./lang/${G}.ts`)).default) == null ? void 0 : ne.message) != null ? oe : {};
91859
+ return setHtmlPageLang(G), setLoadLocalePool((ie) => {
91860
+ ie.push(G);
91861
91861
  }), {
91862
91862
  legacy: !1,
91863
- locale,
91863
+ locale: G,
91864
91864
  fallbackLocale: fallback,
91865
91865
  messages: {
91866
- [locale]: G
91866
+ [G]: te
91867
91867
  },
91868
91868
  availableLocales,
91869
91869
  sync: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.28.1-beta.2",
3
+ "version": "0.28.1-beta.3",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",