vue2-client 1.2.88 → 1.2.91

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,59 +1,64 @@
1
- <template>
2
- <div>
3
- <a-card :bordered="false" :body-style="{ margin: 0, padding: 0 }">
4
- <a-skeleton active v-show="loadState === 'loading'" style="padding: 16px"/>
5
- <a-card
6
- v-show="loadState === 'error'"
7
- :body-style="{ margin: '0 auto' }"
8
- :bordered="false"
9
- class="retryCard"
10
- :hoverable="true"
11
- @click="retry" >
12
- <a-icon type="global" :style="{ fontSize: '28px' }"/>
13
- <p style="margin-top: 20px" class="noSelect">网络好像开小差了,点击重新加载...</p>
14
- </a-card>
15
- <div v-show="loadState === 'success'">
16
- <slot></slot>
17
- </div>
18
- </a-card>
19
- </div>
20
- </template>
21
-
22
- <script>
23
-
24
- export default {
25
- name: 'XCard',
26
- props: {
27
- loadState: {
28
- type: String,
29
- default: 'success'
30
- },
31
- retry: {
32
- type: Function,
33
- default: () => {
34
- console.error('未实现重新加载')
35
- }
36
- }
37
- },
38
- data () {
39
- return {
40
-
41
- }
42
- }
43
- }
44
- </script>
45
-
46
- <style lang="less" scoped>
47
- .retryCard {
48
- text-align: center;
49
- }
50
- .noSelect {
51
- -webkit-touch-callout: none; /* iOS Safari */
52
- -webkit-user-select: none; /* Chrome/Safari/Opera */
53
- -khtml-user-select: none; /* Konqueror */
54
- -moz-user-select: none; /* Firefox */
55
- -ms-user-select: none; /* Internet Explorer/Edge */
56
- user-select: none; /* Non-prefixed version, currently
57
- not supported by any browser */
58
- }
59
- </style>
1
+ <template>
2
+ <div>
3
+ <a-card :body-style="{ margin: 0, padding: 0 }" :bordered="false">
4
+ <a-skeleton v-show="loadState === 'loading'" active style="padding: 16px"/>
5
+ <a-empty v-show="loadState === 'empty'">
6
+ <a-button type="dashed" @click="retry">
7
+ 重新加载
8
+ </a-button>
9
+ </a-empty>
10
+ <a-card
11
+ v-show="loadState === 'error'"
12
+ :body-style="{ margin: '0 auto' }"
13
+ :bordered="false"
14
+ :hoverable="true"
15
+ class="retryCard"
16
+ @click="retry" >
17
+ <a-icon :style="{ fontSize: '28px' }" type="global"/>
18
+ <p class="noSelect" style="margin-top: 20px">网络好像开小差了,点击重新加载...</p>
19
+ </a-card>
20
+ <div v-show="loadState === 'success'">
21
+ <slot></slot>
22
+ </div>
23
+ </a-card>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+
29
+ export default {
30
+ name: 'XCard',
31
+ props: {
32
+ loadState: {
33
+ type: String,
34
+ default: 'success'
35
+ },
36
+ retry: {
37
+ type: Function,
38
+ default: () => {
39
+ console.error('未实现重新加载')
40
+ }
41
+ }
42
+ },
43
+ data () {
44
+ return {
45
+
46
+ }
47
+ }
48
+ }
49
+ </script>
50
+
51
+ <style lang="less" scoped>
52
+ .retryCard {
53
+ text-align: center;
54
+ }
55
+ .noSelect {
56
+ -webkit-touch-callout: none; /* iOS Safari */
57
+ -webkit-user-select: none; /* Chrome/Safari/Opera */
58
+ -khtml-user-select: none; /* Konqueror */
59
+ -moz-user-select: none; /* Firefox */
60
+ -ms-user-select: none; /* Internet Explorer/Edge */
61
+ user-select: none; /* Non-prefixed version, currently
62
+ not supported by any browser */
63
+ }
64
+ </style>