From f0dffc29faa7b2ad989c1306c7199683d48a97e2 Mon Sep 17 00:00:00 2001 From: houjunxiang Date: Mon, 16 Mar 2026 13:51:28 +0800 Subject: [PATCH] feat:select --- uni_modules/zxz-uni-data-select/changelog.md | 49 ++ .../zxz-uni-data-select.vue | 823 ++++++++++++++++++ uni_modules/zxz-uni-data-select/package.json | 86 ++ uni_modules/zxz-uni-data-select/readme.md | 37 + 4 files changed, 995 insertions(+) create mode 100644 uni_modules/zxz-uni-data-select/changelog.md create mode 100644 uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue create mode 100644 uni_modules/zxz-uni-data-select/package.json create mode 100644 uni_modules/zxz-uni-data-select/readme.md diff --git a/uni_modules/zxz-uni-data-select/changelog.md b/uni_modules/zxz-uni-data-select/changelog.md new file mode 100644 index 0000000..32e10e0 --- /dev/null +++ b/uni_modules/zxz-uni-data-select/changelog.md @@ -0,0 +1,49 @@ +## 1.0.20(2024-05-09) +1.修复APP点击下拉框无法关闭 +## 1.0.19(2024-04-29) +1.修复点击多个下拉框无法关闭 +2.优化多选类型支持一次选择多个 +3.修复小程序点击有个蓝色底 +4.优化下拉菜单溢出屏幕底部时改为向上弹出 +## 1.0.15(2023-11-24) +1.优化多选选中样式(tianheng20**qq.com网友提供) +2.优化chang事件(chang事件中将返回所选中的对象) +## 1.0.14(2023-10-25) +优化vue3延时添加未渲染问题,处理37;分号警告问题 +## 1.0.13(2023-10-12) +优化mixinDatacomResData报错和defValue报错 +## 1.0.12(2023-09-27) +修复搜索输入内容的时候下拉框的箭头会跑到文本框前面去 +优化当有选中项时不显示清除按钮 +## 1.0.11(2023-09-05) +更换change事件执行顺序 +修复多选更改值时未即时更改下拉框选项 +修复单选搜索框选中了 +修复多选筛选输入时点击其他未清空筛选值 +## 1.0.10(2023-08-29) +修复单选搜索回显问题 +## 1.0.9(2023-08-28) +更新文档 +## 1.0.8(2023-08-28) +更新文档 +## 1.0.7(2023-08-16) +修复组件禁用bug +修复数据回显问题 +添加多选搜索功能 +## 1.0.6(2023-08-05) +修复清空值多选下拉列表还是被选中bug +## 1.0.5(2023-07-10) +修复多选初始化异步数据不显示问题 +## 1.0.4(2023-07-07) +修复微信小程序多选显示兼容问题 +## 1.0.3(2023-07-06) +修复bug +多选情况下 初始化之后重新选择第一个不显示 +## 1.0.2(2023-07-06) +更新VUE3兼容 +## 1.0.1(2023-06-30) +添加多选合并功能 +## 1.0.0(2023-06-16) +添加下拉框检索,多选功能,自定义数据 +## 1.0.4(2023-06-16) + 添加下拉框检索,多选功能,自定义数据 diff --git a/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue new file mode 100644 index 0000000..4c689a5 --- /dev/null +++ b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue @@ -0,0 +1,823 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/zxz-uni-data-select/package.json b/uni_modules/zxz-uni-data-select/package.json new file mode 100644 index 0000000..397169b --- /dev/null +++ b/uni_modules/zxz-uni-data-select/package.json @@ -0,0 +1,86 @@ +{ + "id": "zxz-uni-data-select", + "displayName": "zxz-uni-data-select 下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)", + "version": "1.0.20", + "description": "通过数据驱动的下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)", + "keywords": [ + "uni-ui", + "select", + "uni-data-select", + "下拉框", + "下拉选择框" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.1" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-load-more"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y", + "alipay": "n" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "京东": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/zxz-uni-data-select/readme.md b/uni_modules/zxz-uni-data-select/readme.md new file mode 100644 index 0000000..cfd4ea0 --- /dev/null +++ b/uni_modules/zxz-uni-data-select/readme.md @@ -0,0 +1,37 @@ +## DataSelect 下拉框选择器 先导入示例项目 看看是否满足需求,然后再下载插件,有问题可以加微weiyila520 +> **组件名:zxz-uni-data-select** +> 代码块: `zxz-uni-data-select` + +本插件基于官方插件 [uni-data-select](https://ext.dcloud.net.cn/plugin?id=7993) 进行二次开发拓展功能,支持uni-data-select本身功能不变(表单验证等) + +

拓展功能

+
    +
  1. 支持多选功能
  2. +
  3. 支持选项禁用
  4. +
  5. 支持自定义显示值
  6. +
  7. 支持搜索
  8. +
  9. 支持多选时将选中值按文字形式展示
  10. +
  11. 支持下拉菜单溢出屏幕底部时自动改为向上弹出
  12. +
  13. 监听搜索输入事件
  14. +
+ +

API

+### zxz-uni-data-select Props + +| 属性名 | 类型 | 默认值 | 说明 | +| - | - | - | - | +| v-model | String、Array、Number |- | 选中项绑定值 | +| multiple | Boolean | false | 是否多选 | +| disabled | Boolean |false | 是否禁用 | +| dataKey | String |"key" | 作为 key 唯一标识的键名 | +| dataValue | String | "value" | 作为 value 唯一标识的键名 | +| filterable | Boolean | false | 是否开启搜索 | +| collapseTags | Boolean | false | 多选时是否将选中值按文字的形式展示 | +|collapseTagsNum|Number | 1 | 多选时选中值按文字的形式展示的数量 | +| localdata | Array |- | 下拉列表本地数据 | +|label | String | - | 左侧标题 | +|placeholder | String | "请选择" | 输入框的提示文字 | +|emptyTips | String |"无选项" | 无选项提示 | +|clear | Boolean | true | 是否清空 | +|format | String | - | 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"| +|@inputChange | event | event(String) | 搜索输入事件 | \ No newline at end of file