Skip to content

Commit 1ab8b5b

Browse files
committed
1.6.0 README.md update
1 parent fc5e138 commit 1ab8b5b

File tree

25 files changed

+2858
-2966
lines changed

25 files changed

+2858
-2966
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
*.sh
32
node_modules
43
*.md
@@ -14,3 +13,4 @@ dist
1413
/bin
1514
Dockerfile
1615
components.d.ts
16+
components.d.ts

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ pnpm-debug.log*
2424
*.sln
2525
*.sw?
2626
/components.d.ts
27+
/components.d.ts

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# CHANGELOG
22

3+
## 1.6.0 (2021-12-24)
4+
5+
### 🐛 Bug Fixes
6+
- 修复 `低版本浏览器` 报 globalThis 未定义
7+
- 修复 `Axios` api地址拼接异常
8+
- 修复 `createStorage存在prefixKey` 会出bug
9+
10+
- ### ✨ Features
11+
- 破坏 `Axios` 取消默认导出 `http` 可支持多个请求导出
12+
- 搜索 `import http from '@/utils/http/axios'` 替换为 `import { http } from '@/utils/http/axios`
13+
- 新增 `Axios` 多项配置 `urlPrefix``joinTime``ignoreCancelToken``withToken``uploadFile方法`
14+
- 依赖升级
15+
316
## 1.5.5 (2021-08-14)
417

518
### 🐛 Bug Fixes

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@
3030

3131
## 新品
3232

33-
千呼万唤 `Naive Admin Antd` 也迎来了第一个版本,同时具备 `Naive Ui Admin` 优点,如果您选的技术栈是 `antd` 的话,不妨看看以下版本,他或许能让您眼前一亮O(∩_∩)O哈哈~
33+
### Antd vue
34+
35+
千呼万唤 `Naive Admin Antd` 也迎来了第一个版本,同时具备 `Naive Ui Admin` 优点,如果您选的技术栈是 `Antd` 的话,不妨看看。
3436

3537
[NaiveAdmin Antd 预览](https://antd.naiveadmin.com)
3638

39+
### Arco vue
40+
41+
新产品,新生态,智能设计体系,连接轻盈体验,一如既往、开箱即用,欢迎前往查看。
42+
43+
[NaiveAdmin Arco 预览](https://arco.naiveadmin.com)
44+
45+
3746
## 文档
3847

39-
[文档地址](https://naive-ui-admin-docs.vercel.app)
48+
[v1文档地址](https://naive-ui-admin-docs.vercel.app)
4049

4150
## 准备
4251

commitlint.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'fixed',
1515
'resolve',
1616
'resolves',
17-
'resolved'
17+
'resolved',
1818
],
1919
issuePrefixes: ['#'],
2020
noteKeywords: ['BREAKING CHANGE'],
@@ -23,8 +23,8 @@ module.exports = {
2323
revertCorrespondence: ['header', 'hash'],
2424
warn() {},
2525
mergePattern: null,
26-
mergeCorrespondence: null
27-
}
26+
mergeCorrespondence: null,
27+
},
2828
},
2929
rules: {
3030
'body-leading-blank': [2, 'always'],
@@ -50,8 +50,8 @@ module.exports = {
5050
'wip',
5151
'workflow',
5252
'types',
53-
'release'
54-
]
55-
]
56-
}
57-
}
53+
'release',
54+
],
55+
],
56+
},
57+
};

index.html

