feat: restore admin form quality lightly

This commit is contained in:
2026-06-12 09:01:27 +08:00
parent 8cb1101f5a
commit faa14fd3dd
5 changed files with 499 additions and 4 deletions
@@ -100,6 +100,11 @@ const RoleSelector = defineAsyncComponent(() =>
(res) => res.default,
),
);
const DeptSelector = defineAsyncComponent(() =>
import('#/components/zq-form/dept-selector/dept-selector.vue').then(
(res) => res.default,
),
);
const FileSelector = defineAsyncComponent(() =>
import('#/components/zq-form/file-selector/file-selector.vue').then(
(res) => res.default,
@@ -115,6 +120,11 @@ const UserSelector = defineAsyncComponent(() =>
(res) => res.default,
),
);
const PostSelector = defineAsyncComponent(() =>
import('#/components/zq-form/post-selector/post-selector.vue').then(
(res) => res.default,
),
);
const ZqIconPicker = defineAsyncComponent(() =>
import('#/components/zq-form/zq-icon-picker/zq-icon-picker.vue').then(
(res) => res.default,
@@ -166,12 +176,14 @@ export type ComponentType =
| 'CheckboxGroup'
| 'CodeEditor'
| 'DatePicker'
| 'DeptSelector'
| 'Divider'
| 'FileSelector'
| 'IconPicker'
| 'ImageSelector'
| 'Input'
| 'InputNumber'
| 'PostSelector'
| 'RadioGroup'
| 'RoleSelector'
| 'Select'
@@ -249,6 +261,7 @@ function initComponentAdapter() {
PrimaryButton: (props, { attrs, slots }) => {
return h(ElButton, { ...props, attrs, type: 'primary' }, slots);
},
DeptSelector: withDefaultPlaceholder(DeptSelector, 'select'),
RoleSelector: withDefaultPlaceholder(RoleSelector, 'select'),
Divider: ElDivider,
FileSelector: withDefaultPlaceholder(FileSelector, 'select'),
@@ -261,6 +274,7 @@ function initComponentAdapter() {
type: 'textarea',
}),
InputNumber: withDefaultPlaceholder(ElInputNumber, 'input'),
PostSelector: withDefaultPlaceholder(PostSelector, 'select'),
RadioGroup: (props, { attrs, slots }) => {
let defaultSlot;
if (Reflect.has(slots, 'default')) {