Skip to content

Commit

Permalink
nvue文档补充样式支持
Browse files Browse the repository at this point in the history
  • Loading branch information
anne-lxm committed Mar 4, 2021
1 parent 80a9d21 commit fe740a1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/nvue-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@
- 文字内容,必须只能在```text```组件下,```text```组件不能换行写内容,否则会出现无法去除的周边空白
- 只有```text```标签可以设置字体大小,字体颜色


**HBuilderX 3.1.0+ 开始支持更多简写样式**
- `border`
- `border-top`
- `border-right`
- `border-bottom`
- `border-left`
- `border-style`
- `border-width`
- `border-color`
- `border-radius`
- `flex-flow`
- `background`


**HBuilderX 3.1.0+ 开始支持新的样式编译模式**
- 新增 `nvueStyleCompiler` 配置,支持组合选择器(相邻兄弟选择器、普通兄弟选择器、子选择器、后代选择器)。[详见](https://ask.dcloud.net.cn/article/38751)






下面有些正确和错误的写法示例对比:

- 选择器类型仅支持 class 选择器
Expand Down
21 changes: 21 additions & 0 deletions docs/nvue-outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,28 @@ nvue 的页面跳转,与 weex 不同,仍然遵循 uni-app 的路由模型。

weex 编译模式下支持使用 weex ui ,例子[详见](https://ext.dcloud.net.cn/plugin?id=442)。但相比uni-app插件市场及官方[uni ui](https://ext.dcloud.net.cn/plugin?id=55)而言,weex语法的组件生态还是比较欠缺的。


**HBuilderX 3.1.0+ 开始支持新的样式编译模式**
- weex 编译模式:老模式,样式支持与普通 weex 相同
- uni-app 编译模式:新模式,在 weex 原有样式基础上支持组合选择器(相邻兄弟选择器、普通兄弟选择器、子选择器、后代选择器)[详见](https://ask.dcloud.net.cn/article/38751)
```js
// manifest.json
{
// ...
/* App平台特有配置 */
"app-plus": {
"nvueStyleCompiler": "uni-app"
}
}
```





## 快速上手


### 1.新建nvue页面
在HBuilderX的 ```uni-app``` 项目中,新建页面,弹出界面右上角可以选择是建立```vue```页面还是```nvue```页面,或者2个同时建。

Expand Down

0 comments on commit fe740a1

Please sign in to comment.