fix bug for +/-
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { search } from '@/js/helper';
|
||||
import type { CachedSelectedAppData } from '@/types/model';
|
||||
import type { KucEvent } from '@/types/my-kintone';
|
||||
import type { DropdownItem } from 'kintone-ui-component';
|
||||
@@ -17,6 +18,8 @@ import { defineProps, defineEmits, type Ref, watch, ref } from 'vue';
|
||||
const props = defineProps<{
|
||||
items: Ref<DropdownItem[]>;
|
||||
modelValue: string;
|
||||
dataList: any[];
|
||||
id: string;
|
||||
selectedAppData: CachedSelectedAppData;
|
||||
}>();
|
||||
|
||||
@@ -33,11 +36,16 @@ watch(
|
||||
},
|
||||
);
|
||||
|
||||
type EmitData = {
|
||||
obj?: any;
|
||||
value: string;
|
||||
};
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: string): void;
|
||||
(e: 'update:modelValue', data: EmitData): void;
|
||||
}>();
|
||||
|
||||
const updateValue = (event: KucEvent) => {
|
||||
emit('update:modelValue', event.detail.value);
|
||||
emit('update:modelValue', { obj: search(props.dataList, props.id), value: event.detail.value });
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user