optimize Page style

optimize Page style
This commit is contained in:
梁灏 2016-11-03 18:09:04 +08:00
parent 4901af54c5
commit 928033f0bd
4 changed files with 26 additions and 62 deletions

View file

@ -1,59 +1,13 @@
<style>
</style>
<template>
<Page :total="40" size="small"></Page>
<Page :total="40" size="small" show-elevator show-sizer></Page>
<Page :total="40" size="small" show-total></Page>
<Page :total="100" show-sizer :page-size="5" :page-size-opts="[5,10,15,20]"></Page>
<Page :total="1000" show-sizer show-elevator show-total></Page>
<br><br>
<Page :total="1000" show-sizer show-elevator show-total size="small"></Page>
<br><br>
<Page :current="2" :total="50" simple></Page>
</template>
<script>
import { Modal, Button, Message, Page } from 'iview';
import { Page } from 'iview';
export default {
components: { Modal, Button, Page },
props: {
},
data () {
return {
}
},
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
});
}
}
components: { Page }
}
</script>