yxuse 2.0.9 → 2.0.11

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 (47) hide show
  1. package/README.md +1 -1
  2. package/lib/api.cjs.js +1 -1
  3. package/lib/api.es.js +8 -7
  4. package/lib/components.cjs.js +1 -1
  5. package/lib/components.es.js +12 -11
  6. package/lib/directives.cjs.js +1 -1
  7. package/lib/directives.es.js +4 -3
  8. package/lib/icons.cjs.js +1 -1
  9. package/lib/icons.cjs.js.gz +0 -0
  10. package/lib/icons.es.js +75 -1
  11. package/lib/icons.es.js.gz +0 -0
  12. package/lib/index.cjs.js +1 -1
  13. package/lib/index.cjs2.js +1 -9
  14. package/lib/index.cjs3.js +3 -1
  15. package/lib/index.cjs3.js.gz +0 -0
  16. package/lib/index.cjs4.js +1 -1
  17. package/lib/index.cjs5.js +1 -1
  18. package/lib/index.cjs6.js +40 -10
  19. package/lib/index.cjs6.js.gz +0 -0
  20. package/lib/index.es.js +14 -12
  21. package/lib/index.es2.js +32 -2444
  22. package/lib/index.es3.js +3838 -118
  23. package/lib/index.es3.js.gz +0 -0
  24. package/lib/index.es4.js +21 -3
  25. package/lib/index.es5.js +132 -35
  26. package/lib/index.es6.js +7668 -8177
  27. package/lib/index.es6.js.gz +0 -0
  28. package/lib/style.css +1 -1
  29. package/lib/style.css.gz +0 -0
  30. package/lib/theme.cjs.js +1 -1
  31. package/lib/theme.es.js +12 -11
  32. package/lib/utils.cjs.js +1 -1
  33. package/lib/utils.es.js +9 -8
  34. package/lib/vue.runtime.esm-bundler.cjs.js +8 -0
  35. package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
  36. package/lib/vue.runtime.esm-bundler.es.js +4588 -0
  37. package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
  38. package/package.json +152 -150
  39. package/types/icons/src/index.d.ts +4 -0
  40. package/types/index.d.ts +3 -0
  41. package/types/theme/config.d.ts +2 -0
  42. package/types/theme/type.d.ts +2 -0
  43. package/types/translate/index.d.ts +6 -0
  44. package/lib/index.cjs2.js.gz +0 -0
  45. package/lib/index.cjs7.js +0 -1
  46. package/lib/index.es2.js.gz +0 -0
  47. package/lib/index.es7.js +0 -24
