yelo

Results 47 comments of yelo

> @imyelo 好的谢谢,但是我觉的 Component 组件数据字段监听器,用于监听 properties 和 data 的变化,好像不能对全局变量进行监听比如 app.globaldata wx.[xxx]这样的,还有就是 page 下,希望能考虑支持下。 是的,Page 还没能支持;全局变量的话可能更适合用 flux 的模式 (例如 [redux](https://github.com/tinajs/tina-redux)) 🤔

确定引用的路径正确吗? 可以把文件目录的结构发一下 e.g.: ```bash $ tree src . ├── app.mina ├── components │   └── author.mina ├── images │   └── driver.png ├── pages │   └── home.mina ├── store │   ├── index.js...

config 里的 pages / usingComponents 现在还不支持 alias 呢,抱歉😅

是不是和这个一样 https://github.com/tinajs/tina/issues/59

`` 的语法高亮可以用以下方法实现: 你还可以通过配置 Vetur 的 `vetur.grammar.customBlocks` 为 `` 部块也设置语法高亮: 1. 在 VSCode 中按下 `Ctrl+,` 打开用户设置 (User Settings) 2. 在用户设置中追加如下配置并保存 ```json "vetur.grammar.customBlocks": { "config": "json" } ``` 3. 通过 `Ctrl+Shift+P` 唤起命令面板,执行...

自动格式化的话,VSCode 里用 [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) 可以解决你的问题吗?

另外如果项目里有使用 TypeScript 的话,@Jimexist 的 https://github.com/DefinitelyTyped/DefinitelyTyped/pull/27191 也许可以帮助实现自动补全。😉

> **更新** > 写成 `` 就好了。 > > —————— > > 不知道为什么,安装了 Vetur,也配置了文件关联,还是有红色波浪线,重启了也没有用。请问下这种情况有办法解决吗? > ![image](https://user-images.githubusercontent.com/12868055/87879085-04b32b00-ca1b-11ea-8011-fbfe50f9b54f.png) vetur 的问题持续有一段时间了:#59 , 手动加 `lang` 属性可以暂时避开这个问题 👍

确认能重现。 通过避免直接修改 `this.data` 可以暂时避开这个问题: ```diff - this.data.formData['surname'] = value this.setData({ - formData: this.data.formData + ...this.data.formData, + surname: value, }) ```

于 https://github.com/tinajs/tina/commit/cd292da5ccb7eaa74099935c2ab6539810ba2096 修复。 已发布 [v1.7.1](https://github.com/tinajs/tina/releases/tag/v1.7.1)