Comments (4)
from ant-design-vue.
不一样,你这个示例没有label属性,大部分场景显示label而不是value,当只有value值label就会失效,这又回到之前说的bug
from ant-design-vue.
哦哦,我懂了,那这个看起来确实不行。
from ant-design-vue.
确实是个 bug
const selectedRoleIds = ref<string[]>([]);
let roleList = ref([{"1":"超级管理员"},{"2":"开发者"}])
const filteredOptions = computed(() => {
return roleList.value.filter((item:any) => !selectedRoleIds.value.includes(item.id)).map(item => ({
value: item.id,
label: item.roleName
}))
})
<a-select key="id" allow-clear v-model:value="selectedRoleIds" mode="multiple"
:options="filteredOptions" placeholder="请选择角色">
<template #tagRender="{ value: val, label, closable, onClose, option }">
<a-tag :closable="closable" style="margin-right: 3px" @close="onClose">
{{ label }}/{{ val }}
</a-tag>
</template>
</a-select>
template的 label 的值被设置为了value的值
from ant-design-vue.
Related Issues (20)
- table单元格气泡显示 HOT 2
- Select mode属性类型声明和文档不一致 HOT 1
- 使用Transition和ConfigProvider组件的页面间切换,出现瞬间组件样式丢失
- table 数据量达到400条以上出现滑动条一直滑动页面会卡死 HOT 7
- Tree 组件异步加载,Promise 抛出异常,Tree组件会报错 HOT 1
- a-input 组件不受控 HOT 2
- a-input 组件不受控
- InputNumber组件使用 precision 时,在safari浏览器中且输入法为mac自带输入法的简体中文时(第三方输入法正常),会自动填写小数点后面的值,小数点后值的长度为precision的值 HOT 2
- RangePicker从startDate进入后选择startDate后,无法选择小于startDate范围的日期,期望恢复这个能力(antd就支持)
- 在nuxt3中,使用message.useMessage读取的contextHolder下js会报错,导致页面白屏 HOT 1
- 自定义时间库文档有问题
- 使用v-for动态创建timeline时,时间线不显示 HOT 1
- 页面中使用a-input进行报错TypeError: Cannot read properties of undefined (reading 'input')
- 主题修改中,controlHeight 对于多选Select 不生效, 单选Select生效
- 组件中是否考虑增加一个颜色选择器(color-picker)?
- Form 與其以下輸入類型的表單驗證
- 希望可以添加Split 面板分割组件
- a-config-provider 补充cssVar参数
- 分段控制器闪现问题
- a-tree中TreeNode中的isLeaf当前版本默认为true,官网文档里写的默认为false
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 ant-design-vue.