ChasLui

Results 20 comments of ChasLui

> 非常感谢 还有 P11 使用| 作为管理符号

在 mac 下使用 zsh, 执行 `umi config set routes [] ` 会报错,匹配不到[], 需要改成`umi config set routes '[]' `

执行`umi g page index`报警告`warning You should config the routes in config.routes manunally since config.routes exists`,并且启动后8000 端口报错`AssertionError [ERR_ASSERTION]: routes should not be empty`, 所以 `umi config set routes '[]'`要改成`umi config set...

> `warning You should config the routes in config.routes manunally since config.routes exists` 有这个警告说明你全局的 umi 不是最新的。 @sorrycc ``` ❯ umi -v 2.10.0-beta.5 ```

> @ChasLui 不够新。 解决了, 搜索到了`2.10.0`, 原因是 Nexus 搭建的私服注册表缓存时间太长了,已改实时

```javascript Object.assign(this.$data, this.$options.data()) ```

> ```js > function rotateArr(arr, k) { > return [...arr.splice(k+1), ...arr]; > } > ``` 拷贝下数组, 防止修改入参 ```js function rotateArr(arr, k) { const _tmp = JSON.parse(JSON.stringify(arr)); return [..._tmp.splice(k + 1),...

```js function rotate(arr, k) { if (!Array.isArray(arr) || !arr.length) { console.error('参数 arr 必须为长度大于 0 的数组'); return []; } if (!Number.isInteger(k) || k

> > if editorjs extract Toolbar into an individual plugin, or make it configable to override default Toolbar renderer, that's would be great. For my current project, we are going...

> ```js > const currying = fn => { > if (typeof fn !== 'function') { > return new Error('No function provided') > } > return function curriedFn(...args){ > if...