您的位置:首页 > 文旅 > 美景 > 沧州开发网站多少钱_优衣库的网络营销方式_广州番禺发布网_软文小故事200字

沧州开发网站多少钱_优衣库的网络营销方式_广州番禺发布网_软文小故事200字

2024/12/27 11:57:42 来源:https://blog.csdn.net/weixin_43871703/article/details/142170379  浏览:    关键词:沧州开发网站多少钱_优衣库的网络营销方式_广州番禺发布网_软文小故事200字
沧州开发网站多少钱_优衣库的网络营销方式_广州番禺发布网_软文小故事200字

视图层

<uni-table border stripe emptyText="暂无更多数据" class="table_x"><!-- 表头行 --><uni-tr><uni-th align="center">患者姓名</uni-th><uni-th align="center">透析方式</uni-th><uni-th align="center">选择</uni-th></uni-tr><!-- 表格数据行 --><uni-tr v-for="(item,index) in dataRowSpan" :key="index"><uni-td class="td_item" align="center" v-if="item.rowspan":rowspan="item.rowspan">{{item.name}}</uni-td><uni-td align="center">{{item.age}}</uni-td><uni-td align="center">{{item.address}}</uni-td></uni-tr></uni-table>

数据和需要的变量

//合并行

dataRowSpan: [{name: 'AAA',age: 18,address: 'New York No. 1 Lake Park',id: "1",rowspan: 2},{name: 'AAA',age: 25,address: 'London No. 1 Lake Park',id: "2",rowspan: 0},{name: 'BBB',age: 30,address: 'Sydney No. 1 Lake Park',id: "3",rowspan: 1},{name: 'BBB',age: 26,address: 'Ottawa No. 2 Lake Park',id: "5",rowspan: 1},{name: 'C',age: 26,address: 'Ottawa No. 2 Lake Park',id: "6",rowspan: 2},{name: 'DD',age: 26,address: 'Ottawa No. 2 Lake Park',id: "11",rowspan: 2},{name: 'DD',age: 26,address: 'Ottawa No. 2 Lake Park',id: "111",rowspan: 0}],spanArr1: [],	// 存储序列pos1: 0			

JS 方法

handleData() {// this.dataRowSpan.forEach(item)this.spanArr1 = [];this.pos1 = 0;this.dataRowSpan.forEach((item, index) => {if (index == 0) {this.spanArr1.push(1);this.pos1 = 0;} else {if (item.name == this.dataRowSpan[index - 1].name) {this.spanArr1[this.pos1] += 1;this.spanArr1.push(0);} else {this.spanArr1.push(1);this.pos1 = index;}}});this.dataRowSpan.forEach((item, index) => {item.rowspan = this.spanArr1[index];})},

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com