这段代码是一个 Vue 组件,用于实现一个下架确认框。当满足条件 'scope.row.enable === 0' 时,会显示一个下架确认框,确认框的宽度为 220px,确认按钮文本为 '确定',取消按钮文本为 '取消',标题为 '下架后,将不可以通过 APP 查看此资讯内容,确定继续吗?'。当用户点击确认按钮时,会调用 'handleStatus' 方法处理 'scope.row' 的状态。下架确认框的触发元素是一个带有 '下架' 文本的小型按钮。

代码示例:

<el-popconfirm v-if='scope.row.enable === 0' width='220' confirm-button-text='确定' cancel-button-text='取消'
              title='下架后,将不可以通过APP查看此资讯内容,确定继续吗?' @confirm='handleStatus(scope.row)'>
              <template #reference>
                <el-button type='primary' size='small' link>
                  <span>下架</span>
                </el-button>
              </template>
            </el-popconfirm>
Vue 组件实现下架确认框 - <el-popconfirm> 使用指南

原文地址: https://www.cveoy.top/t/topic/qgQv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录