1
나는 다음과 같은 시도 :vue.js 2에서 제출하는 버튼의 유형 속성을 어떻게 바꿀 수 있습니까?
다음과 같은 오류를 제공<template>
<button @click="checkout" class="btn btn-danger pull-right" :type="typeButton">
Checkout
</button>
</template>
<script>
export default {
methods: {
data() {
return {
typeButton: 'submit'
}
},
checkout(e) {
this.typeButton = 'button'
...
}
},
}
</script>
가 :
[Vue warn]: Property or method "typeButton" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
가 어떻게이 문제를 해결할 수 있습니까?