zanui demos

This commit is contained in:
cookfront
2017-02-27 16:54:37 +08:00
parent 650dc01906
commit 8cc5fa5007
46 changed files with 1130 additions and 295 deletions

54
docs/examples/dialog.vue Normal file
View File

@@ -0,0 +1,54 @@
<template>
<div class="page-dialog">
<h1 class="page-title">Dialog</h1>
<div class="z-button-1">
<z-button @click="handleAlertClick">点击我打开alert提示框</z-button>
</div>
<div class="z-button-1">
<z-button @click="handleConfirmClick">点击我打开confirm提示框</z-button>
</div>
</div>
</template>
<script>
import { Dialog } from 'src/index';
export default {
methods: {
handleAlertClick() {
Dialog.alert({
title: 'alert标题',
message: '弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。'
}).then((action) => {
console.log(action);
});
},
handleConfirmClick() {
Dialog.confirm({
title: 'confirm标题',
message: '弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。'
}).then((action) => {
console.log(action);
}, (error) => {
console.log(error);
});
}
}
};
</script>
<style>
@component-namespace page {
@b dialog {
padding: 0 15px;
.z-button-1 {
margin-bottom: 10px;
}
}
}
</style>