VUE
- 
    正确找到VUE的官方文档,肯定不是你搜到的v3.cn.vuejs.org其实此前我也不知道VUE3有新版文档,也是经过老师提醒才知道的。 一般流程 一般情况下,我们可能会通过搜索引擎搜索VUE,如下 这时候我们很自然的点击进入第二个结果,VUE.js官网 进入官网,顶部醒目的说明这是VUE2的文档,要进入VUE3请点击跳转 点击随后跳转至https://v3.cn.vuejs.org/ 如下所示 那么,这是VUE3的最新文档了吗… 
- 
        
        VUE Elements报Elements in iteration expect to have ‘v-bind:key’ directives解决办法如下图所示,编辑器报错,但是前端能正常运行。 VUE中是简单这样示例的,但是实际上应该加上:key 123<div v-for="item in items">{{ item.text }}</div>加上之后,上面的代码变成 12345678910111213141516171819202122<el-table-column prop="financial_money_received" width="120" align="center" sortable label="实收金额"><template #default="scope"><el-popover effect="light" trigger="hover" placement="top" width="auto"><template #default><div v-if="scope.row.temp_financial_money_received ==null">查无记录</div><div v-else-if="scope.row.temp_financial_money_received.length === 0">查无记录</div><div v-else><div v-for="(item,index) in scope.row.temp_financial_money_received" :key="index">{{ item.date }}</div></div></template><template #reference><el-tag>{{ scope.row.financial_money_receivable }}</el-tag></template></el-popover></template></el-table-column>因为的元素中,并没有KEY字段,所以要引用一个索引作为KEY,当然,如果你有KEY,直接以对应KEY即可。 
- 
        
        VUE中,如何用v-if判断为空或者为[]{}情况因为项目调整,原来是layui的,该字段此前并没有使用json数据,所以要么为空,要么为字符串。 升级后,项目使用VUE+element,这个字段也升级成为json数据或者为空的[]。 那么,在列表中,要如何呈现呢? 直接上代码 1234567891011121314151617181920<el-table-column prop="financial_money_received" width="120" align="center" sortable label="实收金额"><template #default="scope"><el-popover effect="light" trigger="hover" placement="top" width="auto"><template #default><div v-if="scope.row.temp_financial_money_received ==null">查无记录</div><div v-else-if="scope.row.temp_financial_money_received.length === 0">查无记录</div><div v-else><div> {{ scope.row.temp_financial_money_received }}</div></div></template><template #reference><el-tag>{{ scope.row.financial_money_receivable }}</el-tag></template></el-popover></template></el-table-column>第一个判断,先判断是否是老数据的null,也就是为空[crayon… 
 
                 
                         
        