optimize Alert style

optimize Alert style
This commit is contained in:
梁灏 2016-11-02 15:38:37 +08:00
parent 2af5843d96
commit a901da64ed
7 changed files with 48 additions and 4 deletions

View file

@ -36,6 +36,7 @@ li + li {
<li><a v-link="'/slider'">Slider</a></li>
<li><a v-link="'/step'">Step</a></li>
<li><a v-link="'/switch'">Switch</a></li>
<li><a v-link="'/alert'">Alert</a></li>
</ul>
</nav>
<router-view></router-view>

View file

@ -70,6 +70,11 @@ router.map({
component: function (resolve) {
require(['./routers/switch.vue'], resolve);
}
},
'/alert': {
component: function (resolve) {
require(['./routers/alert.vue'], resolve);
}
}
});

37
test/routers/alert.vue Normal file
View file

@ -0,0 +1,37 @@
<template>
<Alert show-icon>消息提示文案</Alert>
<Alert type="success" show-icon>成功提示文案</Alert>
<Alert type="warning" show-icon>警告提示文案</Alert>
<Alert type="error" show-icon>错误提示文案</Alert>
<Alert show-icon>
消息提示文案
<template slot="desc">消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案</template>
</Alert>
<Alert type="success" show-icon>
成功提示文案
<span slot="desc">成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案</span>
</Alert>
<Alert type="warning" show-icon>
警告提示文案
<template slot="desc">
警告的提示描述文案警告的提示描述文案警告的提示描述文案
</template>
</Alert>
<Alert type="error" show-icon>
错误提示文案
<span slot="desc">
自定义错误描述文案
</span>
</Alert>
<Alert show-icon>
自定义图标
<Icon type="ios-lightbulb-outline" slot="icon"></Icon>
<template slot="desc">自定义图标文案自定义图标文案自定义图标文案自定义图标文案自定义图标文案</template>
</Alert>
</template>
<script>
import { Alert, Icon } from 'iview';
export default {
components: { Alert, Icon }
}
</script>