uview-plus 3.8.39 → 3.8.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,65 @@
1
+ ## 3.8.49(2026-06-05)
2
+ fix(datetime-picker): 修复hasInput模式下点击遮罩无法关闭弹窗的问题
3
+
4
+ - 在close()方法中补充将showByClickInput置为false的逻辑,
5
+ - 与cancel()和confirm()的处理保持一致,修复issue #759
6
+
7
+ ## 3.8.48(2026-06-04)
8
+ feat(calendar): 新增区间模式返回值格式配置
9
+
10
+ - 新增 rangeResultMode 配置项,支持 range 模式在 confirm 时返回全部区间日期或仅返回起止日期。
11
+ - 本次改动覆盖默认配置、组件 props、确认回调返回逻辑与 TypeScript 类型声明,默认值为 all 以保持现有行为兼容。
12
+
13
+ ## 3.8.47(2026-06-03)
14
+ 扩展 u-datetime-picker 支持小时与秒级时间选择
15
+
16
+ - 新增 datehour、timesecond、datetimesecond 三种模式,覆盖年月日时与秒级场景\n- 增加 minSecond/maxSecond 配置,并同步列生成、边界计算、回显与变更事件处理\n- 更新 TypeScript 类型定义,确保新模式和秒级属性在项目中可被正确约束
17
+
18
+ ## 3.8.46(2026-06-02)
19
+ fix: 修复DatetimePicker在pageInline模式下无法滚动到默认值问题 #941
20
+
21
+ pageInline模式下picker-view原生组件常驻显示,Android/HarmonyOS端
22
+ 原生组件尚未完成初始化时已渲染为索引0位置,后续更新无法可靠触发滚动。
23
+
24
+ - updateColumnValue改用$nextTick+条件延时:pageInline时等待100ms
25
+ - mounted新增pageInline兜底:200ms后再次设置索引确保原生组件就绪
26
+
27
+ ## 3.8.45(2026-06-01)
28
+ fix: 修复NumberBox最小值限制导致无法输入新值问题 #914
29
+
30
+ ## 3.8.44(2026-05-31)
31
+ fix: 修复up-tooltip未暴露open/close方法及manual模式失效问题 #1021
32
+
33
+ - 新增 show prop,支持 triggerMode="manual" 时通过 :show 控制显示
34
+ - 新增 open() / close() 方法并对外暴露
35
+ - 监听 show prop 变化,manual 模式下自动调用 open/close
36
+ - 新增 open / close emit 事件,u-popover 的 @open @close 监听可正常工作
37
+ - 统一内部显示/隐藏逻辑均走 open()/close() 方法
38
+
39
+ ## 3.8.43(2026-05-30)
40
+ fix: 修复小程序中 tabbar midButton 模式图标不显示问题
41
+
42
+ - 使用 :deep() 选择器替代普通后代选择器,解决 virtualHost:true 导致
43
+ - 父组件 scoped 样式无法传播到子组件根元素的问题。
44
+
45
+ ## 3.8.42(2026-05-29)
46
+ feat: 新增单行日历组件并支持下拉展开完整月历及修复签名组件 clear 方法实现
47
+
48
+ -新增 up-calendar-strip 组件,支持单行横向滚动日期、前后切月、选中态与今天高亮,并受 minDate/maxDate 约束。
49
+ -完整模式复用内嵌 up-calendar(pageInline + monthSwitch),支持下拉展开、上拉收起与完整月历选中回写,降低重复代码与维护复杂度。
50
+ -同步接入全局默认 props 与 TypeScript 类型声明,并在 calendar 示例页增加可直接验证的演示入口。
51
+ - 修复 Signature 组件对外 clear 方法缺失导致 ref 调用报错的问题。
52
+ - 在 u-signature 中新增 clear 公共方法,统一重置路径与绘制状态并清空画布,同时触发 clear 事件,保持工具栏清空与外部调用行为一致。
53
+
54
+ ## 3.8.41(2026-05-29)
55
+ feat: tabs新增多形态模式并优化示例页吸顶展示
56
+
57
+ - 新增shapeMode能力,支持capsule/card/pill-arrow/tag四种模式,并补齐props默认配置与类型声明。
58
+ - 完善各模式样式细节与尺寸,优化圆角矩形箭头视觉表现,卡片模式使用轻量阴影增强层次。
59
+
60
+ ## 3.8.40(2026-05-28)
61
+ feat: 新增 up-guide 首屏全屏引导组件,支持开箱即用的一次性引导能力。
62
+
1
63
  ## 3.8.39(2026-05-27)
2
64
  feat: 新增 tabbar 风格体系与动态图标表现
3
65
 
