Element: [Bug Report] Using el-table in electronic-vue, it can't render properly.

Created on 2 Jun 2019  ·  15Comments  ·  Source: ElemeFE/element

Element UI version

2.9.1

OS/Browsers version

macOs Mojave 10.14.5

Vue version

2.6.10

Reproduction Link

https://github.com/Char-set/element-ui-issue-in-electron-vue.git

Steps to reproduce

1、拉取项目代码
2、yarn
3、yarn run dev

What is Expected?

el-table渲染正常

组件文件在 src -> renderer -> components -> LandingPage.vue

What is actually happening?

el-table 渲染失败

在devtools中查看 el-table-header 组件属性 发现:

conputed属性中 columns 数组为空,但是columnsCount 属性值确为 3

Most helpful comment

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

MacOs Mojave 10.14.5

Vue version

2.6.10

Reproduction Link

Https://github.com/Char-set/element-ui-issue-in-electron-vue.git

Steps to reproduce

  1. Pull project code

2, yarn

  1. yarn run dev

What is Expected?

El-table rendering is normal

Component file in SRC - > renderer - > components - > LandingPage. Vue

What is actually happening?

El-table rendering failure
Looking at the el-table-header component properties in devtools, we found that:

The columns array in the conputed attribute is empty, but the columnsCount attribute value is really 3

在2.9.0版本上也可以正常显示el-table,不过通过设置electron-vue配置文件后,可以正常使用[email protected]版本
solution: SimulatedGREG/electron-vue#361

操作方式:
修改.electron-vue/webpack.render.config.js文件中21行的位置,在whiteListedModules中增加element-ui可以解决上述问题

All 15 comments

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

MacOs Mojave 10.14.5

Vue version

2.6.10

Reproduction Link

Https://github.com/Char-set/element-ui-issue-in-electron-vue.git

Steps to reproduce

  1. Pull project code

2, yarn

  1. yarn run dev

What is Expected?

El-table rendering is normal

Component file in SRC - > renderer - > components - > LandingPage. Vue

What is actually happening?

El-table rendering failure
Looking at the el-table-header component properties in devtools, we found that:

The columns array in the conputed attribute is empty, but the columnsCount attribute value is really 3

can confirm. I have the same problem

can confirm. I have the same problem

Switch into 2.8.2 ,it's ok

I have this problem too, May I know if there is any plan to fix it?

+1

+1

2.8.2 is works~~~

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

MacOs Mojave 10.14.5

Vue version

2.6.10

Reproduction Link

Https://github.com/Char-set/element-ui-issue-in-electron-vue.git

Steps to reproduce

  1. Pull project code

2, yarn

  1. yarn run dev

What is Expected?

El-table rendering is normal

Component file in SRC - > renderer - > components - > LandingPage. Vue

What is actually happening?

El-table rendering failure
Looking at the el-table-header component properties in devtools, we found that:

The columns array in the conputed attribute is empty, but the columnsCount attribute value is really 3

在2.9.0版本上也可以正常显示el-table,不过通过设置electron-vue配置文件后,可以正常使用[email protected]版本
solution: SimulatedGREG/electron-vue#361

操作方式:
修改.electron-vue/webpack.render.config.js文件中21行的位置,在whiteListedModules中增加element-ui可以解决上述问题

Same problem, not in electronic-vue, just in a electron project.
With just vue, it works fine, but when import vue-router, and change vue to 'vue/dist/vue.js', it will fail, 2.9.0 is fine.
After test, the problem is caused by

    import Vue from 'vue/dist/vue.js';
    // import Vue from 'vue';

if import with dist/vue.js, it won't show table.

Switch into 2.8.2 ,it's ok

my project not in electron-vue, but after switch info 2.8.2 it still doesn't work.

same problem in 2.12.0

I have the same problem in 2.13.0

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

MacOs Mojave 10.14.5

Vue version

2.6.10

Reproduction Link

Https://github.com/Char-set/element-ui-issue-in-electron-vue.git

Steps to reproduce

  1. Pull project code

2, yarn

  1. yarn run dev

What is Expected?

El-table rendering is normal
Component file in SRC - > renderer - > components - > LandingPage. Vue

What is actually happening?

El-table rendering failure
Looking at the el-table-header component properties in devtools, we found that:
The columns array in the conputed attribute is empty, but the columnsCount attribute value is really 3

在2.9.0版本上也可以正常显示el-table,不过通过设置electron-vue配置文件后,可以正常使用[email protected]版本
solution: SimulatedGREG/electron-vue#361

操作方式:
修改.electron-vue/webpack.render.config.js文件中21行的位置,在whiteListedModules中增加element-ui可以解决上述问题

this solution works on element-ui v2.13.0

Same problem, not in electronic-vue, just in a electron project.
~With just vue, it works fine, but when import vue-router, and change vue to 'vue/dist/vue.js', it will fail, 2.9.0 is fine.~
After test, the problem is caused by

    import Vue from 'vue/dist/vue.js';
    // import Vue from 'vue';

if import with dist/vue.js, it won't show table.

yep,you are right,it is caused by vue built version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gengxuelei picture gengxuelei  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments