ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 444 forks source link

Table No Data text is not editable #1108

Open kagankorkmaz opened 2 years ago

kagankorkmaz commented 2 years ago

Description

When there is no data in the table the text will be displayed is not editable it does not exist on the TableProps. Moreover I internationalized the element-react to English by using import { i18n } from "element-react"; import locale from "element-react/src/locale/lang/en"; i18n.use(locale);

And still the text displaying automatically is "暂无数据"

It is very annoying and I guess easily solvable. If you can help I will be so appreciated.

kamxy commented 2 years ago

same issue

ceyhuncfc9 commented 2 years ago

Yeah I have this issue too, really frustrating actually. I didn't have this issue when I did the same configuration with the Vue.js package.

AlexVagrant commented 2 years ago

I think this link may help you: https://elemefe.github.io/element-react/index#/zh-CN/i18n

webpack.config.js

{
  plugins: [
    new webpack.NormalModuleReplacementPlugin(/element-react[\/\\]src[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-react/src/locale/lang/en')
  ]
}
kagankorkmaz commented 2 years ago

I think this link may help you: https://elemefe.github.io/element-react/index#/zh-CN/i18n

webpack.config.js

{
  plugins: [
    new webpack.NormalModuleReplacementPlugin(/element-react[\/\\]src[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-react/src/locale/lang/en')
  ]
}

Hi Alex, thank you so much for your response. I solved that by copying repo and using it as a local npm module also by that way I solved some other issues that I gave up. They mostly forgot add typings, if you have similar problems with me I strongly suggest.