diff --git a/.github/contributing.md b/.github/contributing.md index f22370f3b..304c51926 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -19,11 +19,9 @@ Project maintainers have the right and responsibility to remove, edit, or reject - Checkout a topic branch from the relevant branch, e.g. main, and merge back against that branch. - If adding a new feature: - - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. - If fixing bug: - - Provide a detailed description of the bug in the PR. Live demo preferred. - It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging. diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index 71133647c..f1ab1016d 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -8,13 +8,7 @@ import type { Component } from 'vue'; import type { BaseFormComponentType } from '@vben/common-ui'; import type { Recordable } from '@vben/types'; -import { - defineAsyncComponent, - defineComponent, - getCurrentInstance, - h, - ref, -} from 'vue'; +import { defineAsyncComponent, defineComponent, h, ref } from 'vue'; import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui'; import { $t } from '@vben/locales'; @@ -85,16 +79,15 @@ const withDefaultPlaceholder = ( $t(`ui.placeholder.${type}`); // 透传组件暴露的方法 const innerRef = ref(); - const publicApi: Recordable = {}; - expose(publicApi); - const instance = getCurrentInstance(); - instance?.proxy?.$nextTick(() => { - for (const key in innerRef.value) { - if (typeof innerRef.value[key] === 'function') { - publicApi[key] = innerRef.value[key]; - } - } - }); + expose( + new Proxy( + {}, + { + get: (_target, key) => innerRef.value?.[key], + has: (_target, key) => key in (innerRef.value || {}), + }, + ), + ); return () => h( component, diff --git a/apps/web-antd/src/api/bpm/definition/index.ts b/apps/web-antd/src/api/bpm/definition/index.ts index befd60650..c7facf6ec 100644 --- a/apps/web-antd/src/api/bpm/definition/index.ts +++ b/apps/web-antd/src/api/bpm/definition/index.ts @@ -7,6 +7,8 @@ export namespace BpmProcessDefinitionApi { export interface ProcessDefinition { id: string; version: number; + name: string; + description: string; deploymentTime: number; suspensionState: number; modelType: number; @@ -15,6 +17,7 @@ export namespace BpmProcessDefinitionApi { bpmnXml?: string; simpleModel?: string; formFields?: string[]; + icon?: string; } } diff --git a/apps/web-antd/src/api/bpm/processInstance/index.ts b/apps/web-antd/src/api/bpm/processInstance/index.ts index 0550b595f..49c623b73 100644 --- a/apps/web-antd/src/api/bpm/processInstance/index.ts +++ b/apps/web-antd/src/api/bpm/processInstance/index.ts @@ -35,7 +35,7 @@ export namespace BpmProcessInstanceApi { candidateStrategy?: BpmCandidateStrategyEnum; candidateUsers?: User[]; endTime?: Date; - id: number; + id: string; name: string; nodeType: BpmNodeTypeEnum; startTime?: Date; diff --git a/apps/web-antd/src/components/form-create/components/use-api-select.tsx b/apps/web-antd/src/components/form-create/components/use-api-select.tsx index 491fdba32..74f33fe0f 100644 --- a/apps/web-antd/src/components/form-create/components/use-api-select.tsx +++ b/apps/web-antd/src/components/form-create/components/use-api-select.tsx @@ -186,6 +186,12 @@ export const useApiSelect = (option: ApiSelectProps) => { }); const buildSelect = () => { + const { + modelValue, + 'onUpdate:modelValue': onUpdateModelValue, + ...restAttrs + } = attrs; + if (props.multiple) { // fix:多写此步是为了解决 multiple 属性问题 return ( @@ -193,7 +199,9 @@ export const useApiSelect = (option: ApiSelectProps) => { class="w-full" loading={loading.value} mode="multiple" - {...attrs} + onUpdate:value={onUpdateModelValue as any} + value={modelValue as any} + {...restAttrs} // TODO: remote 对等实现 // remote={props.remote} {...(props.remote && { remoteMethod })} @@ -212,7 +220,9 @@ export const useApiSelect = (option: ApiSelectProps) => {