Browse Source

fix/gui-v2-phonenumber-integrated-vmodel

pull/2925/head
Muhammed Mustafa 2 years ago
parent
commit
30006b93fc
  1. 17
      packages/nc-gui-v2/components/cell/PhoneNumber.vue

17
packages/nc-gui-v2/components/cell/PhoneNumber.vue

@ -1,23 +1,24 @@
<script setup lang="ts"> <script setup lang="ts">
import Text from './Text.vue' import Text from './Text.vue'
import { computed } from '#imports'
interface Props { interface Props {
modelValue: any modelValue: any
} }
const { modelValue: value } = defineProps<Props>() interface Emits {
(event: 'update:modelValue', model: number): void
}
const props = defineProps<Props>()
const emits = defineEmits<Emits>()
const emit = defineEmits(['update:modelValue']) const vModel = useVModel(props, 'modelValue', emits)
const VModal = computed({
get: () => value,
set: (val) => emit('update:modelValue', val),
})
</script> </script>
<template> <template>
<Text v-model="VModal" /> <Text v-model="vModel" />
</template> </template>
<style scoped></style> <style scoped></style>

Loading…
Cancel
Save