Element UI version
2.3.4
OS/Browsers version
chrome
Vue version
2.6.12
Reproduction Link
https://elementui.github.io/issue-generator/#/zh-CN
Steps to reproduce
<el-table-column
property = "name"// js在setInterval回调函数中改变此变量值,ui更新
label="名称"
width="150">
<el-table-column
property = "key" // js在setInterval回调函数中改变此变量值,ui更新
label="key"
width="150">
<el-table-column
property = "status"// js在setInterval回调函数中改变此变量值,ui不更新,但如果改变其它ui可更新的值,它会一起更新
label="status"
width="150">
<el-table-column
property = "value" // js在setInterval回调函数中改变此变量值,ui不更新,但如果改变其它ui可更新的值,它会一起更新
label="value"
width="160">
<el-table-column
property="virtualDevice.name" // js在setInterval回调函数中改变此变量值,ui更新
label="虚拟设备">
js如下:
情景1:
$this.currentServer.items[0].value = '111' ui不更新
情景2:
$this.currentServer.items[0].name = '111' ui更新
情景3:
$this.currentServer.items[0].value = '111'
$this.currentServer.items[0].name = '111'
两个ui都更新
情景4:
$this.currentServer.items[0].name = '111'
$this.currentServer.items[0].value = '111'
两个ui都更新
What is Expected?
解决bug
What is actually happening?
解决bug
4条答案
按热度按时间d8tt03nd1#
Translation of this issue:
Element UI version
2.3.4
OS/Browsers version
chrome
Vue version
2.6.12
Reproduction Link
https://elementui.github.io/issue-generator/#/zh -CN
Steps to reproduce
<el-dialog
:title="'[' currentServer.serviceId '] variable list'“
: visible.sync= " modals.showServerVariables "
width="800px">
<el-table
:data=" currentServer.items "
height="300"
style="width: 100%;">
<el-table-column
type="index"
width="50">
Change the value of this variable in setinterval callback function to update UI
Label = "name"
width="150">
<el-table-column
Change the value of this variable in the setinterval callback function to update the UI
label="key"
width="150">
Property = "status" / / JS changes the value of this variable in the setinterval callback function, and the UI is not updated. However, if other UI updatable values are changed, it will be updated together
label="status"
width="150">
<el-table-column
Property = "value" / / JS changes the value of this variable in setinterval callback function, the UI will not be updated, but if other UI updatable values are changed, it will be updated together
label="value"
width="160">
property=" virtualDevice.name "/ / JS changes the value of this variable in setinterval callback function to update UI
Label = "virtual device" >
JS is as follows:
Scenario 1:
$ this.currentServer.items [0]. Value ='111 'UI does not update
Scenario 2:
$ this.currentServer.items [0]. Name ='111 'UI update
Scenario 3:
$ this.currentServer.items [0].value = '111'
$ this.currentServer.items [0].name = '111'
Both UIs are updated
Scenario 4:
$ this.currentServer.items [0].name = '111'
$ this.currentServer.items [0].value = '111'
Both UIs are updated
What is Expected?
Fix bugs
What is actually happening?
Fix bugs
vzgqcmou2#
I am having the same issue
xxhby3vn3#
兄弟,你这复现的链接也没有,就几行代码能看出什么问题
6kkfgxo04#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.