Commit a764a95ae9a6cff831f75aa97b00724cadc48e92
1 parent
535bdddf
fix(countdown-input): add `slots` support
为CountdownInput组件添加Input的插槽支持
Showing
2 changed files
with
4 additions
and
0 deletions
CHANGELOG.zh_CN.md
@@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
30 | - **MultipleTab** 修复可能会意外创建登录路由标签的问题 | 30 | - **MultipleTab** 修复可能会意外创建登录路由标签的问题 |
31 | - **BasicTree** 修复搜索功能可能导致`checkedKeys`丢失的问题 | 31 | - **BasicTree** 修复搜索功能可能导致`checkedKeys`丢失的问题 |
32 | - **CodeEditor** 修复 value 不支持 v-model 用法的问题 | 32 | - **CodeEditor** 修复 value 不支持 v-model 用法的问题 |
33 | +- **CountdownInput** 修复不支持`input`插槽的问题 | ||
33 | - **其它** | 34 | - **其它** |
34 | - 修复菜单默认折叠的配置不起作用的问题 | 35 | - 修复菜单默认折叠的配置不起作用的问题 |
35 | - 修复`safari`浏览器报错导致网站打不开 | 36 | - 修复`safari`浏览器报错导致网站打不开 |
src/components/CountDown/src/CountdownInput.vue
@@ -3,6 +3,9 @@ | @@ -3,6 +3,9 @@ | ||
3 | <template #addonAfter> | 3 | <template #addonAfter> |
4 | <CountButton :size="size" :count="count" :value="state" :beforeStartFunc="sendCodeApi" /> | 4 | <CountButton :size="size" :count="count" :value="state" :beforeStartFunc="sendCodeApi" /> |
5 | </template> | 5 | </template> |
6 | + <template #[item]="data" v-for="item in Object.keys($slots).filter((k) => k !== 'addonAfter')"> | ||
7 | + <slot :name="item" v-bind="data"></slot> | ||
8 | + </template> | ||
6 | </a-input> | 9 | </a-input> |
7 | </template> | 10 | </template> |
8 | <script lang="ts"> | 11 | <script lang="ts"> |