cx-chat 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cx-chat.css +1 -0
- package/dist/cx-chat.es.js +97326 -0
- package/dist/cx-chat.umd.js +734 -0
- package/package.json +21 -1
- package/.cursor/rules/i18n-cn-gloss-comments.mdc +0 -31
- package/.cursor/rules/list-page-view-pageconfig.mdc +0 -32
- package/.cursor/rules/no-over-defensive-programming.mdc +0 -90
- package/.cursor/rules/requirement-description-for-agent.mdc +0 -33
- package/.cursor/rules/use-showToast-not-antd-message.mdc +0 -28
- package/.docker/Dockerfile +0 -7
- package/.env +0 -9
- package/.env.development +0 -7
- package/.env.production +0 -7
- package/.gitlab-ci/docker-build.yaml +0 -28
- package/.gitlab-ci/k8s-deploy-dev-master.yaml +0 -42
- package/.gitlab-ci/npm-build.yaml +0 -17
- package/.gitlab-ci.yml +0 -8
- package/.k8s/0-namespace.yaml +0 -6
- package/.k8s/1-configmap-web.yaml +0 -7
- package/.k8s/1-nginx-conf-dev.yaml +0 -110
- package/.k8s/2-deployment.yaml +0 -27
- package/.k8s/3-service.yaml +0 -16
- package/.k8s/4-ingress-dev.yaml +0 -30
- package/.lingma/rules/use-showToast-not-antd-message.md +0 -34
- package/.nginx/nginx.conf +0 -52
- package/.prettierrc +0 -9
- package/eslint.config.js +0 -32
- package/index.html +0 -13
- package/postcss.config.js +0 -6
- package/src/App.tsx +0 -96
- package/src/_doc/0.docs-overview.md +0 -28
- package/src/_doc/cx-ui/0.docs-overview.md +0 -30
- package/src/_doc/cx-ui/comp.1.cx-ui-overview.md +0 -82
- package/src/_doc/cx-ui/comp.2.cx-modal.md +0 -82
- package/src/_doc/cx-ui/comp.3.cx-button.md +0 -89
- package/src/_doc/cx-ui/comp.4.cx-form.md +0 -72
- package/src/_doc/cx-ui/comp.5.cx-fields.md +0 -76
- package/src/_doc/cx-ui/comp.6.cx-tag.md +0 -57
- package/src/_doc/cx-ui/comp.7.cx-empty-state.md +0 -29
- package/src/_doc/meta/0.docs-overview.md +0 -24
- package/src/_doc/meta/comp.1.enum-runtime.md +0 -33
- package/src/_doc/meta/comp.2.dict-runtime.md +0 -39
- package/src/_doc/router/0.docs-overview.md +0 -14
- package/src/_doc/router/guide.1.menu-component-config.md +0 -181
- package/src/_doc/router/guide.2.router-auto-registration.md +0 -114
- package/src/_doc/table-view/0.docs-overview.md +0 -30
- package/src/_doc/table-view/comp.1.table-view.md +0 -542
- package/src/_doc/table-view/props.1.create-table-view-config.md +0 -193
- package/src/_doc/table-view/props.2.table-view-search-fields.md +0 -106
- package/src/api/_mock/README.md +0 -340
- package/src/api/_mock/api.ts +0 -1642
- package/src/api/_mock/bundle-shim.ts +0 -16
- package/src/api/_mock/handler-shim.ts +0 -6
- package/src/api/_mock/handler.ts +0 -458
- package/src/api/_mock/index.ts +0 -711
- package/src/api/_mock/interceptor.ts +0 -15
- package/src/api/_mock/mod.ts +0 -12
- package/src/api/_mock/utils.ts +0 -65
- package/src/api/base/memory.js +0 -24
- package/src/api/chat.js +0 -210
- package/src/api/common/auth.js +0 -70
- package/src/api/menus/business-rules.js +0 -76
- package/src/api/menus/feedback.js +0 -102
- package/src/api/menus/knowledge.js +0 -159
- package/src/api/menus/model-metadata/manage.js +0 -70
- package/src/api/menus/model-metadata/role.js +0 -50
- package/src/api/menus/model-metadata/training-detail-mock-data.js +0 -569
- package/src/api/menus/model-metadata/training.js +0 -28
- package/src/api/menus/skill.js +0 -40
- package/src/api/system/agent-config.js +0 -16
- package/src/api/system/department.js +0 -94
- package/src/api/system/dict.js +0 -86
- package/src/api/system/menu.js +0 -37
- package/src/api/system/permission.js +0 -26
- package/src/api/system/role.js +0 -34
- package/src/api/system/sys-config.js +0 -16
- package/src/api/system/sys-log.js +0 -17
- package/src/api/system/user.js +0 -75
- package/src/api/upload.js +0 -39
- package/src/assets/react.svg +0 -1
- package/src/components/auth/current-user-avatar.tsx +0 -77
- package/src/components/common/code-view.tsx +0 -149
- package/src/components/common/detail-link.tsx +0 -67
- package/src/components/common/error-boundary.tsx +0 -98
- package/src/components/common/language-switcher.tsx +0 -91
- package/src/components/common/lite-table/index.tsx +0 -135
- package/src/components/common/md-editor.tsx +0 -126
- package/src/components/common/modal/confirm-dialog.tsx +0 -113
- package/src/components/common/modal/dep-user-select-multi.tsx +0 -324
- package/src/components/common/modal/dep-user-select.tsx +0 -249
- package/src/components/common/modal/user-select-multi.tsx +0 -266
- package/src/components/common/pagination.tsx +0 -472
- package/src/components/common/path.tsx +0 -175
- package/src/components/common/system-logo-mark.tsx +0 -48
- package/src/components/cx-ui/button/index.less +0 -208
- package/src/components/cx-ui/button/index.tsx +0 -611
- package/src/components/cx-ui/checkbox/index.tsx +0 -78
- package/src/components/cx-ui/date-picker/index.less +0 -17
- package/src/components/cx-ui/date-picker/index.tsx +0 -193
- package/src/components/cx-ui/drawer/index.tsx +0 -47
- package/src/components/cx-ui/empty-state/index.tsx +0 -20
- package/src/components/cx-ui/floating-shell/CxFloatingShell.tsx +0 -89
- package/src/components/cx-ui/floating-shell/cx-floating-shell.less +0 -283
- package/src/components/cx-ui/floating-shell/has-floating-value.ts +0 -41
- package/src/components/cx-ui/form/CxForm.tsx +0 -15
- package/src/components/cx-ui/form/index.tsx +0 -20
- package/src/components/cx-ui/form-item/index.less +0 -26
- package/src/components/cx-ui/form-item/index.tsx +0 -36
- package/src/components/cx-ui/index.ts +0 -70
- package/src/components/cx-ui/input/auto-complete.tsx +0 -134
- package/src/components/cx-ui/input/index.tsx +0 -259
- package/src/components/cx-ui/input-number/index.jsx +0 -66
- package/src/components/cx-ui/modal/index.jsx +0 -212
- package/src/components/cx-ui/modal/index.less +0 -144
- package/src/components/cx-ui/modal/useCxModal.ts +0 -125
- package/src/components/cx-ui/multi-select/index.jsx +0 -74
- package/src/components/cx-ui/multi-select/index.less +0 -40
- package/src/components/cx-ui/multi-select/index2.tsx +0 -361
- package/src/components/cx-ui/radio/index.tsx +0 -33
- package/src/components/cx-ui/range-picker/index.less +0 -65
- package/src/components/cx-ui/range-picker/index.tsx +0 -219
- package/src/components/cx-ui/select/index.less +0 -34
- package/src/components/cx-ui/select/index.tsx +0 -196
- package/src/components/cx-ui/skeleton/index.tsx +0 -12
- package/src/components/cx-ui/steps/index.tsx +0 -14
- package/src/components/cx-ui/styles/_tokens.less +0 -79
- package/src/components/cx-ui/styles/index.less +0 -246
- package/src/components/cx-ui/switch/index.less +0 -106
- package/src/components/cx-ui/switch/index.tsx +0 -120
- package/src/components/cx-ui/table/index.less +0 -160
- package/src/components/cx-ui/table/index.tsx +0 -152
- package/src/components/cx-ui/tabs/index.less +0 -15
- package/src/components/cx-ui/tabs/index.tsx +0 -34
- package/src/components/cx-ui/tag/index.less +0 -51
- package/src/components/cx-ui/tag/index.tsx +0 -140
- package/src/components/cx-ui/timeline/index.tsx +0 -14
- package/src/components/cx-ui/tooltip/index.tsx +0 -67
- package/src/components/cx-ui/tree/index.tsx +0 -193
- package/src/components/cx-ui/tree-select/index.jsx +0 -91
- package/src/components/cx-ui/tree-select/index.less +0 -27
- package/src/components/cx-ui/upload-file/index.less +0 -223
- package/src/components/cx-ui/upload-file/index.tsx +0 -640
- package/src/components/cx-ui/upload-img/index.tsx +0 -291
- package/src/components/layout/components/Header.tsx +0 -216
- package/src/components/layout/components/Sidebar.tsx +0 -717
- package/src/components/layout/index.tsx +0 -95
- package/src/components/table-view/components/search-area.tsx +0 -411
- package/src/components/table-view/components/table-view-config.tsx +0 -528
- package/src/components/table-view/components/table-view.types.ts +0 -478
- package/src/components/table-view/components/tree-api-normalize.ts +0 -38
- package/src/components/table-view/components/tree-data-annotate.ts +0 -31
- package/src/components/table-view/components/tree-sidebar.tsx +0 -74
- package/src/components/table-view/index.tsx +0 -61
- package/src/components/table-view/list-page-view.tsx +0 -1049
- package/src/components/table-view/select-table-view.tsx +0 -1094
- package/src/components/table-view/styles/select-table-view.less +0 -51
- package/src/config/default-system-name.ts +0 -9
- package/src/config/system.ts +0 -165
- package/src/constants/countryCodes.ts +0 -3
- package/src/contexts/AuthContext.tsx +0 -256
- package/src/contexts/ChatContext.tsx +0 -839
- package/src/contexts/MenuContext.tsx +0 -62
- package/src/contexts/ToastContext.tsx +0 -181
- package/src/hooks/useCopyToClipboard.ts +0 -47
- package/src/hooks/useModalSubmit.ts +0 -104
- package/src/hooks/useRouter.ts +0 -240
- package/src/hooks/useStepForm.ts +0 -46
- package/src/hooks/useStickyHeader.ts +0 -42
- package/src/hooks/useThreadActions.ts +0 -105
- package/src/hooks/useUserPreferences.ts +0 -101
- package/src/http/axios.js +0 -372
- package/src/http/mock.interceptor.ts +0 -9
- package/src/http/obfuscationKey.ts +0 -41
- package/src/i18n.ts +0 -60
- package/src/index.js +0 -1
- package/src/index.less +0 -169
- package/src/locales/en/auth.ts +0 -70
- package/src/locales/en/base/memory.ts +0 -28
- package/src/locales/en/base/settings.ts +0 -41
- package/src/locales/en/chat.ts +0 -40
- package/src/locales/en/common.ts +0 -173
- package/src/locales/en/enum.ts +0 -27
- package/src/locales/en/menus/business-rules.ts +0 -48
- package/src/locales/en/menus/feedback.ts +0 -62
- package/src/locales/en/menus/knowledge.ts +0 -120
- package/src/locales/en/menus/model-metadata/index.ts +0 -10
- package/src/locales/en/menus/model-metadata/manage.ts +0 -151
- package/src/locales/en/menus/model-metadata/role.ts +0 -48
- package/src/locales/en/menus/model-metadata/training.ts +0 -65
- package/src/locales/en/menus/skill.ts +0 -34
- package/src/locales/en/system/agent-config.ts +0 -34
- package/src/locales/en/system/department.ts +0 -68
- package/src/locales/en/system/dict.ts +0 -44
- package/src/locales/en/system/menu.ts +0 -45
- package/src/locales/en/system/permission.ts +0 -89
- package/src/locales/en/system/role.ts +0 -25
- package/src/locales/en/system/sys-config.ts +0 -33
- package/src/locales/en/system/sys-log.ts +0 -38
- package/src/locales/en/system/user.ts +0 -113
- package/src/locales/en.ts +0 -68
- package/src/locales/zh/auth.ts +0 -70
- package/src/locales/zh/base/memory.ts +0 -29
- package/src/locales/zh/base/settings.ts +0 -41
- package/src/locales/zh/chat.ts +0 -47
- package/src/locales/zh/common.ts +0 -178
- package/src/locales/zh/enum.ts +0 -28
- package/src/locales/zh/menus/business-rules.ts +0 -47
- package/src/locales/zh/menus/feedback.ts +0 -62
- package/src/locales/zh/menus/knowledge.ts +0 -117
- package/src/locales/zh/menus/model-metadata/index.ts +0 -10
- package/src/locales/zh/menus/model-metadata/manage.ts +0 -151
- package/src/locales/zh/menus/model-metadata/role.ts +0 -47
- package/src/locales/zh/menus/model-metadata/training.ts +0 -64
- package/src/locales/zh/menus/skill.ts +0 -34
- package/src/locales/zh/system/agent-config.ts +0 -33
- package/src/locales/zh/system/department.ts +0 -69
- package/src/locales/zh/system/dict.ts +0 -44
- package/src/locales/zh/system/menu.ts +0 -47
- package/src/locales/zh/system/permission.ts +0 -94
- package/src/locales/zh/system/role.ts +0 -25
- package/src/locales/zh/system/sys-config.ts +0 -32
- package/src/locales/zh/system/sys-log.ts +0 -38
- package/src/locales/zh/system/user.ts +0 -114
- package/src/locales/zh.ts +0 -67
- package/src/main.tsx +0 -50
- package/src/meta/const/index.ts +0 -40
- package/src/meta/index-dict.ts +0 -56
- package/src/meta/index-enum.ts +0 -95
- package/src/meta/index.ts +0 -14
- package/src/meta/module/dict-data/runtime.ts +0 -199
- package/src/meta/module/dict-data/types.ts +0 -17
- package/src/meta/module/enum-data/runtime.ts +0 -75
- package/src/meta/module/enum-data/types.ts +0 -18
- package/src/router/index.tsx +0 -312
- package/src/styles/AntdThemeProvider.tsx +0 -40
- package/src/styles/antd-theme.ts +0 -20
- package/src/styles/global.less +0 -107
- package/src/styles/variable.less +0 -103
- package/src/types/feedback.ts +0 -43
- package/src/types/index.ts +0 -85
- package/src/types/menu.ts +0 -43
- package/src/utils/aesUtil.ts +0 -123
- package/src/utils/chatUtils.ts +0 -524
- package/src/utils/cn.ts +0 -6
- package/src/utils/crypto.ts +0 -164
- package/src/utils/date.ts +0 -72
- package/src/utils/file-icons.tsx +0 -79
- package/src/utils/index.ts +0 -168
- package/src/utils/markdown-math-plugins.ts +0 -21
- package/src/utils/menuI18n.ts +0 -305
- package/src/utils/menuRouteRegistry.ts +0 -78
- package/src/utils/permission-crud.ts +0 -147
- package/src/utils/routeConfig.ts +0 -350
- package/src/utils/storage.ts +0 -135
- package/src/utils/toastBridge.ts +0 -26
- package/src/utils/url.ts +0 -38
- package/src/utils/validation.ts +0 -16
- package/src/views/auth/auth-code/index.less +0 -169
- package/src/views/auth/auth-code/index.module.less +0 -174
- package/src/views/auth/auth-code/index.tsx +0 -233
- package/src/views/auth/login.tsx +0 -498
- package/src/views/auth/register.tsx +0 -388
- package/src/views/base/memory/index.tsx +0 -136
- package/src/views/base/memory/modal/detail-modal.tsx +0 -89
- package/src/views/base/memory/modal/submit-modal.tsx +0 -134
- package/src/views/base/settings/index.tsx +0 -657
- package/src/views/chat/chat.less +0 -323
- package/src/views/chat/components/chat-input.tsx +0 -298
- package/src/views/chat/components/header-thread-title.tsx +0 -210
- package/src/views/chat/components/message-list/content-answer.tsx +0 -100
- package/src/views/chat/components/message-list/content-question.tsx +0 -18
- package/src/views/chat/components/message-list/index.tsx +0 -520
- package/src/views/chat/components/message-list/message-item.tsx +0 -199
- package/src/views/chat/components/message-list/preparation-demo-items.ts +0 -147
- package/src/views/chat/components/message-list/preparation-steps.tsx +0 -506
- package/src/views/chat/components/message-list/suggestion-list.tsx +0 -36
- package/src/views/chat/components/message-list/thinking-process.tsx +0 -49
- package/src/views/chat/components/message-list/toolbar.tsx +0 -224
- package/src/views/chat/components/message-list/use-message-list-scroll.ts +0 -214
- package/src/views/chat/components/references-knowledge/context.tsx +0 -57
- package/src/views/chat/components/references-knowledge/index.ts +0 -9
- package/src/views/chat/components/references-knowledge/modal/knowledge-detail-drawer.tsx +0 -556
- package/src/views/chat/components/references-knowledge/modal/knowledge-doc-detail-drawer.tsx +0 -529
- package/src/views/chat/components/references-knowledge/panel.tsx +0 -115
- package/src/views/chat/hooks/use-chat-common.ts +0 -19
- package/src/views/chat/index-session.tsx +0 -647
- package/src/views/chat/index.tsx +0 -127
- package/src/views/page-error/401.tsx +0 -56
- package/src/views/page-error/404.tsx +0 -56
- package/src/views/page-menus/business-rules/index.tsx +0 -376
- package/src/views/page-menus/business-rules/modal/detail-modal.tsx +0 -186
- package/src/views/page-menus/business-rules/modal/scope-modal.tsx +0 -272
- package/src/views/page-menus/business-rules/modal/submit-modal.tsx +0 -142
- package/src/views/page-menus/feedback/components/feedback-dataset-list.tsx +0 -471
- package/src/views/page-menus/feedback/index.tsx +0 -166
- package/src/views/page-menus/feedback/modal/export-feedback-modal.tsx +0 -367
- package/src/views/page-menus/knowledge/components/doc-editor-by-type.tsx +0 -32
- package/src/views/page-menus/knowledge/components/doc-editor-type-file.tsx +0 -330
- package/src/views/page-menus/knowledge/detail.tsx +0 -600
- package/src/views/page-menus/knowledge/index.tsx +0 -337
- package/src/views/page-menus/knowledge/modal/detail-modal.tsx +0 -618
- package/src/views/page-menus/knowledge/modal/doc-detail-modal.tsx +0 -550
- package/src/views/page-menus/knowledge/modal/doc-parse.ts +0 -99
- package/src/views/page-menus/knowledge/modal/doc-submit-modal.tsx +0 -349
- package/src/views/page-menus/knowledge/modal/doc-type-picker-modal.tsx +0 -88
- package/src/views/page-menus/knowledge/modal/knowledge-user-select-modal.tsx +0 -283
- package/src/views/page-menus/knowledge/modal/submit-modal.tsx +0 -179
- package/src/views/page-menus/model-metadata/manage/components/metadata-detail-schema-tab.tsx +0 -114
- package/src/views/page-menus/model-metadata/manage/components/step1-basic-info.tsx +0 -232
- package/src/views/page-menus/model-metadata/manage/components/step2-schema.tsx +0 -316
- package/src/views/page-menus/model-metadata/manage/components/step3-permissions.tsx +0 -134
- package/src/views/page-menus/model-metadata/manage/components/step4-documents.tsx +0 -134
- package/src/views/page-menus/model-metadata/manage/components/step5-example-sql.tsx +0 -101
- package/src/views/page-menus/model-metadata/manage/components/submit-add.tsx +0 -338
- package/src/views/page-menus/model-metadata/manage/components/submit-edit.tsx +0 -276
- package/src/views/page-menus/model-metadata/manage/detail.tsx +0 -298
- package/src/views/page-menus/model-metadata/manage/hooks/model-metadata-submit-shared.ts +0 -113
- package/src/views/page-menus/model-metadata/manage/hooks/use-model-metadata-item-state.ts +0 -20
- package/src/views/page-menus/model-metadata/manage/index.tsx +0 -304
- package/src/views/page-menus/model-metadata/manage/modal/components/table-schema.ts +0 -374
- package/src/views/page-menus/model-metadata/manage/modal/components/use-table-detail-tabs.tsx +0 -151
- package/src/views/page-menus/model-metadata/manage/modal/components/use-table-submit-tabs.tsx +0 -423
- package/src/views/page-menus/model-metadata/manage/modal/detail-modal.tsx +0 -218
- package/src/views/page-menus/model-metadata/manage/modal/submit-modal.tsx +0 -261
- package/src/views/page-menus/model-metadata/manage/modal/table-detail-modal.tsx +0 -196
- package/src/views/page-menus/model-metadata/manage/modal/table-submit-modal.tsx +0 -229
- package/src/views/page-menus/model-metadata/manage/submit.tsx +0 -31
- package/src/views/page-menus/model-metadata/role/index.tsx +0 -207
- package/src/views/page-menus/model-metadata/role/modal/detail-modal.tsx +0 -97
- package/src/views/page-menus/model-metadata/role/modal/role-assign-users-modal.tsx +0 -254
- package/src/views/page-menus/model-metadata/role/modal/role-assign-users-panel.tsx +0 -393
- package/src/views/page-menus/model-metadata/role/modal/role-assign-users-utils.ts +0 -120
- package/src/views/page-menus/model-metadata/role/modal/role-permission-assign-panel.tsx +0 -698
- package/src/views/page-menus/model-metadata/role/modal/role-permission-modal.tsx +0 -237
- package/src/views/page-menus/model-metadata/role/modal/submit-modal.tsx +0 -135
- package/src/views/page-menus/model-metadata/training/components/detail-records/index.ts +0 -4
- package/src/views/page-menus/model-metadata/training/components/detail-records/node-card.tsx +0 -72
- package/src/views/page-menus/model-metadata/training/components/detail-records/summary-lines.ts +0 -196
- package/src/views/page-menus/model-metadata/training/components/detail-records/summary-list.tsx +0 -153
- package/src/views/page-menus/model-metadata/training/components/detail-records/timeline.tsx +0 -103
- package/src/views/page-menus/model-metadata/training/components/detail-records/types.ts +0 -82
- package/src/views/page-menus/model-metadata/training/detail.tsx +0 -159
- package/src/views/page-menus/model-metadata/training/index.tsx +0 -236
- package/src/views/page-menus/model-metadata/training/modal/update-detail-modal.tsx +0 -154
- package/src/views/page-menus/skill/index.tsx +0 -201
- package/src/views/page-menus/skill/modal/detail-modal.tsx +0 -156
- package/src/views/page-menus/skill/modal/submit-modal.tsx +0 -214
- package/src/views/page-system/agent-config/index.tsx +0 -370
- package/src/views/page-system/department/departmentFormShared.ts +0 -36
- package/src/views/page-system/department/index.tsx +0 -541
- package/src/views/page-system/department/modal/detail-modal.tsx +0 -94
- package/src/views/page-system/department/modal/member-role-modal.tsx +0 -128
- package/src/views/page-system/department/modal/submit-modal.tsx +0 -265
- package/src/views/page-system/dict/index.tsx +0 -440
- package/src/views/page-system/dict/modal/cate-submit-modal.tsx +0 -315
- package/src/views/page-system/dict/modal/submit-modal.tsx +0 -184
- package/src/views/page-system/logs/components/index.ts +0 -3
- package/src/views/page-system/logs/components/log-message-demo.tsx +0 -30
- package/src/views/page-system/logs/components/log-message-stream.ts +0 -184
- package/src/views/page-system/logs/components/message-list/content-answer.tsx +0 -100
- package/src/views/page-system/logs/components/message-list/content-question.tsx +0 -18
- package/src/views/page-system/logs/components/message-list/index.tsx +0 -515
- package/src/views/page-system/logs/components/message-list/message-item.tsx +0 -193
- package/src/views/page-system/logs/components/message-list/preparation-demo-items.ts +0 -147
- package/src/views/page-system/logs/components/message-list/preparation-steps.tsx +0 -506
- package/src/views/page-system/logs/components/message-list/suggestion-list.tsx +0 -36
- package/src/views/page-system/logs/components/message-list/thinking-process.tsx +0 -49
- package/src/views/page-system/logs/components/message-list/toolbar.tsx +0 -134
- package/src/views/page-system/logs/components/message-list/use-message-list-scroll.ts +0 -214
- package/src/views/page-system/logs/components/message-modal.tsx +0 -239
- package/src/views/page-system/logs/index.tsx +0 -132
- package/src/views/page-system/logs/modal/detail-modal.tsx +0 -157
- package/src/views/page-system/menu/components/menuFormShared.ts +0 -283
- package/src/views/page-system/menu/index.less +0 -12
- package/src/views/page-system/menu/index.tsx +0 -410
- package/src/views/page-system/menu/modal/icon-modal.less +0 -51
- package/src/views/page-system/menu/modal/icon-modal.tsx +0 -87
- package/src/views/page-system/menu/modal/submit-modal.tsx +0 -263
- package/src/views/page-system/permission/index.tsx +0 -562
- package/src/views/page-system/permission/modal/detail-modal.tsx +0 -179
- package/src/views/page-system/permission/modal/submit-modal.less +0 -146
- package/src/views/page-system/permission/modal/submit-modal.tsx +0 -650
- package/src/views/page-system/role/index.tsx +0 -163
- package/src/views/page-system/role/modal/detail-modal.tsx +0 -127
- package/src/views/page-system/role/modal/permission-assign-group-rules.ts +0 -86
- package/src/views/page-system/role/modal/permission-modal.tsx +0 -111
- package/src/views/page-system/role/modal/role-modal-shell-styles.ts +0 -21
- package/src/views/page-system/role/modal/role-permission-assign-panel.tsx +0 -916
- package/src/views/page-system/role/modal/role-permission-assign-shared.ts +0 -1047
- package/src/views/page-system/role/modal/submit-modal.tsx +0 -193
- package/src/views/page-system/sys-config/index.tsx +0 -294
- package/src/views/page-system/user/components/user-role-column.tsx +0 -87
- package/src/views/page-system/user/index.tsx +0 -439
- package/src/views/page-system/user/modal/assign-roles-modal.tsx +0 -389
- package/src/views/page-system/user/modal/detail-modal.tsx +0 -72
- package/src/views/page-system/user/modal/modal-style/submit-modal.less +0 -40
- package/src/views/page-system/user/modal/submit-modal.less +0 -40
- package/src/views/page-system/user/modal/submit-modal.tsx +0 -287
- package/src/views/page-system/user/userFormShared.ts +0 -51
- package/tailwind.config.js +0 -17
- package/tsconfig.app.json +0 -48
- package/tsconfig.json +0 -11
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -264
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Tooltip, type TooltipProps } from 'antd'
|
|
2
|
-
import clsx from 'clsx'
|
|
3
|
-
import type { CSSProperties, ReactNode } from 'react'
|
|
4
|
-
|
|
5
|
-
type LooseTooltipStyles = Record<string, CSSProperties | undefined>
|
|
6
|
-
type LooseTooltipClassNames = Record<string, string | undefined>
|
|
7
|
-
|
|
8
|
-
export type CxTooltipTone = 'default' | 'primary' | 'success' | 'warning' | 'danger'
|
|
9
|
-
|
|
10
|
-
const TONE_BG: Record<CxTooltipTone, string> = {
|
|
11
|
-
default: '#1f1f1f',
|
|
12
|
-
primary: '#2563eb',
|
|
13
|
-
success: '#15803d',
|
|
14
|
-
warning: '#b45309',
|
|
15
|
-
danger: '#dc2626',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type CxTooltipProps = Omit<
|
|
19
|
-
TooltipProps,
|
|
20
|
-
'color' | 'overlayInnerStyle' | 'overlayClassName' | 'title'
|
|
21
|
-
> & {
|
|
22
|
-
title: ReactNode
|
|
23
|
-
/** Tooltip 背景语义色,便于与操作类型区分 */
|
|
24
|
-
tone?: CxTooltipTone
|
|
25
|
-
overlayInnerStyle?: CSSProperties
|
|
26
|
-
overlayClassName?: string
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 基于 antd Tooltip 的封装,统一字号与类名前缀,后续可在 `cx-tooltip` 上覆写样式。
|
|
31
|
-
*/
|
|
32
|
-
export function CxTooltip({
|
|
33
|
-
title,
|
|
34
|
-
tone = 'default',
|
|
35
|
-
overlayInnerStyle,
|
|
36
|
-
overlayClassName,
|
|
37
|
-
mouseEnterDelay = 0.35,
|
|
38
|
-
children,
|
|
39
|
-
classNames: userClassNames,
|
|
40
|
-
styles: userStyles,
|
|
41
|
-
...rest
|
|
42
|
-
}: CxTooltipProps) {
|
|
43
|
-
const ucn = userClassNames as LooseTooltipClassNames | undefined
|
|
44
|
-
const ust = userStyles as LooseTooltipStyles | undefined
|
|
45
|
-
return (
|
|
46
|
-
<Tooltip
|
|
47
|
-
title={title}
|
|
48
|
-
color={TONE_BG[tone]}
|
|
49
|
-
mouseEnterDelay={mouseEnterDelay}
|
|
50
|
-
classNames={{
|
|
51
|
-
...ucn,
|
|
52
|
-
root: clsx('cx-tooltip', overlayClassName, ucn?.root),
|
|
53
|
-
}}
|
|
54
|
-
styles={{
|
|
55
|
-
...ust,
|
|
56
|
-
container: {
|
|
57
|
-
fontSize: 12,
|
|
58
|
-
lineHeight: 1.4,
|
|
59
|
-
...(overlayInnerStyle ?? {}),
|
|
60
|
-
...ust?.container,
|
|
61
|
-
},
|
|
62
|
-
}}
|
|
63
|
-
{...rest}>
|
|
64
|
-
{children}
|
|
65
|
-
</Tooltip>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import type { MenuTreeItem } from '@/types/menu'
|
|
2
|
-
import { getMenuNodeIcon } from '@/utils'
|
|
3
|
-
import { getMenuDisplayName } from '@/utils/menuI18n'
|
|
4
|
-
import { ChevronDown, ChevronRight } from 'lucide-react'
|
|
5
|
-
import React, { useMemo } from 'react'
|
|
6
|
-
import { useTranslation } from 'react-i18next'
|
|
7
|
-
import { CxCheckbox } from '../checkbox'
|
|
8
|
-
|
|
9
|
-
export type CxTreeFieldNames = {
|
|
10
|
-
id?: string
|
|
11
|
-
children?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type CxTreeSameNodeReselect = 'keep' | 'deselect'
|
|
15
|
-
|
|
16
|
-
export type CxTreeProps = {
|
|
17
|
-
treeData: any[]
|
|
18
|
-
fieldNames?: CxTreeFieldNames
|
|
19
|
-
/** 与现有 tree-sidebar 一致:受控展开 */
|
|
20
|
-
expandedKeys: Set<string | number> | ReadonlyArray<string | number>
|
|
21
|
-
selectedKey?: string | number | null
|
|
22
|
-
onSelect?: (key: string | number | null, node: any | null) => void
|
|
23
|
-
onToggleExpand?: (key: string | number, e?: React.MouseEvent) => void
|
|
24
|
-
/** 为 true 时在行首渲染勾选框;仅操作勾选框会触发 onCheck,与选中行分离 */
|
|
25
|
-
checkable?: boolean
|
|
26
|
-
checkedKeys?: Set<string | number> | ReadonlyArray<string | number>
|
|
27
|
-
onCheck?: (key: string | number, checked: boolean, node: any) => void
|
|
28
|
-
/** 覆盖默认菜单标题(默认走 getMenuDisplayName) */
|
|
29
|
-
renderLabel?: (node: any) => React.ReactNode
|
|
30
|
-
className?: string
|
|
31
|
-
emptyText?: React.ReactNode
|
|
32
|
-
/**
|
|
33
|
-
* `keep`(默认):已选中节点再次点击仍回调选中;
|
|
34
|
-
* `deselect`:再次点击当前选中节点回调 `(null, null)` 用于取消选中
|
|
35
|
-
*/
|
|
36
|
-
sameNodeReselect?: CxTreeSameNodeReselect
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function toSet(
|
|
40
|
-
keys: Set<string | number> | ReadonlyArray<string | number> | undefined,
|
|
41
|
-
): Set<string | number> {
|
|
42
|
-
if (!keys) return new Set()
|
|
43
|
-
return keys instanceof Set ? keys : new Set(keys)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 纯展示树:缩进、间距、展开图标、文件夹图标与 `tree-sidebar` 菜单样式对齐。
|
|
48
|
-
*/
|
|
49
|
-
export function CxTree({
|
|
50
|
-
treeData,
|
|
51
|
-
fieldNames,
|
|
52
|
-
expandedKeys,
|
|
53
|
-
selectedKey,
|
|
54
|
-
onSelect,
|
|
55
|
-
onToggleExpand,
|
|
56
|
-
checkable = false,
|
|
57
|
-
checkedKeys,
|
|
58
|
-
onCheck,
|
|
59
|
-
renderLabel,
|
|
60
|
-
className,
|
|
61
|
-
emptyText,
|
|
62
|
-
sameNodeReselect = 'keep',
|
|
63
|
-
}: CxTreeProps) {
|
|
64
|
-
const { t, i18n } = useTranslation()
|
|
65
|
-
const idKey = fieldNames?.id ?? 'id'
|
|
66
|
-
const childrenKey = fieldNames?.children ?? 'children'
|
|
67
|
-
|
|
68
|
-
const expandSet = useMemo(() => toSet(expandedKeys), [expandedKeys])
|
|
69
|
-
const checkSet = useMemo(() => toSet(checkedKeys), [checkedKeys])
|
|
70
|
-
|
|
71
|
-
const formatNodeLabel = (node: any): React.ReactNode => {
|
|
72
|
-
if (renderLabel) return renderLabel(node)
|
|
73
|
-
return getMenuDisplayName(node as MenuTreeItem, t, i18n.language)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const renderTreeNode = (node: any, level = 0): React.JSX.Element => {
|
|
77
|
-
const children = node[childrenKey] as any[] | undefined
|
|
78
|
-
const hasChildren = !!children?.length
|
|
79
|
-
const key = node[idKey]
|
|
80
|
-
const isExpanded = expandSet.has(key)
|
|
81
|
-
const isSelected =
|
|
82
|
-
selectedKey != null &&
|
|
83
|
-
key != null &&
|
|
84
|
-
String(selectedKey) === String(key)
|
|
85
|
-
const isChecked = checkSet.has(key)
|
|
86
|
-
const nodeSelectable = node.selectable !== false
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<div key={String(key)}>
|
|
90
|
-
<div
|
|
91
|
-
className={`
|
|
92
|
-
group flex items-center px-2 py-1.5 rounded-md text-sm transition-colors
|
|
93
|
-
${
|
|
94
|
-
isSelected
|
|
95
|
-
? 'bg-blue-50 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 font-medium'
|
|
96
|
-
: nodeSelectable
|
|
97
|
-
? 'hover:bg-gray-100 dark:hover:bg-gray-700/50 text-gray-700 dark:text-gray-300'
|
|
98
|
-
: 'text-gray-500 dark:text-gray-400'
|
|
99
|
-
}
|
|
100
|
-
`}
|
|
101
|
-
style={{ paddingLeft: `${level * 16 + 8}px` }}>
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
className={`mr-1 shrink-0 p-0.5 rounded-sm hover:bg-gray-200 dark:hover:bg-gray-700 ${
|
|
105
|
-
hasChildren ? 'visible' : 'invisible'
|
|
106
|
-
}`}
|
|
107
|
-
onClick={(e) => hasChildren && onToggleExpand?.(key, e)}>
|
|
108
|
-
{isExpanded ? (
|
|
109
|
-
<ChevronDown size={14} />
|
|
110
|
-
) : (
|
|
111
|
-
<ChevronRight size={14} />
|
|
112
|
-
)}
|
|
113
|
-
</button>
|
|
114
|
-
|
|
115
|
-
<div
|
|
116
|
-
role={nodeSelectable ? 'button' : undefined}
|
|
117
|
-
tabIndex={nodeSelectable ? 0 : undefined}
|
|
118
|
-
className={`flex min-w-0 flex-1 items-center ${
|
|
119
|
-
nodeSelectable
|
|
120
|
-
? 'cursor-pointer'
|
|
121
|
-
: 'cursor-default pointer-events-none select-none'
|
|
122
|
-
}`}
|
|
123
|
-
onClick={() => {
|
|
124
|
-
if (!nodeSelectable) return
|
|
125
|
-
if (
|
|
126
|
-
sameNodeReselect === 'deselect' &&
|
|
127
|
-
selectedKey != null &&
|
|
128
|
-
String(selectedKey) === String(key)
|
|
129
|
-
) {
|
|
130
|
-
onSelect?.(null, null)
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
onSelect?.(key, node)
|
|
134
|
-
}}
|
|
135
|
-
onKeyDown={(e) => {
|
|
136
|
-
if (!nodeSelectable) return
|
|
137
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
138
|
-
e.preventDefault()
|
|
139
|
-
if (
|
|
140
|
-
sameNodeReselect === 'deselect' &&
|
|
141
|
-
selectedKey != null &&
|
|
142
|
-
String(selectedKey) === String(key)
|
|
143
|
-
) {
|
|
144
|
-
onSelect?.(null, null)
|
|
145
|
-
return
|
|
146
|
-
}
|
|
147
|
-
onSelect?.(key, node)
|
|
148
|
-
}
|
|
149
|
-
}}>
|
|
150
|
-
<div className="mr-2 shrink-0 text-gray-400 dark:text-gray-500">
|
|
151
|
-
{getMenuNodeIcon(node as MenuTreeItem, isExpanded, isSelected)}
|
|
152
|
-
</div>
|
|
153
|
-
{checkable && (
|
|
154
|
-
<span
|
|
155
|
-
className="mr-1.5 flex shrink-0 items-center"
|
|
156
|
-
onClick={(e) => e.stopPropagation()}
|
|
157
|
-
onMouseDown={(e) => e.stopPropagation()}>
|
|
158
|
-
<CxCheckbox
|
|
159
|
-
checked={isChecked}
|
|
160
|
-
size="md"
|
|
161
|
-
onChange={(next) => onCheck?.(key, next, node)}
|
|
162
|
-
/>
|
|
163
|
-
</span>
|
|
164
|
-
)}
|
|
165
|
-
<span className="truncate">{formatNodeLabel(node)}</span>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
{hasChildren && isExpanded && (
|
|
170
|
-
<div className="ml-4 border-l border-gray-200 dark:border-gray-700">
|
|
171
|
-
{children!.map((child) => renderTreeNode(child, level + 1))}
|
|
172
|
-
</div>
|
|
173
|
-
)}
|
|
174
|
-
</div>
|
|
175
|
-
)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (!treeData?.length) {
|
|
179
|
-
return (
|
|
180
|
-
<div className="p-4 text-center text-sm text-gray-400 dark:text-gray-500">
|
|
181
|
-
{emptyText ?? t('common.no_data')}
|
|
182
|
-
</div>
|
|
183
|
-
)
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return (
|
|
187
|
-
<div className={className}>
|
|
188
|
-
{treeData.map((n) => renderTreeNode(n))}
|
|
189
|
-
</div>
|
|
190
|
-
)
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export default CxTree
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TreeSelect } from 'antd';
|
|
3
|
-
import { CxEmptyState } from '../empty-state';
|
|
4
|
-
import './index.less';
|
|
5
|
-
|
|
6
|
-
/** 有子节点的树节点 key,用于「全部展开」 */
|
|
7
|
-
function collectExpandableKeys(treeData) {
|
|
8
|
-
const keys = [];
|
|
9
|
-
const walk = (nodes) => {
|
|
10
|
-
if (!Array.isArray(nodes)) return;
|
|
11
|
-
for (const node of nodes) {
|
|
12
|
-
const children = node.children;
|
|
13
|
-
if (Array.isArray(children) && children.length > 0) {
|
|
14
|
-
const k = node.key != null ? node.key : node.value;
|
|
15
|
-
if (k != null) keys.push(k);
|
|
16
|
-
walk(children);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
walk(treeData);
|
|
21
|
-
return keys;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @param {import('antd').TreeSelectProps & { variant?: 'cxForm' | 'cxSearch' }} props
|
|
26
|
-
* - variant: cxForm 表单下拉(42px,默认)| cxSearch 搜索下拉(40px)
|
|
27
|
-
* - treeDefaultExpandAll:树数据异步更新时 rc 仅初次挂载生效,此处随 treeData 同步展开
|
|
28
|
-
*/
|
|
29
|
-
const CxTreeSelect = ({
|
|
30
|
-
variant = 'cxForm',
|
|
31
|
-
style = undefined,
|
|
32
|
-
treeData,
|
|
33
|
-
treeDefaultExpandAll,
|
|
34
|
-
treeExpandedKeys,
|
|
35
|
-
onTreeExpand,
|
|
36
|
-
notFoundContent,
|
|
37
|
-
...props
|
|
38
|
-
}) => {
|
|
39
|
-
const height = variant === 'cxSearch' ? 40 : 42;
|
|
40
|
-
|
|
41
|
-
const expandableKeys = React.useMemo(
|
|
42
|
-
() => collectExpandableKeys(treeData),
|
|
43
|
-
[treeData],
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
const isExpandedControlled = treeExpandedKeys !== undefined;
|
|
47
|
-
const useInternalExpandAll = Boolean(treeDefaultExpandAll) && !isExpandedControlled;
|
|
48
|
-
|
|
49
|
-
const [internalExpandedKeys, setInternalExpandedKeys] = React.useState([]);
|
|
50
|
-
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
if (!useInternalExpandAll) return;
|
|
53
|
-
setInternalExpandedKeys(expandableKeys);
|
|
54
|
-
}, [useInternalExpandAll, expandableKeys]);
|
|
55
|
-
|
|
56
|
-
const treeNotFoundContent =
|
|
57
|
-
notFoundContent === undefined
|
|
58
|
-
? <CxEmptyState message="暂无数据" />
|
|
59
|
-
: notFoundContent;
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<TreeSelect
|
|
63
|
-
{...props}
|
|
64
|
-
treeData={treeData}
|
|
65
|
-
treeDefaultExpandAll={useInternalExpandAll ? false : treeDefaultExpandAll}
|
|
66
|
-
treeExpandedKeys={
|
|
67
|
-
useInternalExpandAll ? internalExpandedKeys : treeExpandedKeys
|
|
68
|
-
}
|
|
69
|
-
onTreeExpand={
|
|
70
|
-
useInternalExpandAll
|
|
71
|
-
? (keys) => {
|
|
72
|
-
setInternalExpandedKeys(keys);
|
|
73
|
-
onTreeExpand?.(keys);
|
|
74
|
-
}
|
|
75
|
-
: onTreeExpand
|
|
76
|
-
}
|
|
77
|
-
size='large'
|
|
78
|
-
notFoundContent={treeNotFoundContent}
|
|
79
|
-
className='cx-tree-select'
|
|
80
|
-
classNames={{ popup: 'cx-tree-select-dropdown' }}
|
|
81
|
-
style={{
|
|
82
|
-
height,
|
|
83
|
-
boxSizing: 'border-box',
|
|
84
|
-
borderRadius: 8,
|
|
85
|
-
...(style || {}),
|
|
86
|
-
}}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export default CxTreeSelect;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.cx-tree-select-dropdown {
|
|
2
|
-
.ant-select-tree-treenode {
|
|
3
|
-
min-height: 36px;
|
|
4
|
-
border-radius: 6px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.ant-select-tree-node-content-wrapper {
|
|
8
|
-
min-height: 36px !important;
|
|
9
|
-
line-height: 34px !important;
|
|
10
|
-
border-radius: 6px;
|
|
11
|
-
font-size: 14px !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.ant-select-tree-node-content-wrapper:hover {
|
|
15
|
-
background-color: var(--cx-option-hover-bg) !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ant-select-tree-node-selected {
|
|
19
|
-
background-color: var(--cx-option-selected-bg) !important;
|
|
20
|
-
color: var(--cx-option-selected-text) !important;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ant-select-tree-node-selected:hover {
|
|
24
|
-
background-color: var(--cx-option-selected-bg) !important;
|
|
25
|
-
color: var(--cx-option-selected-text) !important;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
.cx-upload-file-root {
|
|
2
|
-
width: 100%;
|
|
3
|
-
|
|
4
|
-
.ant-upload-wrapper,
|
|
5
|
-
.ant-upload-list,
|
|
6
|
-
.ant-upload-list-item,
|
|
7
|
-
.ant-upload-list-item-container {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// 清掉 Upload 列表默认的上下间距,避免在 Table 单元格里出现“底部空白”
|
|
12
|
-
.ant-upload-list {
|
|
13
|
-
margin: 0 !important;
|
|
14
|
-
padding: 0 !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// antd 会在 list 非空时强行给 picture-card list 设置 min-height(dev 环境用 :where(.css-dev-only-...) 包裹)
|
|
18
|
-
// 这里统一按 thumbSize 覆盖,避免底部被撑出空白
|
|
19
|
-
.ant-upload-wrapper.ant-upload-picture-card-wrapper
|
|
20
|
-
.ant-upload-list.ant-upload-list-picture-card:not(:empty),
|
|
21
|
-
.ant-upload-wrapper.ant-upload-picture-circle-wrapper
|
|
22
|
-
.ant-upload-list.ant-upload-list-picture-card:not(:empty),
|
|
23
|
-
.ant-upload-wrapper.ant-upload-picture-card-wrapper
|
|
24
|
-
.ant-upload-list.ant-upload-list-picture-circle:not(:empty),
|
|
25
|
-
.ant-upload-wrapper.ant-upload-picture-circle-wrapper
|
|
26
|
-
.ant-upload-list.ant-upload-list-picture-circle:not(:empty) {
|
|
27
|
-
min-height: var(--cx-upload-thumb-size, 104px) !important;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// 缩略图尺寸:上传位 + 已上传项容器统一
|
|
31
|
-
.ant-upload-list-picture-card {
|
|
32
|
-
// 容器本身不要默认 padding/margin
|
|
33
|
-
margin: 0 !important;
|
|
34
|
-
padding: 0 !important;
|
|
35
|
-
|
|
36
|
-
.ant-upload-list-item-container,
|
|
37
|
-
.ant-upload-select {
|
|
38
|
-
width: var(--cx-upload-thumb-size, 104px);
|
|
39
|
-
height: var(--cx-upload-thumb-size, 104px);
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// antd 默认会给每个 item/上传位加 margin,导致视觉尺寸不一致,这里统一清掉
|
|
44
|
-
.ant-upload-list-item-container {
|
|
45
|
-
margin: 0 !important;
|
|
46
|
-
padding: 0 !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.ant-upload-select {
|
|
50
|
-
margin: 0 !important;
|
|
51
|
-
padding: 0 !important;
|
|
52
|
-
min-height: var(--cx-upload-thumb-size, 104px) !important;
|
|
53
|
-
height: var(--cx-upload-thumb-size, 104px) !important;
|
|
54
|
-
line-height: var(--cx-upload-thumb-size, 104px) !important;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ant-upload-select .ant-upload {
|
|
58
|
-
width: 100%;
|
|
59
|
-
height: 100%;
|
|
60
|
-
margin: 0 !important;
|
|
61
|
-
padding: 0 !important;
|
|
62
|
-
box-sizing: border-box;
|
|
63
|
-
min-height: 0 !important;
|
|
64
|
-
line-height: var(--cx-upload-thumb-size, 104px) !important;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 已上传项本体也清掉默认边距,确保和上传位同盒模型
|
|
68
|
-
.ant-upload-list-item {
|
|
69
|
-
margin: 0 !important;
|
|
70
|
-
padding: 0 !important;
|
|
71
|
-
box-sizing: border-box;
|
|
72
|
-
box-shadow: none !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.ant-upload-list-item:hover {
|
|
76
|
-
border-color: transparent !important;
|
|
77
|
-
box-shadow: none !important;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.cx-upload-file-picture-list-wrap {
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: flex-start;
|
|
85
|
-
gap: 10px;
|
|
86
|
-
width: 100%;
|
|
87
|
-
|
|
88
|
-
.ant-upload-wrapper {
|
|
89
|
-
width: var(--cx-upload-thumb-size, 104px);
|
|
90
|
-
height: var(--cx-upload-thumb-size, 104px);
|
|
91
|
-
flex: 0 0 var(--cx-upload-thumb-size, 104px);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.is-empty {
|
|
95
|
-
.ant-upload-wrapper {
|
|
96
|
-
width: 100%;
|
|
97
|
-
height: auto;
|
|
98
|
-
flex: 1 1 auto;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.cx-upload-file-list {
|
|
103
|
-
flex: 1 1 auto;
|
|
104
|
-
min-width: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// 右侧文件名列表:纯文本,无边框
|
|
108
|
-
.cx-upload-file-list-item {
|
|
109
|
-
border: none;
|
|
110
|
-
background: transparent;
|
|
111
|
-
padding: 0;
|
|
112
|
-
height: var(--cx-upload-thumb-size, 104px);
|
|
113
|
-
align-items: center;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.cx-upload-file-card {
|
|
118
|
-
.cx-upload-file-card-mask {
|
|
119
|
-
opacity: 0;
|
|
120
|
-
transition: opacity 0.2s;
|
|
121
|
-
z-index: 3;
|
|
122
|
-
background: rgba(0, 0, 0, 0.6);
|
|
123
|
-
|
|
124
|
-
.ant-btn {
|
|
125
|
-
color: #fff;
|
|
126
|
-
background: transparent;
|
|
127
|
-
border: none !important;
|
|
128
|
-
opacity: 1;
|
|
129
|
-
box-shadow: none;
|
|
130
|
-
padding: 6px;
|
|
131
|
-
line-height: 1;
|
|
132
|
-
outline: none !important;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.ant-btn:hover {
|
|
136
|
-
color: #fff;
|
|
137
|
-
background: transparent;
|
|
138
|
-
opacity: 1;
|
|
139
|
-
text-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
|
|
140
|
-
box-shadow: none;
|
|
141
|
-
outline: none !important;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.ant-btn:active {
|
|
145
|
-
color: #fff;
|
|
146
|
-
background: transparent;
|
|
147
|
-
box-shadow: none;
|
|
148
|
-
border-color: transparent;
|
|
149
|
-
outline: none !important;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.ant-btn:focus,
|
|
153
|
-
.ant-btn:focus-visible {
|
|
154
|
-
outline: none;
|
|
155
|
-
box-shadow: none;
|
|
156
|
-
border-color: transparent;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// 去掉 antd 的 hover/click 状态层(避免出现“一闪的边框/波纹”)
|
|
160
|
-
.ant-btn::before,
|
|
161
|
-
.ant-btn::after {
|
|
162
|
-
display: none !important;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// 图标更明显:放大 + 投影描边
|
|
166
|
-
.anticon {
|
|
167
|
-
font-size: 18px;
|
|
168
|
-
filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.55));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&:hover {
|
|
173
|
-
.cx-upload-file-card-mask {
|
|
174
|
-
opacity: 1;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.cx-upload-file-list {
|
|
180
|
-
display: flex;
|
|
181
|
-
flex-direction: column;
|
|
182
|
-
gap: 6px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.cx-upload-file-list-item {
|
|
186
|
-
display: flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
gap: 8px;
|
|
189
|
-
padding: 6px 8px;
|
|
190
|
-
border: 1px solid rgba(5, 5, 5, 0.06);
|
|
191
|
-
border-radius: 6px;
|
|
192
|
-
background: #fff;
|
|
193
|
-
|
|
194
|
-
.cx-upload-file-list-actions {
|
|
195
|
-
opacity: 0;
|
|
196
|
-
transition: opacity 0.15s;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&:hover {
|
|
200
|
-
.cx-upload-file-list-actions {
|
|
201
|
-
opacity: 1;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.cx-upload-file-list-name {
|
|
207
|
-
display: flex;
|
|
208
|
-
align-items: center;
|
|
209
|
-
flex: 1 1 auto;
|
|
210
|
-
min-width: 0;
|
|
211
|
-
overflow: hidden;
|
|
212
|
-
text-overflow: ellipsis;
|
|
213
|
-
white-space: nowrap;
|
|
214
|
-
height: 100%;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.cx-upload-file-list-actions {
|
|
218
|
-
display: flex;
|
|
219
|
-
align-items: center;
|
|
220
|
-
gap: 2px;
|
|
221
|
-
flex: 0 0 auto;
|
|
222
|
-
}
|
|
223
|
-
|