当前位置:网站首页>转正菜鸟前进中的经验(废话)之谈 持续更新中... ...
转正菜鸟前进中的经验(废话)之谈 持续更新中... ...
2022-08-05 05:13:00 【转正开始写博客!】
首先,关于这篇文章的小序我简单阐述一下,主要写一些在平时工作中的疑惑,和看法,或者是比较小巧点的经验和技巧吧,持续的更新,欢迎收藏随时来共同学习吧
*我会在每次的标题上加上相应的日期以便参考回溯 *
笨方法
<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>
总结:在 vue 中可以从标签上或者是插值表达式中,利用三元表达式,动态判断 不重复 的地方需要渲染的东西,这样可以节省很多代码。
边栏推荐
猜你喜欢

Flutter real machine running and simulator running

The mall background management system based on Web design and implementation

The software design experiment four bridge model experiment

怎么更改el-table-column的边框线

2022杭电多校第一场01

Develop a highly fault-tolerant distributed system

【练一下1】糖尿病遗传风险检测挑战赛 【讯飞开放平台】

day10-字符串作业

Multi-threaded query results, add List collection

Error creating bean with name 'configDataContextRefresher' defined in class path resource
随机推荐
学习总结week2_1
HQL语句执行过程
Basic properties of binary tree + oj problem analysis
【Untitled】
DOM及其应用
Distributed systems revisited: there will never be a perfect consistency scheme...
Judgment statement _switch and case
Error creating bean with name 'configDataContextRefresher' defined in class path resource
机器学习(二) —— 机器学习基础
HQL statement execution process
A blog clears the Redis technology stack
1068找到更多的硬币
【过一下6】机器视觉视频 【过一下2被挤掉了】
LeetCode: 1403. Minimum subsequence in non-increasing order [greedy]
数据库 单表查询
1.3 mysql批量插入数据
day6-列表作业
day11-函数作业
Mesos学习
Qt produces 18 frames of Cupid to express his love, is it your Cupid!!!