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
子站问答
访问
宣传栏