Comments (3)
Translation of this issue:
[Xupload] Under the default configuration, the download button in the list slot cannot be displayed
- I have searched the [isSues] (https://github.com/iduxfe/idux/isSues) of this repository and believe that this is not a duplicate.
REPRODUCTION LINK
[link] (https://playground.idux.site/#eyjqbgf5z3jvdw5kqxbwlnz1zSi6ijx0ZW1WBGF0ZT5CBIAGPEL4RHD2VDMLKZXI +xg4g 4TM90A Wzpy2f0aw9uuhjvdmlkzxi+xg4gicagica8sxhnb2rhbfbyb3zgvyPlxuicagicAgicAgicAgica8sxhnzywdluhjvdmlkzxi+XG4GICAGAGPEFWCCAVPLXU ICAGICAGICA8L0L0L4TWVZC2FNZVBYB3ZPZGVYPLXUICAGICAGPC9jee1vzgfsuhjvdmlkzxi+XG4GICAGPC9jee5vdglmdglVBLXPLXUICA8L0L0L0L0L0L 4RHJHD2VYUHJVDMLKZXI+XG48L3RLBXBSYXRLPLXUXG48C2NYAXB0IGXHBMC9XCJ0C1wiihhnldhvwPlxuaw1wb3j0iHSGC2V0DXIH0GZBSANLI9ZZXR 1CELKDXGUANMNXG5PBXBVCNQGQXBWIGZYB20GJY4VQXBWLNZ1ZSDCBNNLDHVWR1ECGPXG48L3NNNNLWDD5CBIISISIK52DGVTCGXHDGU+XG4GIDXJJ EFVWBG9HZCB2LB2LB2LBZGVSOMZPBGVZPVWIZMLSZXNCIIBHY3RPB249XCJODHRWCZL3J1BI5TB2NR LHZTMZNTRCIJ5CBIAGICA8SXHCDXR0B24+VXBSB2FKPC9jej1DHRVBJ5CBIAGICA8DGVTCGXHDGUGI2XPC3Q+XG4GICGXHVCGXVYWRCYBAZG93B93B MXVYWQ9XCJKBFILZ5CBIAGICA8L3RLBXBSYXRLPLXUICA8L4VXBSBSB2FKPLXUICBCBIAGA8SXHVCGXWQGDPMAWXLCZ1CIMZZXCIGYWN0N0 AW9UPVWIHR0CHM6LY9YDW4UBW9JA3KUAW8VDJMVNZU2NGJJNGYTNZS00M2Y3LWJJNTGTNDY3LWUZMZU0XCI+XG4GICAGPEL4QNVWBBG9Hzdwvs XHCDXR0B24+XG4GICAGPHRLBXBSYXRLICNSAXN0PLXUICAGPEL4VXBSB2FKRMLSZMGQGRVD25SB2FKPVWNVBJ1CIMLJB25CII8+XG4GICAGP C90ZW1WBGF0ZT5CBIAGPC9jefvWBG9Hzd5CBJWVDGVTCGXHDGU+XG5CBJXZY3JPCHQGC2V0DXAGBGFUZZ1CINRZXCI+XG5PBXBCNQGFSBMCM9TICD2D Wunxg5cbmnvbnvn0igzpbgvzid0cmvmvmkFTCBIAGE1XUICAGTLETOGJ3RC3QXJYXCBIAGICBUYW1LOIANAWR1EC5ZDMCNLFXR1CZOGJ3NLC3 Mnlfxuicb9lfxSLCBMNVBNBNN0IGLJB24GPSB7ZG93BMXVYWQ6icdkb3Dubg9Hzcd9xg5cbmnnnn0igrsid0gkkge1xuGXUFVXUPC9ZY 3jpchq+xg4ifq ==)
STEPS To Reproduce
What is exfected?
Show the download button
What is actually happy?
Do not display the download button
ENVIRONMENT Info
ANY Additional Comments? (Optional)
The default configuration is not download icon
https://github.com/iduxfe/idux/blob/b03eadde3c9a119EAD5F440AC96FC5EE03E5DB7B/packages/Comfig/defaultConfig.ts#L416 -L424
https://github.com/iduxfe/idux/blob/b03eadde3c9a119EAD5F440AC96FC5EE03E5DB7B7B7B7B/packages/compload/Src/UTILS/ICON.TS#L60-L60-l6 4
from idux.
因为现在按钮处于file状态,你配置file状态的icon就好了
<template>
<IxUpload v-model:files="files" action="https://run.mocky.io/v3/7564bc4f-780e-43f7-bc58-467959ae3354">
<IxButton>Upload</IxButton>
<template #list>
<IxUploadFiles @download="dl"/>
</template>
</IxUpload>
<!-- <IxUploadFiles @download="dl" :icon="icon"/> -->
<IxIcon name="download" />
<IxUpload v-model:files="files" action="https://run.mocky.io/v3/7564bc4f-780e-43f7-bc58-467959ae3354">
<IxButton>Upload</IxButton>
<template #list>
<IxUploadFiles @download="dl" :icon="icon"/>
</template>
</IxUpload>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const files = ref([
{
key: 'test1',
name: 'idux.svg',
status: 'success',
},
])
const icon = {
file: 'download',
}
const dl = () => {
alert(1)
}
</script>
from idux.
因为现在按钮处于file状态,你配置file状态的icon就好了
<template> <IxUpload v-model:files="files" action="https://run.mocky.io/v3/7564bc4f-780e-43f7-bc58-467959ae3354"> <IxButton>Upload</IxButton> <template #list> <IxUploadFiles @download="dl"/> </template> </IxUpload> <!-- <IxUploadFiles @download="dl" :icon="icon"/> --> <IxIcon name="download" /> <IxUpload v-model:files="files" action="https://run.mocky.io/v3/7564bc4f-780e-43f7-bc58-467959ae3354"> <IxButton>Upload</IxButton> <template #list> <IxUploadFiles @download="dl" :icon="icon"/> </template> </IxUpload> </template> <script setup lang="ts"> import { ref } from 'vue' const files = ref([ { key: 'test1', name: 'idux.svg', status: 'success', }, ]) const icon = { file: 'download', } const dl = () => { alert(1) } </script>
是idux配置里面,默认值少配置了属性导致的。
理想情况下,应该显示file icon + 右侧 关闭 icon 以及 下载 icon
from idux.
Related Issues (20)
- [cdk] 开发套件中resize套件文档中api错误
- [table] 任意列配置了列宽之后,选中列宽度会进行缩放变大
- [textarea] IxTextarea 无法配置原生 textarea 的 cols 属性
- [table] 树表格的勾选,在初始化赋值时未做到级联 HOT 1
- [ form] formItem中的表单项未继承formItem的status
- [bug]IxRadioGroup的gap配置,对字符串和数字的处理不一致 HOT 1
- [Table ] Table在虚拟滚动+合并单元格场景,滚动时会出现合并单元格消失
- [RadioData] RadioData的key能否设置成布尔类型 HOT 1
- [IxDesc ] desc header slots 不会独立成一行
- [proSearch ] 能提供一个api,获取当前筛选条件的所有文案 HOT 2
- [ pro-search]searchFileds的key值是0或false,第一次点击选项会清空,第二次点击才能选中 HOT 1
- [ pro-search] [偶现] 快捷面板下配置keywordFallback,一键清空,删除等操作后,输入关键字,默认选中的项不对 HOT 1
- [ pro-search] [偶现] 快捷面板下配置keywordFallback,一键清空,删除等操作后,输入关键字,默认选中的项不对 #
- [ pro-search]searchFileds的key值是0或false,第一次点击选项会清空,第二次点击才能选中 HOT 1
- [Tooltip] [必现] [vue2] ixTooltip与v-if使用时 如果v-if加在hover的内容上,且v-if延时加载,会出现tooltip加载不出来的现象 HOT 1
- [IxTree] When IxTree sets draggable and showLine together, the treeNode's line is wrong.
- [IxModal] 弹窗IxModal 同时设置可拖动与 #header 插槽,控制台会报错 HOT 1
- [IxProSearch ]快捷面板中点击“输入框”类型的过滤项,面板浮层建议不要自动消失,从而增强体验
- [IxProSearch ] 复合搜索框的下拉选项全选后,选项消失问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idux.