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