如果您单击该图标,我想链接到该活动,您有什么想法吗?因为如果用户单击删除图标我想清除选择中选择的所有值,也许我们有另一种方法可以做到这一点。
import ipyvuetify as v
model_select =v.Select(
color = 'blue',
append_outer_icon='delete',
style_='width: 600px',
v_model= None,
items=['Select All',
'A',
'B',
'C',
'D'
],
item_color = 'blue',
label='Hospital Name',
attach = False,
solo = True,
small_chips = True,
multiple = True,
deletable_chips = True,
autofocus = True,
)
def on_click(widget, event, data):
print(model_select.v_model)
if 'Select All' in model_select.v_model:
model_select.v_model = set(model_select.items) - set(['Select All'])
model_select.on_event('change', on_click)
model_select.append_outer_icon
model_select