我寫了以下代碼:<template v-slot="scope"> <div :class="getFuncationBarClass(scope)" :style="'{ --progress: `${getFunctionPercentage(scope)}` }'">{{getFuncationTotals(scope)}}</div></template>由于某種原因getFuncationBarClass,getFuncationTotals被調用但getFunctionPercentage未被調用。我嘗試了其他一些變體,:style但都沒有用。如何從樣式綁定中調用方法?
如何使用 Vue 從樣式綁定調用方法?
慕工程0101907
2022-12-22 12:47:07