Lines changed: 106 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,122 @@
11
<!DOCTYPE html>
2-
<html lang="zh-cmn-Hans">
2+
<html lang="zh-cmn-Hans" id="htmlRoot" data-theme="light">
33
<head>
44
<meta charset="UTF-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6-
<meta name="renderer" content="webkit"/>
5+
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
6+
<meta content="webkit" name="renderer"/>
77
<meta
8-
name="viewport"
98
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
9+
name="viewport"
1010
/>
11-
<link rel="icon" href="/favicon.ico"/>
11+
<link href="/favicon.ico" rel="icon"/>
1212
<title><%= title %></title>
13-
<style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
1413
</head>
1514
<body>
1615
<div id="appProvider" style="display: none"></div>
1716
<div id="app">
18-
<div class="first-loading-wrp">
19-
<div class="loading-wrp">
20-
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
17+
<style>
18+
.first-loading-wrap {
19+
display: flex;
20+
width: 100%;
21+
height: 100vh;
22+
justify-content: center;
23+
align-items: center;
24+
flex-direction: column;
25+
}
26+
27+
.first-loading-wrap > h1 {
28+
font-size: 128px
29+
}
30+
31+
.first-loading-wrap .loading-wrap {
32+
padding: 98px;
33+
display: flex;
34+
justify-content: center;
35+
align-items: center
36+
}
37+
38+
.dot {
39+
animation: antRotate 1.2s infinite linear;
40+
transform: rotate(45deg);
41+
position: relative;
42+
display: inline-block;
43+
font-size: 32px;
44+
width: 32px;
45+
height: 32px;
46+
box-sizing: border-box
47+
}
48+
49+
.dot i {
50+
width: 14px;
51+
height: 14px;
52+
position: absolute;
53+
display: block;
54+
background-color: #1890ff;
55+
border-radius: 100%;
56+
transform: scale(.75);
57+
transform-origin: 50% 50%;
58+
opacity: .3;
59+
animation: antSpinMove 1s infinite linear alternate
60+
}
61+
62+
.dot i:nth-child(1) {
63+
top: 0;
64+
left: 0
65+
}
66+
67+
.dot i:nth-child(2) {
68+
top: 0;
69+
right: 0;
70+
-webkit-animation-delay: .4s;
71+
animation-delay: .4s
72+
}
73+
74+
.dot i:nth-child(3) {
75+
right: 0;
76+
bottom: 0;
77+
-webkit-animation-delay: .8s;
78+
animation-delay: .8s
79+
}
80+
81+
.dot i:nth-child(4) {
82+
bottom: 0;
83+
left: 0;
84+
-webkit-animation-delay: 1.2s;
85+
animation-delay: 1.2s
86+
}
87+
88+
@keyframes antRotate {
89+
to {
90+
-webkit-transform: rotate(405deg);
91+
transform: rotate(405deg)
92+
}
93+
}
94+
95+
@-webkit-keyframes antRotate {
96+
to {
97+
-webkit-transform: rotate(405deg);
98+
transform: rotate(405deg)
99+
}
100+
}
101+
102+
@keyframes antSpinMove {
103+
to {
104+
opacity: 1
105+
}
106+
}
107+
108+
@-webkit-keyframes antSpinMove {
109+
to {
110+
opacity: 1
111+
}
112+
}</style>
113+
<div class="first-loading-wrap">
114+
<div class="loading-wrap">
115+
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
21116
</div>
22117
</div>
23118
</div>
24-
<script type="module" src="/src/main.ts"></script>
119+
<script>var globalThis = window;</script>
120+
<script src="/src/main.ts" type="module"></script>
25121
</body>
26122
</html>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "naive-ui-admin",
3-
"version": "1.5.5",
3+
"version": "1.6.0",
44
"author": {
55
"name": "Ahjung",
66
"email": "735878602@qq.com",
@@ -39,7 +39,7 @@
3939
"makeit-captcha": "^1.2.5",
4040
"mitt": "^2.1.0",
4141
"mockjs": "^1.1.0",
42-
"naive-ui": "^2.19.1",
42+
"naive-ui": "^2.23.1",
4343
"pinia": "^2.0.0-rc.4",
4444
"qs": "^6.10.1",
4545
"vfonts": "^0.1.0",

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ module.exports = {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
};

src/api/dashboard/console.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from '@/utils/http/axios';
1+
import { http } from '@/utils/http/axios';
22

33
//获取主控台信息
44
export function getConsoleInfo() {

src/api/system/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from '@/utils/http/axios';
1+
import { http } from '@/utils/http/axios';
22

33
/**
44
* @description: 根据用户id获取用户菜单

src/api/system/role.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import http from '@/utils/http/axios';
1+
import { http } from '@/utils/http/axios';
22

33
/**
44
* @description: 角色列表
55
*/
6-
export function getRoleList(params) {
6+
export function getRoleList() {
77
return http.request({
88
url: '/role/list',
99
method: 'GET',

src/api/system/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from '@/utils/http/axios';
1+
import { http } from '@/utils/http/axios';
22

33
export interface BasicResponseModel<T = any> {
44
code: number;

src/api/table/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import http from '@/utils/http/axios';
1+
import { http } from '@/utils/http/axios';
22

33
//获取table
44
export function getTableList(params) {

src/components/Table/src/Table.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{{ title }}
88
<n-tooltip trigger="hover" v-if="titleTooltip">
99
<template #trigger>
10-
<n-icon size="18" class="ml-1 cursor-pointer text-gray-400">
10+
<n-icon size="18" class="ml-1 text-gray-400 cursor-pointer">
1111
<QuestionCircleOutlined />
1212
</n-icon>
1313
</template>
@@ -156,7 +156,7 @@
156156
157157
const { getPaginationInfo, setPagination } = usePagination(getProps);
158158
159-
const { getDataSourceRef, getRowKey, reload } = useDataSource(
159+
const { getDataSourceRef, getDataSource, getRowKey, reload } = useDataSource(
160160
getProps,
161161
{
162162
getPaginationInfo,
@@ -280,6 +280,7 @@
280280
...toRefs(state),
281281
tableElRef,
282282
getBindValues,
283+
getDataSource,
283284
densityOptions,
284285
reload,
285286
densitySelect,

src/components/Table/src/hooks/useDataSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function useDataSource(
99
{ getPaginationInfo, setPagination, setLoading, tableData },
1010
emit
1111
) {
12-
const dataSourceRef = ref([]);
12+
const dataSourceRef = ref<Recordable[]>([]);
1313

1414
watchEffect(() => {
1515
tableData.value = unref(dataSourceRef);

src/utils/Storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const createStorage = ({ prefixKey = '', storage = localStorage } = {}) =
4848
if (expire === null || expire >= Date.now()) {
4949
return value;
5050
}
51-
this.remove(this.getKey(key));
51+
this.remove(key);
5252
} catch (e) {
5353
return def;
5454
}

0 commit comments

Comments
 (0)