-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring 眾多 listing pages,使重複的程式碼減少 #69
Comments
這部分的重構我有計畫要引入 composition api 來輔助,由於 composition api 使用上需要手動 import 相關 function 並透過 setup 來使用,故引入之後不會直接影響既有的 components,可漸進式的使用,所以引入之後應該不會直接破壞目前的系統。 |
Default listing pages 現有功能紀錄
Default listing pages 各頁功能列表https://docs.google.com/spreadsheets/d/1mIcRw-2ehZ0UQv7KjMcQ9vOkCoBqOP6wiLDfmMSmSDA |
重構方法依我個人認為重構後的結果依收斂(需要越少檔案越收斂)程度由小到大排序
目前 default listing pages 測試覆蓋率
|
Mixin: fetch-list-and-loadmore.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: #63
目前的 listing pages 條列如下,當中有許多程式碼屬重複部分,可考慮重構:
/pages/author/_id.vue
/pages/category/_name.vue
/pages/search/_keyword.vue
/pages/section/_name.vue
/pages/section/topic.vue
/pages/tag/_id.vue
/pages/topic/_id.vue
在 nuxt 中令多個 routes 可共用同一個 page component 而減少 page components 數量的方法參考:nuxt/nuxt#2693 (comment)
The text was updated successfully, but these errors were encountered: