Comments (7)
首先你的demo代码存在错误,这个自己研究。
是指运算优先级问题吧,抱歉,在复现代码中出现了这样的错误(
建这个 issue 起源于我想替换掉单选模式下 el-select 展示的选中的值。tag 插槽出现之前,el-select 只能通过 prefix 插槽去改变显示。然而,在我的印象中,el-select 的 prefix 的样式是不正确的,而且这个问题许久没有处理(见 #10644),所以对新的 tag 插槽抱有期待。
现在,我能理解 tag 只适用于多选模式这一设计。请问除了 prefix 或者 tag 有没有更合适的方法去修改 el-select 中的内容呢
The styling issue with the prefix has been fixed in version 2.5.0. Can the custom template meet your requirements?
from element-plus.
当然最好的方法是新增插槽,但是没这么快哦。
新增插槽可能还需要考虑是否要把tag插槽收敛进去之类的。
from element-plus.
首先你的demo代码存在错误,这个自己研究。其次本身tag功能就是为多选设计的,用于隔开选项,单选tag不是多此一举?
from element-plus.
Tag插槽只对多选模式生效。
from element-plus.
首先你的demo代码存在错误,这个自己研究。
是指运算优先级问题吧,抱歉,在复现代码中出现了这样的错误(
建这个 issue 起源于我想替换掉单选模式下 el-select 展示的选中的值。tag 插槽出现之前,el-select 只能通过 prefix 插槽去改变显示。然而,在我的印象中,el-select 的 prefix 的样式是不正确的,而且这个问题许久没有处理(见 #10644),所以对新的 tag 插槽抱有期待。
现在,我能理解 tag 只适用于多选模式这一设计。请问除了 prefix 或者 tag 有没有更合适的方法去修改 el-select 中的内容呢
from element-plus.
手动画一个select框,把el-select隐藏起来,这样结果的渲染就都可以自己处理了。
from element-plus.
手动画一个select框,把el-select隐藏起来,这样结果的渲染就都可以自己处理了。
这能解决问题,但不是一个合适的方法。也许应该给 ElSelect 新增一个插槽来表示“选中”的内容?
对用户和开发者而言,Select 是选中内容而不是字符输入,这是符合直觉的,所以既然 Option 可以自定义的话,Select 所选中的内容也应该可以自定义。
from element-plus.
Related Issues (20)
- [Component] [input] v-show使用初始化变量控制显示或隐藏时不起作用 HOT 7
- [Style] [menu] 升级到2.5.0+后,el-menu 设置ellipsis为true后在全屏模式下一直省略多余的子项
- [Style] [All] el-iinput, el-select宽度的问题 HOT 2
- [Component] [date-picker] 日期选择器type为datetimerange时,点击弹出框左侧的"开始时间",两边的月份都会显示为当前月份
- [Component] [table-v2] el-table-v2没有对列的虚拟化 HOT 1
- [Style] [dialog] dialog组件在2.5.3升级到2.5.4后在外层新增了一层padding,导致我调整过的所有header、footer、body全部都需要重新调整,我想知道这是临时更改的还是以后都这样了。 HOT 5
- [Docs] [All] gogocode not work HOT 1
- [Component] [date-picker] DateTimePicker 日期时间选择器 dateranger类型下 选择时间后清除填入相同时间下拉选择器无法再选择其他时间且按钮不能点击
- [Component] [date-picker] When type dates is given a default value, the panel expansion will not be selected the first time
- [Style] [table-v2] Virtualized Table 表头错位
- [Style] [select] el-select 组件设置属性 disabled 为 true 后,组件值字体颜色未改变
- [tree] [plugin:vite:import-analysis] Failed to resolve import "element-plus/es/components/tree-node/style/css" from "dist/assets/el-popper-BpYy968T.js". Does the file exist? HOT 7
- [Performance] [scrollbar] [Component] [el-scrollbar] scrollBar内部的resize事件解绑的问题。 HOT 1
- [Component] [All] The component still displays when v-show is false. HOT 1
- [Component] [space] el-space和v-if使用会有不该有的占位出现 HOT 1
- [Component] [form] `scroll-into-view-options` 属性无效 HOT 1
- [Component] [date-picker] el-date-picker出现警告computed计算属性相关的警告 HOT 4
- [Performance] [select-v2] el-select-v2数据很多时, 全选后下拉会卡死
- [Component] [radio-group] 在el-form中使用el-radio-group组件时,谷歌浏览器html检查报错Incorrect use of <label for=FORM_ELEMENT> HOT 1
- [Component] [date-picker] el-date-picker在最新的VUE版本中会报错 HOT 1
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 element-plus.