做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

解決iview多表頭動態更改列元素發生的錯誤的方法

來源:懂視網 責編:小采 時間:2020-11-27 22:05:28
文檔

解決iview多表頭動態更改列元素發生的錯誤的方法

解決iview多表頭動態更改列元素發生的錯誤的方法:解決iview 'You may have an infinite update loop in watcher with expression columns' 解決方案 單表頭是可以動態變化不需要增添什么東西 多表頭目前iview尚不能動態變化,會報錯You may have an infinite update lo
推薦度:
導讀解決iview多表頭動態更改列元素發生的錯誤的方法:解決iview 'You may have an infinite update loop in watcher with expression columns' 解決方案 單表頭是可以動態變化不需要增添什么東西 多表頭目前iview尚不能動態變化,會報錯You may have an infinite update lo

解決iview 'You may have an infinite update loop in watcher with expression "columns"'

解決方案

單表頭是可以動態變化不需要增添什么東西

多表頭目前iview尚不能動態變化,會報錯You may have an infinite update loop in watcher with expression "columns"解決方法是github大神提供的:需要修改iview.js源碼

將iview.js中

columns: {
 handler: function handler() {
 var colsWithId = this.makeColumnsId(this.columns);
 his.allColumns = (0, _util.getAllColumns)(colsWithId);
 this.cloneColumns = this.makeColumns(colsWithId);

 this.columnRows = this.makeColumnRows(false, colsWithId);
 this.leftFixedColumnRows = this.makeColumnRows('left', colsWithId);
 this.rightFixedColumnRows = this.makeColumnRows('right', colsWithId);
 this.rebuildData = this.makeDataWithSortAndFilter();
 this.handleResize();
 },
 deep: true
 },

修改為

columns: {
 handler: function handler() {
 //[Fix Bug]You may have an infinite update loop in watcher with expression "columns"
 var tempClonedColumns = (0, _assist.deepCopy)(this.columns);
 var colsWithId = this.makeColumnsId(tempClonedColumns);
 //[Fix Bug End]
 this.allColumns = (0, _util.getAllColumns)(colsWithId);
 this.cloneColumns = this.makeColumns(colsWithId);

 this.columnRows = this.makeColumnRows(false, colsWithId);
 this.leftFixedColumnRows = this.makeColumnRows('left', colsWithId);
 this.rightFixedColumnRows = this.makeColumnRows('right', colsWithId);
 this.rebuildData = this.makeDataWithSortAndFilter();
 this.handleResize();
 },
 deep: true
 },

demo

<template>
 <div>
 單表頭:
 <Table :columns="columns1" @on-row-click="onRowClick" :data="data1"></Table>
 多表頭:
 <Table :columns="columns12" @on-row-click="onRowClick2" :data="data1" border height="500"></Table>
 </div>
</template>
<script>
 export default {
 data() {
 return {
 columns1: [
 {
 title: 'Name',
 key: 'name'
 },
 {
 title: 'Age',
 key: 'age'
 },
 {
 title: 'Address',
 key: 'address'
 }
 ],
 data1: [
 {
 name: 'John Brown',
 age: 18,
 address: 'New York No. 1 Lake Park',
 date: '2016-10-03'
 },
 {
 name: 'Jim Green',
 age: 24,
 address: 'London No. 1 Lake Park',
 date: '2016-10-01'
 },
 {
 name: 'Joe Black',
 age: 30,
 address: 'Sydney No. 1 Lake Park',
 date: '2016-10-02'
 },
 {
 name: 'Jon Snow',
 age: 26,
 address: 'Ottawa No. 2 Lake Park',
 date: '2016-10-04'
 }
 ],
 columns12: [{
 title: 'Name',
 align:'center',
 children: [{
 title: 'nickName',
 key: 'name',
 },
 {
 title: 'realName',
 key: 'name'
 }
 ]
 },
 {
 title: 'Age',
 key: 'age'
 },
 {
 title: 'Address',
 key: 'address'
 }
 ],
 }
 },
 methods: {
 onRowClick() {
 if('City'!==this.columns1[this.columns1.length-1].title) {
 this.columns1.splice(this.columns1.length, 0, {
 title: 'City',
 key: 'address'
 })
 }
 },
 onRowClick2() {
 if('City'!==this.columns12[this.columns12.length-1].title) {
 this.columns12.splice(this.columns12.length, 0, {
 title: 'City',
 key: 'address'
 })
 }
 }
 },
 }
</script>

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

解決iview多表頭動態更改列元素發生的錯誤的方法

解決iview多表頭動態更改列元素發生的錯誤的方法:解決iview 'You may have an infinite update loop in watcher with expression columns' 解決方案 單表頭是可以動態變化不需要增添什么東西 多表頭目前iview尚不能動態變化,會報錯You may have an infinite update lo
推薦度:
標簽: 動態 錯誤 表頭的
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 金湖县| 哈尔滨市| 文昌市| 陕西省| 霸州市| 柘城县| 茂名市| 平顺县| 阜南县| 营山县| 铜山县| 巩义市| 贞丰县| 东乌| 衡阳县| 竹北市| 苏尼特右旗| 濮阳县| 昂仁县| 河西区| 台南市| 新河县| 达拉特旗| 宣城市| 南城县| 九江县| 内乡县| 山东省| 沽源县| 类乌齐县| 志丹县| 天全县| 山丹县| 新河县| 阿城市| 靖远县| 仙游县| 锡林浩特市| 称多县| 定日县| 长宁区|