<el-table
@row-click="handleRowClick"
>
<el-table-column align="center" label="数量" >
<template slot-scope="scope">
<el-input v-if="item.type == 'input'" v-model="scope.row[item.field]" @click.native.stop></el-input>
</template>
</el-table-column>
</el-table>
在Vue.js中,组件内部的事件处理是通过Vue实现的,而原生DOM事件是浏览器提供的。通过使用.native
修饰符,您可以监听到组件内部元素触发的原生DOM事件,从而更灵活地处理事件逻辑。