package/package.json CHANGED
@@ -1,150 +1,152 @@
1
- {
2
- "name": "yxuse",
3
- "version": "2.0.9",
4
- "private": false,
5
- "keywords": [
6
- "yx"
7
- ],
8
- "scripts": {
9
- "dev": "node ./build/log.ts dev && vite",
10
- "build": "node ./build/log.ts build && vite build --mode production && node ./build/log.ts end",
11
- "preview": "vite preview",
12
- "build-only": "vite build",
13
- "type-check": "vue-tsc --noEmit",
14
- "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
15
- "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
16
- "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
17
- "prepare": "husky install",
18
- "lint:lint-staged": "lint-staged",
19
- "commit": "git pull && git add -A && git-cz && git push",
20
- "tsc": "tsc --noEmit --watch"
21
- },
22
- "files": [
23
- "lib",
24
- "types"
25
- ],
26
- "main": "lib/index.es.js",
27
- "module": "lib/index.es.js",
28
- "types": "types/index.d.ts",
29
- "exports": {
30
- ".": {
31
- "import": "./lib/index.es.js",
32
- "require": "./lib/index.cls.js",
33
- "types": "./types/index.d.ts"
34
- },
35
- "./utils": {
36
- "import": "./lib/utils.es.js",
37
- "require": "./lib/utils.cls.js",
38
- "types": "./types/utils/index.d.ts"
39
- },
40
- "./api": {
41
- "import": "./lib/api.es.js",
42
- "require": "./lib/api.cls.js",
43
- "types": "./types/api/index.d.ts"
44
- },
45
- "./theme": {
46
- "import": "./lib/theme.es.js",
47
- "require": "./lib/theme.cls.js",
48
- "types": "./types/theme/index.d.ts"
49
- },
50
- "./directives": {
51
- "import": "./lib/directives.es.js",
52
- "require": "./lib/directives.cls.js",
53
- "types": "./types/directives/index.d.ts"
54
- },
55
- "./icons": {
56
- "import": "./lib/icons.es.js",
57
- "require": "./lib/icons.cls.js",
58
- "types": "./types/icons/index.d.ts"
59
- },
60
- "./components": {
61
- "import": "./lib/components.es.js",
62
- "require": "./lib/components.cls.js",
63
- "types": "./types/components/index.d.ts"
64
- },
65
- "./style": {
66
- "import": "./lib/style.css",
67
- "require": "./lib/style.css"
68
- }
69
- },
70
- "dependencies": {
71
- "axios": "^1.3.3",
72
- "element-plus": "^2.4.4",
73
- "file-saver": "^2.0.5",
74
- "mqtt": "^4.0.1",
75
- "nprogress": "^0.2.0",
76
- "pinia": "^2.0.30",
77
- "qs": "^6.11.0",
78
- "sortablejs": "^1.15.0",
79
- "vue": "^3.3.9",
80
- "vue-router": "^4.1.6",
81
- "xlsx": "^0.18.5"
82
- },
83
- "devDependencies": {
84
- "@commitlint/cli": "^17.5.1",
85
- "@commitlint/config-conventional": "^17.4.4",
86
- "@rushstack/eslint-patch": "^1.2.0",
87
- "@types/node": "^18.14.0",
88
- "@types/nprogress": "^0.2.0",
89
- "@typescript-eslint/eslint-plugin": "^6.19.0",
90
- "@typescript-eslint/parser": "^6.19.0",
91
- "@vitejs/plugin-vue": "^5.0.2",
92
- "@vitejs/plugin-vue-jsx": "^3.1.0",
93
- "@vue/eslint-config-prettier": "^7.0.0",
94
- "@vue/eslint-config-typescript": "^11.0.2",
95
- "@vue/tsconfig": "^0.1.3",
96
- "autoprefixer": "^10.4.13",
97
- "commitizen": "^4.3.0",
98
- "cssnano": "^5.1.15",
99
- "cz-git": "^1.6.1",
100
- "eslint": "^8.56.0",
101
- "eslint-plugin-vue": "^9.20.1",
102
- "figlet": "^1.6.0",
103
- "husky": "^8.0.3",
104
- "lint-staged": "^13.2.0",
105
- "npm-run-all": "^4.1.5",
106
- "pinia-plugin-persistedstate": "^3.1.0",
107
- "postcss": "^8.4.21",
108
- "postcss-html": "^1.5.0",
109
- "postcss-import": "^15.1.0",
110
- "postcss-nesting": "^11.2.2",
111
- "postcss-preset-env": "^8.4.2",
112
- "postcss-px-to-viewport": "^1.1.1",
113
- "postcss-scss": "^4.0.6",
114
- "prettier": "^2.8.4",
115
- "rollup-plugin-visualizer": "^5.9.2",
116
- "sass": "^1.58.3",
117
- "stylelint": "^15.6.0",
118
- "stylelint-config-prettier": "^9.0.3",
119
- "stylelint-config-recess-order": "^4.0.0",
120
- "stylelint-config-recommended-scss": "^11.0.0",
121
- "stylelint-config-recommended-vue": "^1.4.0",
122
- "stylelint-config-standard": "^33.0.0",
123
- "stylelint-config-standard-scss": "^9.0.0",
124
- "tailwindcss": "^3.2.7",
125
- "typescript": "~5.3.3",
126
- "unplugin-auto-import": "^0.16.6",
127
- "unplugin-element-plus": "^0.8.0",
128
- "unplugin-vue-components": "^0.25.1",
129
- "vite": "^5.0.10",
130
- "vite-plugin-compression": "^0.5.1",
131
- "vite-plugin-dts": "^3.7.0",
132
- "vite-plugin-remove-console": "^2.1.0",
133
- "vite-plugin-windicss": "^1.9.3",
134
- "vite-svg-loader": "^4.0.0",
135
- "vue-tsc": "^1.1.4"
136
- },
137
- "pnpm": {
138
- "peerDependencyRules": {
139
- "ignoreMissing": [
140
- "rollup",
141
- "webpack"
142
- ]
143
- }
144
- },
145
- "config": {
146
- "commitizen": {
147
- "path": "node_modules/cz-git"
148
- }
149
- }
150
- }
1
+ {
2
+ "name": "yxuse",
3
+ "version": "2.0.11",
4
+ "private": false,
5
+ "keywords": [
6
+ "yx"
7
+ ],
8
+ "scripts": {
9
+ "dev": "node ./build/log.ts dev && vite",
10
+ "build": "node ./build/log.ts build && vite build --mode production && node ./build/log.ts end",
11
+ "preview": "vite preview",
12
+ "build-only": "vite build",
13
+ "type-check": "vue-tsc --noEmit",
14
+ "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
15
+ "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
16
+ "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
17
+ "prepare": "husky install",
18
+ "lint:lint-staged": "lint-staged",
19
+ "commit": "git pull && git add -A && git-cz && git push",
20
+ "tsc": "tsc --noEmit --watch"
21
+ },
22
+ "files": [
23
+ "lib",
24
+ "types"
25
+ ],
26
+ "main": "lib/index.es.js",
27
+ "module": "lib/index.es.js",
28
+ "types": "types/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "import": "./lib/index.es.js",
32
+ "require": "./lib/index.cls.js",
33
+ "types": "./types/index.d.ts"
34
+ },
35
+ "./utils": {
36
+ "import": "./lib/utils.es.js",
37
+ "require": "./lib/utils.cls.js",
38
+ "types": "./types/utils/index.d.ts"
39
+ },
40
+ "./api": {
41
+ "import": "./lib/api.es.js",
42
+ "require": "./lib/api.cls.js",
43
+ "types": "./types/api/index.d.ts"
44
+ },
45
+ "./theme": {
46
+ "import": "./lib/theme.es.js",
47
+ "require": "./lib/theme.cls.js",
48
+ "types": "./types/theme/index.d.ts"
49
+ },
50
+ "./directives": {
51
+ "import": "./lib/directives.es.js",
52
+ "require": "./lib/directives.cls.js",
53
+ "types": "./types/directives/index.d.ts"
54
+ },
55
+ "./icons": {
56
+ "import": "./lib/icons.es.js",
57
+ "require": "./lib/icons.cls.js",
58
+ "types": "./types/icons/index.d.ts"
59
+ },
60
+ "./components": {
61
+ "import": "./lib/components.es.js",
62
+ "require": "./lib/components.cls.js",
63
+ "types": "./types/components/index.d.ts"
64
+ },
65
+ "./style": {
66
+ "import": "./lib/style.css",
67
+ "require": "./lib/style.css"
68
+ }
69
+ },
70
+ "dependencies": {
71
+ "axios": "^1.3.3",
72
+ "element-plus": "^2.4.4",
73
+ "file-saver": "^2.0.5",
74
+ "localforage": "^1.10.0",
75
+ "lodash": "^4.17.21",
76
+ "mqtt": "^4.0.1",
77
+ "nprogress": "^0.2.0",
78
+ "pinia": "^2.0.30",
79
+ "qs": "^6.11.0",
80
+ "sortablejs": "^1.15.0",
81
+ "vue": "^3.3.9",
82
+ "vue-router": "^4.1.6",
83
+ "xlsx": "^0.18.5"
84
+ },
85
+ "devDependencies": {
86
+ "@commitlint/cli": "^17.5.1",
87
+ "@commitlint/config-conventional": "^17.4.4",
88
+ "@rushstack/eslint-patch": "^1.2.0",
89
+ "@types/node": "^18.14.0",
90
+ "@types/nprogress": "^0.2.0",
91
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
92
+ "@typescript-eslint/parser": "^6.19.0",
93
+ "@vitejs/plugin-vue": "^5.0.2",
94
+ "@vitejs/plugin-vue-jsx": "^3.1.0",
95
+ "@vue/eslint-config-prettier": "^7.0.0",
96
+ "@vue/eslint-config-typescript": "^11.0.2",
97
+ "@vue/tsconfig": "^0.1.3",
98
+ "autoprefixer": "^10.4.13",
99
+ "commitizen": "^4.3.0",
100
+ "cssnano": "^5.1.15",
101
+ "cz-git": "^1.6.1",
102
+ "eslint": "^8.56.0",
103
+ "eslint-plugin-vue": "^9.20.1",
104
+ "figlet": "^1.6.0",
105
+ "husky": "^8.0.3",
106
+ "lint-staged": "^13.2.0",
107
+ "npm-run-all": "^4.1.5",
108
+ "pinia-plugin-persistedstate": "^3.1.0",
109
+ "postcss": "^8.4.21",
110
+ "postcss-html": "^1.5.0",
111
+ "postcss-import": "^15.1.0",
112
+ "postcss-nesting": "^11.2.2",
113
+ "postcss-preset-env": "^8.4.2",
114
+ "postcss-px-to-viewport": "^1.1.1",
115
+ "postcss-scss": "^4.0.6",
116
+ "prettier": "^2.8.4",
117
+ "rollup-plugin-visualizer": "^5.9.2",
118
+ "sass": "^1.58.3",
119
+ "stylelint": "^15.6.0",
120
+ "stylelint-config-prettier": "^9.0.3",
121
+ "stylelint-config-recess-order": "^4.0.0",
122
+ "stylelint-config-recommended-scss": "^11.0.0",
123
+ "stylelint-config-recommended-vue": "^1.4.0",
124
+ "stylelint-config-standard": "^33.0.0",
125
+ "stylelint-config-standard-scss": "^9.0.0",
126
+ "tailwindcss": "^3.2.7",
127
+ "typescript": "~5.3.3",
128
+ "unplugin-auto-import": "^0.16.6",
129
+ "unplugin-element-plus": "^0.8.0",
130
+ "unplugin-vue-components": "^0.25.1",
131
+ "vite": "^5.0.10",
132
+ "vite-plugin-compression": "^0.5.1",
133
+ "vite-plugin-dts": "^3.7.0",
134
+ "vite-plugin-remove-console": "^2.1.0",
135
+ "vite-plugin-windicss": "^1.9.3",
136
+ "vite-svg-loader": "^4.0.0",
137
+ "vue-tsc": "^1.1.4"
138
+ },
139
+ "pnpm": {
140
+ "peerDependencyRules": {
141
+ "ignoreMissing": [
142
+ "rollup",
143
+ "webpack"
144
+ ]
145
+ }
146
+ },
147
+ "config": {
148
+ "commitizen": {
149
+ "path": "node_modules/cz-git"
150
+ }
151
+ }
152
+ }
@@ -0,0 +1,4 @@
1
+ import * as Component from "./svg/Component.svg";
2
+ import * as Device from "./svg/device.svg?component";
3
+ import * as Data from "./svg/Data.svg";
4
+ export { Component, Device, Data };
package/types/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * as icons from "./icons";
3
3
  export * as api from "./api";
