diff --git a/src/components/custom/post-select.vue b/src/components/custom/post-select.vue index 49dd8741..57cfee9e 100644 --- a/src/components/custom/post-select.vue +++ b/src/components/custom/post-select.vue @@ -21,27 +21,27 @@ const attrs: SelectProps = useAttrs(); const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading(); -/** the enabled role options */ -const roleOptions = ref[]>([]); +/** the enabled post options */ +const postOptions = ref[]>([]); watch( () => props.deptId, () => { if (!props.deptId) { - roleOptions.value = []; + postOptions.value = []; return; } - getRoleOptions(); + getPostOptions(); }, { immediate: true } ); -async function getRoleOptions() { +async function getPostOptions() { startPostLoading(); const { error, data } = await fetchGetPostSelect(props.deptId!); if (!error) { - roleOptions.value = data.map(item => ({ + postOptions.value = data.map(item => ({ label: item.postName, value: item.postId })); @@ -54,7 +54,7 @@ async function getRoleOptions() { diff --git a/src/styles/css/reset.css b/src/styles/css/reset.css index b813d307..77a00356 100644 --- a/src/styles/css/reset.css +++ b/src/styles/css/reset.css @@ -13,6 +13,13 @@ border-color: var(--un-default-border-color, #e5e7eb); /* 2 */ } +/* +* [Naive UI] Fix the icon size in the image preview toolbar +*/ +.n-image-preview-toolbar .n-base-icon { + box-sizing: unset !important; +} + /* 1. Use a consistent sensible line-height in all browsers. 2. Prevent adjustments of font size after orientation changes in iOS. diff --git a/src/typings/api/system.api.d.ts b/src/typings/api/system.api.d.ts index 8e779f31..64825d10 100644 --- a/src/typings/api/system.api.d.ts +++ b/src/typings/api/system.api.d.ts @@ -163,6 +163,8 @@ declare namespace Api { postIds: string[]; /** user role ids */ roleIds: string[]; + /** roles */ + roles: Role[]; }; /** user list */