vue components传值,在组件里页面使用 slot-scope,scope.row,报错?
      <rightColumn        :urlParams="urlParams"
        :equipmentList="equipmentList"
        :pipeDiameterLenghList="pipeDiameterLenghList"
        :unitList="unitList"
        :systemWarningInfo="systemWarningInfo"
        :modelTabsName="rightColumnTabsName"
        :pipeLenghHighDiffList="pipeLenghHighDiffList"
        :equipAttrubute="equipAttrubute"
      ></rightColumn>
vue3的版本我用的vue2写法,我在1个components里传了多个值,在rightColumn页面使用 slot-scope,
报错信息:Property "scope" was accessed during render but is not defined on instance.
很多警告信息:Unhandled error during execution of scheduler flush. This is likely a Vue internals bug.
            <el-table :data="pipeLenghHighDiffList" style="width: 100%">              <!-- 检查项prop="checkItem" -->
              <el-table-column
                :label="`${$t('glsj.checkItem')}`"
              >
                <template slot-scope="scope">
                  <span>{{ scope.row.checkItem }}</span>
                </template>
              </el-table-column>
我尝试只传1个值,使用slot-scope="scope",取值scope.row,也报错。
<rightColumn        :pipeLenghHighDiffList="pipeLenghHighDiffList"
      ></rightColumn>
回答:
Vue 3 还有 slot-scope 这个属性?不是从 Vue 2.6 开始不就已经废弃了吗?只不过还是可以用。
你如果说要在 Vue 3 中用作用域插槽就改用 v-slot 就好了呀。
作用域插槽 - 插槽 Slots | Vue.js
#slot-scope 废弃 | API — Vue.js
以上是 vue components传值,在组件里页面使用 slot-scope,scope.row,报错? 的全部内容, 来源链接: utcz.com/p/935264.html

