首先,关于这篇文章的小序我简单阐述一下,主要写一些在平时工作中的疑惑,和看法,或者是比较小巧点的经验和技巧吧,持续的更新,欢迎收藏随时来共同学习吧
*我会在每次的标题上加上相应的日期以便参考回溯 *
笨方法
<a-modal width="900px" v-model="visible" :footer="null">
<center slot="title" v-if="this.noticeType==1"><a-tag color="red">通知</a-tag>{{ noticeTitle }}</center>
<center slot="title" v-if="this.noticeType==2"><a-tag color="red">公告</a-tag>{{ noticeTitle }}</center>
<div v-html="noticeContent"></div>
</a-modal>
进阶方法
<a-modal width="900px" v-model="visible" :footer="null">
<center slot="title"><a-tag color="red">{{ this.noticeType==1?"通知":"公告" }}</a-tag>{{ noticeTitle }}</center>
<!-- <center slot="title" v-if="this.noticeType==2"><a-tag color="red">公告</a-tag>{{ noticeTitle }}</center> -->
<div v-html="noticeContent"></div>
</a-modal>