Преглед на файлове

fix(demo): useForm中DatePicker,RangePicker 日期控件位置不对

Li Kui преди 1 година
родител
ревизия
ae58ada82e
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      src/views/demo/form/UseForm.vue

+ 10 - 0
src/views/demo/form/UseForm.vue

@@ -84,12 +84,22 @@
       component: 'DatePicker',
       label: '字段3',
       colProps: { span: 8 },
+      componentProps: {
+        getPopupContainer: () => {
+          return document.querySelector('.ant-form');
+        },
+      },
     },
     {
       field: 'fieldTime',
       component: 'RangePicker',
       label: '时间字段',
       colProps: { span: 8 },
+      componentProps: {
+        getPopupContainer: () => {
+          return document.querySelector('.ant-form');
+        },
+      },
     },
     {
       field: 'field4',