标签:ice == 生成 tab notice class i++ feedback col
1 export default { 2 name: ‘Notice‘, 3 data() { 4 var createTableData = function() { 5 var arr = [] 6 var oDate = new Date() 7 var y = oDate.getFullYear() 8 var m = oDate.getMonth() + 1 9 var d = oDate.getDate() 10 for (var i = 1; i < 67; i++) { 11 var obj = {} 12 obj.title = `${i % 2 === 0 ? ‘紧急公告‘ : ‘对外公函‘}` 13 obj.type = `${i % 3 === 0 ? ‘通知‘ : i % 3 === 1 ? ‘报备‘ : ‘公文‘}` 14 obj.viewed = `${i % 2 === 0 ? ‘17‘ : ‘28‘}` 15 obj.noView = `${i % 2 === 0 ? ‘56‘ : ‘39‘}` 16 obj.feedBack = `${i % 2 === 0 ? ‘56‘ : ‘39‘}` 17 obj.viewStatus = `${i % 2 === 0 ? ‘已阅读‘ : ‘未阅读‘}` 18 obj.feedbackStatus = `${i % 2 === 0 ? ‘已反馈‘ : ‘未反馈‘}` 19 obj.noFeedBack = `${i % 2 === 0 ? ‘56‘ : ‘39‘}` 20 obj.date = `${y}-${m}-${d} ` 21 arr.push(obj) 22 } 23 return arr 24 } 25 26 return { 27 tableData:createTableData () 28 }
标签:ice == 生成 tab notice class i++ feedback col
原文地址:https://www.cnblogs.com/anbozhu7/p/10287787.html