Vue组件渲染时触发function的方式,如下:
<div class="invoice-image" :data-temp="getFileSuffixName()">...something...</div>
getFileSuffixName() {
const temp = this.$props.invoiceList[this.activeIndex]
console.log('temp.file.raw.type: ', temp.file.raw.type)
return 666
}
阅读全文>>