From b3f3a5e1728d109c615ab6852b4b8b3362fe2953 Mon Sep 17 00:00:00 2001 From: linju-json Date: Sat, 20 Nov 2021 20:48:42 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BD=BF=E7=94=A8=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E7=99=BB=E9=99=86=E4=B8=AD=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB=E9=99=86=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=9A=E6=9C=AA=E5=8B=BE=E9=80=89=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E6=94=BF=E7=AD=96=E6=97=B6=EF=BC=8Ctoast=E6=8F=90?= =?UTF-8?q?=E9=86=92=E5=B9=B6=E9=98=BB=E6=AD=A2=E4=BA=86=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E7=99=BB=E9=99=86=E7=95=8C=E9=9D=A2=E7=9A=84close=20-=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81=E7=9C=8B=E6=BF=80=E5=8A=B1?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=B9=BF=E5=91=8A=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- androidPrivacy.json | 3 + changelog.md | 3 + common/appInit.js | 2 +- components/cloud-image/cloud-image.vue | 2 +- components/uni-agreements/uni-agreements.vue | 4 +- .../uni-bindMobileByMpWeixin.vue | 2 +- components/uni-quick-login/i18n/en.json | 15 + components/uni-quick-login/i18n/index.js | 6 + components/uni-quick-login/i18n/zh-Hans.json | 15 + .../uni-quick-login/uni-quick-login.vue | 796 +++++++++--------- lang/en.js | 3 +- lang/zh-Hans.js | 3 +- manifest.json | 9 +- pages/list/detail.vue | 222 ++--- pages/list/list.nvue | 6 +- pages/list/search/search.nvue | 7 +- pages/ucenter/login-page/index/index.vue | 8 +- .../login-page/pwd-retrieve/pwd-retrieve.vue | 10 +- pages/ucenter/read-news-log/read-news-log.vue | 3 +- pages/ucenter/ucenter.vue | 15 +- .../userinfo/bind-mobile/bind-mobile.vue | 2 +- uni_modules/uni-calendar/changelog.md | 2 + .../components/uni-calendar/uni-calendar.vue | 8 +- .../components/uni-calendar/util.js | 12 +- uni_modules/uni-calendar/package.json | 4 +- .../uni-config-center/uni-ad/config.json | 3 + uni_modules/uni-data-picker/changelog.md | 65 +- .../uni-data-picker/uni-data-picker.vue | 71 +- .../uni-data-pickerview/uni-data-picker.js | 92 +- .../uni-data-pickerview.vue | 557 ++++++------ uni_modules/uni-data-picker/package.json | 11 +- uni_modules/uni-data-picker/readme.md | 30 +- uni_modules/uni-datetime-picker/changelog.md | 11 + .../uni-datetime-picker/calendar-item.vue | 94 +-- .../uni-datetime-picker/calendar.vue | 98 ++- .../uni-datetime-picker/time-picker.vue | 13 +- .../uni-datetime-picker.vue | 111 +-- .../components/uni-datetime-picker/util.js | 35 +- uni_modules/uni-datetime-picker/package.json | 4 +- uni_modules/uni-datetime-picker/readme.md | 10 +- uni_modules/uni-id/changelog.md | 8 + uni_modules/uni-id/package.json | 2 +- .../cloudfunctions/common/uni-id/index.js | 2 +- .../cloudfunctions/common/uni-id/package.json | 2 +- uni_modules/uni-sign-in/changelog.md | 2 + .../components/uni-sign-in/uni-sign-in.vue | 160 +++- uni_modules/uni-sign-in/package.json | 2 +- uni_modules/uni-sign-in/readme.md | 45 +- .../cloudfunctions/common/sign-in/index.js | 106 +++ .../common/sign-in/package.json | 12 + .../rewarded-video-ad-notify-url/index.js | 64 ++ .../rewarded-video-ad-notify-url/package.json | 15 + .../database/opendb-sign-in.schema.json | 2 +- uni_modules/uni-sign-in/utils/ad.js | 253 ++++++ 54 files changed, 1975 insertions(+), 1067 deletions(-) create mode 100644 androidPrivacy.json create mode 100644 components/uni-quick-login/i18n/en.json create mode 100644 components/uni-quick-login/i18n/index.js create mode 100644 components/uni-quick-login/i18n/zh-Hans.json create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-ad/config.json create mode 100644 uni_modules/uni-sign-in/uniCloud/cloudfunctions/common/sign-in/index.js create mode 100644 uni_modules/uni-sign-in/uniCloud/cloudfunctions/common/sign-in/package.json create mode 100644 uni_modules/uni-sign-in/uniCloud/cloudfunctions/rewarded-video-ad-notify-url/index.js create mode 100644 uni_modules/uni-sign-in/uniCloud/cloudfunctions/rewarded-video-ad-notify-url/package.json create mode 100644 uni_modules/uni-sign-in/utils/ad.js diff --git a/androidPrivacy.json b/androidPrivacy.json new file mode 100644 index 00000000..0d726ca9 --- /dev/null +++ b/androidPrivacy.json @@ -0,0 +1,3 @@ +{ + "prompt" : "template" +} diff --git a/changelog.md b/changelog.md index e87aa746..69f778c4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 1.1.23(2021-11-20) +- 使用`uni.getUniverifyManager`优化一键登陆中,点击第三方登陆的逻辑:未勾选隐私政策时,toast提醒并阻止了一键登陆界面的close +- 新增支持看激励视频广告签到 ## 1.1.22(2021-11-10) 删除`common/openApp.js`中可选链操作符,解决vue3版本在hbuilderX内置浏览器不兼容的问题 ## 1.1.21(2021-11-10) diff --git a/common/appInit.js b/common/appInit.js index 9af4be22..4dd648bf 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -179,7 +179,7 @@ export default async function() { oaid, idfa } - console.log("重新登录/注册,获取设备id", deviceInfo); + //console.log("重新登录/注册,获取设备id", deviceInfo); option.data.deviceInfo = deviceInfo // #ifndef H5 diff --git a/components/cloud-image/cloud-image.vue b/components/cloud-image/cloud-image.vue index b211f1a2..2279eb81 100644 --- a/components/cloud-image/cloud-image.vue +++ b/components/cloud-image/cloud-image.vue @@ -39,7 +39,7 @@ handler(src) { // console.log(src); // console.log(src.substring(0, 8)); - if (src.substring(0, 8) == "cloud://") { + if (src&&src.substring(0, 8) == "cloud://") { uniCloud.getTempFileURL({ fileList: [src] }).then(res=>{ diff --git a/components/uni-agreements/uni-agreements.vue b/components/uni-agreements/uni-agreements.vue index 2c0af79c..d94a5b76 100644 --- a/components/uni-agreements/uni-agreements.vue +++ b/components/uni-agreements/uni-agreements.vue @@ -1,7 +1,7 @@ - + - + @@ -50,22 +50,29 @@ diff --git a/pages/list/list.nvue b/pages/list/list.nvue index 1e5281e3..fa234aa3 100644 --- a/pages/list/list.nvue +++ b/pages/list/list.nvue @@ -39,16 +39,20 @@ format="yyyy-MM-dd" :threshold="[60000, 2592000000]" /> - + + + diff --git a/pages/list/search/search.nvue b/pages/list/search/search.nvue index 12ab7704..89ec8ab3 100644 --- a/pages/list/search/search.nvue +++ b/pages/list/search/search.nvue @@ -63,10 +63,9 @@ - + + diff --git a/pages/ucenter/login-page/index/index.vue b/pages/ucenter/login-page/index/index.vue index 16aa161e..8d1a855d 100644 --- a/pages/ucenter/login-page/index/index.vue +++ b/pages/ucenter/login-page/index/index.vue @@ -54,7 +54,13 @@ "top": "2000px" //隐藏当前页面窗体 }) } - //#endif + //#endif + uni.$on('setLoginType',type=>{ + this.type = type + }) + }, + onUnload() { + uni.$off('setLoginType') }, onReady() { //#ifdef APP-PLUS diff --git a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue index 0c923776..3d0705c5 100644 --- a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue +++ b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue @@ -39,6 +39,7 @@ lock:false, formData: { "phone": "", + "code":"", 'pwd': '', 'pwd2': '' }, @@ -152,10 +153,10 @@ } }).then(({result})=>{ console.log(result); - // uni.showToast({ - // title: result.msg, - // icon: 'none' - // }); + uni.showToast({ + title: result.msg||'更新成功', + icon: 'none' + }); if (result.code === 0) { uni.navigateBack() } @@ -191,7 +192,6 @@ + .item-text-overflow { + width: 280px; + /* fix nvue */ + overflow: hidden; + /* #ifndef APP-NVUE */ + width: 20em; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + /* #endif */ + } + + .check { + margin-right: 5px; + border: 2px solid #007aff; + border-left: 0; + border-top: 0; + height: 12px; + width: 6px; + transform-origin: center; + /* #ifndef APP-NVUE */ + transition: all 0.3s; + /* #endif */ + transform: rotate(45deg); + } + diff --git a/uni_modules/uni-data-picker/package.json b/uni_modules/uni-data-picker/package.json index 676f68ba..0647354f 100644 --- a/uni_modules/uni-data-picker/package.json +++ b/uni_modules/uni-data-picker/package.json @@ -1,8 +1,8 @@ { "id": "uni-data-picker", "displayName": "uni-data-picker 数据驱动的picker选择器", - "version": "0.4.0", - "description": "Picker选择器", + "version": "0.4.9", + "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景", "keywords": [ "uni-ui", "uniui", @@ -43,7 +43,8 @@ }, "uni_modules": { "dependencies": [ - "uni-load-more" + "uni-load-more", + "uni-icons" ], "encrypt": [], "platforms": { @@ -79,6 +80,10 @@ "快应用": { "华为": "u", "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" } } } diff --git a/uni_modules/uni-data-picker/readme.md b/uni_modules/uni-data-picker/readme.md index 70eed230..d4662748 100644 --- a/uni_modules/uni-data-picker/readme.md +++ b/uni_modules/uni-data-picker/readme.md @@ -23,14 +23,9 @@ > 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。 > - 组件需要依赖 `sass` 插件 ,请自行手动安装 > - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 -> - `` 内部包含了弹出层组件 `` 外层的布局可能会影响弹出层,[详情](https://developer.mozilla.org/zh-Hans/docs/Web/CSS/Common_CSS_Questions) +> - `` 内部包含了弹出层组件 `` 外层的布局可能会影响弹出层,[详情](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Common_CSS_Questions) - -### 平台差异说明 - -暂不支持在nvue页面中使用 - ### 安装方式 本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`componets`。 @@ -44,9 +39,12 @@ |属性名 | 类型 | 可选值 | 默认值 | 说明| |:-: | :-: |:-: | :-: | :-: | |v-model |String/ Number | - | - |绑定数据| +|spaceInfo |Object | | |服务空间配置,[详情](https://uniapp.dcloud.net.cn/uniCloud/init)| |localdata |Array | | |数据,[详情](https://gitee.com/dcloud/datacom)| |preload |Boolean | true/false | false |预加载数据| |readonly |Boolean | true/false | false |是否禁用| +|clear-icon |Boolean | true/false | true |是否显示清除按钮| +|ellipsis |Boolean | true/false | true |是否隐藏 tab 标签过长的文本| |step-searh |Boolean | true/false | true |分步查询时,点击节点请求数据| |step-search-url |String | | |分步查询时,动态加载云端数据url格式,`https://xxx.com/{parentValue}`(当前版本暂不支持,下版支持)| |self-field |String | | |分步查询时当前字段名称| @@ -56,7 +54,7 @@ |where |String | | |查询条件,内容较多,另见jql文档:[详情](https://uniapp.dcloud.net.cn/uniCloud/uni-clientDB?id=jsquery)| |orderby |String | | |排序字段及正序倒叙设置| |popup-title |String | | |弹出层标题| - +|map |Object | |{text:'text',value:'value'}|字段映射,将text/value映射到数据中的其他字段| > **** > `collection/where/orderby` 和 `` 的用法一致,[详情](https://uniapp.dcloud.net.cn/uniCloud/unicloud-db) @@ -73,6 +71,24 @@ |@popupopened |EventHandle | 弹出层弹出时触发 | |@popupclosed |EventHandle | 弹出层关闭时触发 | +### DataPicker Methods + +|方法称名 |说明|参数| +|:-:|:-:|:-:| +|show|打开弹出层|-| +|hide|关闭弹出层|-| +|clear|清除已选项|-| + +**使用方法:** +```js +this.$refs.picker.show() // `picker` 为组件的 ref 名称 +``` + +### DataPicker Slots + +|名称|说明| +|:-:|:-:| +|default|覆盖显示框内容| ### 基本用法 diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md index 1011ada5..4182e0c2 100644 --- a/uni_modules/uni-datetime-picker/changelog.md +++ b/uni_modules/uni-datetime-picker/changelog.md @@ -1,3 +1,14 @@ +## 2.1.4(2021-09-10) +- 修复 hide-second 在移动端的 bug +- 修复 单选赋默认值时,赋值日期未高亮的 bug +- 修复 赋默认值时,移动端未正确显示时间的 bug +## 2.1.3(2021-09-09) +- 新增 hide-second 属性,支持只使用时分,隐藏秒 +## 2.1.2(2021-09-03) +- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次 +- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法 +- 优化 调整字号大小,美化日历界面 +- 修复 因国际化导致的 placeholder 失效的 bug ## 2.1.1(2021-08-24) - 新增 支持国际化 - 优化 范围选择器在 pc 端过宽的问题 diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue index e3bf17d8..7c9a093c 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue @@ -7,7 +7,7 @@ }" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)"> {{weeks.date}} - - @@ -47,18 +44,18 @@ lunar: { type: Boolean, default: false - }, - checkHover: { - type: Boolean, - default: false + }, + checkHover: { + type: Boolean, + default: false } }, methods: { choiceDate(weeks) { this.$emit('change', weeks) - }, - handleMousemove(weeks) { - this.$emit('handleMouse', weeks) + }, + handleMousemove(weeks) { + this.$emit('handleMouse', weeks) } } } @@ -72,12 +69,13 @@ /* #endif */ flex-direction: column; justify-content: center; - align-items: center; + align-items: center; margin: 3px 0; } .uni-calendar-item__weeks-box-text { - font-size: $uni-font-size-base; + font-size: 12px; + // font-size: $uni-font-size-base; // color: $uni-text-color; } @@ -94,13 +92,13 @@ flex-direction: column; justify-content: center; align-items: center; - width: 43px; - height: 43px; + width: 40px; + height: 40px; /* #ifdef H5 */ cursor: pointer; /* #endif */ - } - + } + .uni-calendar-item__weeks-box-circle { position: absolute; @@ -115,12 +113,12 @@ .uni-calendar-item__weeks-box .uni-calendar-item--disable { // background-color: rgba(249, 249, 249, $uni-opacity-disabled); - color: $uni-text-color-disable; + color: $uni-text-color-disable; cursor: default; } - .uni-calendar-item--isDay-text { - color: $uni-color-primary !important; + .uni-calendar-item__weeks-box .uni-calendar-item--isDay-text { + color: $uni-color-primary; } .uni-calendar-item--isDay { @@ -134,17 +132,17 @@ opacity: 0.8; } - .uni-calendar-item--checked { - background-color: $uni-color-primary; - // border-radius: 50%; - box-sizing: border-box; + .uni-calendar-item__weeks-box .uni-calendar-item--checked { + background-color: $uni-color-primary; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; color: #fff; opacity: 0.8; - } - - .uni-calendar-item--multiple .uni-calendar-item--checked-range-text { - color: #333; + } + + .uni-calendar-item--multiple .uni-calendar-item--checked-range-text { + color: #333; } .uni-calendar-item--multiple { @@ -155,29 +153,29 @@ .uni-calendar-item--multiple .uni-calendar-item--before-checked { background-color: #409eff; - color: #fff !important; - // border-radius: 50%; - box-sizing: border-box; + color: #fff !important; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; } .uni-calendar-item--multiple .uni-calendar-item--after-checked { background-color: #409eff;; - color: #fff !important; - // border-radius: 50%; - box-sizing: border-box; + color: #fff !important; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; - } - - .uni-calendar-item--before-checked-x { - // border-top-left-radius: 25px; - // border-bottom-left-radius: 25px; - background-color: #f2f6fc; - } - - .uni-calendar-item--after-checked-x { - // border-top-right-radius: 25px; - // border-bottom-right-radius: 25px; - background-color: #f2f6fc; - } - + } + + .uni-calendar-item--before-checked-x { + // border-top-left-radius: 25px; + // border-bottom-left-radius: 25px; + background-color: #f2f6fc; + } + + .uni-calendar-item--after-checked-x { + // border-top-right-radius: 25px; + // border-bottom-right-radius: 25px; + background-color: #f2f6fc; + } + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue index 6b7a20b4..d04b9cf2 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue @@ -10,8 +10,7 @@ - {{ (nowDate.year||'') +' / '+( nowDate.month||'')}} + {{ (nowDate.year||'') +' / '+( nowDate.month||'')}} @@ -56,29 +55,29 @@ - {{tempSingleDate ? tempSingleDate : selectDateText}} + style="padding: 0 80px;"> + {{tempSingleDate ? tempSingleDate : selectDateText}} + :disabled="!tempSingleDate" :border="false" :hide-second="hideSecond" class="time-picker-style"> - {{tempRange.before ? tempRange.before : startDateText}} - {{tempRange.before ? tempRange.before : startDateText}} + + - {{tempRange.after ? tempRange.after : endDateText}} - {{tempRange.after ? tempRange.after : endDateText}} + - {{okText}} @@ -96,7 +95,9 @@ initVueI18n } from '@dcloudio/uni-i18n' import messages from './i18n/index.js' - const { t } = initVueI18n(messages) + const { + t + } = initVueI18n(messages) /** * Calendar 日历 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等 @@ -186,6 +187,10 @@ checkHover: { type: Boolean, default: true + }, + hideSecond: { + type: [Boolean], + default: false }, pleStatus: { type: Object, @@ -207,12 +212,12 @@ nowDate: '', aniMaskShow: false, firstEnter: true, - time: this.defTime ? this.defTime : '', + time: '', timeRange: { - startTime: this.defTime.start ? this.defTime.start : '', - endTime: this.defTime.end ? this.defTime.end : '' + startTime: '', + endTime: '' }, - tempSingleDate: this.date, + tempSingleDate: '', tempRange: { before: '', after: '' @@ -223,11 +228,25 @@ date: { immediate: true, handler(newVal, oldVal) { - if (!this.range) - setTimeout(() => { - this.init(newVal) - }, 100) + if (!this.range) { + this.tempSingleDate = newVal + setTimeout(() => { + this.init(newVal) + }, 100) + } } + }, + defTime: { + immediate: true, + handler(newVal, oldVal) { + if (!this.range) { + this.time = newVal + } else { + // console.log('-----', newVal); + this.timeRange.startTime = newVal.start + this.timeRange.endTime = newVal.end + } + } }, startDate(val) { this.cale.resetSatrtDate(val) @@ -261,8 +280,7 @@ this.cale.lastHover = true if (this.rangeWithinMonth(after, before)) return this.setDate(before) - } - if (!before && !after) { + } else { this.cale.setMultiple(fulldate) this.setDate(this.nowDate.fullDate) this.calendar.fullDate = '' @@ -380,9 +398,26 @@ this.close() }, + clearCalender() { + if (this.range) { + this.timeRange.startTime = '' + this.timeRange.endTime = '' + this.tempRange.before = '' + this.tempRange.after = '' + this.cale.multipleStatus.before = '' + this.cale.multipleStatus.after = '' + this.cale.multipleStatus.data = [] + this.cale.lastHover = false + } else { + this.time = '' + this.tempSingleDate = '' + } + this.calendar.fullDate = '' + this.setDate() + }, + bindDateChange(e) { const value = e.detail.value + '-1' - console.log(this.cale.getDate(value)); this.init(value) }, /** @@ -494,6 +529,7 @@ choiceDate(weeks) { if (weeks.disable) return this.calendar = weeks + this.calendar.userChecked = true // 设置多选 this.cale.setMultiple(this.calendar.fullDate, true) this.weeks = this.cale.weeks @@ -506,7 +542,6 @@ * 回到今天 */ backtoday() { - console.log(this.cale.getDate(new Date()).fullDate); let date = this.cale.getDate(new Date()).fullDate // this.cale.setDate(date) this.init(date) @@ -678,14 +713,14 @@ } .uni-calendar__header-btn { - width: 10px; - height: 10px; + width: 8px; + height: 8px; border-left-color: $uni-text-color-placeholder; border-left-style: solid; - border-left-width: 2px; + border-left-width: 1px; border-top-color: $uni-color-subtitle; border-top-style: solid; - border-top-width: 2px; + border-top-width: 1px; } .uni-calendar--left { @@ -717,14 +752,14 @@ flex-direction: column; justify-content: center; align-items: center; - height: 45px; + height: 40px; border-bottom-color: #F5F5F5; border-bottom-style: solid; border-bottom-width: 1px; } .uni-calendar__weeks-day-text { - font-size: 14px; + font-size: 12px; } .uni-calendar__box { @@ -783,11 +818,12 @@ .uni-date-changed--time-date { color: #999; line-height: 50px; + margin-right: 5px; // opacity: 0.6; } .time-picker-style { - width: 62px; + // width: 62px; /* #ifndef APP-NVUE */ display: flex; /* #endif */ @@ -798,4 +834,4 @@ .mr-10 { margin-right: 10px; } - + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue index 147513a1..9e799a4b 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue @@ -124,7 +124,7 @@ // 输入框当前时间 time: '', // 当前的年月日时分秒 - year: 1900, + year: 1920, month: 0, day: 0, hour: 0, @@ -190,7 +190,8 @@ if (newVal) { this.parseValue(this.fixIosDateFormat(newVal)) //兼容 iOS、safari 日期格式 this.initTime(false) - } else { + } else { + this.time = '' this.parseValue(Date.now()) } }, @@ -538,7 +539,9 @@ * @param {Object} defaultTime */ parseValue(value) { - if (!value) return + if (!value) { + return + } if (this.type === 'time' && typeof value === "string") { this.parseTimeType(value) } else { @@ -576,7 +579,7 @@ this.startSecond = 0 } if (pointType === 'end') { - this.endYear = 120 + this.endYear = 2120 this.endMonth = 12 this.endDay = 31 this.endHour = 23 @@ -770,7 +773,7 @@