This commit is contained in:
Warunee Tamkoo 2023-08-18 14:29:09 +07:00
parent 0f6f04853c
commit cf75412206

View file

@ -2,20 +2,19 @@
<input ref="inputRef" type="text" /> <input ref="inputRef" type="text" />
</template> </template>
<script setup lang="ts"> <script>
import { ref, watch } from "vue";
import { useCurrencyInput } from "vue-currency-input"; import { useCurrencyInput } from "vue-currency-input";
const props = defineProps({ export default {
modelValue: Number, // Vue 2: value name: "CurrencyInput",
options: Object, props: {
}); modelValue: Number,
options: Object,
},
setup(props) {
const { inputRef } = useCurrencyInput(props.options);
const inputRef = ref<any>(); return { inputRef };
},
watch(props, (count, prevCount) => { };
console.log(" 1222", props); </script>
if (props.options != null) inputRef.value = useCurrencyInput(props.options);
});
</script>