//vue 变量写进style
<div :style="{'color':bgColor}">
<div class="top-bg" ref="bg" :style="{'backgroundImage': 'url(' + top_pic_url + ')','color':bgColor}" >
//vue 变量写进url中
<div :style="{'backgroundImage': 'url(' + body_pic_url + ')'}" >
<div :style="{backgroundImage: `url(${actInfo.actPic})`}">
//vue 三目判断写style
<div class="title" :style="{'fontSize': name.length > 16 ? '.5rem' : '.6rem','lineHeight': name.length > 16 ? '.8rem' : '1.6rem','color':bgColor}">
//vue动态绑定class
<span :class="[changeOnOff?'jiaoUp':'jiaoUpActive']" >
//vue 动态拼接class
<span :class="`amo-status-${pageInfo.orderStatus}`">
//拼接写法
url: API.manageApi + `/strategy/${id}/update-strategy`
showTotal: total => `共 ${total} 条记录 第${this.state.current}/${Math.ceil(total / 10)}页`
//扩展运算符
this.results = [...this.results, ...data.list];//将data.list 追加到results
网友评论