Skip to content

Commit 22607a6

Browse files
committed
fix(icon): added the content of the show-title example and improved several comments
1 parent 2d47f95 commit 22607a6

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<template>
2-
<div title="复制" class="icon-demo">
3-
<tiny-icon-copy></tiny-icon-copy>
2+
<div class="icon-demo">
3+
<div title="可见复制">
4+
<tiny-icon-copy></tiny-icon-copy>
5+
</div>
6+
7+
<tiny-icon-copy title="不可见复制"></tiny-icon-copy>
48
</div>
59
</template>
610

@@ -11,8 +15,11 @@ const TinyIconCopy = iconCopy()
1115
</script>
1216

1317
<style scoped>
18+
.icon-demo {
19+
display: flex;
20+
}
1421
.icon-demo .tiny-svg {
15-
margin: 20px 83px;
22+
margin: 20px 40px;
1623
font-size: 24px;
1724
}
1825
</style>

examples/sites/demos/pc/app/icon/show-title.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ test('显示title', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('icon#show-title')
66

7-
await expect(page.getByTitle('复制')).toHaveCount(1)
7+
await expect(page.getByTitle('可见复制')).toHaveCount(1)
88
})
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<template>
2-
<div title="复制" class="icon-demo">
3-
<icon-copy></icon-copy>
2+
<div class="icon-demo">
3+
<div title="可见复制">
4+
<tiny-icon-copy></tiny-icon-copy>
5+
</div>
6+
7+
<tiny-icon-copy title="不可见复制"></tiny-icon-copy>
48
</div>
59
</template>
610

@@ -9,14 +13,17 @@ import { IconCopy } from '@opentiny/vue-icon'
913
1014
export default {
1115
components: {
12-
IconCopy: IconCopy()
16+
TinyIconCopy: IconCopy()
1317
}
1418
}
1519
</script>
1620

1721
<style scoped>
22+
.icon-demo {
23+
display: flex;
24+
}
1825
.icon-demo .tiny-svg {
19-
margin: 20px 83px;
26+
margin: 20px 40px;
2027
font-size: 24px;
2128
}
2229
</style>

examples/sites/demos/pc/app/icon/webdoc/icon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default {
4242
},
4343
desc: {
4444
'zh-CN':
45-
'图标组件自身上指定 <code>title</code> 属性无效,需要通过给其父元素的 <code>title</code> 属性实现提示功能。',
45+
'图标组件自身上指定 <code>title</code> 属性无效,需要通过其父元素的 <code>title</code> 属性实现提示功能。',
4646
'en-US':
4747
'The <code>title</code> attribute specified on the icon component is invalid. You need to give the <code>title</code> attribute of its parent element to realize the prompt function.'
4848
},

packages/theme/build/release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let cssStr = fs.readFileSync(path.resolve(root, 'dist/old-theme-index.css'), 'ut
2121

2222
jsStr = jsStr.replace('#CSS#', cssStr)
2323
fs.writeFileSync(path.resolve(root, 'src/old-theme-index.js'), jsStr) // 供开发时(pnpm site), 可以访问到最新的定制主题变量
24-
fs.writeFileSync(path.resolve(root, 'dist/old-theme-index.js'), jsStr)
24+
fs.writeFileSync(path.resolve(root, 'dist/old-theme-index.js'), jsStr) // 打包发布用
2525

2626
// 3、复制 package.json
2727
const content = fs.readFileSync(path.resolve(root, 'package.json'), 'utf8')

packages/theme/src/button/vars.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// 圆形时按钮圆角
2727
--tv-Button-border-radius-circle: var(--tv-border-radius-round); // 50% 会造成椭圆,此次common变量用 999px代替
2828

29-
//------------------------------------------------------ 场景2、尺寸 height, font-size,padding-x,min-width----
29+
//--------------------------------------------------- 场景2、尺寸 height, font-size,padding-x,min-width,仅图标时的 icon-size
3030
// 默认时按钮字号
3131
--tv-Button-font-size: var(--tv-font-size-md);
3232
// 默认时按钮高度
@@ -78,7 +78,7 @@
7878
// 超小按钮内图标的大小
7979
--tv-Button-size-icon-font-size-mini: 12px;
8080

81-
//------------------------------------------------------ 场景3、颜色 text-color bg-color border-color icon-color----
81+
//------------------------------------------------------ 场景3、颜色 text-color bg-color border-color icon-color
8282
//------ 状态: 默认+primary+4主题 ghost plain (hover active) disabled
8383
// 1、ghost中只影响 bg 2、active 只影响(主题+plain) 3、 disabled 优先级高过 (主题+plain+激活)
8484

0 commit comments

Comments
 (0)