@@ -35,12 +35,13 @@ export default {
35
35
  showConfirm: true,
36
36
  maxRange: Number.MAX_SAFE_INTEGER, // Infinity
37
37
  rangePrompt: '',
38
- showRangePrompt: true,
39
- allowSameDay: false,
40
- round: 0,
38
+ showRangePrompt: true,
39
+ allowSameDay: false,
40
+ round: 0,
41
41
  monthNum: 3,
42
42
  monthSwitch: false,
43
43
  showToday: true,
44
+ rangeResultMode: 'all',
44
45
  weekText: [t("up.week.one"), t("up.week.two"), t("up.week.three"), t("up.week.four"), t("up.week.five"), t("up.week.six"), t("up.week.seven")],
45
46
  forbidDays: [],
46
47
  forbidDaysToast: t("up.calendar.disabled"),
@@ -132,6 +132,11 @@ export const props = defineMixin({
132
132
  allowSameDay: {
133
133
  type: Boolean,
134
134
  default: () => defProps.calendar.allowSameDay
135
+ },
136
+ // 区间模式下确认返回值格式,all-返回区间内所有日期,boundary-仅返回起止日期
137
+ rangeResultMode: {
138
+ type: String,
139
+ default: () => defProps.calendar.rangeResultMode
135
140
  },
136
141
  // 圆角值
137
142
  round: {
@@ -158,6 +158,7 @@ import { t } from '../../libs/i18n'
158
158
  * @property {String} rangePrompt 范围选择超过最多可选天数时的提示文案,mode = range时有效
159
159
  * @property {Boolean} showRangePrompt 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 (默认 true )
160
160
  * @property {Boolean} allowSameDay 是否允许日期范围的起止时间为同一天,mode = range时有效 (默认 false )
161
+ * @property {String} rangeResultMode 区间模式下确认返回值格式,all-返回区间内所有日期,boundary-仅返回起止日期 (默认 'all' )
161
162
  * @property {Number|String} round 圆角值,默认无圆角 (默认 0 )
162
163
  * @property {Number|String} monthNum 最多展示的月份数量 (默认 3 )
163
164
  * @property {Boolean} monthSwitch 是否启用非滚动的单月切换模式 (默认 false )
@@ -307,6 +308,17 @@ export default {
307
308
  emits: ["confirm", "close"],
308
309
  methods: {
309
310
  addUnit,
311
+ getConfirmValue(selected = this.selected) {
312
+ if (
313
+ this.mode === 'range' &&
314
+ this.rangeResultMode === 'boundary' &&
315
+ selected.length >= 2
316
+ ) {
317
+ const len = selected.length - 1
318
+ return [selected[0], selected[len]]
319
+ }
320
+ return selected
321
+ },
310
322
  // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
311
323
  setFormatter(e) {
312
324
  this.innerFormatter = e
@@ -325,7 +337,7 @@ export default {
325
337
  return
326
338
  }
327
339
  if( scene === 'tap') {
328
- this.$emit('confirm', this.selected)
340
+ this.$emit('confirm', this.getConfirmValue())
329
341
  }
330
342
  }
331
343
  }
@@ -355,7 +367,7 @@ export default {
355
367
  // 点击确定按钮
356
368
  confirm() {
357
369
  if (!this.buttonDisabled) {
358
- this.$emit('confirm', this.selected)
370
+ this.$emit('confirm', this.getConfirmValue())
359
371
  }
360
372
  },
361
373
  // 获得两个日期之间的月份数
@@ -0,0 +1,36 @@
1
+ /*
2
+ * @Author : uview-plus
3
+ * @Description : calendarStrip default props
4
+ * @version : 3.0
5
+ * @Date : 2026-05-29 14:40:00
6
+ */
7
+ import { t } from '../../libs/i18n'
8
+
9
+ export default {
10
+ calendarStrip: {
11
+ modelValue: null,
12
+ minDate: 0,
13
+ maxDate: 0,
14
+ color: '#3c9cff',
15
+ weekText: [
16
+ t('up.week.one'),
17
+ t('up.week.two'),
18
+ t('up.week.three'),
19
+ t('up.week.four'),
20
+ t('up.week.five'),
21
+ t('up.week.six'),
22
+ t('up.week.seven')
23
+ ],
24
+ fullCalendar: true,
25
+ fullCalendarProps: {},
26
+ fullMonthNum: 24,
27
+ pullDownThreshold: 40,
28
+ collapseAfterSelect: true,
29
+ readonly: false,
30
+ showToday: true,
31
+ monthFormat: '',
32
+ expandHint: '下拉展开月历',
33
+ collapseHint: '上拉收起月历'
34
+ }
35
+ }
36
+
@@ -0,0 +1,68 @@
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+
4
+ export const props = defineMixin({
5
+ props: {
6
+ modelValue: {
7
+ type: [String, Number, Date, null],
8
+ default: () => defProps.calendarStrip.modelValue
9
+ },
10
+ minDate: {
11
+ type: [String, Number],
12
+ default: () => defProps.calendarStrip.minDate
13
+ },
14
+ maxDate: {
15
+ type: [String, Number],
16
+ default: () => defProps.calendarStrip.maxDate
17
+ },
18
+ color: {
19
+ type: String,
20
+ default: () => defProps.calendarStrip.color
21
+ },
22
+ weekText: {
23
+ type: Array,
24
+ default: () => defProps.calendarStrip.weekText
25
+ },
26
+ fullCalendar: {
27
+ type: Boolean,
28
+ default: () => defProps.calendarStrip.fullCalendar
29
+ },
30
+ fullCalendarProps: {
31
+ type: Object,
32
+ default: () => defProps.calendarStrip.fullCalendarProps
33
+ },
34
+ fullMonthNum: {
35
+ type: [String, Number],
36
+ default: () => defProps.calendarStrip.fullMonthNum
37
+ },
38
+ pullDownThreshold: {
39
+ type: [String, Number],
40
+ default: () => defProps.calendarStrip.pullDownThreshold
41
+ },
42
+ collapseAfterSelect: {
43
+ type: Boolean,
44
+ default: () => defProps.calendarStrip.collapseAfterSelect
45
+ },
46
+ readonly: {
47
+ type: Boolean,
48
+ default: () => defProps.calendarStrip.readonly
49
+ },
50
+ showToday: {
51
+ type: Boolean,
52
+ default: () => defProps.calendarStrip.showToday
53
+ },
54
+ monthFormat: {
55
+ type: String,
56
+ default: () => defProps.calendarStrip.monthFormat
57
+ },
58
+ expandHint: {
59
+ type: String,
60
+ default: () => defProps.calendarStrip.expandHint
61
+ },
62
+ collapseHint: {
63
+ type: String,
64
+ default: () => defProps.calendarStrip.collapseHint
65
+ }
66
+ }
67
+ })
68
+