遇到不懂的记录
<a-select-option @click="showDrawer" :value="auth === 0? item.project_id :item.id" v-for="(item) in prolist" :key="item.id" >
上面这种 :value是动态传值
"auth === 0? item.project_id :item.id" 这个是js的if 表达式(简写)
比如控制按钮是否展示 <a-button type="primary" @click="groupapi(value),onClose()" v-bind:disabled="prolist.length===0? true:false">确定</a-button>
另外一种 写法 https://www.cnblogs.com/kaibindirver/p/12601575.html
tags === '正常' ? 'green' : tags.length > 2 ? 'orange' : 'red' //tags等于正常 那么绿色,不等于正常 再判断长度是否大于2,大于为橙色,小于为红色
const commonHeaders = (token) =>{
const headers = {
Authorization:token || null
}}
|| 为或的意思 当token为空(没有赋值) 那么就赋值null
https://es6.ruanyifeng.com/#docs/function