fix: return value as string not object
This commit is contained in:
parent
9148163485
commit
929c0e4ee8
@ -16,7 +16,7 @@
|
||||
<script setup>
|
||||
import { call } from 'frappe-ui'
|
||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
||||
import { defineModel, useAttrs, computed } from 'vue'
|
||||
import { useAttrs, computed } from 'vue'
|
||||
import { computedAsync } from '@vueuse/core'
|
||||
|
||||
const props = defineProps({
|
||||
@ -24,11 +24,21 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
|
||||
const value = defineModel()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const attrs = useAttrs()
|
||||
|
||||
const value = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val?.value),
|
||||
})
|
||||
|
||||
const options = computedAsync(async () => {
|
||||
let options = await call('frappe.desk.search.search_link', {
|
||||
txt: '',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user