popup component demo

This commit is contained in:
cookfront
2017-03-09 20:29:41 +08:00
parent da86a0c214
commit 2fe99d031a
10 changed files with 219 additions and 22 deletions

View File

@@ -1,7 +1,26 @@
<style>
@component-namespace demo {
@b dialog {
.zan-button {
margin: 15px;
}
}
}
</style>
<script>
import { Dialog } from 'src/index';
import MobileComputed from 'components/mobile-computed';
export default {
mixins: [MobileComputed],
computed: {
mobileUrl() {
return '/examples.html' + location.hash;
}
},
methods: {
handleAlertClick() {
Dialog.alert({
@@ -66,6 +85,12 @@ export default {
```
:::
点击以下按钮查看手机端效果:
<zan-button @click="mobileShow = true">点击查看手机端效果</zan-button>
<mobile-popup v-model="mobileShow" :url="mobileUrl"></mobile-popup>
### API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |