• render函数里面实现for循环的写法


    核心代码
    render: (h, params) => { let texts = ''; //表格列显示文字 let index = params.row.IpAddress.indexOf(',') if (params.row.IpAddress !== null) { if (index > -1) { texts = params.row.IpAddress.substring(0, index) + "..."; } else { texts = params.row.IpAddress; } } let IPArr = params.row.IpAddress.split(',') // console.log('组合的数组是:', IPArr) return h('Tooltip', { props: { // content: params.row.IpAddress, placement: "left-start" }, style: { cursor: 'pointer' } },[ texts, IPArr.map(function (item,index) { return h('div',{ slot: 'content', style: { whiteSpace: 'normal', wordWrap: 'break-word' } }, [ h('p' , item) ]) }) ]) // return h('Tooltip', { // props: { // // content: params.row.IpAddress, // placement: "left-start" // }, // style: { // cursor: 'pointer' // } // }, [ // // h('span', params.row.IpAddress) // texts, // h('div', { // slot: 'content', // style: { // whiteSpace: 'normal', // wordWrap: 'break-word' // } // }, [ // h('p' , IPArr[0]), // h('p' , IPArr[1]), // h('p' , IPArr[2]), // h('p' , IPArr[3]) // ]) // ]) }
  • 相关阅读:
    数据库存储过程
    asp.net类中公共类DBHelp
    asp.net Cookie的用法实例
    使用SandCastle创建.Net帮助文档
    DotNetNuke(DNN)如何升级到DNN 4.9.3
    两个VS的文档工具
    SunBlogNuke.net logo设计
    自动化测试网站
    Debugging DLL Projects
    .NET 下自动生成UML图
  • 原文地址:https://www.cnblogs.com/JeneryYang/p/10209222.html
Copyright © 2020-2023  润新知