iview/local/routers/index.vue

57 lines
1.6 KiB
Vue
Raw Normal View History

2016-09-09 14:29:19 +08:00
<style>
</style>
<template>
<Page :total="100" show-sizer></Page>
2016-09-09 14:29:19 +08:00
</template>
<script>
2016-10-10 09:08:20 +08:00
import { Modal, Button, Message, Page } from 'iview';
2016-09-09 14:29:19 +08:00
export default {
2016-10-10 09:08:20 +08:00
components: { Modal, Button, Page },
2016-09-09 14:29:19 +08:00
props: {
},
data () {
return {
2016-09-09 14:29:19 +08:00
}
},
methods: {
info () {
Modal.info({
title: '这是对话框标题',
content: `<p>这是对话框内容</p><p>这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容</p>`
});
},
success () {
Modal.success();
},
warning () {
Modal.warning();
},
error () {
Modal.error();
},
confirm () {
Modal.confirm({
// okText: 'OK',
// cancelText: 'Cancel',
title: '删除提示',
content: '删除后将不可找回,您确定要删除吗?',
onCancel () {
Message.info('cancel it');
},
onOk () {
setTimeout(() => {
Modal.remove();
Message.success('OK!');
}, 2000);
},
loading: true
});
}
2016-09-09 14:29:19 +08:00
}
}
</script>