refactor(client): use composition api
This commit is contained in:
		| @@ -4,29 +4,22 @@ | ||||
| </MkSpacer> | ||||
| </template> | ||||
|  | ||||
| <script lang="ts"> | ||||
| import { defineComponent } from 'vue'; | ||||
| <script lang="ts" setup> | ||||
| import XNotes from '@/components/notes.vue'; | ||||
| import * as symbols from '@/symbols'; | ||||
| import { i18n } from '@/i18n'; | ||||
|  | ||||
| export default defineComponent({ | ||||
| 	components: { | ||||
| 		XNotes | ||||
| 	}, | ||||
| const pagination = { | ||||
| 	endpoint: 'notes/featured', | ||||
| 	limit: 10, | ||||
| 	offsetMode: true, | ||||
| }; | ||||
|  | ||||
| 	data() { | ||||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.featured, | ||||
| 				icon: 'fas fa-fire-alt', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'notes/featured', | ||||
| 				limit: 10, | ||||
| 				offsetMode: true, | ||||
| 			}, | ||||
| 		}; | ||||
| defineExpose({ | ||||
| 	[symbols.PAGE_INFO]: { | ||||
| 		title: i18n.locale.featured, | ||||
| 		icon: 'fas fa-fire-alt', | ||||
| 		bg: 'var(--bg)', | ||||
| 	}, | ||||
| }); | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo