fix: ノート詳細ページの新しいノートを表示する機能の動作が正しくなるように修正する (#8607)
* ノート詳細で新しいノートの表示が正しくないのを修正する * ノート詳細から別のノート詳細を表示した時に前後の表示をリセットする
This commit is contained in:
		
							parent
							
								
									3abb0d589d
								
							
						
					
					
						commit
						0f33864df1
					
				
					 2 changed files with 11 additions and 2 deletions
				
			
		|  | @ -14,8 +14,14 @@ | |||
| 	</div> | ||||
| 
 | ||||
| 	<div v-else ref="rootEl"> | ||||
| 		<div v-show="pagination.reversed && more" key="_more_" class="cxiknjgy _gap"> | ||||
| 			<MkButton v-if="!moreFetching" class="button" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary @click="fetchMoreAhead"> | ||||
| 				{{ $ts.loadMore }} | ||||
| 			</MkButton> | ||||
| 			<MkLoading v-else class="loading"/> | ||||
| 		</div> | ||||
| 		<slot :items="items"></slot> | ||||
| 		<div v-show="more" key="_more_" class="cxiknjgy _gap"> | ||||
| 		<div v-show="!pagination.reversed && more" key="_more_" class="cxiknjgy _gap"> | ||||
| 			<MkButton v-if="!moreFetching" v-appear="($store.state.enableInfiniteScroll && !disableAutoLoad) ? fetchMore : null" class="button" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary @click="fetchMore"> | ||||
| 				{{ $ts.loadMore }} | ||||
| 			</MkButton> | ||||
|  | @ -278,7 +284,6 @@ defineExpose({ | |||
| 	queue, | ||||
| 	backed, | ||||
| 	reload, | ||||
| 	fetchMoreAhead, | ||||
| 	prepend, | ||||
| 	append, | ||||
| 	removeItem, | ||||
|  |  | |||
|  | @ -108,6 +108,10 @@ export default defineComponent({ | |||
| 	}, | ||||
| 	methods: { | ||||
| 		fetch() { | ||||
| 			this.hasPrev = false; | ||||
| 			this.hasNext = false; | ||||
| 			this.showPrev = false; | ||||
| 			this.showNext = false; | ||||
| 			this.note = null; | ||||
| 			os.api('notes/show', { | ||||
| 				noteId: this.noteId | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue