Skip to content

Commit

Permalink
feat(cell-group): enrich external-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Jul 23, 2022
1 parent d548af0 commit df8026d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/cell-group/cell-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const name = `${prefix}-cell-group`;

@wxComponent()
export default class CellGroup extends SuperComponent {
externalClasses = ['t-class'];
externalClasses = [`${prefix}-class`, `${prefix}-class-title`];

options = {
addGlobalClass: true,
Expand All @@ -22,6 +22,7 @@ export default class CellGroup extends SuperComponent {
* 组件的初始数据
*/
data = {
prefix,
classPrefix: name,
};
}
4 changes: 2 additions & 2 deletions src/cell-group/cell-group.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<view wx:if="{{ title }}" class="{{ classPrefix }}__title"> {{ title }} </view>
<view class="t-class {{ classPrefix }} {{ bordered ? classPrefix + '--bordered' : '' }}">
<view wx:if="{{ title }}" class="{{ classPrefix }}__title {{prefix}}-class-title"> {{ title }} </view>
<view class="{{prefix}}-class {{ classPrefix }} {{ bordered ? classPrefix + '--bordered' : '' }}">
<slot />
</view>

0 comments on commit df8026d

Please sign in to comment.