html:
<template v-slot="scope">
<span
@click="toCabinetList(scope.row)"
:class="
isZeroStart(scope.row.rope_cabinet_num_text) ? '' : 'btn-href'
"
>{{ scope.row.rope_cabinet_num_text }}</span
>
</template>
js:
// 判断首位是否为0
const isZeroStart = value => {
return /^0/.test(value);
};