update Modal & Notice style
This commit is contained in:
parent
21ff0303cb
commit
1d247d2099
3 changed files with 37 additions and 31 deletions
|
@ -1,30 +1,43 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Button type="primary" @click="modal1 = true">Display dialog box</Button>
|
<Button @click="instance('info')">Info</Button>
|
||||||
<Modal
|
<Button @click="instance('success')">Success</Button>
|
||||||
v-model="modal1"
|
<Button @click="instance('warning')">Warning</Button>
|
||||||
title="Common Modal dialog box title"
|
<Button @click="instance('error')">Error</Button>
|
||||||
@on-ok="ok"
|
|
||||||
@on-cancel="cancel">
|
|
||||||
<p>Content of dialog</p>
|
|
||||||
<p>Content of dialog</p>
|
|
||||||
<p>Content of dialog</p>
|
|
||||||
</Modal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
modal1: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
ok () {
|
instance (type) {
|
||||||
this.$Message.info('Clicked ok');
|
const title = 'Title';
|
||||||
},
|
const content = '<p>Content of dialog</p><p>Content of dialog</p>';
|
||||||
cancel () {
|
switch (type) {
|
||||||
this.$Message.info('Clicked cancel');
|
case 'info':
|
||||||
|
this.$Modal.info({
|
||||||
|
title: title,
|
||||||
|
content: content
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'success':
|
||||||
|
this.$Modal.success({
|
||||||
|
title: title,
|
||||||
|
content: content
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'warning':
|
||||||
|
this.$Modal.warning({
|
||||||
|
title: title,
|
||||||
|
content: content
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'error':
|
||||||
|
this.$Modal.error({
|
||||||
|
title: title,
|
||||||
|
content: content
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: -2px;
|
||||||
|
|
||||||
&-info {
|
&-info {
|
||||||
color: @primary-color;
|
color: @primary-color;
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
&-icon {
|
&-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 16px;
|
top: -2px;
|
||||||
font-size: @font-size-large;
|
font-size: @font-size-large;
|
||||||
|
|
||||||
&-success {
|
&-success {
|
||||||
|
@ -107,17 +107,10 @@
|
||||||
}
|
}
|
||||||
&-with-desc &-icon{
|
&-with-desc &-icon{
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
|
top: -6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-custom-content{
|
&-custom-content{
|
||||||
&:after{
|
position: relative;
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
width: 4px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue