@netang/quasar 0.2.28 → 0.2.30
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/components/dialog/index.vue +12 -0
- package/package.json +1 -1
- package/utils/$auth.js +4 -3
- package/utils/$table.js +2 -1
- package/utils/config.js +2 -0
- package/utils/useAuth.js +2 -2
|
@@ -128,6 +128,10 @@ export default {
|
|
|
128
128
|
type: [String, Number],
|
|
129
129
|
default: '600px',
|
|
130
130
|
},
|
|
131
|
+
// 最小高度
|
|
132
|
+
minHeight: [String, Number],
|
|
133
|
+
// 最大宽度
|
|
134
|
+
maxWidth: [String, Number],
|
|
131
135
|
// 是否全屏
|
|
132
136
|
fullscreen: Boolean,
|
|
133
137
|
// 是否是页面容器
|
|
@@ -258,6 +262,14 @@ export default {
|
|
|
258
262
|
setWH(style, 'height', 'vh')
|
|
259
263
|
// 最小宽度
|
|
260
264
|
setWH(style, 'minWidth', 'vw')
|
|
265
|
+
// 最小高度度
|
|
266
|
+
if (props.minHeight) {
|
|
267
|
+
setWH(style, 'minHeight', 'vh')
|
|
268
|
+
}
|
|
269
|
+
// 最大宽度
|
|
270
|
+
if (props.maxWidth) {
|
|
271
|
+
setWH(style, 'maxWidth', 'vw')
|
|
272
|
+
}
|
|
261
273
|
}
|
|
262
274
|
|
|
263
275
|
return style
|
package/package.json
CHANGED
package/utils/$auth.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import $n_router from '@netang/utils/vue/router'
|
|
2
2
|
|
|
3
3
|
import $n_isValidObject from '@netang/utils/isValidObject'
|
|
4
|
-
import $
|
|
4
|
+
import $n_storage from '@netang/utils/storage'
|
|
5
5
|
|
|
6
|
+
import { configs } from './config'
|
|
6
7
|
import { stateUserInfo } from '../store'
|
|
7
8
|
import { checkUserInfo } from './useAuth'
|
|
8
9
|
|
|
@@ -58,7 +59,7 @@ function _updateUserInfo(res) {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
// 保存缓存(永久缓存)
|
|
61
|
-
$
|
|
62
|
+
$n_storage.set('_tk', res, configs.authExpireTime)
|
|
62
63
|
|
|
63
64
|
// 设置用户信息状态
|
|
64
65
|
stateUserInfo.value = res
|
|
@@ -96,7 +97,7 @@ function pushLogin(query) {
|
|
|
96
97
|
function logout() {
|
|
97
98
|
|
|
98
99
|
// 删除管理员信息
|
|
99
|
-
$
|
|
100
|
+
$n_storage.delete('_tk')
|
|
100
101
|
|
|
101
102
|
// 清空用户信息状态
|
|
102
103
|
stateUserInfo.value = {
|
package/utils/$table.js
CHANGED
|
@@ -1192,7 +1192,8 @@ function create(options) {
|
|
|
1192
1192
|
* 获取表格配置
|
|
1193
1193
|
*/
|
|
1194
1194
|
function config(routePath, path, defaultValue) {
|
|
1195
|
-
|
|
1195
|
+
const res = $n_get(tablesConfig, $n_slash(routePath, 'start', false) + (path ? '.' + path : ''), defaultValue)
|
|
1196
|
+
return $n_cloneDeep($n_isFunction(res) ? res() : res)
|
|
1196
1197
|
}
|
|
1197
1198
|
|
|
1198
1199
|
/**
|
package/utils/config.js
CHANGED
package/utils/useAuth.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import $n_validator from '@netang/utils/validator'
|
|
2
|
-
import $
|
|
2
|
+
import $n_storage from '@netang/utils/storage'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 初始化鉴权状态
|
|
6
6
|
*/
|
|
7
7
|
export function initAuthStore() {
|
|
8
8
|
// 获取管理员信息缓存
|
|
9
|
-
const cache = $
|
|
9
|
+
const cache = $n_storage.get('_tk')
|
|
10
10
|
return checkUserInfo(cache) ? cache : {
|
|
11
11
|
id: 0,
|
|
12
12
|
token: '',
|