行编辑列表JVxeTable时间控件问题修复
parent
6c2dfc29f2
commit
a250827b37
|
@ -6,6 +6,7 @@
|
||||||
:showTime="isDatetime"
|
:showTime="isDatetime"
|
||||||
dropdownClassName="j-vxe-date-picker"
|
dropdownClassName="j-vxe-date-picker"
|
||||||
style="min-width: 0"
|
style="min-width: 0"
|
||||||
|
v-model:open="openPicker"
|
||||||
v-bind="cellProps"
|
v-bind="cellProps"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
/>
|
/>
|
||||||
|
@ -14,7 +15,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ref, computed, watch, defineComponent } from 'vue';
|
import { ref, computed, watch, defineComponent } from 'vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { dispatchEvent } from '/@/components/jeecg/JVxeTable/utils';
|
|
||||||
import { JVxeComponent, JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
|
import { JVxeComponent, JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
|
||||||
import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
|
import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
|
||||||
import { isEmpty } from '/@/utils/is';
|
import { isEmpty } from '/@/utils/is';
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
let format = originColumn.value.format;
|
let format = originColumn.value.format;
|
||||||
return format ? format : isDatetime.value ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD';
|
return format ? format : isDatetime.value ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD';
|
||||||
});
|
});
|
||||||
|
const openPicker = ref(true);
|
||||||
watch(
|
watch(
|
||||||
innerValue,
|
innerValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
@ -51,24 +52,13 @@
|
||||||
isDatetime,
|
isDatetime,
|
||||||
dateFormat,
|
dateFormat,
|
||||||
innerDateValue,
|
innerDateValue,
|
||||||
|
openPicker,
|
||||||
handleChange,
|
handleChange,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
||||||
enhanced: {
|
enhanced: {
|
||||||
aopEvents: {
|
aopEvents: {
|
||||||
editActived({ $event, row, column }) {
|
|
||||||
dispatchEvent({
|
|
||||||
$event,
|
|
||||||
row,
|
|
||||||
column,
|
|
||||||
props: this.props,
|
|
||||||
instance: this,
|
|
||||||
className: '.ant-calendar-picker',
|
|
||||||
isClick: false,
|
|
||||||
handler: (el) => el.children[0].click(),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
} as JVxeComponent.EnhancedPartial,
|
} as JVxeComponent.EnhancedPartial,
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
:format="format"
|
:format="format"
|
||||||
dropdownClassName="j-vxe-time-picker"
|
dropdownClassName="j-vxe-time-picker"
|
||||||
style="min-width: 0"
|
style="min-width: 0"
|
||||||
|
v-model:open="openPicker"
|
||||||
v-bind="cellProps"
|
v-bind="cellProps"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
:getPopupContainer="(node) => node.parentNode"
|
:getPopupContainer="(node) => node.parentNode"
|
||||||
|
@ -15,7 +16,6 @@
|
||||||
import { ref, computed, watch, defineComponent } from 'vue';
|
import { ref, computed, watch, defineComponent } from 'vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { TimePicker } from 'ant-design-vue';
|
import { TimePicker } from 'ant-design-vue';
|
||||||
import { dispatchEvent } from '/@/components/jeecg/JVxeTable/utils';
|
|
||||||
import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types';
|
import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types';
|
||||||
import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
|
import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
|
||||||
import { isEmpty } from '/@/utils/is';
|
import { isEmpty } from '/@/utils/is';
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
let format = originColumn.value.format;
|
let format = originColumn.value.format;
|
||||||
return format ? format : 'HH:mm:ss';
|
return format ? format : 'HH:mm:ss';
|
||||||
});
|
});
|
||||||
|
const openPicker = ref(true);
|
||||||
watch(
|
watch(
|
||||||
innerValue,
|
innerValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
@ -51,23 +52,13 @@
|
||||||
cellProps,
|
cellProps,
|
||||||
format,
|
format,
|
||||||
innerTimeValue,
|
innerTimeValue,
|
||||||
|
openPicker,
|
||||||
handleChange,
|
handleChange,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
||||||
enhanced: {
|
enhanced: {
|
||||||
aopEvents: {
|
aopEvents: {
|
||||||
editActived({ $event, row, column }) {
|
|
||||||
dispatchEvent({
|
|
||||||
$event,
|
|
||||||
row,
|
|
||||||
column,
|
|
||||||
props: this.props,
|
|
||||||
instance: this,
|
|
||||||
className: '.ant-time-picker-input',
|
|
||||||
isClick: true,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
} as JVxeComponent.EnhancedPartial,
|
} as JVxeComponent.EnhancedPartial,
|
||||||
});
|
});
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
key: 'datetime',
|
key: 'datetime',
|
||||||
type: JVxeTypes.datetime,
|
type: JVxeTypes.datetime,
|
||||||
width: 200,
|
width: 200,
|
||||||
defaultValue: '2019-4-30 14:52:22',
|
defaultValue: '2019-04-30 14:52:22',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
key: 'datetime',
|
key: 'datetime',
|
||||||
type: JVxeTypes.datetime,
|
type: JVxeTypes.datetime,
|
||||||
width: 240,
|
width: 240,
|
||||||
defaultValue: '2019-4-30 14:52:22',
|
defaultValue: '2019-04-30 14:51:22',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue