适配多商户
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
@update:value="updateValue"
|
||||
:style="`width: 200px`"
|
||||
@blur="onBlur"
|
||||
@change="onChange"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -20,6 +21,7 @@
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:value', value: string, item: any): void;
|
||||
(e: 'done', item: Merchant): void;
|
||||
(e: 'blur'): void;
|
||||
}>();
|
||||
|
||||
@@ -48,11 +50,16 @@
|
||||
emit('blur');
|
||||
};
|
||||
|
||||
const onChange = (item: Merchant) => {
|
||||
emit('done', item);
|
||||
};
|
||||
|
||||
const reload = () => {
|
||||
listMerchant({}).then((list) => {
|
||||
options.value = list.map((d) => {
|
||||
d.label = d.merchantName;
|
||||
d.value = d.merchantCode;
|
||||
d.value = d.merchantId;
|
||||
d.key = d.merchantCode;
|
||||
return d;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user