提交 d70a2026 编写于 作者: RedPig97's avatar RedPig97

update: 表格更新默认值

上级 09cb9c37
......@@ -72,7 +72,7 @@ const props = withDefaults(defineProps<DatePickerProps>(), {
placeholder: '请选择日期',
});
const emit = defineEmits<EditorEmit>();
const curValue: Ref<any> = props.value ? ref<Dayjs>(dayjs(props.value, props.dateFormat)) : ref('');
let curValue : Ref<any> = computed(() => props.value ? (dayjs(props.value, props.dateFormat)) : '');
const onChange = (date: string, dateString: string) => {
emit('editorEvent', {
tag: props.name,
......
......@@ -682,7 +682,7 @@ export class GridControl extends MDControl {
}
break;
}
} else if (createDV && row.hasOwnProperty(property)) {
} else if (createDV && (row.hasOwnProperty(property) || property in row)) {
row[property] = fieldType && DataTypes.isNumber(fieldType) ? Number(createDV) : createDV;
}
});
......
......@@ -36,7 +36,11 @@ export const ctrlState = {
{
createDV: "{{editItem.createDV}}",
createDVT: "{{editItem.createDVT}}",
{{#if editItem.psAppDEField}}
property: "{{lowerCase editItem.psAppDEField.codeName}}",
{{else}}
property: "{{lowerCase editItem.codeName}}",
{{/if}}
{{#if (and editItem.psEditor editItem.psEditor.dateTimeFormat)}}
valueFormat: "{{editItem.psEditor.dateTimeFormat}}",
{{else if editItem.psAppDEField}}
......@@ -148,7 +152,11 @@ export const ctrlState = {
{
updateDV: "{{editItem.updateDV}}",
updateDVT: "{{editItem.updateDVT}}",
{{#if editItem.psAppDEField}}
property: "{{lowerCase editItem.psAppDEField.codeName}}",
{{else}}
property: "{{lowerCase editItem.codeName}}",
{{/if}}
{{#if (and editItem.psEditor editItem.psEditor.dateTimeFormat)}}
valueFormat: "{{editItem.psEditor.dateTimeFormat}}",
{{else if editItem.psAppDEField}}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册