# 模态加载
暂态toast提示
# 示例
<template>
<div class="wrapper">
<dof-minibar title="Toast提示"></dof-minibar>
<div class="title-box">
<text class="title-text">基础样式</text>
</div>
<div style="padding: 32px;">
<dof-button @dofButtonClicked="$refs['dofToast1'].showToast()" text="文字toast"></dof-button>
</div>
<div style="padding: 32px;">
<dof-button @dofButtonClicked="$refs['dofToast2'].showToast()" text="成功toast"></dof-button>
</div>
<div style="padding: 32px;">
<dof-button @dofButtonClicked="$refs['dofToast3'].showToast()" text="失败toast"></dof-button>
</div>
<dof-toast ref="dofToast1" :content="'提示文案'"></dof-toast>
<dof-toast ref="dofToast2" type="success" :content="'提示文案'"></dof-toast>
<dof-toast ref="dofToast3" type="fail" :content="'提示文案'"></dof-toast>
</div>
</template>
<style scoped>
.wrapper {
background-color: #f9f9f9;
}
@media screen and (weex-theme: colmo) {
.wrapper {
background-color: #151617;
}
}
</style>
<script>
import { DofMinibar, DofButton, DofToast } from 'dolphin-weex-ui'
export default {
components: { DofMinibar, DofButton, DofToast },
data: () => ({}),
computed: {},
created() {},
methods: {}
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
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
2
3
4
5
6
7
8
9
10
11
12
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
# Attributes
| 参数 | 说明 | 类型 | 默认值 | 是否必须 |
|---|---|---|---|---|
| type | 颜色主题,可选值为: `` success fail | String | `` | N |
| content | 文案内容 | String | `` | N |
点我扫二维码 查看demo