要判断record.busKey是否包含数字,可以使用正则表达式进行匹配。下面是一个示例代码:

// 判断record.busKey是否包含数字
if (/^\d+$/.test(record.busKey)) {
  // 包含数字的情况
  console.log("record.busKey包含数字");
} else {
  // 不包含数字的情况
  console.log("record.busKey不包含数字");
}

在你的代码中,可以将上述判断逻辑加入到对应的条件判断中:

<span @click.stop="jumpEdit3([record.id])" v-if="editEnable && !(record.busKey) && !(/^\d+$/.test(record.busKey))">编辑</span>

以上代码中,!(record.busKey)表示record.busKey不存在或为空,/^\d+$/.test(record.busKey)表示record.busKey包含数字。当editEnable为真且record.busKey不存在或为空且不包含数字时,显示"编辑"按钮

判定这里面的recordbusKey包含数字 请写出详细代码 span slot=action slot-scope= text record class=actionIcons span clickstop=jumpEdit3recordid v-if=editEnable&&!recordbusKey编辑span

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

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