mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
Merge branch 'master' of gitlab.qima-inc.com:fe/zanui-vue
This commit is contained in:
66
docs/examples-docs/toast.md
Normal file
66
docs/examples-docs/toast.md
Normal file
@@ -0,0 +1,66 @@
|
||||
<style>
|
||||
@component-namespace demo {
|
||||
@b toast {
|
||||
.zan-button {
|
||||
margin: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { Toast } from 'src/index';
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
showSimpleToast() {
|
||||
Toast('我是提示文案,建议不超过十五字~');
|
||||
},
|
||||
showToast(type) {
|
||||
Toast({
|
||||
type: type,
|
||||
message: '文案信息'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
## Dialog组件
|
||||
|
||||
### 基础用法
|
||||
|
||||
:::demo 基础用法
|
||||
```html
|
||||
<zan-button @click="showSimpleToast()">普通文字提示</zan-button>
|
||||
|
||||
<zan-button @click="showToast('loading')">加载Toast</zan-button>
|
||||
<zan-button @click="showToast('success')">成功</zan-button>
|
||||
<zan-button @click="showToast('failure')">失败</zan-button>
|
||||
|
||||
<script>
|
||||
import { Toast } from 'src/index';
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
showSimpleToast() {
|
||||
Toast('我是提示文案,建议不超过十五字~');
|
||||
},
|
||||
showToast(type) {
|
||||
Toast({
|
||||
type: type,
|
||||
message: '文案信息'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
### API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| type | 类型 | String | 'text' | 'text', 'loading', 'success', 'failure' |
|
||||
| message | 内容 | String | '' | - |
|
Reference in New Issue
Block a user