Skip to content

Commit 485a3c9

Browse files
authored
fix(theme): select-dropdown's wrap dom add overflow = auto (#4015)
* fix(theme): select-dropdown's wrap dom add overflow = auto * fix(icon): add icon's demo description * fix(icon): add icon's demo descriptions
1 parent d0e7230 commit 485a3c9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,27 @@ export default {
1212
},
1313
desc: {
1414
'zh-CN': `
15-
从 <code>@opentiny/vue-icon</code> 图标库中引入图标函数图标函数执行后生成一个有效的 <code> Vue </code> 图标组件,可以在模板中使用。<br>
15+
从 <code>@opentiny/vue-icon</code> 图标库中引入图标函数图标函数执行后生成一个有效的 <code> Vue </code> 图标组件,可以在模板中使用。在组件内应该保存图标组件的变量用于绑定,要避免在模板上直接绑定图标函数的执行。<br>
1616
通过修改图标的 <code>font-size</code> 的样式,指定图标的大小,通过修改<code>fill</code> 的样式指定图标的颜色。
1717
<div class="tip custom-block">
1818
<p class="custom block title"> 常见的图标使用方式 </p>
1919
以 <code>Shared</code>图标组件为例:<br>
2020
1、在模板中通过标签式引入。比如 <code> &lt;tiny-shared /&gt; </code> <br>
2121
2、在模板中通过<code> &lt;component&gt; </code> 组件引入。比如 <code> &lt;component :is="tinyShared" /&gt; </code> <br>
2222
3、在组件属性中传入。比如 <code> &lt;tiny-button :icon="tinyShared" &gt; </code> <br>
23+
4、避免模板绑定图标函数的执行。不建议 <code> &lt;component :is="IconShared()" /&gt; </code>
2324
</div>
2425
`,
2526
'en-US': `
26-
Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template. <br>
27+
Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template.Save the icon component variables for binding within the component. Avoid directly binding the icon function execution on the template. <br>
2728
Specify the size of the icon by modifying the <code>font-size</code> style, and specify the color of the icon by modifying <code>fill</code>.
2829
<div class="tip custom-block">
2930
<p class="custom block title"> Common icon usage </p>
3031
Take the <code>Shared</code> icon component as an example: <br>
3132
1. Import labels in the template. For example, <code> &lt; tiny-shared /&gt; </code> <br>
3233
2, in the template by <code> &lt; component&gt; The </code> component is introduced. For example, <code> &lt; component :is="tinyShared" /&gt; </code> <br>
3334
3. Pass in component properties. For example, <code> &lt; tiny-button :icon="tinyShared" &gt; </code> <br>
35+
4. Avoid executing template-bound icon functions.Not recommended <code> &lt;component :is="IconShared()" /&gt; </code>
3436
</div>
3537
`
3638
},

packages/theme-saas/src/select-dropdown/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
}
147147

148148
.@{select-prefix-cls}__popper-maxh-50 {
149+
overflow: auto;
149150
max-height: 50%;
150151
}
151152

packages/theme/src/select-dropdown/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,6 @@
197197
}
198198

199199
.@{select-prefix-cls}__popper-maxh-50 {
200+
overflow: auto;
200201
max-height: 50%;
201202
}

0 commit comments

Comments
 (0)