当前位置: 首页 > 知识库问答 >
问题:

vue.js - Typescript + element-plus中el-table使用scope,类型怎么定义?

慕健
2023-09-18

报错图片

    <el-table-column type="expand" width="0">        <template slot-scope="scope">          <el-form label-position="left" inline class="demo-table-expand">            <sy_dd_process              :processData="scope.row"              :clickId="'0'"              v-if="                scope.row.process_data != undefined &&                scope.row.process_data.length > 0              "            ></sy_dd_process>

共有2个答案

方恺
2023-09-18

以 vue3 文档语法为准吧,slot-scope已经废弃了
v-slot:default="scope" 或者语法糖 #default = scope

钱言
2023-09-18

<el-table-column type="expand" width="0">

    <template #default="scope">      <el-form label-position="left" inline class="demo-table-expand">        <sy_dd_process          :processData="scope.row"          :clickId="'0'"          v-if="            scope.row.process_data != undefined &&            scope.row.process_data.length > 0          "        ></sy_dd_process>
 类似资料: