推 DCTmaybe: 所以你的問題是:如何依照用戶自訂的順序去執行功能嗎? 12/11 16:03
非常精闢,感謝,哈哈,是的,簡單說就是DCT大大的結論 XD
推 a510042003: 不對 你 action array裡面用的是字串 12/11 16:04
→ a510042003: 應該要 action [ this.action1, this.action2, this.a 12/11 16:04
→ a510042003: ction3 ] 12/11 16:04
→ a510042003: 然後記得 settimeout不是非同步function 12/11 16:06
謝謝,settimeout是async這件事是知道的
所以一定要存進actions就設定完整的function name囉?
※ 編輯: asleepme (223.136.67.63), 12/11/2018 16:15:06
推 a510042003: 是啊 你要在action array 塞function的 reference 他 12/11 17:41
→ a510042003: 才知道指引到哪一個 12/11 17:41
推 Phenomenon: this[action[0]]() 12/11 20:09
推 TitanEric: 樓上厲害 12/11 22:34
推 DCTmaybe: this可以這樣包methods function!?(大驚!? 12/12 00:44
推 fukinhot: 就取thos prop然後執行啊 12/12 08:57
推 fukinhot: *this 12/12 09:02
→ max241: user設定method array 走訪array去執行method 依序等待 12/12 12:26
→ hstt: 感覺你需要像 redux-saga之類的套件 12/12 13:37
推 truthmanman: rxjs ,保證處理的省力很多 12/23 14:16