You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Vue warn]: Error in setup: "TypeError: Cannot read properties of undefined (reading 'length')"
[Vue warn]: Property or method "formattedValue" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> at packages/admin/src/components/ui/inputs/CurrencyInput.vue
My Vue.js version is 2.7.1
My code is here
<template>
<v-text-field
v-bind="commonProps"
:filled="filled"
:value="formattedValue"
ref="inputRef"
@change="changeState"
></v-text-field>
</template>
<script>
import { useCurrencyInput } from 'vue-currency-input'
import { watch } from '@vue/composition-api'
import Input from "../../../mixins/input";
import Editable from "../../../mixins/editable";
export default {
mixins: [Input, Editable],
props: {
/**
* Number to be edited.
* @model
*/
value: {
// type: Number,
default: null,
},
/**
* Use full filled background color style.
*/
filled: {
type: Boolean,
default: true,
},
options: Object,
/**
* Error status for form validation input focus feature
*/
status: {
type: Boolean,
}
},
methods: {
changeState(value) {
this.change(value)
// this.update(value, true) // bunu açınca elle sayı girme çalışmıyor
},
},
setup (props) {
const {
inputRef,
formattedValue,
setValue
} = useCurrencyInput(props.options)
watch(() => props.value, (value) => {
setValue(value)
})
return { inputRef, formattedValue }
}
};
</script>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
[Vue warn]: Error in setup: "TypeError: Cannot read properties of undefined (reading 'length')"
[Vue warn]: Property or method "formattedValue" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> at packages/admin/src/components/ui/inputs/CurrencyInput.vue
My Vue.js version is 2.7.1
My code is here
Beta Was this translation helpful? Give feedback.
All reactions