diff --git a/uni_modules/uni-badge/changelog.md b/uni_modules/uni-badge/changelog.md index 56581c4..e352c60 100644 --- a/uni_modules/uni-badge/changelog.md +++ b/uni_modules/uni-badge/changelog.md @@ -1,3 +1,5 @@ +## 1.2.2(2023-01-28) +- 修复 运行/打包 控制台警告问题 ## 1.2.1(2022-09-05) - 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473) ## 1.2.0(2021-11-19) diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue index 664dc37..282d253 100644 --- a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue +++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue @@ -21,7 +21,7 @@ * @value error 红色 * @property {String} inverted = [true|false] 是否无需背景颜色 * @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+ - * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上 + * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上 * @value rightTop 右上 * @value rightBottom 右下 * @value leftTop 左上 @@ -191,12 +191,13 @@ /* #ifndef APP-NVUE */ display: flex; overflow: hidden; - box-sizing: border-box; + box-sizing: border-box; + font-feature-settings: "tnum"; + min-width: 20px; /* #endif */ justify-content: center; flex-direction: row; height: 20px; - min-width: 20px; padding: 0 4px; line-height: 18px; color: #fff; @@ -206,7 +207,6 @@ border: 1px solid #fff; text-align: center; font-family: 'Helvetica Neue', Helvetica, sans-serif; - font-feature-settings: "tnum"; font-size: $bage-size; /* #ifdef H5 */ z-index: 999; diff --git a/uni_modules/uni-badge/package.json b/uni_modules/uni-badge/package.json index 7a34d9c..b0bac93 100644 --- a/uni_modules/uni-badge/package.json +++ b/uni_modules/uni-badge/package.json @@ -1,7 +1,7 @@ { "id": "uni-badge", "displayName": "uni-badge 数字角标", - "version": "1.2.1", + "version": "1.2.2", "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。", "keywords": [ "", diff --git a/uni_modules/uni-breadcrumb/changelog.md b/uni_modules/uni-breadcrumb/changelog.md index 82a2243..209e5c5 100644 --- a/uni_modules/uni-breadcrumb/changelog.md +++ b/uni_modules/uni-breadcrumb/changelog.md @@ -1,6 +1,6 @@ ## 0.1.2(2022-06-08) -- 修复 微信小程序 separator 不显示问题 +- 修复 微信小程序 separator 不显示的Bug ## 0.1.1(2022-06-02) - 新增 支持 uni.scss 修改颜色 -## 0.1.0(2022-04-21) -- 初始化 +## 0.1.0(2022-04-21) +- 初始化 diff --git a/uni_modules/uni-calendar/changelog.md b/uni_modules/uni-calendar/changelog.md index 0160b69..f291eec 100644 --- a/uni_modules/uni-calendar/changelog.md +++ b/uni_modules/uni-calendar/changelog.md @@ -1,20 +1,26 @@ +## 1.4.10(2023-04-10) +- 修复 某些情况 monthSwitch 未触发的Bug +## 1.4.9(2023-02-02) +- 修复 某些情况切换月份错误的Bug +## 1.4.8(2023-01-30) +- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/161964) ## 1.4.7(2022-09-16) -- 可以使用 uni-scss 控制主题色 +- 优化 支持使用 uni-scss 控制主题色 ## 1.4.6(2022-09-08) -- fix: 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件 +- 修复 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件的Bug ## 1.4.5(2022-02-25) -- 修复 条件编译 nvue 不支持的 css 样式 +- 修复 条件编译 nvue 不支持的 css 样式的Bug ## 1.4.4(2022-02-25) -- 修复 条件编译 nvue 不支持的 css 样式 +- 修复 条件编译 nvue 不支持的 css 样式的Bug ## 1.4.3(2021-09-22) -- 修复 startDate、 endDate 属性失效的 bug +- 修复 startDate、 endDate 属性失效的Bug ## 1.4.2(2021-08-24) - 新增 支持国际化 ## 1.4.1(2021-08-05) -- 修复 弹出层被 tabbar 遮盖 bug +- 修复 弹出层被 tabbar 遮盖的Bug ## 1.4.0(2021-07-30) - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) ## 1.3.16(2021-05-12) - 新增 组件示例地址 ## 1.3.15(2021-02-04) -- 调整为uni_modules目录规范 +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue index d29ead5..bf714c2 100644 --- a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue +++ b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue @@ -51,11 +51,10 @@ - diff --git a/uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue b/uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue index 5f63365..d8d3faa 100644 --- a/uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue +++ b/uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue @@ -58,10 +58,10 @@ color: { type: String, default: '#333' - }, - fontSize: { - type: Number, - default: 14 + }, + fontSize: { + type: Number, + default: 14 }, splitorColor: { type: String, @@ -86,6 +86,10 @@ timestamp: { type: Number, default: 0 + }, + zeroPad: { + type: Boolean, + default: true } }, data() { @@ -116,23 +120,23 @@ timeStyle() { const { color, - backgroundColor, + backgroundColor, fontSize } = this return { color, - backgroundColor, - fontSize: `${fontSize}px`, - width: `${fontSize * 22 / 14}px`, // 按字体大小为 14px 时的比例缩放 - lineHeight: `${fontSize * 20 / 14}px`, - borderRadius: `${fontSize * 3 / 14}px`, + backgroundColor, + fontSize: `${fontSize}px`, + width: `${fontSize * 22 / 14}px`, // 按字体大小为 14px 时的比例缩放 + lineHeight: `${fontSize * 20 / 14}px`, + borderRadius: `${fontSize * 3 / 14}px`, } }, - splitorStyle() { - const { splitorColor, fontSize, backgroundColor } = this - return { - color: splitorColor, - fontSize: `${fontSize * 12 / 14}px`, + splitorStyle() { + const { splitorColor, fontSize, backgroundColor } = this + return { + color: splitorColor, + fontSize: `${fontSize * 12 / 14}px`, margin: backgroundColor ? `${fontSize * 4 / 14}px` : '' } } @@ -141,10 +145,10 @@ day(val) { this.changeFlag() }, - hour(val) { + hour(val) { this.changeFlag() }, - minute(val) { + minute(val) { this.changeFlag() }, second(val) { @@ -199,30 +203,22 @@ } else { this.timeUp() } - if (day < 10) { - day = '0' + day - } - if (hour < 10) { - hour = '0' + hour - } - if (minute < 10) { - minute = '0' + minute - } - if (second < 10) { - second = '0' + second - } + day = (day < 10 && this.zeroPad) ? `0${day}` : day + hour = (hour < 10 && this.zeroPad) ? `0${hour}` : hour + minute = (minute < 10 && this.zeroPad) ? `0${minute}` : minute + second = (second < 10 && this.zeroPad) ? `0${second}` : second this.d = day this.h = hour this.i = minute - this.s = second + this.s = second }, startData() { this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second) - if (this.seconds <= 0) { - this.seconds = this.toSeconds(0, 0, 0, 0, 0) + if (this.seconds <= 0) { + this.seconds = this.toSeconds(0, 0, 0, 0, 0) this.countDown() return - } + } clearInterval(this.timer) this.countDown() this.timer = setInterval(() => { @@ -233,11 +229,11 @@ } this.countDown() }, 1000) - }, - update(){ - this.startData(); }, - changeFlag() { + update(){ + this.startData(); + }, + changeFlag() { if (!this.syncFlag) { this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second) this.startData(); @@ -248,24 +244,24 @@ } + diff --git a/uni_modules/uni-data-picker/changelog.md b/uni_modules/uni-data-picker/changelog.md index 8451fb3..1dd79f7 100644 --- a/uni_modules/uni-data-picker/changelog.md +++ b/uni_modules/uni-data-picker/changelog.md @@ -1,3 +1,12 @@ +## 1.1.2(2023-04-11) +- 修复 更改 modelValue 报错的 bug +- 修复 v-for 未使用 key 值控制台 warning +## 1.1.1(2023-02-21) +- 修复代码合并时引发 value 属性为空时不渲染数据的问题 +## 1.1.0(2023-02-15) +- 修复 localdata 不支持动态更新的bug +## 1.0.9(2023-02-15) +- 修复 localdata 不支持动态更新的bug ## 1.0.8(2022-09-16) - 可以使用 uni-scss 控制主题色 ## 1.0.7(2022-07-06) diff --git a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue index 1830794..c86d547 100644 --- a/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue +++ b/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue @@ -75,7 +75,7 @@ */ export default { name: 'UniDataPicker', - emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue'], + emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'], mixins: [dataPicker], components: { DataPickerView @@ -131,9 +131,16 @@ this.load(); }) }, + watch: { + localdata: { + handler() { + this.load() + }, + deep: true + }, + }, methods: { clear() { - this.modelValue = null; this._dispatchEvent([]); }, onPropsChange() { @@ -148,10 +155,6 @@ return; } - if (!this.hasValue) { - return; - } - // 回显本地数据 if (this.isLocalData) { this.loadData(); @@ -184,6 +187,7 @@ }, handleInput() { if (this.readonly) { + this.$emit('inputclick') return } this.show() @@ -544,4 +548,4 @@ } /* #endif */ - + diff --git a/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue b/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue index 2d1344f..d3acf92 100644 --- a/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue +++ b/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue @@ -2,25 +2,27 @@ - - + + + {{item[map.text]}} + + + @@ -164,8 +166,8 @@ } - + diff --git a/uni_modules/uni-data-picker/package.json b/uni_modules/uni-data-picker/package.json index 7b731fc..038f9ce 100644 --- a/uni_modules/uni-data-picker/package.json +++ b/uni_modules/uni-data-picker/package.json @@ -1,7 +1,7 @@ { "id": "uni-data-picker", "displayName": "uni-data-picker 数据驱动的picker选择器", - "version": "1.0.8", + "version": "1.1.2", "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景", "keywords": [ "uni-ui", diff --git a/uni_modules/uni-data-select/changelog.md b/uni_modules/uni-data-select/changelog.md index 9e48c69..eb3d1ce 100644 --- a/uni_modules/uni-data-select/changelog.md +++ b/uni_modules/uni-data-select/changelog.md @@ -1,3 +1,16 @@ +## 1.0.6(2023-04-12) +- 修复 微信小程序点击时会改变背景颜色的 bug +## 1.0.5(2023-02-03) +- 修复 禁用时会显示清空按钮 +## 1.0.4(2023-02-02) +- 优化 查询条件短期内多次变更只查询最后一次变更后的结果 +- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue +## 1.0.3(2023-01-16) +- 修复 不关联服务空间报错的问题 +## 1.0.2(2023-01-14) +- 新增 属性 `format` 可用于格式化显示选项内容 +## 1.0.1(2022-12-06) +- 修复 当where变化时,数据不会自动更新的问题 ## 0.1.9(2022-09-05) - 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框 ## 0.1.8(2022-08-29) diff --git a/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue index 21e7922..19b2d9e 100644 --- a/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue +++ b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue @@ -2,12 +2,16 @@ {{label + ':'}} - + {{current}} {{typePlaceholder}} - - + + + + + + @@ -16,10 +20,9 @@ {{emptyTips}} - - {{formatItemName(item)}} + + {{formatItemName(item)}} @@ -44,17 +47,8 @@ */ export default { - name: "uni-stat-select", + name: "uni-data-select", mixins: [uniCloud.mixinDatacom || {}], - data() { - return { - showSelector: false, - current: '', - mixinDatacomResData: [], - apps: [], - channels: [] - }; - }, props: { localdata: { type: Array, @@ -90,15 +84,32 @@ type: Number, default: 0 }, - disabled: { + disabled: { type: Boolean, default: false - } + }, + // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}" + format: { + type: String, + default: '' + }, + }, + data() { + return { + showSelector: false, + current: '', + mixinDatacomResData: [], + apps: [], + channels: [], + cacheKey: "uni-data-select-lastSelectedValue", + }; }, created() { - this.last = `${this.collection}_last_selected_option_value` + this.debounceGet = this.debounce(() => { + this.query(); + }, 300); if (this.collection && !this.localdata.length) { - this.mixinDatacomEasyGet() + this.debounceGet(); } }, computed: { @@ -113,6 +124,14 @@ return placeholder ? common + placeholder : common + }, + valueCom(){ + // #ifdef VUE3 + return this.modelValue; + // #endif + // #ifndef VUE3 + return this.value; + // #endif } }, watch: { @@ -124,16 +143,9 @@ } } }, - // #ifndef VUE3 - value() { + valueCom(val, old) { this.initDefVal() }, - // #endif - // #ifdef VUE3 - modelValue() { - this.initDefVal() - }, - // #endif mixinDatacomResData: { immediate: true, handler(val) { @@ -144,27 +156,46 @@ } }, methods: { + debounce(fn, time = 100){ + let timer = null + return function(...args) { + if (timer) clearTimeout(timer) + timer = setTimeout(() => { + fn.apply(this, args) + }, time) + } + }, + // 执行数据库查询 + query(){ + this.mixinDatacomEasyGet(); + }, + // 监听查询条件变更事件 + onMixinDatacomPropsChange(){ + if (this.collection) { + this.debounceGet(); + } + }, initDefVal() { let defValue = '' - if ((this.value || this.value === 0) && !this.isDisabled(this.value)) { - defValue = this.value - } else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) { - defValue = this.modelValue + if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) { + defValue = this.valueCom } else { let strogeValue if (this.collection) { - strogeValue = uni.getStorageSync(this.last) + strogeValue = this.getCache() } if (strogeValue || strogeValue === 0) { defValue = strogeValue } else { let defItem = '' - if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) { + if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) { defItem = this.mixinDatacomResData[this.defItem - 1].value } defValue = defItem } - this.emit(defValue) + if (defValue || defValue === 0) { + this.emit(defValue) + } } const def = this.mixinDatacomResData.find(item => item.value === defValue) this.current = def ? this.formatItemName(def) : '' @@ -189,7 +220,7 @@ clearVal() { this.emit('') if (this.collection) { - uni.removeStorageSync(this.last) + this.removeCache() } }, change(item) { @@ -200,18 +231,17 @@ } }, emit(val) { - this.$emit('change', val) this.$emit('input', val) this.$emit('update:modelValue', val) + this.$emit('change', val) if (this.collection) { - uni.setStorageSync(this.last, val) + this.setCache(val); } }, - toggleSelector() { - if(this.disabled){ - return - } + if (this.disabled) { + return + } this.showSelector = !this.showSelector }, @@ -222,14 +252,50 @@ channel_code } = item channel_code = channel_code ? `(${channel_code})` : '' - return this.collection.indexOf('app-list') > 0 ? - `${text}(${value})` : - ( - text ? - text : - `未命名${channel_code}` - ) - } + + if (this.format) { + // 格式化输出 + let str = ""; + str = this.format; + for (let key in item) { + str = str.replace(new RegExp(`{${key}}`,"g"),item[key]); + } + return str; + } else { + return this.collection.indexOf('app-list') > 0 ? + `${text}(${value})` : + ( + text ? + text : + `未命名${channel_code}` + ) + } + }, + // 获取当前加载的数据 + getLoadData(){ + return this.mixinDatacomResData; + }, + // 获取当前缓存key + getCurrentCacheKey(){ + return this.collection; + }, + // 获取缓存 + getCache(name=this.getCurrentCacheKey()){ + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + return cacheData[name]; + }, + // 设置缓存 + setCache(value, name=this.getCurrentCacheKey()){ + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + cacheData[name] = value; + uni.setStorageSync(this.cacheKey, cacheData); + }, + // 删除缓存 + removeCache(name=this.getCurrentCacheKey()){ + let cacheData = uni.getStorageSync(this.cacheKey) || {}; + delete cacheData[name]; + uni.setStorageSync(this.cacheKey, cacheData); + }, } } @@ -253,7 +319,9 @@ display: flex; align-items: center; // padding: 15px; - cursor: pointer; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ width: 100%; flex: 1; box-sizing: border-box; @@ -297,10 +365,10 @@ flex: 1; height: 35px; - &--disabled{ - background-color: #f5f7fa; - cursor: not-allowed; - } + &--disabled { + background-color: #f5f7fa; + cursor: not-allowed; + } } .uni-select__label { @@ -357,6 +425,14 @@ /* #endif */ } + /* #ifdef H5 */ + @media (min-width: 768px) { + .uni-select__selector-scroll { + max-height: 600px; + } + } + /* #endif */ + .uni-select__selector-empty, .uni-select__selector-item { /* #ifndef APP-NVUE */ @@ -436,5 +512,6 @@ bottom: 0; right: 0; left: 0; + z-index: 2; } diff --git a/uni_modules/uni-data-select/package.json b/uni_modules/uni-data-select/package.json index f156d50..ccffa59 100644 --- a/uni_modules/uni-data-select/package.json +++ b/uni_modules/uni-data-select/package.json @@ -1,7 +1,7 @@ { "id": "uni-data-select", "displayName": "uni-data-select 下拉框选择器", - "version": "0.1.9", + "version": "1.0.6", "description": "通过数据驱动的下拉框选择器", "keywords": [ "uni-ui", diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md index 9f09862..1f1a554 100644 --- a/uni_modules/uni-datetime-picker/changelog.md +++ b/uni_modules/uni-datetime-picker/changelog.md @@ -1,41 +1,71 @@ +## 2.2.22(2023-03-30) +- 修复 日历 picker 修改年月后,自动选中当月1日 [详情](https://ask.dcloud.net.cn/question/165937) +- 修复 小程序端 低版本 ios NaN [详情](https://ask.dcloud.net.cn/question/162979) +## 2.2.21(2023-02-20) +- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362) +## 2.2.20(2023-02-17) +- 优化 值为空依然选中当天问题 +- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间 +- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间 +- 优化 字节小程序日期时间范围选择,底部日期换行问题 +## 2.2.19(2023-02-09) +- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686) +## 2.2.18(2023-02-08) +- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684) +- 优化 PC端输入日期格式错误时返回当前日期时间 +- 优化 PC端输入日期时间超出 start、end 限制的Bug +- 优化 移动端日期时间范围用法时间展示不完整问题 +## 2.2.17(2023-02-04) +- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679) +- 修复 vue3 time-picker 无法显示绑定时分秒的Bug +## 2.2.16(2023-02-02) +- 修复 字节小程序报错的Bug +## 2.2.15(2023-02-02) +- 修复 某些情况切换月份错误的Bug +## 2.2.14(2023-01-30) +- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033) +## 2.2.13(2023-01-10) +- 修复 多次加载组件造成内存占用的Bug +## 2.2.12(2022-12-01) +- 修复 vue3 下 i18n 国际化初始值不正确的Bug ## 2.2.11(2022-09-19) -- 修复,支付宝小程序样式错乱,[详情](https://github.com/dcloudio/uni-app/issues/3861) +- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861) ## 2.2.10(2022-09-19) -- 修复,反向选择日期范围,日期显示异常,[详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false) +- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false) ## 2.2.9(2022-09-16) - 可以使用 uni-scss 控制主题色 ## 2.2.8(2022-09-08) -- 修复 close事件无效的 bug +- 修复 close事件无效的Bug ## 2.2.7(2022-09-05) -- 修复 移动端 maskClick 无效的 bug,详见:[https://ask.dcloud.net.cn/question/140824?item_id=209458&rf=false](https://ask.dcloud.net.cn/question/140824?item_id=209458&rf=false) +- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824) ## 2.2.6(2022-06-30) - 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致 ## 2.2.5(2022-06-24) -- 修复 日历顶部年月及底部确认未国际化 bug +- 修复 日历顶部年月及底部确认未国际化的Bug ## 2.2.4(2022-03-31) -- 修复 Vue3 下动态赋值,单选类型未响应的 bug +- 修复 Vue3 下动态赋值,单选类型未响应的Bug ## 2.2.3(2022-03-28) -- 修复 Vue3 下动态赋值未响应的 bug +- 修复 Vue3 下动态赋值未响应的Bug ## 2.2.2(2021-12-10) -- 修复 clear-icon 属性在小程序平台不生效的 bug +- 修复 clear-icon 属性在小程序平台不生效的Bug ## 2.2.1(2021-12-10) -- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug +- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug ## 2.2.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-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker) -## 2.1.5(2021-11-09) +- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker) +## 2.1.5(2021-11-09) - 新增 提供组件设计资源,组件样式调整 ## 2.1.4(2021-09-10) -- 修复 hide-second 在移动端的 bug -- 修复 单选赋默认值时,赋值日期未高亮的 bug -- 修复 赋默认值时,移动端未正确显示时间的 bug +- 修复 hide-second 在移动端的Bug +- 修复 单选赋默认值时,赋值日期未高亮的Bug +- 修复 赋默认值时,移动端未正确显示时间的Bug ## 2.1.3(2021-09-09) - 新增 hide-second 属性,支持只使用时分,隐藏秒 ## 2.1.2(2021-09-03) - 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次 - 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法 - 优化 调整字号大小,美化日历界面 -- 修复 因国际化导致的 placeholder 失效的 bug +- 修复 因国际化导致的 placeholder 失效的Bug ## 2.1.1(2021-08-24) - 新增 支持国际化 - 优化 范围选择器在 pc 端过宽的问题 @@ -43,50 +73,50 @@ - 新增 适配 vue3 ## 2.0.19(2021-08-09) - 新增 支持作为 uni-forms 子组件相关功能 -- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug +- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug ## 2.0.18(2021-08-05) -- 修复 type 属性动态赋值无效的 bug +- 修复 type 属性动态赋值无效的Bug - 修复 ‘确认’按钮被 tabbar 遮盖 bug -- 修复 组件未赋值时范围选左、右日历相同的 bug +- 修复 组件未赋值时范围选左、右日历相同的Bug ## 2.0.17(2021-08-04) -- 修复 范围选未正确显示当前值的 bug -- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug +- 修复 范围选未正确显示当前值的Bug +- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug ## 2.0.16(2021-07-21) - 新增 return-type 属性支持返回 date 日期对象 ## 2.0.15(2021-07-14) -- 修复 单选日期类型,初始赋值后不在当前日历的 bug +- 修复 单选日期类型,初始赋值后不在当前日历的Bug - 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效) - 优化 移动端移除显示框的清空按钮,无实际用途 ## 2.0.14(2021-07-14) -- 修复 组件赋值为空,界面未更新的 bug -- 修复 start 和 end 不能动态赋值的 bug -- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug +- 修复 组件赋值为空,界面未更新的Bug +- 修复 start 和 end 不能动态赋值的Bug +- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug ## 2.0.13(2021-07-08) -- 修复 范围选择不能动态赋值的 bug +- 修复 范围选择不能动态赋值的Bug ## 2.0.12(2021-07-08) - 修复 范围选择的初始时间在一个月内时,造成无法选择的bug ## 2.0.11(2021-07-08) - 优化 弹出层在超出视窗边缘定位不准确的问题 ## 2.0.10(2021-07-08) -- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug +- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug - 优化 弹出层在超出视窗边缘被遮盖的问题 ## 2.0.9(2021-07-07) - 新增 maskClick 事件 -- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px +- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px - 修复 范围选择时清空返回值不合理的bug,['', ''] -> [] ## 2.0.8(2021-07-07) - 新增 日期时间显示框支持插槽 ## 2.0.7(2021-07-01) - 优化 添加 uni-icons 依赖 ## 2.0.6(2021-05-22) -- 修复 图标在小程序上不显示的 bug +- 修复 图标在小程序上不显示的Bug - 优化 重命名引用组件,避免潜在组件命名冲突 ## 2.0.5(2021-05-20) - 优化 代码目录扁平化 ## 2.0.4(2021-05-12) - 新增 组件示例地址 ## 2.0.3(2021-05-10) -- 修复 ios 下不识别 '-' 日期格式的 bug +- 修复 ios 下不识别 '-' 日期格式的Bug - 优化 pc 下弹出层添加边框和阴影 ## 2.0.2(2021-05-08) - 修复 在 admin 中获取弹出层定位错误的bug @@ -97,7 +127,7 @@ > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker) ## 1.0.6(2021-03-18) - 新增 hide-second 属性,时间支持仅选择时、分 -- 修复 选择跟显示的日期不一样的 bug -- 修复 chang事件触发2次的 bug -- 修复 分、秒 end 范围错误的 bug +- 修复 选择跟显示的日期不一样的Bug +- 修复 chang事件触发2次的Bug +- 修复 分、秒 end 范围错误的Bug - 优化 更好的 nvue 适配 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 222030d..8f3c461 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 @@ -13,10 +13,10 @@ 'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--disable':weeks.disable, }"> - + {{weeks.date}} - + @@ -41,10 +41,6 @@ return [] } }, - lunar: { - type: Boolean, - default: false - }, checkHover: { type: Boolean, default: false @@ -61,8 +57,8 @@ } - diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js index 882f006..3b1735b 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js @@ -1,27 +1,24 @@ class Calendar { constructor({ - date, selected, startDate, endDate, range, - // multipleStatus } = {}) { // 当前日期 - this.date = this.getDate(new Date()) // 当前初入日期 + this.date = this.getDateObj(new Date()) // 当前初入日期 // 打点信息 this.selected = selected || []; - // 范围开始 + // 起始时间 this.startDate = startDate - // 范围结束 + // 终止时间 this.endDate = endDate + // 是否范围选择 this.range = range // 多选状态 this.cleanMultipleStatus() // 每周日期 this.weeks = {} - // this._getWeek(this.date.fullDate) - // this.multipleStatus = multipleStatus this.lastHover = false } /** @@ -29,8 +26,8 @@ class Calendar { * @param {Object} date */ setDate(date) { - this.selectDate = this.getDate(date) - this._getWeek(this.selectDate.fullDate) + const selectDate = this.getDateObj(date) + this.getWeeks(selectDate.fullDate) } /** @@ -44,93 +41,82 @@ class Calendar { } } - /** - * 重置开始日期 - */ - resetSatrtDate(startDate) { - // 范围开始 + setStartDate(startDate) { this.startDate = startDate - } - /** - * 重置结束日期 - */ - resetEndDate(endDate) { - // 范围结束 + setEndDate(endDate) { this.endDate = endDate } + getPreMonthObj(date){ + date = fixIosDateFormat(date) + date = new Date(date) + + const oldMonth = date.getMonth() + date.setMonth(oldMonth - 1) + const newMonth = date.getMonth() + if(oldMonth !== 0 && newMonth - oldMonth === 0){ + date.setMonth(newMonth - 1) + } + return this.getDateObj(date) + } + getNextMonthObj(date){ + date = fixIosDateFormat(date) + date = new Date(date) + + const oldMonth = date.getMonth() + date.setMonth(oldMonth + 1) + const newMonth = date.getMonth() + if(newMonth - oldMonth > 1){ + date.setMonth(newMonth - 1) + } + return this.getDateObj(date) + } + /** - * 获取任意时间 + * 获取指定格式Date对象 */ - getDate(date, AddDayCount = 0, str = 'day') { - if (!date) { - date = new Date() - } - if (typeof date !== 'object') { - date = date.replace(/-/g, '/') - } - const dd = new Date(date) - switch (str) { - case 'day': - dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期 - break - case 'month': - if (dd.getDate() === 31) { - dd.setDate(dd.getDate() + AddDayCount) - } else { - dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期 - } - break - case 'year': - dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期 - break - } - const y = dd.getFullYear() - const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0 - const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0 + getDateObj(date) { + date = fixIosDateFormat(date) + date = new Date(date) + return { - fullDate: y + '-' + m + '-' + d, - year: y, - month: m, - date: d, - day: dd.getDay() + fullDate: getDate(date), + year: date.getFullYear(), + month: addZero(date.getMonth() + 1), + date: addZero(date.getDate()), + day: date.getDay() } } - /** - * 获取上月剩余天数 + * 获取上一个月日期集合 */ - _getLastMonthDays(firstDay, full) { - let dateArr = [] - for (let i = firstDay; i > 0; i--) { - const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate() - dateArr.push({ - date: beforeDate, - month: full.month - 1, + getPreMonthDays(amount, dateObj) { + const result = [] + for (let i = amount - 1; i >= 0; i--) { + const month = dateObj.month - 1 + result.push({ + date: new Date(dateObj.year, month, -i).getDate(), + month, disable: true }) } - return dateArr + return result } /** - * 获取本月天数 + * 获取本月日期集合 */ - _currentMonthDys(dateData, full) { - let dateArr = [] - let fullDate = this.date.fullDate - for (let i = 1; i <= dateData; i++) { - let isinfo = false - let nowDate = full.year + '-' + (full.month < 10 ? - full.month : full.month) + '-' + (i < 10 ? - '0' + i : i) - // 是否今天 - let isDay = fullDate === nowDate + getCurrentMonthDays(amount, dateObj) { + const result = [] + const fullDate = this.date.fullDate + for (let i = 1; i <= amount; i++) { + const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}` + const isToday = fullDate === currentDate // 获取打点信息 - let info = this.selected && this.selected.find((item) => { - if (this.dateEqual(nowDate, item.date)) { + const info = this.selected && this.selected.find((item) => { + if (this.dateEqual(currentDate, item.date)) { return item } }) @@ -139,62 +125,52 @@ class Calendar { let disableBefore = true let disableAfter = true if (this.startDate) { - // let dateCompBefore = this.dateCompare(this.startDate, fullDate) - // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate) - disableBefore = this.dateCompare(this.startDate, nowDate) + disableBefore = dateCompare(this.startDate, currentDate) } if (this.endDate) { - // let dateCompAfter = this.dateCompare(fullDate, this.endDate) - // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate) - disableAfter = this.dateCompare(nowDate, this.endDate) - } - let multiples = this.multipleStatus.data - let checked = false - let multiplesStatus = -1 - if (this.range) { - if (multiples) { - multiplesStatus = multiples.findIndex((item) => { - return this.dateEqual(item, nowDate) - }) - } - if (multiplesStatus !== -1) { - checked = true - } - } - let data = { - fullDate: nowDate, - year: full.year, - date: i, - multiple: this.range ? checked : false, - beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after), - afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after), - month: full.month, - disable: !(disableBefore && disableAfter), - isDay, - userChecked: false - } - if (info) { - data.extraInfo = info + disableAfter = dateCompare(currentDate, this.endDate) } - dateArr.push(data) + let multiples = this.multipleStatus.data + let multiplesStatus = -1 + if (this.range && multiples) { + multiplesStatus = multiples.findIndex((item) => { + return this.dateEqual(item, currentDate) + }) + } + const checked = multiplesStatus !== -1 + + result.push({ + fullDate: currentDate, + year: dateObj.year, + date: i, + multiple: this.range ? checked : false, + beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after), + afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after), + month: dateObj.month, + disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)), + isToday, + userChecked: false, + extraInfo: info + }) } - return dateArr + return result } /** - * 获取下月天数 + * 获取下一个月日期集合 */ - _getNextMonthDays(surplus, full) { - let dateArr = [] - for (let i = 1; i < surplus + 1; i++) { - dateArr.push({ + _getNextMonthDays(amount, dateObj) { + const result = [] + const month = dateObj.month + 1 + for (let i = 1; i <= amount; i++) { + result.push({ date: i, - month: Number(full.month) + 1, + month, disable: true }) } - return dateArr + return result } /** @@ -205,59 +181,38 @@ class Calendar { if (!date) { date = new Date() } - const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate) - return dateInfo - } - /** - * 比较时间大小 - */ - dateCompare(startDate, endDate) { - // 计算截止时间 - startDate = new Date(startDate.replace('-', '/').replace('-', '/')) - // 计算详细项的截止时间 - endDate = new Date(endDate.replace('-', '/').replace('-', '/')) - if (startDate <= endDate) { - return true - } else { - return false - } + return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate) } /** * 比较时间是否相等 */ dateEqual(before, after) { - // 计算截止时间 - before = new Date(before.replace('-', '/').replace('-', '/')) - // 计算详细项的截止时间 - after = new Date(after.replace('-', '/').replace('-', '/')) - if (before.getTime() - after.getTime() === 0) { - return true - } else { - return false - } + before = new Date(fixIosDateFormat(before)) + after = new Date(fixIosDateFormat(after)) + return before.valueOf() === after.valueOf() } - + /** * 比较真实起始日期 */ - - isLogicBefore(currentDay, before, after) { - let logicBefore = before - if (before && after) { - logicBefore = this.dateCompare(before, after) ? before : after - } - return this.dateEqual(logicBefore, currentDay) + + isLogicBefore(currentDate, before, after) { + let logicBefore = before + if (before && after) { + logicBefore = dateCompare(before, after) ? before : after + } + return this.dateEqual(logicBefore, currentDate) + } + + isLogicAfter(currentDate, before, after) { + let logicAfter = after + if (before && after) { + logicAfter = dateCompare(before, after) ? after : before + } + return this.dateEqual(logicAfter, currentDate) } - - isLogicAfter(currentDay, before, after) { - let logicAfter = after - if (before && after) { - logicAfter = this.dateCompare(before, after) ? after : before - } - return this.dateEqual(logicAfter, currentDay) - } /** * 获取日期范围内所有日期 @@ -276,7 +231,7 @@ class Calendar { var unixDe = de.getTime() - 24 * 60 * 60 * 1000 for (var k = unixDb; k <= unixDe;) { k = k + 24 * 60 * 60 * 1000 - arr.push(this.getDate(new Date(parseInt(k))).fullDate) + arr.push(this.getDateObj(new Date(parseInt(k))).fullDate) } return arr } @@ -285,11 +240,12 @@ class Calendar { * 获取多选状态 */ setMultiple(fullDate) { + if (!this.range) return + let { before, after - } = this.multipleStatus - if (!this.range) return + } = this.multipleStatus if (before && after) { if (!this.lastHover) { this.lastHover = true @@ -302,46 +258,42 @@ class Calendar { this.lastHover = false } else { if (!before) { - this.multipleStatus.before = fullDate + this.multipleStatus.before = fullDate this.lastHover = false } else { this.multipleStatus.after = fullDate - if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus .after); } else { this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus .before); - } + } this.lastHover = true } } - this._getWeek(fullDate) + this.getWeeks(fullDate) } /** * 鼠标 hover 更新多选状态 */ setHoverMultiple(fullDate) { - let { - before, - after - } = this.multipleStatus + if (!this.range || this.lastHover) return - if (!this.range) return - if (this.lastHover) return + const { before } = this.multipleStatus if (!before) { this.multipleStatus.before = fullDate } else { this.multipleStatus.after = fullDate - if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); } else { this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); } } - this._getWeek(fullDate) + this.getWeeks(fullDate) } /** @@ -351,12 +303,12 @@ class Calendar { this.multipleStatus.before = before this.multipleStatus.after = after if (before && after) { - if (this.dateCompare(before, after)) { + if (dateCompare(before, after)) { this.multipleStatus.data = this.geDateAll(before, after); - this._getWeek(after) + this.getWeeks(after) } else { this.multipleStatus.data = this.geDateAll(after, before); - this._getWeek(before) + this.getWeeks(before) } } } @@ -365,46 +317,87 @@ class Calendar { * 获取每周数据 * @param {Object} dateData */ - _getWeek(dateData) { + getWeeks(dateData) { const { - fullDate, year, month, - date, - day - } = this.getDate(dateData) - let firstDay = new Date(year, month - 1, 1).getDay() - let currentDay = new Date(year, month, 0).getDate() - let dates = { - lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 - currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 - nextMonthDays: [], // 下个月开始几天 - weeks: [] + } = this.getDateObj(dateData) + + const preMonthDayAmount = new Date(year, month - 1, 1).getDay() + const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData)) + + const currentMonthDayAmount = new Date(year, month, 0).getDate() + const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData)) + + const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount + const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData)) + + const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays] + + const weeks = new Array(6) + for (let i = 0; i < calendarDays.length; i++) { + const index = Math.floor(i / 7) + if(!weeks[index]){ + weeks[index] = new Array(7) + } + weeks[index][i % 7] = calendarDays[i] } - let canlender = [] - const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length) - dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)) - canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays) - let weeks = {} - // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天 - for (let i = 0; i < canlender.length; i++) { - if (i % 7 === 0) { - weeks[parseInt(i / 7)] = new Array(7) - } - weeks[parseInt(i / 7)][i % 7] = canlender[i] - } - this.canlender = canlender + + this.calendar = calendarDays this.weeks = weeks } - - //静态方法 - // static init(date) { - // if (!this.instance) { - // this.instance = new Calendar(date); - // } - // return this.instance; - // } } +function getDateTime(date, hideSecond){ + return `${getDate(date)} ${getTime(date, hideSecond)}` +} -export default Calendar +function getDate(date) { + date = fixIosDateFormat(date) + date = new Date(date) + const year = date.getFullYear() + const month = date.getMonth()+1 + const day = date.getDate() + return `${year}-${addZero(month)}-${addZero(day)}` +} + +function getTime(date, hideSecond){ + date = fixIosDateFormat(date) + date = new Date(date) + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}` +} + +function addZero(num) { + if(num < 10){ + num = `0${num}` + } + return num +} + +function getDefaultSecond(hideSecond) { + return hideSecond ? '00:00' : '00:00:00' +} + +function dateCompare(startDate, endDate) { + startDate = new Date(fixIosDateFormat(startDate)) + endDate = new Date(fixIosDateFormat(endDate)) + return startDate <= endDate +} + +function checkDate(date){ + const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g + return date.match(dateReg) +} + +const dateTimeReg = /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])( [0-5][0-9]:[0-5][0-9]:[0-5][0-9])?$/ +function fixIosDateFormat(value) { + if (typeof value === 'string' && dateTimeReg.test(value)) { + value = value.replace(/-/g, '/') + } + return value +} + +export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat} \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/package.json b/uni_modules/uni-datetime-picker/package.json index f7a2e6a..8abed63 100644 --- a/uni_modules/uni-datetime-picker/package.json +++ b/uni_modules/uni-datetime-picker/package.json @@ -1,7 +1,7 @@ { "id": "uni-datetime-picker", "displayName": "uni-datetime-picker 日期选择器", - "version": "2.2.11", + "version": "2.2.22", "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择", "keywords": [ "uni-datetime-picker", diff --git a/uni_modules/uni-easyinput/changelog.md b/uni_modules/uni-easyinput/changelog.md index 49b1a3b..765401a 100644 --- a/uni_modules/uni-easyinput/changelog.md +++ b/uni_modules/uni-easyinput/changelog.md @@ -1,10 +1,21 @@ +## 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) diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue index 110722d..7f5113e 100644 --- a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue +++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue @@ -1,24 +1,7 @@