Skip to content

Commit 12f6956

Browse files
committed
chore: 还原测试标签
1 parent dbc6fae commit 12f6956

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

packages/renderless/src/pager-item/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
88
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9-
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. 测试e2e-action
9+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
1010
*
1111
*/
1212

packages/renderless/src/picker/index.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
88
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9-
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. 测试e2e-action
9+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
1010
*
1111
*/
1212

@@ -64,9 +64,9 @@ export const watchMobileVisible =
6464
}
6565

6666
export const watchPickerVisible =
67-
({ api, vm, dispatch, emit, props, state, nextTick }) =>
67+
({ api, vm, dispatch, emit, props, state, nextTick, isPCMode }) =>
6868
(value) => {
69-
if (props.readonly || state.pickerDisabled || state.isMobileScreen) return
69+
if (props.readonly || state.pickerDisabled || (state.isMobileScreen && !isPCMode)) return
7070

7171
if (value) {
7272
api.showPicker()
@@ -940,20 +940,27 @@ export const handleClose =
940940
}
941941

942942
export const handleFocus =
943-
({ emit, vm, state, api, props }) =>
943+
({ emit, vm, state, api, props, isPCMode }) =>
944944
() => {
945945
const type = state.type
946946
if (props.readonly || state.pickerDisabled) {
947947
return
948948
}
949949

950+
// 判断当前日期选择器类型是否在触发类型列表中
950951
if (DATEPICKER.TriggerTypes.includes(type)) {
951-
if (state.isMobileScreen && state.isDateMobileComponent) {
952+
// 如果不是移动端屏幕或者强制使用PC端模式
953+
if (!state.isMobileScreen || isPCMode) {
954+
// 显示PC端的日期选择弹窗
955+
state.pickerVisible = true
956+
} else if (state.isDateMobileComponent) {
957+
// 如果是移动端日期相关组件(日期、日期时间、日期范围等)
958+
// 调用移动端日期选择器的显示方法
952959
api.dateMobileToggle(true)
953-
} else if (state.isMobileScreen && state.isTimeMobileComponent) {
960+
} else if (state.isTimeMobileComponent) {
961+
// 如果是移动端时间相关组件(时间、时间范围等)
962+
// 调用移动端时间选择器的显示方法
954963
api.timeMobileToggle(true)
955-
} else {
956-
state.pickerVisible = true
957964
}
958965
}
959966

packages/vue/src/form-item/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
import FormItem from './src/index'
1313

14-
/* istanbul ignore next 测试e2e-action */
14+
/* istanbul ignore next */
1515
FormItem.install = function (Vue) {
1616
Vue.component(FormItem.name, FormItem)
1717
}

0 commit comments

Comments
 (0)