From 1ba88a00d3c7bb0f16a73feaa5ffcf7c1635e0ea Mon Sep 17 00:00:00 2001 From: Sanakey <714737083@qq.com> Date: 星期五, 02 八月 2024 17:44:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/v2' into onbus-crm --- src/views/demo/form/index.vue | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/views/demo/form/index.vue b/src/views/demo/form/index.vue index 9300af0..ba5687a 100644 --- a/src/views/demo/form/index.vue +++ b/src/views/demo/form/index.vue @@ -57,8 +57,8 @@ </template> <script lang="ts" setup> import { type Recordable } from '@vben/types'; - import { computed, unref, ref } from 'vue'; - import { BasicForm, ApiSelect, FormSchema } from '@/components/Form'; + import { computed, ref, unref } from 'vue'; + import { ApiSelect, BasicForm, FormSchema } from '@/components/Form'; import { CollapseContainer } from '@/components/Container'; import { useMessage } from '@/hooks/web/useMessage'; import { PageWrapper } from '@/components/Page'; @@ -472,7 +472,7 @@ }, }, { - field: 'field32', + field: 'field32-1', label: '涓嬫媺杩滅▼鎼滅储', helpMessage: ['ApiSelect缁勪欢', '灏嗗叧閿瘝鍙戦�佸埌鎺ュ彛杩涜杩滅▼鎼滅储'], required: true, @@ -483,6 +483,35 @@ defaultValue: '0', }, { + field: 'field32-2', + label: '涓嬫媺杩滅▼鎼滅储', + component: 'ApiSelect', + helpMessage: ['ApiSelect缁勪欢', '灏嗗叧閿瘝鍙戦�佸埌鎺ュ彛杩涜杩滅▼鎼滅储'], + componentProps: { + api: optionsListApi, + showSearch: true, + apiSearch: { + show: true, + searchName: 'name', + }, + resultField: 'list', + labelField: 'name', + valueField: 'id', + immediate: true, + onChange: (e, v) => { + console.log('ApiSelect====>:', e, v); + }, + onOptionsChange: (options) => { + console.log('get options', options.length, options); + }, + }, + required: true, + colProps: { + span: 8, + }, + defaultValue: '0', + }, + { field: 'field33', component: 'ApiTreeSelect', label: '杩滅▼涓嬫媺鏍�', -- Gitblit v1.8.0