Skip to content

Commit

Permalink
Merge pull request #223 from xihangzhou/feature/tag
Browse files Browse the repository at this point in the history
feat(tag): add external classes for tag
  • Loading branch information
jin0209 authored Mar 8, 2022
2 parents d826495 + 47e8132 commit 00ff8ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/tag/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default class Tag extends SuperComponent {
classBasePrefix: prefix,
};

externalClasses = [`${prefix}-class`];

properties = props;

methods = {
Expand Down
2 changes: 1 addition & 1 deletion src/tag/tag.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<wxs src="./tag.wxs" module="this" />
<view
class="{{ this.getTagClass({classBasePrefix, classPrefix, theme, size, variant, shape, disabled, closable}) }}"
class="{{classBasePrefix}}-class {{ this.getTagClass({classBasePrefix, classPrefix, theme, size, variant, shape, disabled, closable}) }}"
>
<t-icon wx:if="{{icon}}" name="{{icon}}" />
<view class="{{classPrefix}}__text" style="{{ this.getTagStyle(maxWidth) }}">
Expand Down

0 comments on commit 00ff8ac

Please sign in to comment.