mros / infinite-city Goto Github PK
View Code? Open in Web Editor NEW可編程的論壇與聊天室
Home Page: https://city-of-infinity.com
可編程的論壇與聊天室
Home Page: https://city-of-infinity.com
點擊用戶名稱時,要能鏈接到一個新頁面,用來顯示該用戶的基本資訊以及它寫過的文章。
每個看板以及個人頁面,都會增加一塊空間,用以撰寫看板的基本資訊或個人的自我介紹
研究並實作更新文章的權限
以現行API,若使用者將一個深度很深的看板加入書籤,則下次點擊時,必須遞迴發出請求,才能一層一層取得欲查詢看板的資料。
因此,希望能有一個API,請求中包含看板的路徑,例如
GET /api/board/**/桌球/抽球
能在伺服器直接搜尋到 **/桌球/抽球 這個看板
原本的API不用移除,往後可被localstorage記錄,用以加速
先提出一定要實現的場景有哪些:
接着討論此兩場景中遇到的困難或未確定設計之處,並提出解決方式。
Q1: 在場景 1 中,我們該如何從自定義的表單中蒐集資料以回傳到伺服器呢?
解法 1 :採用一個 JSX 組件來定義表單,並且必須約定此組件實作一個 getData 函式,以讓其他組件取得它想給出的資料。
解法 2 :進一步限制自定義能力,使用一個形如
[{"name": "XXXXX", "restriction": "function() {}"}]
的格式。
而渲染方式則固定,也就是說無法讓使用者自行做出富文本編輯器、日期選擇器
Q1: 函式該如何定義?
解法 1 :每個函式應該吃下一個參數,此參數參照到一個描述整個文章的物件。
解法 2 : 函式吃下的參數可已被指定到更細範圍,如第N個留言的name欄位
Q2: 是否一個表單只能是函式或只能是字串?能否在一個欄位裡僅有一部分是函式,例如「贊成的有N人」,中僅有N是個函式。
解法 1 :只要有這種需求就寫成函式
解法 2 :使用模板(如 JSX 就可實現)
目前 header 右側的「登入」與「註冊」功能在行動端無法顯示,導致行動端用戶無法登入。
請修改 css 以修正該問題。
用戶發表私人文章時,不需要添加到根看板下的某個節點,可以直接發在個人頁面下。
在 production 使用 prerender 以渲染頁面給搜尋引擎的爬蟲
最簡單的例子:分辨「原創」跟「轉載」
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.