responsive name
This commit is contained in:
@@ -128,7 +128,7 @@ export default {
|
||||
|
||||
const visitTime = ref(0);
|
||||
const currentViewingUser = computed(() => acctMgmtStore.currentViewingUser);
|
||||
const name = computed(() => acctMgmtStore.currentViewingUser.name);
|
||||
const name = computed(() => currentViewingUser.value.name);
|
||||
const {
|
||||
username,
|
||||
is_admin,
|
||||
@@ -180,18 +180,9 @@ export default {
|
||||
isPwdLengthValid.value = inputPwd.value.length >= PWD_VALID_LENGTH;
|
||||
}
|
||||
|
||||
watch(() => acctMgmtStore.currentViewingUser, (newVal, oldVal) => {
|
||||
console.log('currentViewingUser updated:', newVal);
|
||||
console.log('newVal.name', newVal.name);
|
||||
});
|
||||
|
||||
onBeforeMount(async() => {
|
||||
// 在此設定 current viewing user 的來源是登入者的身分
|
||||
await acctMgmtStore.getUserDetail(loginStore.userData.username);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async() => {
|
||||
loadingStore.setIsLoading(false);
|
||||
await acctMgmtStore.getUserDetail(loginStore.userData.username);
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user