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