@netang/quasar 0.1.57 → 0.1.58
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/empty/index.vue +80 -71
- package/components/power-page/index.vue +94 -92
- package/package.json +2 -3
|
@@ -1,71 +1,80 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="q-pa-lg column flex-center q-gutter-sm"
|
|
4
|
-
:class="{
|
|
5
|
-
'absolute-full': fit,
|
|
6
|
-
}"
|
|
7
|
-
>
|
|
8
|
-
<!-- 图标 -->
|
|
9
|
-
<q-icon
|
|
10
|
-
:name="icon"
|
|
11
|
-
color="grey-5"
|
|
12
|
-
:size="toPx(iconSize)"
|
|
13
|
-
/>
|
|
14
|
-
|
|
15
|
-
<!-- 描述文字 -->
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="q-pa-lg column flex-center q-gutter-sm"
|
|
4
|
+
:class="{
|
|
5
|
+
'absolute-full': fit,
|
|
6
|
+
}"
|
|
7
|
+
>
|
|
8
|
+
<!-- 图标 -->
|
|
9
|
+
<q-icon
|
|
10
|
+
:name="icon"
|
|
11
|
+
color="grey-5"
|
|
12
|
+
:size="toPx(iconSize)"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<!-- 描述文字 -->
|
|
16
|
+
<template v-if="!! description">
|
|
17
|
+
<div
|
|
18
|
+
:class="descriptionClass"
|
|
19
|
+
v-html="description"
|
|
20
|
+
v-if="html"
|
|
21
|
+
></div>
|
|
22
|
+
<div
|
|
23
|
+
:class="descriptionClass"
|
|
24
|
+
v-else
|
|
25
|
+
>{{description}}</div>
|
|
26
|
+
</template>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import $n_px from '@netang/utils/px'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 标识
|
|
37
|
+
*/
|
|
38
|
+
name: 'NEmpty',
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 声明属性
|
|
42
|
+
*/
|
|
43
|
+
props: {
|
|
44
|
+
// 图标
|
|
45
|
+
icon: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: 'info',
|
|
48
|
+
},
|
|
49
|
+
// 图标大小
|
|
50
|
+
iconSize: {
|
|
51
|
+
type: [ String, Number ],
|
|
52
|
+
default: 70,
|
|
53
|
+
},
|
|
54
|
+
// 描述类名
|
|
55
|
+
descriptionClass: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'text-subtitle1 text-grey-7',
|
|
58
|
+
},
|
|
59
|
+
// 描述文字
|
|
60
|
+
description: String,
|
|
61
|
+
// 撑满全屏
|
|
62
|
+
fit: Boolean,
|
|
63
|
+
// 是否开启 html
|
|
64
|
+
html: Boolean,
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 组合式
|
|
69
|
+
*/
|
|
70
|
+
setup() {
|
|
71
|
+
|
|
72
|
+
// ==========【方法】=============================================================================================
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
// 转像素
|
|
76
|
+
toPx: $n_px,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
@@ -1,92 +1,94 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="container">
|
|
3
|
-
<!-- 空数据 -->
|
|
4
|
-
<n-empty
|
|
5
|
-
:description="emptyDescription"
|
|
6
|
-
fit
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
v-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<!--
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
import
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="container">
|
|
3
|
+
<!-- 空数据 -->
|
|
4
|
+
<n-empty
|
|
5
|
+
:description="emptyDescription"
|
|
6
|
+
fit
|
|
7
|
+
html
|
|
8
|
+
v-if="pageStatus === false"
|
|
9
|
+
/>
|
|
10
|
+
<!-- 插槽 -->
|
|
11
|
+
<slot v-else-if="pageStatus === true" />
|
|
12
|
+
<!-- 加载 -->
|
|
13
|
+
<q-inner-loading
|
|
14
|
+
:showing="pageLoading"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<q-page
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
v-else
|
|
20
|
+
>
|
|
21
|
+
<!-- 空数据 -->
|
|
22
|
+
<n-empty
|
|
23
|
+
:description="emptyDescription"
|
|
24
|
+
fit
|
|
25
|
+
html
|
|
26
|
+
v-if="pageStatus === false"
|
|
27
|
+
/>
|
|
28
|
+
<!-- 插槽 -->
|
|
29
|
+
<slot v-else-if="pageStatus === true" />
|
|
30
|
+
<!-- 加载 -->
|
|
31
|
+
<q-inner-loading
|
|
32
|
+
:showing="pageLoading"
|
|
33
|
+
/>
|
|
34
|
+
</q-page>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { inject } from 'vue'
|
|
39
|
+
|
|
40
|
+
import { NPowerKey } from '../../utils/symbols'
|
|
41
|
+
|
|
42
|
+
import NEmpty from '../empty'
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 标识
|
|
48
|
+
*/
|
|
49
|
+
name: 'NPowerPage',
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 声明属性
|
|
53
|
+
*/
|
|
54
|
+
props: {
|
|
55
|
+
// 是否容器化
|
|
56
|
+
container: Boolean,
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 组件
|
|
61
|
+
*/
|
|
62
|
+
components: {
|
|
63
|
+
NEmpty,
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 组合式
|
|
68
|
+
*/
|
|
69
|
+
setup() {
|
|
70
|
+
|
|
71
|
+
// ==========【数据】============================================================================================
|
|
72
|
+
|
|
73
|
+
// 获取注入权限数据
|
|
74
|
+
const {
|
|
75
|
+
// 页面状态
|
|
76
|
+
pageStatus,
|
|
77
|
+
// 空状态描述
|
|
78
|
+
emptyDescription,
|
|
79
|
+
// 页面加载
|
|
80
|
+
pageLoading,
|
|
81
|
+
} = inject(NPowerKey)
|
|
82
|
+
|
|
83
|
+
// ==========【返回】============================================================================================
|
|
84
|
+
return {
|
|
85
|
+
// 页面状态
|
|
86
|
+
pageStatus,
|
|
87
|
+
// 空状态描述
|
|
88
|
+
emptyDescription,
|
|
89
|
+
// 页面加载
|
|
90
|
+
pageLoading,
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netang/quasar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"description": "netang-quasar",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
-
"publish": "npm publish --access public"
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
7
|
},
|
|
9
8
|
"repository": {
|
|
10
9
|
"type": "git",
|