Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Strange phenomenon with vue3 and element date picker #5365

Open
litong534 opened this issue Jan 13, 2022 · 12 comments
Open

[Bug Report] Strange phenomenon with vue3 and element date picker #5365

litong534 opened this issue Jan 13, 2022 · 12 comments

Comments

@litong534
Copy link

Element Plus version

1.3.0-beta.5

OS/Browsers version

mac/chrome

Vue version

3.2.26

Reproduction Link

https://codesandbox.io/s/quiet-https-o0kup?file=/src/App.vue

Steps to reproduce

  1. select a date
  2. reselect date
  3. boom!

What is Expected?

works well

What is actually happening?

when i use nextTick to reset data, the unrelated component el-date-picker may cause an error

@litong534
Copy link
Author

why unable to reproduce?

@msidolphin
Copy link
Collaborator

why unable to reproduce?

Kapture.2022-01-13.at.16.38.36.mp4

@litong534
Copy link
Author

why unable to reproduce?

Kapture.2022-01-13.at.16.38.36.mp4

i'm so sorry, this happens in vite, i haven't try it in pure vue program yet.
the demo code goes here https://github.com/litong534/error-using-date-picker-demo

@litong534
Copy link
Author

why unable to reproduce?

Kapture.2022-01-13.at.16.38.36.mp4

why you cannot reproduce ? i tried in pure vue program, it still shows error.
another demo goes here https://github.com/litong534/another-date-picker-error-demo-in-vue
image

@litong534
Copy link
Author

why unable to reproduce?

Kapture.2022-01-13.at.16.38.36.mp4

https://another-date-picker-error-demo-in-vue.vercel.app/

I deployed it in vercel, is it clear enough to reproduce?

@hanx316 hanx316 added Project::Bug Something isn't working and removed Issue::Unable To Reproduce labels Jan 14, 2022
@emojiiii
Copy link
Contributor

playground

@Alanscut
Copy link
Contributor

Alanscut commented Jan 18, 2022

@litong534
maybe you can try to finish your el-table code at first,
you should assign value to tableData and use scope.row correctly

@Alanscut
Copy link
Contributor

https://codesandbox.io/s/table-column-use-nexttick-demo-fyqsv?file=/src/App.vue

if display page error "Cannot use import statement outside a module", please refresh again

@Alanscut Alanscut removed the Project::Bug Something isn't working label Jan 19, 2022
@litong534
Copy link
Author

https://codesandbox.io/s/table-column-use-nexttick-demo-fyqsv?file=/src/App.vue

if display page error "Cannot use import statement outside a module", please refresh again

thanks for reply, It does seem to have solved my problem.Thanks very much!
actually I tried plenty of components, only date picker shows error "insertBefore". And why does the Table component affect the DatePicker component?
I am very curious about this question. Could you briefly explain the reason for the problem?
Looking forward to your reply : )

@litong534
Copy link
Author

https://codesandbox.io/s/table-column-use-nexttick-demo-fyqsv?file=/src/App.vue

if display page error "Cannot use import statement outside a module", please refresh again

Besides,in vue 2.6.x,using elementui,the same code does not present similar problems,which makes me confused. 😔

@harrisyangbo
Copy link

https://codesandbox.io/s/table-column-use-nexttick-demo-fyqsv?file=/src/App.vue
if display page error "Cannot use import statement outside a module", please refresh again

Besides,in vue 2.6.x,using elementui,the same code does not present similar problems,which makes me confused. 😔

I also encountered such problems. And affected Component is Select Component. I don't understand very much, this is why?! why? why?

1 similar comment
@harrisyangbo
Copy link

https://codesandbox.io/s/table-column-use-nexttick-demo-fyqsv?file=/src/App.vue
if display page error "Cannot use import statement outside a module", please refresh again

Besides,in vue 2.6.x,using elementui,the same code does not present similar problems,which makes me confused. 😔

I also encountered such problems. And affected Component is Select Component. I don't understand very much, this is why?! why? why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants