dialog component

This commit is contained in:
cookfront
2017-02-16 15:12:28 +08:00
parent 82bb27896e
commit 4c3cdd433b
15 changed files with 350 additions and 6 deletions

40
docs/examples/dialog.md Normal file
View File

@@ -0,0 +1,40 @@
<script>
import { Dialog } from 'src/index';
export default {
methods: {
handleAlertClick() {
Dialog.alert({
title: 'alert',
message: 'alert message'
});
},
handleConfirmClick() {
Dialog.confirm({
title: 'confirm',
message: 'confirm message'
});
}
}
};
</script>
## Dialog组件
### 基础用法
:::demo
```html
<o2-button @click="handleAlertClick">alert</o2-button>
<o2-button @click="handleConfirmClick">confirm</o2-button>
```
:::
### API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| title | 标题 | String | '' | |
| message | 内容 | String | '' | |

View File

@@ -81,4 +81,4 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| value | 利用`v-model`绑定当前组件是否显示 | Boolean | '' | |
| value | 利用`v-model`绑定当前组件是否显示 | Boolean | '' | |

View File

@@ -80,6 +80,10 @@
"path": "/popup",
"title": "Popup"
},
{
"path": "/dialog",
"title": "Dialog"
},
{
"path": "/swipe",
"title": "Swipe"