From 8d3775a4dbe8dcef53b2f7e7b3eac2fd815f3dae Mon Sep 17 00:00:00 2001 From: Y Date: Fri, 28 Oct 2022 14:30:30 +0800 Subject: [PATCH] feat(check-tag): support externalClass (#945) --- src/tag/README.md | 1 + src/tag/check-tag.ts | 2 ++ src/tag/check-tag.wxml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tag/README.md b/src/tag/README.md index 649dff070..7ccb1ae52 100644 --- a/src/tag/README.md +++ b/src/tag/README.md @@ -84,6 +84,7 @@ isComponent: true | icon | String / Slot | - | 标签图标 | N | | shape | String | square | 标签类型,有三种:方形、圆角方形、标记型。可选项:square/round/mark | N | | size | String | medium | 标签尺寸。可选项:small/medium/large。TS 类型:`SizeEnum` | N | +| external-classes | Array | - | 组件类名,用于设置 组件外层元素元素类名。`['t-class'] ### CheckTag Events diff --git a/src/tag/check-tag.ts b/src/tag/check-tag.ts index 18b5d770e..ec9d96399 100644 --- a/src/tag/check-tag.ts +++ b/src/tag/check-tag.ts @@ -16,6 +16,8 @@ export default class CheckTag extends SuperComponent { properties = props; + externalClasses = [`${prefix}-class`]; + controlledProps = [ { key: 'checked', diff --git a/src/tag/check-tag.wxml b/src/tag/check-tag.wxml index 25113cd78..5045b186f 100644 --- a/src/tag/check-tag.wxml +++ b/src/tag/check-tag.wxml @@ -1,4 +1,4 @@ - +