fix: bug#11223

This commit is contained in:
JiangQiming 2023-03-30 19:24:00 +08:00
parent 4767863dda
commit 735994f12f
1 changed files with 10 additions and 0 deletions

View File

@ -39,7 +39,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { setView_api } from '@/api/home'; import { setView_api } from '@/api/home';
import { getImage } from '@/utils/comm'; import { getImage } from '@/utils/comm';
import { useUserInfo } from '@/store/userInfo';
const user = useUserInfo();
const emits = defineEmits(['refresh']); const emits = defineEmits(['refresh']);
const selectValue = ref('device'); const selectValue = ref('device');
@ -49,6 +51,14 @@ const confirm = () => {
content: selectValue.value, content: selectValue.value,
}).then(() => emits('refresh')); }).then(() => emits('refresh'));
}; };
watch(
() => user.userInfos,
(val: any) => {
//
if (val.username === 'admin') selectValue.value = 'comprehensive';
},
);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>