4
4
  export * as theme from "./theme";
5
5
  export * as components from "./components";
6
+ export * as translate from "./translate";
6
7
  export * from "./directives";
7
8
  export declare const BC: BroadcastChannel;
8
9
  export * from "./components/type";
@@ -12,6 +13,7 @@ import * as api from "./api";
12
13
  import * as theme from "./theme";
13
14
  import * as components from "./components";
14
15
  import * as directives from "./directives";
16
+ import * as translate from "./translate";
15
17
  declare const _default: {
16
18
  utils: typeof utils;
17
19
  icons: typeof icons;
@@ -20,5 +22,6 @@ declare const _default: {
20
22
  components: typeof components;
21
23
  directives: typeof directives;
22
24
  BC: BroadcastChannel;
25
+ translate: typeof translate;
23
26
  };
24
27
  export default _default;
@@ -9,4 +9,6 @@ export declare const defaultConfig: {
9
9
  environment: string;
10
10
  isRenderToolbar: boolean;
11
11
  isRenderIssue: boolean;
12
+ isRenderLang: boolean;
13
+ systemKey: string;
12
14
  };
@@ -23,6 +23,8 @@ export interface YxuseOptions {
23
23
  homeUrl?: string;
24
24
  /** 系统语言*/
25
25
  lang?: string;
26
+ /** 系统标识,isRenderLang为true时必传 */
27
+ systemKey?: string;
26
28
  /** 当前环境*/
27
29
  environment: "development" | "production";
28
30
  }
@@ -0,0 +1,6 @@
1
+ export declare const initTranslate: ({ to, systemKey }: {
2
+ to: any;
3
+ systemKey: any;
4
+ }) => Promise<void>;
5
+ export declare const changeLang: (to: any) => Promise<void>;
6
+ export declare const getLang: () => Promise<any>;
Binary file
package/lib/index.cjs7.js DELETED
@@ -1 +0,0 @@
1
- "use strict";const i=require("./index.cjs6.js"),s={mounted(t,e){n(t,e)}},n=(t,e)=>{const c=e.value;return i.getUserIsHaveBtnPower(c)?"":t.remove()},r={auth:s},o={install:function(t){Object.keys(r).forEach(e=>{t.directive(e,r[e])})}},u=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"}));exports.directives=u;exports.directives$1=o;
Binary file
package/lib/index.es7.js DELETED
@@ -1,24 +0,0 @@
1
- import { Q as s } from "./index.es6.js";
2
- const c = {
3
- mounted(t, e) {
4
- n(t, e);
5
- }
6
- }, n = (t, e) => {
7
- const r = e.value;
8
- return s(r) ? "" : t.remove();
9
- }, o = {
10
- auth: c
11
- }, i = {
12
- install: function(t) {
13
- Object.keys(o).forEach((e) => {
14
- t.directive(e, o[e]);
15
- });
16
- }
17
- }, l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18
- __proto__: null,
19
- default: i
20
- }, Symbol.toStringTag, { value: "Module" }));
21
- export {
22
- i as a,
23
- l as d
24
- };