feat(web): add legacy user transfer picker

This commit is contained in:
2026-06-17 22:36:33 +08:00
parent f7ac4cd49e
commit ba41a76a70
4 changed files with 776 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import { http } from '../api/http';
import { APPROVAL_COMPLETED_EVENT } from '../amis/approvalActionEvents';
import { registerApprovalAction } from '../amis/registerApprovalAction';
import { registerReplayAction } from '../amis/registerReplayAction';
import { registerUserTransferPicker } from '../amis/registerUserTransferPicker';
import { getProfile } from '../auth/token';
interface AmisRendererProps {
@@ -58,6 +59,11 @@ export function AmisRenderer({ schema }: AmisRendererProps) {
} catch {
// amis-core 未暴露 registerAction 时静默降级(审批抽屉入口不可用,不阻断渲染)
}
try {
registerUserTransferPicker(amisRequire('amis-core')) || registerUserTransferPicker(amisRequire('amis'));
} catch {
// amis-core 未暴露 registerRenderer 时静默降级,schema 会显示未知控件,测试会覆盖该问题。
}
// 自定义 fetcher:复用宿主 axios(已带 Bearer 注入 + 401 跳登录拦截)
const fetcher = (options: AmisFetcherOptions) => {