mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix: 修复代码生成异常提示
This commit is contained in:
@ -19,7 +19,7 @@ const value = defineModel<CommonType.IdType[] | null>('value', { required: false
|
||||
|
||||
const attrs: SelectProps = useAttrs();
|
||||
|
||||
const { loading: roleLoading, startLoading: startRoleLoading, endLoading: endRoleLoading } = useLoading();
|
||||
const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading();
|
||||
|
||||
/** the enabled role options */
|
||||
const roleOptions = ref<CommonType.Option<CommonType.IdType>[]>([]);
|
||||
@ -34,7 +34,7 @@ watch(
|
||||
);
|
||||
|
||||
async function getRoleOptions() {
|
||||
startRoleLoading();
|
||||
startPostLoading();
|
||||
const { error, data } = await fetchGetPostSelect(props.deptId!);
|
||||
|
||||
if (!error) {
|
||||
@ -43,14 +43,14 @@ async function getRoleOptions() {
|
||||
value: item.postId
|
||||
}));
|
||||
}
|
||||
endRoleLoading();
|
||||
endPostLoading();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NSelect
|
||||
v-model:value="value"
|
||||
:loading="roleLoading"
|
||||
:loading="postLoading"
|
||||
:options="roleOptions"
|
||||
v-bind="attrs"
|
||||
placeholder="请选择岗位"
|
||||
|
Reference in New Issue
Block a user