提交 fc5d406b 编写于 作者: Y yaoyuchi

修改检视意见

Signed-off-by: Nyaoyuchi <yaoyuchi@huawei.com>
上级 bd9c60f2
# 继承样式 # 继承样式 <sup>9+</sup>
自定义组件可以通过inhert-class继承父组件的样式,只支持class选择器,多个class之间用空格分隔。 自定义组件可以通过设置inhert-class属性来继承父组件的样式。目前只支持class选择器,多个class之间用空格分隔。
代码示例如下: 代码示例如下:
自定义组件的hml文件,其中fatherclass1和fatherclass1是从父组件继承的样式。 自定义组件的hml文件,其中fatherclass1和fatherclass2是从父组件继承的样式。
```js ```js
<!--comp.hml--> <!--comp.hml-->
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
页面的hml文件,页面中comp自定组件通过inhert-class继承了父组件的fatherclass1和fatherclass2样式。 父页面的hml文件,其中comp自定组件通过inhert-class属性,继承了父组件的fatherclass1和fatherclass2样式。
```html ```html
<!-- xxx.hml --> <!-- xxx.hml -->
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
页面的css文件 页面的css文件
```html ```html
// xxx.css // xxx.css
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册