반응형
Vue Js 단락이 -> OK로 표시되지만 체크박스가 작동하지 않음
POST API의 3번째 버전입니다.
api에 됩니다.
하면:
// 2 {{answer1}} // 표시 2
// 1 {{answer2}} // 1 ★★
// 3 03} : // 0 표 {{
하지만 처음 시작할 때는 체크박스가 작동하지 않지만 문서를 저장했다가 다시 저장하면 해당 체크박스가 작동합니다.
<el-checkbox v-model="...." :disabled="answer1 > 0 ?'false':'true'" ></el-checkbox>
my mounted call api :
async mounted(){
await this.actionSetanswer1({
props1: '..',
props2: '..',
}).then(() => {
this.actionSetanswer2({
props1: '...',
props2: '...',
}).then(() => {
this.actionSetanswer3({
props1: '...',
props2: '...',
})
})
})
}
NB: 이것을 미리 감사드립니다.$forceUpdate()도 동작하지 않습니다.
로드 상태를 추가할 수 있습니다.
// script
data() {
return {
isLoading: true
}
},
mounted() {
// ...
.then(() => {
this.actionSetanswer3({
props1: '...',
props2: '...',
}).then(() => {
this.isLoading = false
})
}
// template
<el-checkbox v-if="!isLoading" v-model="...." :disabled="answer1 > 0 ?'false':'true'" />
언급URL : https://stackoverflow.com/questions/68951335/vue-js-paragraph-display-ok-but-checkbox-doesnt-works
반응형
'programing' 카테고리의 다른 글
긴 요소 목록에서 작은 변경 하나에 대해 렌더링 시간을 단축할 수 있는 방법이 있습니까? (0) | 2022.06.22 |
---|---|
Vue는 vue 1에서 vue 2로의 이행을 필터링합니다. (0) | 2022.06.22 |
vue.js 2 앱에서 커스텀 데코레이터를 글로벌하게 사용하려면 어떻게 해야 합니까? (0) | 2022.06.22 |
C 매크로 값에서 char 문자열을 만드는 방법 (0) | 2022.06.22 |
예외 코드 "EXC_I386_GPFLT"의 의미는 무엇입니까? (0) | 2022.06.22 |