balibabu
balibabu
`Object.defineProperty(Vue.prototype, '$moment', { value: moment });`想要添加的属性不被重新赋值,应该这么设置吧:`Object.defineProperty(Vue.prototype, '$moment', { value: moment ,writable: false});`默认writable: true 可以被重新赋值。
是的,不好意思,红宝书上这么一段话 *[[Writable]]:表示能否修改属性的值。像前面例子中那样直接在对象上定义的属性,它们的这个特性默认值为 true。*是字面量的方式。
关注下,有时间贡献下代码
希望继续更新!
awesome
如果要实现recompose方式不把逻辑侵入到展示组件,可能还是需要借助高阶组件或者将被入侵的函数组件作为容器组件,再嵌套一个纯的展示组件
+11
vscode debug是需要F5启动的,但是往往cli程序是在命令行里输入并带有参数的,比如:`webpack --env.platform=web`,请问在vscode里打断点能拿到后面的命令行参数吗?
 Comment out the code in the red box above from the login page and the github button will be displayed.