Merge pull request 'fix: 更改图片的同时更改头像;' (#42) from yangws into main
Reviewed-on: #42
This commit is contained in:
commit
1e0d0d18e0
|
@ -53,7 +53,7 @@ const { ipcRenderer } = window.electron || {}
|
|||
const isMaxSize = ref(false)
|
||||
const router = useRouter()
|
||||
const currentRoute = ref('')
|
||||
const userImg = new URL(userStore.user.avatar, import.meta.url)
|
||||
const userImg = ref(new URL(userStore.user.avatar, import.meta.url))
|
||||
|
||||
const menus = ref([
|
||||
{
|
||||
|
@ -128,6 +128,9 @@ const emits = defineEmits(['setLayout'])
|
|||
function setLayout() {
|
||||
emits('setLayout');
|
||||
}
|
||||
watch(()=> userStore.avatar,() => {
|
||||
userImg.value = userStore.avatar;
|
||||
},{deep:true})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -174,7 +174,6 @@ function realTime(data) {
|
|||
/** 关闭窗口 */
|
||||
function closeDialog() {
|
||||
options.img = userStore.avatar
|
||||
console.log(userStore.avatar,'userStore.avatar')
|
||||
options.visible = false
|
||||
}
|
||||
watch(transform, () => {
|
||||
|
|
Loading…
Reference in New Issue