currency
This commit is contained in:
parent
0f6f04853c
commit
cf75412206
1 changed files with 13 additions and 14 deletions
|
|
@ -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>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue