vue中的横向排列_vue + ElementUI 的横向表格代码「建议收藏」

vue中的横向排列_vue + ElementUI 的横向表格代码「建议收藏」{{tableData[index*2-2].key}}{{tableData[index*2-2].value}}{{tableData[index*2-1]!==undefined?tableData[index*2-1].key:‘‘}}{{tableData[index*2-1]!==undefined?tableData[index*2-1].value:‘‘}}…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

{
{tableData[index*2-2].key}}
{
{tableData[index*2-2].value}}
{
{tableData[index*2-1] !== undefined ? tableData[index*2-1].key : ‘‘}}
{
{tableData[index*2-1] !== undefined ? tableData[index*2-1].value : ‘‘}}
商品序号 {
{tableData[index*2-2].index}}
{
{tableData[index-1].key}}22
{
{tableData[index-1].value}}
{
{tableData[rowCount+index-1] !== undefined ? tableData[rowCount+index-1].key : ‘‘}}
{
{tableData[rowCount+index-1] !== undefined ? tableData[rowCount+index-1].value : ‘‘}}

var Main = {

data() {

return {

styleObject: {},

s_showByRow: true,

tableData: [

{key: ‘单号‘, value: ‘1001‘,index: ‘1‘,},

{key: ‘商品名称‘, value: ‘篮球‘,index: ‘1‘},

{key: ‘价格‘, value: ‘120.00‘, index: ‘1‘},

{key: ‘订单日期‘, value: ‘2017-03-01‘, index: ‘1‘},

{key: ‘付款方式‘, value: ‘在线支付‘, index: ‘1‘},

{key: ‘收货地址‘, value: ‘北京市海淀区西北旺镇‘, index: ‘1‘},

],

};

},

//props: [‘tableData‘, ‘tableStyle‘, ‘showByRow‘],

computed: {

rowCount: function() {

return Math.ceil(this.tableData.length/2);

}

},

created() {

this.styleObject = this.tableStyle;

if(this.showByRow !== undefined){

this.s_showByRow = this.showByRow;

}

},

}

var Ctor = Vue.extend(Main)

new Ctor().$mount(‘#app‘)

.mailTable, .mailTable tr, .mailTable tr td{ border:1px solid #E6EAEE; }

.mailTable{ font-size: 12px; color: #71787E; }

.mailTable tr td{ border:1px solid #E6EAEE; width: 150px; height: 35px; line-height: 35px; box-sizing: border-box; padding: 0 10px; }

.mailTable tr td.column { background-color: #EFF3F6; color: #393C3E; }

原文:https://www.cnblogs.com/lhqdbk/p/12206477.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/169667.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号