mirror of https://gitee.com/xiaonuobase/snowy
【升级】更新table组件重置问题,感谢QQ群 影子 发现问题并贡献
parent
2514612c33
commit
e329010c67
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
columns: {
|
columns: {
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reset() {
|
reset() {
|
||||||
this.columnsSetting = this.originColumns
|
this.columnsSetting = JSON.parse(JSON.stringify(this.originColumns))
|
||||||
this.indeterminate = false
|
this.indeterminate = false
|
||||||
this.checkAll = true
|
this.checkAll = true
|
||||||
this.emitColumnChange()
|
this.emitColumnChange()
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.columnsSetting = this.columns.map(value => ({ ...value, checked: true }))
|
this.columnsSetting = this.columns.map(value => ({ ...value, checked: true }))
|
||||||
this.originColumns = [...this.columnsSetting]
|
this.originColumns = JSON.parse(JSON.stringify(this.columnsSetting))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue