Commit 24ad5a69 authored by 何远江's avatar 何远江

bug 修改,新增下拉框可输入组件

parent 6b636664
...@@ -164,10 +164,10 @@ export default { ...@@ -164,10 +164,10 @@ export default {
}); });
params.push({ params.push({
lfsnr: this.goodsList[0].workorderNo, lfsnr: this.goodsList[0].workorderNo,
BLDAT: 20240420, // BLDAT: 20240420,
BUDAT: 20240420, // BUDAT: 20240420,
// BLDAT: parseTime(new Date(),'{y}{m}{d}'), BLDAT: parseTime(new Date(),'{y}{m}{d}'),
// BUDAT: parseTime(new Date(),'{y}{m}{d}'), BUDAT: parseTime(new Date(),'{y}{m}{d}'),
item, item,
}) })
this.$u.api.sapApi this.$u.api.sapApi
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
宽(cm): 宽(cm):
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<uni-easyinput v-model="form.wide"></uni-easyinput> <uni-easyinput v-model="form.wide" @input="updateWeight"></uni-easyinput>
</u-col> </u-col>
</u-row> </u-row>
<u-row gutter="16" class="itemRow"> <u-row gutter="16" class="itemRow">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
高(cm): 高(cm):
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<uni-easyinput v-model="form.high"></uni-easyinput> <uni-easyinput v-model="form.high" @input="updateWeight"></uni-easyinput>
</u-col> </u-col>
</u-row> </u-row>
<u-row gutter="16" class="itemRow"> <u-row gutter="16" class="itemRow">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
箱重(kg): 箱重(kg):
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<uni-easyinput v-model="form.zxntgew"></uni-easyinput> <uni-easyinput v-model="form.zxntgew" @input="updateWeight"></uni-easyinput>
</u-col> </u-col>
</u-row> </u-row>
<u-row gutter="16" class="itemRow"> <u-row gutter="16" class="itemRow">
...@@ -99,17 +99,19 @@ export default { ...@@ -99,17 +99,19 @@ export default {
}, },
methods: { methods: {
updateWeight(e) { updateWeight(e) {
const reg = /^\d+\*\d+\*\d+\-\d+$/ console.log(e, '----')
const reg = /^\d+\*\d+\*\d+\-\d+(\.\d+)+$/
// 验证格式,判断是否是扫码 // 验证格式,判断是否是扫码
if (reg.test(e)) { if (reg.test(e)) {
console.log('扫码11111');
const arr = e.split('*') const arr = e.split('*')
this.$nextTick(() => { setTimeout(() => {
this.form.long = arr[0] this.form.long = arr[0]
this.form.wide = arr[1] this.form.wide = arr[1]
const data = arr[2].split('-') const data = arr[2].split('-')
this.form.high = data[0] this.form.high = data[0]
this.form.zxntgew = data[1] this.form.zxntgew = data[1]
}) }, 500)
} }
} }
} }
......
{ {
"uni-load-more.contentdown": "Pull up to show more", "uni-load-more.contentdown": "Pull up to show more",
"uni-load-more.contentrefresh": "loading...", "uni-load-more.contentrefresh": "loading...",
"uni-load-more.contentnomore": "No more data" "uni-load-more.contentnomore": "No more data"
......
import en from './en.json' import en from './en.json'
import zhHans from './zh-Hans.json' import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json' import zhHant from './zh-Hant.json'
export default { export default {
en, en,
'zh-Hans': zhHans, 'zh-Hans': zhHans,
'zh-Hant': zhHant 'zh-Hant': zhHant
} }
{ {
"uni-load-more.contentdown": "上拉显示更多", "uni-load-more.contentdown": "上拉显示更多",
"uni-load-more.contentrefresh": "正在加载...", "uni-load-more.contentrefresh": "正在加载...",
"uni-load-more.contentnomore": "没有更多数据了" "uni-load-more.contentnomore": "没有更多数据了"
......
{ {
"uni-load-more.contentdown": "上拉顯示更多", "uni-load-more.contentdown": "上拉顯示更多",
"uni-load-more.contentrefresh": "正在加載...", "uni-load-more.contentrefresh": "正在加載...",
"uni-load-more.contentnomore": "沒有更多數據了" "uni-load-more.contentnomore": "沒有更多數據了"
......
## 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.0.15(2023-11-24)
1.优化多选选中样式(tianheng20**qq.com网友提供) 1.优化多选选中样式(tianheng20**qq.com网友提供)
2.优化chang事件(chang事件中将返回所选中的对象) 2.优化chang事件(chang事件中将返回所选中的对象)
...@@ -39,4 +46,4 @@ ...@@ -39,4 +46,4 @@
## 1.0.0(2023-06-16) ## 1.0.0(2023-06-16)
添加下拉框检索,多选功能,自定义数据 添加下拉框检索,多选功能,自定义数据
## 1.0.4(2023-06-16) ## 1.0.4(2023-06-16)
添加下拉框检索,多选功能,自定义数据 添加下拉框检索,多选功能,自定义数据
{ {
"id": "zxz-uni-data-select", "id": "zxz-uni-data-select",
"displayName": "zxz-uni-data-select 下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)", "displayName": "zxz-uni-data-select 下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)",
"version": "1.0.15", "version": "1.0.20",
"description": "通过数据驱动的下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)", "description": "通过数据驱动的下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
"select", "select",
"uni-data-select", "uni-data-select",
"下拉框", "下拉框",
"下拉选" "下拉选择框"
], ],
"repository": "", "repository": "",
"engines": { "engines": {
"HBuilderX": "^3.1.1" "HBuilderX": "^3.1.1"
}, },
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
}, },
"sourcecode": { "sourcecode": {
"price": "0.00" "price": "0.00"
} }
}, },
"contact": { "contact": {
"qq": "" "qq": ""
}, },
"declaration": { "declaration": {
"ads": "无", "ads": "无",
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "", "npmurl": "",
"type": "component-vue" "type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-load-more"], "dependencies": ["uni-load-more"],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "y", "tcb": "y",
"aliyun": "y" "aliyun": "y",
}, "alipay": "n"
"client": { },
"App": { "client": {
"app-vue": "u", "App": {
"app-nvue": "u" "app-vue": "y",
}, "app-nvue": "y"
"H5-mobile": { },
"Safari": "y", "H5-mobile": {
"Android Browser": "y", "Safari": "y",
"微信浏览器(Android)": "y", "Android Browser": "y",
"QQ浏览器(Android)": "y" "微信浏览器(Android)": "y",
}, "QQ浏览器(Android)": "y"
"H5-pc": { },
"Chrome": "y", "H5-pc": {
"IE": "y", "Chrome": "y",
"Edge": "y", "IE": "y",
"Firefox": "y", "Edge": "y",
"Safari": "y" "Firefox": "y",
}, "Safari": "y"
"小程序": { },
"微信": "y", "小程序": {
"阿里": "y", "微信": "y",
"百度": "y", "阿里": "y",
"字节跳动": "y", "百度": "y",
"QQ": "y", "字节跳动": "y",
"京东": "y" "QQ": "y",
}, "京东": "y"
"快应用": { },
"华为": "y", "快应用": {
"联盟": "y" "华为": "y",
}, "联盟": "y"
"Vue": { },
"vue2": "y", "Vue": {
"vue3": "y" "vue2": "y",
} "vue3": "y"
} }
} }
} }
} }
}
## DataSelect 下拉框选择器 先导入示例项目看看是否满足需求,然后再下载插件,有问题可以加微weiyila520 ## DataSelect 下拉框选择器 <strong style="color:orangered;"><em>先导入示例项目</em></strong> 看看是否满足需求,然后再下载插件,有问题可以加微<strong style="color:orangered;"><em>weiyila520</em></strong>
> **组件名:zxz-uni-data-select** > **组件名:zxz-uni-data-select**
> 代码块: `zxz-uni-data-select` > 代码块: `zxz-uni-data-select`
当选项过多时,使用下拉菜单展示并选择内容 本插件基于官方插件 [uni-data-select](https://ext.dcloud.net.cn/plugin?id=7993) 进行二次开发拓展功能,支持uni-data-select本身功能不变(表单验证等)
## API
<h1>拓展功能</h1>
<ol>
<li>支持多选功能</li>
<li>支持选项禁用</li>
<li>支持自定义显示值</li>
<li>支持搜索</li>
<li>支持多选时将选中值按文字形式展示</li>
<li>支持下拉菜单溢出屏幕底部时自动改为向上弹出</li>
<li>监听搜索输入事件</li>
</ol>
<h2>API</h2>
### zxz-uni-data-select Props ### zxz-uni-data-select Props
| 属性名 | 类型 | 默认值 | 说明 | | 属性名 | 类型 | 默认值 | 说明 |
| - | - | - | - | | - | - | - | - |
| v-model | String、Array、Number |- | 选中项绑定值 | | v-model | String、Array、Number |- | 选中项绑定值 |
| multiple | Boolean | false | 是否多选 | | multiple | Boolean | false | 是否多选 |
| disabled | Boolean |false | 是否禁用 | | disabled | Boolean |false | 是否禁用 |
| dataKey | String |"key" | 作为 key 唯一标识的键名 | | dataKey | String |"key" | 作为 key 唯一标识的键名 |
| dataValue | String | "value" | 作为 value 唯一标识的键名 | | dataValue | String | "value" | 作为 value 唯一标识的键名 |
| collapseTags | Boolean | false | 多选时是否将选中值按文字的形式展示| | filterable | Boolean | false | 是否开启搜索 |
|collapseTagsNum|Number | 1 | 多选时选中值按文字的形式展示的数量| | collapseTags | Boolean | false | 多选时是否将选中值按文字的形式展示 |
| localdata | Array |- | 下拉列表本地数据 | |collapseTagsNum|Number | 1 | 多选时选中值按文字的形式展示的数量 |
|label | String | - | 左侧标题 | localdata | Array |- | 下拉列表本地数据 |
|placeholder | String | "请选择" | 输入框的提示文字 |label | String | - | 左侧标题 |
|emptyTips | String |"无选项" | 无选项提示 |placeholder | String | "请选择" | 输入框的提示文字 |
|clear | Boolean | true| 是否清空 |emptyTips | String |"无选项" | 无选项提示 |
|format | String | - | 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}" |clear | Boolean | true | 是否清空 |
|format | String | - | 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"|
#### 如使用过程中有任何问题,或者您对组件有一些好的建议 |@inputChange | event | event(String) | 搜索输入事件 |
## 欢迎加微weiyila520 \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment