Skip to content

Commit

Permalink
fix(tag): update tag's demo, which is relate to size
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjunjian committed Oct 29, 2024
1 parent 680de88 commit fac12c9
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<tiny-tag-group :data="items" size="medium"> </tiny-tag-group>
<div>小型标签:small</div>
<tiny-tag-group :data="items" size="small"> </tiny-tag-group>
<div>超小标签:mini</div>
<tiny-tag-group :data="items" size="mini"> </tiny-tag-group>
</div>
</template>

Expand Down
4 changes: 0 additions & 4 deletions examples/sites/demos/pc/app/tag-group/tag-group-size.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ test('TagGroup 尺寸', async ({ page }) => {
const smallTag = page.locator('.tiny-demo-tag-group-size .tiny-tag-group .tiny-tag.tiny-tag--small').nth(0)
await expect(smallTag).toHaveCSS('height', '20px')
await expect(smallTag).toHaveCSS('line-height', '18px')

const miniTag = page.locator('.tiny-demo-tag-group-size .tiny-tag-group .tiny-tag.tiny-tag--mini').nth(0)
await expect(miniTag).toHaveCSS('height', '18px')
await expect(miniTag).toHaveCSS('line-height', '15px')
})
2 changes: 0 additions & 2 deletions examples/sites/demos/pc/app/tag-group/tag-group-size.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<tiny-tag-group :data="items" size="medium"> </tiny-tag-group>
<div>小型标签:small</div>
<tiny-tag-group :data="items" size="small"> </tiny-tag-group>
<div>超小标签:mini</div>
<tiny-tag-group :data="items" size="mini"> </tiny-tag-group>
</div>
</template>

Expand Down
2 changes: 0 additions & 2 deletions examples/sites/demos/pc/app/tag/size-composition-api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<tiny-tag size="medium" type="success"> 中等标签 </tiny-tag>
<tiny-tag type="success"> 默认标签 </tiny-tag>
<tiny-tag size="small" type="success"> 小型标签 </tiny-tag>
<tiny-tag size="mini" type="success"> 超小标签 </tiny-tag>
<br /><br />
<tiny-tag size="medium" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag size="small" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag size="mini" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
</div>
</template>

Expand Down
2 changes: 0 additions & 2 deletions examples/sites/demos/pc/app/tag/size.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ test('各型号尺寸是否正常', async ({ page }) => {
const normal = page.getByText('默认标签')
const medium = page.getByText('中等标签')
const small = page.getByText('小型标签')
const mini = page.getByText('超小标签')

await expect(normal).toHaveCSS('height', '24px')
await expect(medium).toHaveCSS('height', '32px')
await expect(small).toHaveCSS('height', '20px')
await expect(mini).toHaveCSS('height', '18px')
})
2 changes: 0 additions & 2 deletions examples/sites/demos/pc/app/tag/size.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<tiny-tag size="medium" type="success"> 中等标签 </tiny-tag>
<tiny-tag type="success"> 默认标签 </tiny-tag>
<tiny-tag size="small" type="success"> 小型标签 </tiny-tag>
<tiny-tag size="mini" type="success"> 超小标签 </tiny-tag>
<br /><br />
<tiny-tag size="medium" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag size="small" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
<tiny-tag size="mini" type="success" only-icon> <tiny-icon-heartempty /> </tiny-tag>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/tag/webdoc/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export default {
'en-US': 'Size'
},
desc: {
'zh-CN': '通过 <code>size</code> 设置尺寸大小,可选值: <code>(medium / small / mini)</code> 。',
'en-US': 'Set the size through <code>size</code> , with optional values: <code>(medium/small/mini)</code> .'
'zh-CN': '通过 <code>size</code> 设置尺寸大小,可选值: <code>(medium / small)</code> 。',
'en-US': 'Set the size through <code>size</code> , with optional values: <code>(medium/small)</code> .'
},
codeFiles: ['size.vue']
},
Expand Down

0 comments on commit fac12c9

Please sign in to comment.