热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

文都考研官网,文案狗

vue下拉菜单选择输入框@tillhubvue-search-filter(@tillhubvue-search-filterVuesearchinputw

vue下拉菜单选择输入框

@ tillhub / vue-search-filter (@tillhub/vue-search-filter)

Vue search input with dropdown for more filters.

Vue搜索输入带有下拉列表,用于更多过滤器。

View Demo 查看演示 Download Source 下载源 安装 (Install) npm install --save @tillhub/vue-search-filter 用法 (Usage)

Please see example folder for complete code example. Note, that the css has to be imported separately. This library assumes that element-ui is being used by the caller.

请参阅示例文件夹以获取完整的代码示例。 请注意,css必须单独导入。 该库假定调用者正在使用element-ui。

To see the example in action:

要查看实际示例:

npm run serve 属性 (Attributes) AttributeTypeRequiredExampleDefaultDescriptionwidthnumberno500460sets fixed width of component in pixels, minimum is 350localestringno"de""en"Currently only German and English is supported. Only 'de' and 'en 'inputPlaceholderstringno"Search in products""Search"Sets the placeholder text in the input fieldsearchButtonTextstringno"Submit""Search"Sets a custom text in the blue submitting buttonresetButtonTextstringno"Reset""Cancel"Sets a custom text in the reset button 属性 类型 需要 例 默认 描述 宽度 数 没有 500 460 设置组件的固定宽度(以像素为单位),最小值为350 地区 串 没有 “ de” “ en” 目前仅支持德语和英语。 仅“ de”和“ en” inputPlaceholder 串 没有 “搜索产品” “搜索” 在输入字段中设置占位符文本 searchButtonText 串 没有 “提交” “搜索” 在蓝色的提交按钮中设置自定义文本 resetButtonText 串 没有 “重启” “取消” 在重置按钮中设置自定义文本 大事记 (Events) EventDescriptionParamssubmittriggers when the user clicks on "search" buttonfiltersresettriggers when the user clicks on the "reset" button--close-dropwdowntriggers when the user closes the dropwdown-- 事件 描述 参数 提交 当用户单击“搜索”按钮时触发 过滤器 重启 当用户单击“重置”按钮时触发 - 关闭 当用户关闭下拉菜单时触发 - 插槽 (Slot)

One named slot it provided: "dropwdown-content". It is highly advised to refer to the example folder to see how this slot is used. Understanding the parent-child communication is crucial as the dropdown content and input content are closely linked.

它提供了一个命名的插槽:“ dropwdown-content”。 强烈建议参考示例文件夹以了解如何使用此插槽。 由于下拉内容和输入内容紧密联系,因此了解亲子沟通至关重要。

NameTypeExampleDescriptioninputobject{ key1: { label: "product name", value: "product uuid"}, key2: { label: "branch name", value: "branch uuid"} }this is an object that depicts the current state of the tags in the input field,
on every change they are passed to the slot so the consumer can update the slot children accordingly.
The key name is determined by the user, when it is being passed in the "addTag" method (see below).addTagfunction({ name, value, label }) => {}This method communicates the changes in the slot children to the parent.
It adds tags to the parent input field.E.g. it can be called on every change in the child.
The method expects to be called with an object with at least the "name" prop.
If "label" is falsey, it will default to "value". 名称 类型 例 描述 输入 目的 {key1:{标签:“产品名称”,值:“产品uuid”},key2:{标签:“分支名称”,值:“ branch uuid”}} 该对象描述了输入字段中标签的当前状态,
在每次更改时,它们都会传递到插槽,以便消费者可以相应地更新插槽子代。
在“ addTag”方法中传递键名时,键名由用户确定(请参见下文)。 addTag 功能 ({名称,值,标签})=> {} 此方法将插槽子项中的更改传达给父项。
它将标签添加到父输入字段中,例如可以在子项中的每次更改时调用它。
该方法期望使用至少具有“名称”属性的对象进行调用。
如果“标签”为假,则默认为“值”。

翻译自: https://vuejsexamples.com/vue-search-input-with-dropdown-for-more-filters/

vue下拉菜单选择输入框


推荐阅读
author-avatar
莫不静了_660
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有