File tree Expand file tree Collapse file tree 5 files changed +17
-19
lines changed
examples/sites/demos/mobile/app/exception
packages/mobile/components/exception/src Expand file tree Collapse file tree 5 files changed +17
-19
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" tiny-mobile-exception-demo" >
3
- <tiny-exception
4
- type =" nodata"
5
- button-text =" 重试"
6
- :imageUrl =" imageUrl"
7
- message =" 网络异常,请稍后再试,或者联系管理员给您处理"
8
- ></tiny-exception >
3
+ <tiny-exception type =" nodata" button-text =" 重试" :imageUrl =" imageUrl" ></tiny-exception >
9
4
</div >
10
5
</template >
11
6
Original file line number Diff line number Diff line change 4
4
type =" nodata"
5
5
button-text =" 重试"
6
6
:imageUrl =" imageUrl"
7
+ :exception-class =" exceptionClass"
7
8
message =" 网络异常,请稍后再试,或者联系管理员给您处理"
8
9
></tiny-exception >
9
10
</div >
10
11
</template >
11
12
12
13
<script lang="jsx">
13
- import { TinyException } from '@opentiny/vue-mobile '
14
+ import { Exception } from '@opentiny/vue'
14
15
15
16
export default {
16
17
components: {
17
- TinyException
18
+ TinyException: Exception
18
19
},
19
20
data() {
20
21
return {
21
- imageUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/planet1.jpg`
22
+ imageUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/planet1.jpg`,
23
+ exceptionClass: 'no-problem'
22
24
}
23
25
},
24
- methods: {
25
- test() {
26
- alert(11)
27
- }
28
- }
26
+ methods: {}
29
27
}
30
28
</script >
29
+
30
+ <style lang="less">
31
+ .no-problem {
32
+ background-color : pink ;
33
+ }
34
+ </style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" tiny-mobile-exception-demo" >
3
- <tiny-exception type =" nodata" message =" 自定义文本内容" :imageUrl = " imageUrl " @btn-click =" test" ></tiny-exception >
3
+ <tiny-exception type =" nodata" message =" 自定义文本内容" @btn-click =" test" ></tiny-exception >
4
4
</div >
5
5
</template >
6
6
@@ -12,9 +12,7 @@ export default {
12
12
TinyException
13
13
},
14
14
data() {
15
- return {
16
- imageUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/planet1.jpg`
17
- }
15
+ return {}
18
16
},
19
17
methods: {
20
18
test() {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export const exceptionProps = {
3
3
type : String ,
4
4
default : 'nodata'
5
5
} ,
6
+ buttonText : String ,
6
7
message : String ,
7
8
subMessage : String ,
8
9
exceptionClass : String ,
Original file line number Diff line number Diff line change 17
17
<slot name =" content" >
18
18
<div class =" tiny-mobile-exception__content-message" >
19
19
<div class =" main-message" >
20
- {{ state. message }}
20
+ {{ message }}
21
21
</div >
22
22
<div v-if =" subMessage" class =" sub-message" >
23
23
{{ subMessage }}
You can’t perform that action at this time.
0 commit comments