@ftlab/one-vue3 0.2.9 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9
9
 
10
- ## [v0.2.9](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.2...v0.2.9)
10
+ ## [v0.2.11](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.2...v0.2.11)
11
11
 
12
12
  ### Commits
13
13
 
@@ -16,7 +16,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
16
16
  - feat: support iconfont [`5268467`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/526846752ca3de05e7e78a665a7b1c1ff1b40b9f)
17
17
  - feat: menu style detail change [`93c3abb`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/93c3abba52a689bf6e0e265e4ad2c4aad38605fd)
18
18
  - fix: fix collapse style error [`54e9525`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/54e9525a99b216a9f7bb1b29ec578a768b49cb93)
19
+ - charge storage to js [`1d1368d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1d1368ddb5d1ce8ecbc5754530b46f705146013f)
19
20
  - fix: remove type declare [`d611d3a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/d611d3ab302a4426e96f1c1e4e7ae940e427c9a9)
21
+ - chore: charge ts to js [`e2feead`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/e2feeadc54c45ddab43a8947d38cb1decc76d230)
20
22
  - fix: winter time tz bug [`3f984ee`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/3f984eebce6e6409084439fd0342bbaf883693c1)
21
23
 
22
24
  ## [v0.2.2](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.1...v0.2.2) - 2023-12-04
package/components.d.ts CHANGED
@@ -11,6 +11,7 @@ declare module 'vue' {
11
11
  ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
12
12
  ElButton: typeof import('element-plus/es')['ElButton']
13
13
  ElCard: typeof import('element-plus/es')['ElCard']
14
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
14
15
  ElDialog: typeof import('element-plus/es')['ElDialog']
15
16
  ElDivider: typeof import('element-plus/es')['ElDivider']
16
17
  ElDropdown: typeof import('element-plus/es')['ElDropdown']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftlab/one-vue3",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "One for Apps based on Element UI",
5
5
  "main": "dist/ftlOne.js",
6
6
  "type": "module",
@@ -4,7 +4,7 @@ import storage from '../utils/storage';
4
4
  const userInfo = storage.getAuth();
5
5
 
6
6
  // 同步路由的or翻译为路由name
7
- function translateOrToName(arr: any[]) {
7
+ function translateOrToName(arr) {
8
8
  return arr.map((item) => {
9
9
  if (item.children && item.children.length) {
10
10
  item.children = translateOrToName(item.children);
@@ -23,12 +23,12 @@ export default defineStore('auth', {
23
23
  username: userInfo.username || '',
24
24
  owner: userInfo.owner || '',
25
25
  roles: userInfo.roles || [],
26
- menus: [] as any[],
27
- resources: [] as any[]
26
+ menus: [],
27
+ resources: []
28
28
  };
29
29
  },
30
30
  actions: {
31
- setInfo(authInfo: any) {
31
+ setInfo(authInfo) {
32
32
  if (typeof authInfo === 'object') {
33
33
  this.userInfo = authInfo;
34
34
  this.username = authInfo.username;
@@ -38,7 +38,7 @@ export default defineStore('auth', {
38
38
  storage.setToken(authInfo.token);
39
39
  }
40
40
  },
41
- setMenu(menus: any[]) {
41
+ setMenu(menus) {
42
42
  if (!menus.length) {
43
43
  // 在权限返回为空的时候给menus加一条空数据,防止下次路由进入再次空校验
44
44
  this.menus.push({});
@@ -46,7 +46,7 @@ export default defineStore('auth', {
46
46
  this.menus = translateOrToName(menus);
47
47
  }
48
48
  },
49
- setResources(resources: any[]) {
49
+ setResources(resources) {
50
50
  this.resources = translateOrToName(resources);
51
51
  },
52
52
  logout() {
@@ -8,7 +8,7 @@ export default defineStore('lang', {
8
8
  };
9
9
  },
10
10
  actions: {
11
- setLanguage(lang?: string) {
11
+ setLanguage(lang) {
12
12
  this.language = lang || 'cn';
13
13
  storage.set('language', lang);
14
14
  }
@@ -1,27 +1,27 @@
1
1
  export default {
2
- get(key: string): any {
2
+ get(key) {
3
3
  return localStorage.getItem(key);
4
4
  },
5
- set(key: string, value: any) {
5
+ set(key, value) {
6
6
  localStorage.setItem(key, value);
7
7
  },
8
- remove(key: string) {
8
+ remove(key) {
9
9
  localStorage.removeItem(key);
10
10
  },
11
11
  // 保存token到本地缓存
12
- setToken(token: string) {
13
- this.set("token", token);
12
+ setToken(token) {
13
+ this.set('token', token);
14
14
  },
15
15
  // 保存用户信息到本地缓存
16
- setAuth(auth: any) {
17
- this.set("auth", JSON.stringify(auth));
16
+ setAuth(auth) {
17
+ this.set('auth', JSON.stringify(auth));
18
18
  },
19
19
  // 读取token
20
20
  getToken() {
21
- return this.get("token");
21
+ return this.get('token');
22
22
  },
23
23
  // 读取用户信息
24
24
  getAuth() {
25
- return this.get("auth") ? JSON.parse(this.get("auth")) : {};
25
+ return this.get('auth') ? JSON.parse(this.get('auth')) : {};
26
26
  },
27
27
  };
File without changes