rangepicker等时间控件报错(vue3.4以上版本有问题)

pull/1164/head
JEECG 2024-03-26 22:16:38 +08:00
parent 8540e8d2ae
commit 9eb7031685
1 changed files with 29 additions and 15 deletions

View File

@ -140,6 +140,8 @@
} }
//update-end---author:wangshuai ---date:20230410 forissues/435------------ //update-end---author:wangshuai ---date:20230410 forissues/435------------
if (!Array.isArray(defaultValue)) { if (!Array.isArray(defaultValue)) {
// update-begin--author:liaozhiyang---date:20240326---forQQYUN-8696rangepickervue3.4
if (Object.prototype.toString.call(defaultValue) === '[object Date]') {
//update-begin---author:wangshuai ---date:20221124 for[issues/215]------------ //update-begin---author:wangshuai ---date:20221124 for[issues/215]------------
if (valueFormat) { if (valueFormat) {
schema.defaultValue = dateUtil(defaultValue).format(valueFormat); schema.defaultValue = dateUtil(defaultValue).format(valueFormat);
@ -147,7 +149,17 @@
schema.defaultValue = dateUtil(defaultValue); schema.defaultValue = dateUtil(defaultValue);
} }
//update-end---author:wangshuai ---date:20221124 for[issues/215]------------ //update-end---author:wangshuai ---date:20221124 for[issues/215]------------
}
// update-end--author:liaozhiyang---date:20240326---forQQYUN-8696rangepickervue3.4
} else { } else {
// update-begin--author:liaozhiyang---date:20240326---forQQYUN-8696rangepickervue3.4
let isAssignment = false;
defaultValue.forEach((item) => {
if (Object.prototype.toString.call(item) === '[object Date]') {
isAssignment = true;
}
});
if (isAssignment) {
const def: dayjs.Dayjs[] = []; const def: dayjs.Dayjs[] = [];
defaultValue.forEach((item) => { defaultValue.forEach((item) => {
//update-begin---author:wangshuai ---date:20221124 for[issues/215]------------ //update-begin---author:wangshuai ---date:20221124 for[issues/215]------------
@ -160,6 +172,8 @@
}); });
schema.defaultValue = def; schema.defaultValue = def;
} }
// update-end--author:liaozhiyang---date:20240326---forQQYUN-8696rangepickervue3.4
}
} }
} }
if (unref(getProps).showAdvancedButton) { if (unref(getProps).showAdvancedButton) {