From 3a4fd8b9064c457b4dd443e613a177df1a907f41 Mon Sep 17 00:00:00 2001 From: wangchen Date: Thu, 6 Jul 2023 17:08:59 +0800 Subject: [PATCH] 7.6 --- components/head-info/head-info.vue | 2 +- components/head-view/head-view.vue | 42 ++ components/sider-bar/slider-bar.vue | 8 +- pages.json | 14 +- pages/index/index.vue | 105 ++- pages/index/instruct.vue | 174 +++++ pages/monitor/index.vue | 204 ++++++ pages/shipWork/index.vue | 122 +++- uni_modules/uni-easyinput/changelog.md | 97 +++ .../components/uni-easyinput/common.js | 56 ++ .../uni-easyinput/uni-easyinput.vue | 657 ++++++++++++++++++ uni_modules/uni-easyinput/package.json | 87 +++ uni_modules/uni-easyinput/readme.md | 11 + 13 files changed, 1506 insertions(+), 73 deletions(-) create mode 100644 components/head-view/head-view.vue create mode 100644 pages/index/instruct.vue create mode 100644 pages/monitor/index.vue create mode 100644 uni_modules/uni-easyinput/changelog.md create mode 100644 uni_modules/uni-easyinput/components/uni-easyinput/common.js create mode 100644 uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue create mode 100644 uni_modules/uni-easyinput/package.json create mode 100644 uni_modules/uni-easyinput/readme.md diff --git a/components/head-info/head-info.vue b/components/head-info/head-info.vue index bdb870d..41ec4cf 100644 --- a/components/head-info/head-info.vue +++ b/components/head-info/head-info.vue @@ -3,7 +3,7 @@ wchenp - + diff --git a/components/head-view/head-view.vue b/components/head-view/head-view.vue new file mode 100644 index 0000000..72b652a --- /dev/null +++ b/components/head-view/head-view.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/components/sider-bar/slider-bar.vue b/components/sider-bar/slider-bar.vue index ab627a5..1166750 100644 --- a/components/sider-bar/slider-bar.vue +++ b/components/sider-bar/slider-bar.vue @@ -18,9 +18,11 @@ 货物质量 - - 场位监控 - + + + 场位监控 + + @@ -74,15 +92,20 @@ display: flex; justify-content: flex-end; - .input { - width: 200px; - height: 35px; - line-height: 35px; - border: 1px solid #c9cacb; - border-radius: 5px; - padding-left: 10px; - margin-left: 15px; + .end { + width: 500px; + display: flex; + justify-content: space-between; + + .input { + width: 200px; + height: 35px; + line-height: 35px; + padding-left: 10px; + margin-left: 15px; + } } + } .itemList { @@ -90,6 +113,7 @@ display: flex; justify-content: flex-start; flex-wrap: wrap; + .item { width: 32%; margin-top: 15px; @@ -97,6 +121,7 @@ height: 160px; border: 1px solid #c9cacb; padding: 22px 15px; + .title { display: flex; justify-content: space-between; @@ -104,20 +129,30 @@ margin-bottom: 20px; font-weight: 700; } + .status { font-size: 16px; font-weight: 400; } + + .row { display: flex; justify-content: space-between; font-size: 18px; margin: 10px 0; - .text { - display: block; + + .nitem { + width: 46%; + + text { + color: #929292; + } } + } } + .item:nth-child(3n) { margin-right: 0; } diff --git a/pages/index/instruct.vue b/pages/index/instruct.vue new file mode 100644 index 0000000..f46151d --- /dev/null +++ b/pages/index/instruct.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/pages/monitor/index.vue b/pages/monitor/index.vue new file mode 100644 index 0000000..d65e4c8 --- /dev/null +++ b/pages/monitor/index.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/pages/shipWork/index.vue b/pages/shipWork/index.vue index e151e1e..a7594e1 100644 --- a/pages/shipWork/index.vue +++ b/pages/shipWork/index.vue @@ -9,7 +9,11 @@ - + + + + @@ -17,22 +21,58 @@ 海王星领袖 - - ● 作业中 - ● 已完成 - - - - - 航次:735546 - 贸易类型: 内贸 + + + + + 进口航次: 735546 - - 进出口: 进口 - 泊位: 一泊位 + + 贸易类型: 内贸 + + + 出口航次: 555546 + + + 贸易类型: 外贸 + + + + + 计划泊位: 一泊位 + + + 实际泊位: 一泊位 + + + + + 已下载 + 2023/09/21 12:00 + + + 未下载 + + + 已上传 + 2023/09/21 12:00 + + + 未上传 + + + + + 下载 + + + 上传 + + + @@ -49,20 +89,21 @@ data() { return { value: 0, + value1:'', range: [{ value: 0, - text: "篮球" + text: "一号港" }, { value: 1, - text: "足球" + text: "二号港" }, { value: 2, - text: "游泳" + text: "不冻港" }, ], - ltemList: [1, 1, 1, 1, 2, 1, 1, 1, 1], + ltemList: [1, 2, 1, 1, 2, 1, 1, 1, 1], } }, onLoad() { @@ -88,18 +129,18 @@ .content { padding: 20px; + .form { display: flex; + .select { width: 100px; } + .input { width: 200px; height: 35px; line-height: 35px; - border: 1px solid #c9cacb; - border-radius: 5px; - padding-left: 10px; margin-left: 15px; } } @@ -109,37 +150,52 @@ display: flex; justify-content: flex-start; flex-wrap: wrap; + .item { - width: 48%; + width: 49%; margin-top: 15px; - margin-right: 4%; - height: 160px; + margin-right: 2%; border: 1px solid #c9cacb; - padding: 22px 15px; .title { display: flex; justify-content: space-between; font-size: 21px; - margin-bottom: 20px; + padding: 10px 20px; font-weight: 700; } - .status { - font-size: 16px; - font-weight: 400; - } - .row { display: flex; justify-content: space-between; font-size: 18px; - margin: 10px 0; + padding: 10px 20px; - .text { - display: block; + .nitem { + width: 46%; + + .text { + color: #929292; + } } } + + .footer { + display: flex; + justify-content: space-between; + height: 60px; + line-height: 60px; + font-size: 21px; + background-color: #f7f9fa; + color: #8d8f8f; + + .fitem { + width: 50%; + text-align: center; + } + + } + } .item:nth-child(2n) { diff --git a/uni_modules/uni-easyinput/changelog.md b/uni_modules/uni-easyinput/changelog.md new file mode 100644 index 0000000..765401a --- /dev/null +++ b/uni_modules/uni-easyinput/changelog.md @@ -0,0 +1,97 @@ +## 1.1.9(2023-04-11) +- 修复 vue3 下 keyboardheightchange 事件报错的bug +## 1.1.8(2023-03-29) +- 优化 trim 属性默认值 +## 1.1.7(2023-03-29) +- 新增 cursor-spacing 属性 +## 1.1.6(2023-01-28) +- 新增 keyboardheightchange 事件,可监听键盘高度变化 +## 1.1.5(2022-11-29) +- 优化 主题样式 +## 1.1.4(2022-10-27) +- 修复 props 中背景颜色无默认值的bug +## 1.1.0(2022-06-30) + +- 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容 +- 新增 clear 事件,点击右侧叉号图标触发 +- 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发 +- 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等 + +## 1.0.5(2022-06-07) + +- 优化 clearable 显示策略 + +## 1.0.4(2022-06-07) + +- 优化 clearable 显示策略 + +## 1.0.3(2022-05-20) + +- 修复 关闭图标某些情况下无法取消的 bug + +## 1.0.2(2022-04-12) + +- 修复 默认值不生效的 bug + +## 1.0.1(2022-04-02) + +- 修复 value 不能为 0 的 bug + +## 1.0.0(2021-11-19) + +- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-easyinput](https://uniapp.dcloud.io/component/uniui/uni-easyinput) + +## 0.1.4(2021-08-20) + +- 修复 在 uni-forms 的动态表单中默认值校验不通过的 bug + +## 0.1.3(2021-08-11) + +- 修复 在 uni-forms 中重置表单,错误信息无法清除的问题 + +## 0.1.2(2021-07-30) + +- 优化 vue3 下事件警告的问题 + +## 0.1.1 + +- 优化 errorMessage 属性支持 Boolean 类型 + +## 0.1.0(2021-07-13) + +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) + +## 0.0.16(2021-06-29) + +- 修复 confirmType 属性(仅 type="text" 生效)导致多行文本框无法换行的 bug + +## 0.0.15(2021-06-21) + +- 修复 passwordIcon 属性拼写错误的 bug + +## 0.0.14(2021-06-18) + +- 新增 passwordIcon 属性,当 type=password 时是否显示小眼睛图标 +- 修复 confirmType 属性不生效的问题 + +## 0.0.13(2021-06-04) + +- 修复 disabled 状态可清出内容的 bug + +## 0.0.12(2021-05-12) + +- 新增 组件示例地址 + +## 0.0.11(2021-05-07) + +- 修复 input-border 属性不生效的问题 + +## 0.0.10(2021-04-30) + +- 修复 ios 遮挡文字、显示一半的问题 + +## 0.0.9(2021-02-05) + +- 调整为 uni_modules 目录规范 +- 优化 兼容 nvue 页面 diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/common.js b/uni_modules/uni-easyinput/components/uni-easyinput/common.js new file mode 100644 index 0000000..5549cc9 --- /dev/null +++ b/uni_modules/uni-easyinput/components/uni-easyinput/common.js @@ -0,0 +1,56 @@ +/** + * @desc 函数防抖 + * @param func 目标函数 + * @param wait 延迟执行毫秒数 + * @param immediate true - 立即执行, false - 延迟执行 + */ +export const debounce = function(func, wait = 1000, immediate = true) { + let timer; + console.log(1); + return function() { + console.log(123); + let context = this, + args = arguments; + if (timer) clearTimeout(timer); + if (immediate) { + let callNow = !timer; + timer = setTimeout(() => { + timer = null; + }, wait); + if (callNow) func.apply(context, args); + } else { + timer = setTimeout(() => { + func.apply(context, args); + }, wait) + } + } +} +/** + * @desc 函数节流 + * @param func 函数 + * @param wait 延迟执行毫秒数 + * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发 + */ +export const throttle = (func, wait = 1000, type = 1) => { + let previous = 0; + let timeout; + return function() { + let context = this; + let args = arguments; + if (type === 1) { + let now = Date.now(); + + if (now - previous > wait) { + func.apply(context, args); + previous = now; + } + } else if (type === 2) { + if (!timeout) { + timeout = setTimeout(() => { + timeout = null; + func.apply(context, args) + }, wait) + } + } + } +} diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue new file mode 100644 index 0000000..7f5113e --- /dev/null +++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue @@ -0,0 +1,657 @@ + + + + + diff --git a/uni_modules/uni-easyinput/package.json b/uni_modules/uni-easyinput/package.json new file mode 100644 index 0000000..bd128e1 --- /dev/null +++ b/uni_modules/uni-easyinput/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-easyinput", + "displayName": "uni-easyinput 增强输入框", + "version": "1.1.9", + "description": "Easyinput 组件是对原生input组件的增强", + "keywords": [ + "uni-ui", + "uniui", + "input", + "uni-easyinput", + "输入框" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "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" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-easyinput/readme.md b/uni_modules/uni-easyinput/readme.md new file mode 100644 index 0000000..f1faf8f --- /dev/null +++ b/uni_modules/uni-easyinput/readme.md @@ -0,0 +1,11 @@ + + +### Easyinput 增强输入框 +> **组件名:uni-easyinput** +> 代码块: `uEasyinput` + + +easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file