You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// vite.config.jsimport{defineConfig}from'vite';importlegacyfrom'@vitejs/plugin-legacy';importvue2from'@vitejs/plugin-vue2';importvue2Jsxfrom'@vitejs/plugin-vue2-jsx';exportdefaultdefineConfig(({ command, mode })=>{return{plugins: [vue2(),vue2Jsx(),legacy({// When targeting IE11, you also need regenerator-runtimeadditionalLegacyPolyfills: ['regenerator-runtime/runtime'],}),],};});
// demo.vue<scriptlang="jsx">
import {defineComponent,ref} from 'vue';
let index = 0;
export default defineComponent({setup(){const date1 =ref(newDate());// Invalid prop: type check failed for prop "value". Expected Date, String, Array, got Object constdatePicker1=<DatePickerv-model={date1}></DatePicker>;constdate2=newDate()// Although there is no warning above, but this loses reactiveconstdatePicker2=<DatePickerv-model={date2}></DatePicker>;constdate3=ref(newDate());// [plugin:vite:vue2-jsx] unknown: Cannot read properties of undefined (reading 'body')constdatePicker3=<DatePickerv-model={date3.value}></DatePicker>;return()=>datePicker;},});
</script>