Comments (5)
Hey, I just added the slot. It would be like this to use it:
<treeselect ...>
<template slot="option" slot-scope="{ option }">
{{option.label}}
...other things i want to customize the label with here...
</template>
</treeselect>
Note that, slot-scope="{ option }"
used destructuring. The option
variable provides a lot of properties (e.g. isBranch
, isLeaf
, ancestors
, level
, ...etc) for your template to consume. You can also use option.raw
to access the original option data you passed to the component.
Another thing worth noting is that, since the count text is implemented in the fallback content, if you customized the slot then you have to implement the count text yourself too if you are using it.
Do you think the API design fits your needs? Any suggestions are welcome!
from vue-treeselect.
I totally agree. Thanks for your feedback!
from vue-treeselect.
Any chance to release a new version?
from vue-treeselect.
@anfinil I'm sorry, it's not done yet :(
from vue-treeselect.
Hi, really sorry it took too long to have this feature finished. Just to let you know I just shipped it in v0.0.7.
from vue-treeselect.
Related Issues (20)
- Is it possible to release infinity scroll with async search mode ? HOT 1
- lodash需要升级了
- 请问几万条数据渲染很卡有什么办法吗 特别是在输入框输入的时候 HOT 1
- get selected values
- Issue manually clearing and autopopulating
- 111
- loadOptions always returns No sub-options
- 如何做到,返回的数据是一个对象包含 lable 和 id。 HOT 1
- Search and match word only show HOT 1
- Unable to change options after async options load.
- Add Hover HOT 1
- 需要可以直接接受输入
- 远程搜索和懒加载不能一起用吗
- Is there any way to search in a specific leaf?
- Feature: Type text in search box only show match string
- User Experience while removing the selected item. HOT 1
- 一旦配置了 :disable-branch-nodes="true",则父节点左边的多选框就没有了
- 输入搜索条件过滤后,再点击父节点前面的复选框,选择的不是过滤后的结果,选择了所有
- 全选功能怎么实现?
- ảnh xml
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 vue-treeselect.