diff --git a/.github/contributing.md b/.github/contributing.md index f22370f3ba76dc115714269e3f45947e1299f164..304c519266d08b818807feea59c043241eab10e3 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/.vscode/extensions.json b/.vscode/extensions.json index e8dc9ed9bd6dc2c6677086f19c6ec26cb0b25e6e..c67d983e270df8ad38d4c0bcc490692265893fcf 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -21,7 +21,8 @@ // CSS 变量提示 "vunguyentuan.vscode-css-variables", // 在 package.json 中显示 PNPM catalog 的版本 - "antfu.pnpm-catalog-lens" + "antfu.pnpm-catalog-lens", + "augment.vscode-augment" ], "unwantedRecommendations": [ // 和 volar 冲突 diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index 71133647c360530a5de5dd3cc633a5af41ef5f1c..f1ab1016d357a30fb7dc4c803512c0fbcfe8cecd 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/adapter/vxe-table.ts b/apps/web-antd/src/adapter/vxe-table.ts index 2e8fb5bc6328ebe0ed0ac12fc94061def710244c..69f8555035ae08142cd8100dc4e241ad8e806032 100644 --- a/apps/web-antd/src/adapter/vxe-table.ts +++ b/apps/web-antd/src/adapter/vxe-table.ts @@ -13,6 +13,7 @@ import { import { erpCountInputFormatter, erpNumberFormatter, + fenToYuan, formatPast2, isFunction, isString, @@ -343,6 +344,12 @@ setupVbenVxeTable({ return `${erpNumberFormatter(cellValue, digits)}元`; }, }); + + vxeUI.formats.add('formatFenToYuanAmount', { + tableCellFormatMethod({ cellValue }, digits = 2) { + return `${erpNumberFormatter(fenToYuan(cellValue), digits)}元`; + }, + }); }, useVbenForm, }); diff --git a/apps/web-antd/src/api/bpm/definition/index.ts b/apps/web-antd/src/api/bpm/definition/index.ts index befd606502899f1437ca1d40ef9c5051f220edcf..c7facf6ec56dfacd0785f22a95d1085ac4f39d6a 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 0550b595fbcaa8085c5f986df21b48f18aabad6b..49c623b735d3fa811594a095f934819a766485b2 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 491fdba32f6835ffd861ca1e419b90d1558e9e18..74f33fe0f197dcd9c9a93425ef6bc59f101ae484 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) => {