fix(client): ピン留めされたノートがリアクティブではない問題を修正
This commit is contained in:
		
							parent
							
								
									9f87545901
								
							
						
					
					
						commit
						31a0afdaab
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -83,7 +83,7 @@ | |||
| 	<router-view :user="user"></router-view> | ||||
| 	<template v-if="$route.name == 'user'"> | ||||
| 		<div class="pins"> | ||||
| 			<x-note v-for="note in user.pinnedNotes" class="note" :note="note" :key="note.id" :detail="true" :pinned="true"/> | ||||
| 			<x-note v-for="note in user.pinnedNotes" class="note" :note="note" @updated="pinnedNoteUpdated(note, $event)" :key="note.id" :detail="true" :pinned="true"/> | ||||
| 		</div> | ||||
| 		<mk-container :body-togglable="true" class="content"> | ||||
| 			<template #header><fa :icon="faImage"/>{{ $t('images') }}</template> | ||||
|  | @ -210,6 +210,11 @@ export default Vue.extend({ | |||
| 			const pos = -(top / z); | ||||
| 			banner.style.backgroundPosition = `center calc(50% - ${pos}px)`; | ||||
| 		}, | ||||
| 
 | ||||
| 		pinnedNoteUpdated(oldValue, newValue) { | ||||
| 			const i = this.user.pinnedNotes.findIndex(n => n === oldValue); | ||||
| 			Vue.set(this.user.pinnedNotes, i, newValue); | ||||
| 		}, | ||||
| 	} | ||||
| }); | ||||
| </script> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue