@gonsin/gview 2.0.32 → 2.0.33

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.
@@ -1,5 +1,4 @@
1
1
  import GView from "./GView/index.vue";
2
2
  export * from "./common";
3
3
  export * from "./GLayout";
4
- export * from "./GLogin";
5
4
  export default GView;
@@ -1,13 +1,15 @@
1
- export declare const useClassPrefix: (componentName: string) => string;
2
- export declare const dialogPluginClass: string;
3
- export declare const commonDialogClass: string;
4
- export declare const commonFormClass: string;
5
- export declare const commonHeaderClass: string;
6
- export declare const commonTableClass: string;
7
- export declare const boardClass: string;
8
- export declare const dialogClass: string;
9
- export declare const formClass: string;
10
- export declare const HeaderClass: string;
11
- export declare const TabClass: string;
12
- export declare const TableClass: string;
13
- export declare const LayoutClass: string;
1
+ export declare const dialogPluginClass = "g-dialog-plugin";
2
+ export declare const commonDialogClass = "g-common-dialog";
3
+ export declare const commonFormClass = "g-common-form";
4
+ export declare const commonHeaderClass = "g-common-header";
5
+ export declare const commonTableClass = "g-common-table";
6
+ export declare const boardClass = "g-board";
7
+ export declare const dialogClass = "g-dialog";
8
+ export declare const formClass = "g-form";
9
+ export declare const formItemClass = "g-form-item";
10
+ export declare const headerClass = "g-header";
11
+ export declare const tabClass = "g-tab";
12
+ export declare const tableClass = "g-table";
13
+ export declare const layoutClass = "g-layout";
14
+ export declare const uploaderClass = "g-uploader";
15
+ export declare const gLoginClass = "g-login";
@@ -1,6 +1,7 @@
1
1
  export declare const LOCAL_CONFIG = "config";
2
2
  export declare const LOCAL_THEME_CONFIG = "themeConfig";
3
3
  export declare const LOCAL_USER = "user";
4
+ export declare const LANG_CONFIG = "langConfig";
4
5
  export declare const LOCAL_MENU = "menu";
5
6
  export declare const LOCAL_INIT_TAB_MENU_LIST = "initTabMenuList";
6
7
  export declare const LOCAL_TAB_MENU = "tabMenu";
@@ -1,5 +1,4 @@
1
1
  declare const _default: {
2
2
  timeout: number;
3
- withCredentials: boolean;
4
3
  };
5
4
  export default _default;
@@ -0,0 +1,31 @@
1
+ export declare const config: {
2
+ IP: string;
3
+ PORT: string;
4
+ PROJECT: string;
5
+ KEY: string;
6
+ };
7
+ /**
8
+ * @description: 加载语言
9
+ * @param {string} lang
10
+ */
11
+ export declare function loadLanguageAsync(lang: string): Promise<void>;
12
+ /**
13
+ * @description: 获取当前IP的locale
14
+ */
15
+ export declare function initLocale(): Promise<void>;
16
+ export declare const useI18n: () => {
17
+ /**
18
+ * @description: 传入语言配置 PROJECT/KEY
19
+ * @param {string} key
20
+ * @param {any} value
21
+ */
22
+ setConfig(key: string, value: any): void;
23
+ /**
24
+ * @description: 初始化i18n
25
+ * @param {string} lang
26
+ */
27
+ setupI18n(lang?: string): Promise<void>;
28
+ t(text: string): string;
29
+ };
30
+ declare const i18n: import("vue-i18n").I18n<{}, {}, {}, string, false>;
31
+ export default i18n;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description: 通过地区Code加载Locale
3
+ * @param {string} code 地区缩写代码
4
+ */
5
+ export declare function getLocaleByCode(code: string): any;
@@ -1,6 +1,7 @@
1
1
  import type { Pinia } from "pinia";
2
2
  import type { App } from "vue";
3
3
  import http from "./http";
4
+ import i18n, { useI18n } from "./i18n";
4
5
  declare function install(Vue: App, userConfig?: any): void;
5
6
  declare function setupStore(pinia: Pinia): void;
6
7
  export * from "./components";
@@ -11,7 +12,7 @@ export * from "./utils";
11
12
  export * from "./views";
12
13
  export * from "./types/common";
13
14
  export * from "./types/view";
14
- export { http, setupStore };
15
+ export { http, i18n, useI18n, setupStore };
15
16
  declare const _default: {
16
17
  install: typeof install;
17
18
  };
@@ -1 +1,2 @@
1
1
  export * from "./GMenuManage";
2
+ export * from "./GLogin";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonsin/gview",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "main": "dist/index.mjs",
5
5
  "typings": "dist/types/index.d.ts",
6
6
  "files": [
@@ -10,14 +10,14 @@
10
10
  "scripts": {
11
11
  "dev": "cd develop && vite --host",
12
12
  "preview": "cd develop && vite preview",
13
- "prebuild": "pnpm lint && pnpm format",
14
- "build": "pnpm prebuild && run-p type-check build-only && pnpm build:tsc",
13
+ "prebuild": "npm run lint && npm run format",
14
+ "build": "npm run prebuild && run-p type-check build-only && npm run build:tsc",
15
15
  "build:tsc": "tsc packages/index.ts --emitDeclarationOnly -d --outDir dist/types/",
16
16
  "build-only": "vite build ",
17
17
  "type-check": "vue-tsc --noEmit",
18
18
  "lint:eslint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
19
19
  "lint:style": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
20
- "lint": "pnpm lint:eslint && pnpm lint:style",
20
+ "lint": "npm run lint:eslint && npm run lint:style",
21
21
  "format": "prettier --write develop/ && prettier --write packages/"
22
22
  },
23
23
  "dependencies": {
@@ -35,8 +35,9 @@
35
35
  "pinia": "^2.0.32",
36
36
  "qs": "^6.11.1",
37
37
  "tdesign-icons-vue-next": "^0.1.11",
38
- "tdesign-vue-next": "^1.3.5",
38
+ "tdesign-vue-next": "^1.4.1",
39
39
  "vue": "^3.2.47",
40
+ "vue-i18n": "^9.2.2",
40
41
  "vue-qr": "^4.0.9",
41
42
  "vue-router": "^4.1.6"
42
43
  },
@@ -1,19 +0,0 @@
1
- import { _ as o } from "./index-2b633d8a.mjs";
2
- import "vue";
3
- import "vue-router";
4
- import "pinia";
5
- import "tdesign-vue-next";
6
- import "tdesign-icons-vue-next";
7
- import "number-precision";
8
- import "nanoid";
9
- import "nprogress";
10
- import "axios";
11
- import "lodash-es";
12
- import "dayjs";
13
- import "@wangeditor/editor-for-vue";
14
- import "mustache";
15
- import "he";
16
- import "qs";
17
- export {
18
- o as default
19
- };