How to write a ternary expression in the el-switch tag of element?

I think there is a disabled attribute in the el-switch tag only when scope.row.on=" has a certain value". How to add it?

    <el-table-column width="200%" label="" class="switchVal">
        <template slot-scope="scope">
          <el-switch
            @change="changeSwitch(scope.$index, scope.row)"
            v-model="scope.row.on"
            disabled
            active-text=""
            inactive-text="">
            on-color="-sharp00A854"
            on-text=""
            on-value="1"
            off-color="-sharpF04134"
            off-text=""
            off-value="0"
            >
          </el-switch>
        </template>
      </el-table-column>

this has nothing to do with Element. Vue's ide/syntax.html-sharp%E7%89%B9%E6%80%A7" rel=" nofollow noreferrer "> bind

the solution to your problem is as follows: example


: disabled= "scope.row.on=' a value'"

Menu