Skip to content

Commit a86fffc

Browse files
authored
fix(exception): modify mobile problem (#2690)
1 parent 5b243c2 commit a86fffc

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

examples/sites/demos/mobile/app/exception/buttonText.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<template>
22
<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>
94
</div>
105
</template>
116

examples/sites/demos/mobile/app/exception/exceptionClass.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@
44
type="nodata"
55
button-text="重试"
66
:imageUrl="imageUrl"
7+
:exception-class="exceptionClass"
78
message="网络异常,请稍后再试,或者联系管理员给您处理"
89
></tiny-exception>
910
</div>
1011
</template>
1112

1213
<script lang="jsx">
13-
import { TinyException } from '@opentiny/vue-mobile'
14+
import { Exception } from '@opentiny/vue'
1415
1516
export default {
1617
components: {
17-
TinyException
18+
TinyException: Exception
1819
},
1920
data() {
2021
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'
2224
}
2325
},
24-
methods: {
25-
test() {
26-
alert(11)
27-
}
28-
}
26+
methods: {}
2927
}
3028
</script>
29+
30+
<style lang="less">
31+
.no-problem {
32+
background-color: pink;
33+
}
34+
</style>

examples/sites/demos/mobile/app/exception/message.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<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>
44
</div>
55
</template>
66

@@ -12,9 +12,7 @@ export default {
1212
TinyException
1313
},
1414
data() {
15-
return {
16-
imageUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/planet1.jpg`
17-
}
15+
return {}
1816
},
1917
methods: {
2018
test() {

packages/mobile/components/exception/src/exception.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const exceptionProps = {
33
type: String,
44
default: 'nodata'
55
},
6+
buttonText: String,
67
message: String,
78
subMessage: String,
89
exceptionClass: String,

packages/mobile/components/exception/src/mobile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<slot name="content">
1818
<div class="tiny-mobile-exception__content-message">
1919
<div class="main-message">
20-
{{ state.message }}
20+
{{ message }}
2121
</div>
2222
<div v-if="subMessage" class="sub-message">
2323
{{ subMessage }}

0 commit comments

Comments
 (0)