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

报错图片

    <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>
阅读 1.9k
2 个回答

<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>

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

推荐问题
logo
Microsoft
子站问答
访问
宣传栏