diff --git a/docs/en-US/component/tag.md b/docs/en-US/component/tag.md index 825eefce2d..ac9af1cc03 100644 --- a/docs/en-US/component/tag.md +++ b/docs/en-US/component/tag.md @@ -73,45 +73,50 @@ tag/checkable ::: -## Attributes +## Tag API -| Name | Description | Type | Accepted Values | Default | -| ------------------- | ------------------------------------ | ------- | --------------------------- | ------- | -| type | component type | string | success/info/warning/danger | — | -| closable | whether Tag can be removed | boolean | — | false | -| disable-transitions | whether to disable animations | boolean | — | false | -| hit | whether Tag has a highlighted border | boolean | — | false | -| color | background color of the Tag | string | — | — | -| size | tag size | string | large / default /small | default | -| effect | component theme | string | dark / light / plain | light | -| round | whether Tag is rounded | boolean | — | false | +### Tag Attributes -## Events +| Name | Description | Type | Default | +| ------------------- | ------------------------------------ | ----------------------------------------------------------- | ------- | +| type | type of Tag | ^[enum]`'success' \| 'info' \| 'warning' \| 'danger' \| ''` | '' | +| closable | whether Tag can be removed | ^[boolean] | false | +| disable-transitions | whether to disable animations | ^[boolean] | false | +| hit | whether Tag has a highlighted border | ^[boolean] | false | +| color | background color of the Tag | ^[string] | '' | +| size | size of Tag | ^[enum]`'large' \| 'default' \| 'small' \| ''` | '' | +| effect | theme of Tag | ^[enum]`'dark' \| 'light' \| 'plain'` | light | +| round | whether Tag is rounded | ^[boolean] | false | -| Name | Description | Parameters | -| ----- | ---------------------------- | ---------- | -| click | triggers when Tag is clicked | — | -| close | triggers when Tag is removed | — | +### Tag Events -## Slots +| Name | Description | Type | +| ----- | ---------------------------- | -------------------------------------- | +| click | triggers when Tag is clicked | ^[Function]`(evt: MouseEvent) => void` | +| close | triggers when Tag is removed | ^[Function]`(evt: MouseEvent) => void` | + +### Tag Slots | Name | Description | | ---- | ------------------------- | | — | customize default content | -## CheckTag Attributes -| Name | Description | Type | Accepted Values | Default | -| ------- | ----------- | ------- | --------------- | ------- | -| checked | is checked | boolean | true/false | — | +## CheckTag API -## CheckTag Events +### CheckTag Attributes -| Name | Description | Parameters | -| ------ | ---------------------------------- | ---------- | -| change | triggers when Check Tag is clicked | checked | +| Name | Description | Type | Default | +| ------------------------- | ----------- | ---------- | ------- | +| checked / v-model:checked | is checked | ^[boolean] | false | -## CheckTag Slots +### CheckTag Events + +| Name | Description | Type | +| ------ | ---------------------------------- | ------------------------------------- | +| change | triggers when Check Tag is clicked | ^[Function]`(value: boolean) => void` | + +### CheckTag Slots | Name | Description | | ---- | ------------------------- | diff --git a/packages/components/check-tag/src/check-tag.ts b/packages/components/check-tag/src/check-tag.ts index c9239c53e8..b8bc99e4fc 100644 --- a/packages/components/check-tag/src/check-tag.ts +++ b/packages/components/check-tag/src/check-tag.ts @@ -5,6 +5,9 @@ import type CheckTag from './check-tag.vue' import type { ExtractPropTypes } from 'vue' export const checkTagProps = buildProps({ + /** + * @description is checked + */ checked: { type: Boolean, default: false, diff --git a/packages/components/check-tag/src/check-tag.vue b/packages/components/check-tag/src/check-tag.vue index a1a2409ba8..9ff65faa42 100644 --- a/packages/components/check-tag/src/check-tag.vue +++ b/packages/components/check-tag/src/check-tag.vue @@ -1,10 +1,11 @@