table 只显示编辑框

提问 已结
8 512
云淡风轻379
悬赏:50飞吻
版本:layui 浏览器:
当我后台的tomcat 启动后, 默认打开index 页面,然后 打开layui里面的table,
永远的第一次 都是这样的,然后才会好,有时候 点击搜索还会 只出现 编辑框,
有谁知道是为什么吗?


实在是无语了

@贤心
回帖
  • 贤心
    贤心 (管理员)
    2017-12-19
    @云淡风轻379
    尝试给可以确定宽度的列设置下 width 吧,如:
    {
    field: "updateUser",
    title: "编辑人",
    width: 120
    }
    0 回复
  • 贤心
    贤心 (管理员)
    2017-12-19
    把 table.render 的代码贴出来看看
    0 回复
  • @贤心
    table.render({
    elem: "#LAY_table_notice",
    url: baseNoticeUrl,

    cols: [
    [{
    field: "id",
    title: "公告id",
    minWidth: 40
    }, {
    field: "title",
    title: "公告标题"
    }, {
    field: "sendStatus",
    title: "状态",
    disabled: true,
    selected: true,
    jsontext: "[{ 'text': '待发送', 'value': '0'},{ 'text': '已发送', 'value': '1'}]"
    }, {
    field: "updateUser",
    title: "编辑人"
    }, {
    field: "updateTime",
    title: "编辑时间",
    datetimeformat: true
    }, {
    field: "sendTime",
    title: "发送时间",
    datetimeformat: true
    }, {
    title: "操作",
    fixed: 'right',
    align: 'center',
    toolbar: '#barNotice'
    }]
    ],
    id: "testTab",
    cellMinWidth: 120,
    even: true,
    page: true,
    limits: [10, 15, 20],
    limit: 10,
    height: "full-290"
    });
    0 回复
  • @贤心 这个是数据,这个只解决了一个问题,还有一个是点击搜索,数据能出来,但是 table-body的height=0px
    {
    "msg": "成功",
    "code": "0000",
    "data": [ {
    "updateUser": "",
    "updateTime": "2017-10-18T09:59:08.000+0000",
    "title": "关于华夏信财",
    "content": "<img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-0.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-1.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-2.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-3.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-4.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-5.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-6.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-7.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-8.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-9.jpg\" alt=\"\"><img src=\"http://cxsit.huaxiafinance.com/huacai-sit/cx_images/company_intro/fkc-10.jpg\" alt=\"\">",
    "shareSwitch": "1",
    "sendTime": "2017-12-15T14:46:50.000+0000",
    "shareContent": "信用为本,财富一生",
    "shareTitle": "关于华夏信财",
    "createTime": "2017-11-28T09:59:08.000+0000",
    "deleteTime": null,
    "shareIcon": "http://cxsit.huaxiafinance.com/huacai-sit/cx_images/icon/loginlogo@3x.png",
    "shareTime": 5,
    "sendType": null,
    "shareUrl": "http://cxsit.huaxiafinance.com/huacai-sit/h5/#/notice?id=4&type=0",
    "shareTooltip": "",
    "createUser": "",
    "sendStatus": "1",
    "id": 4
    } , {
    "updateUser": "SYSTEM",
    "updateTime": "2017-12-19T10:01:07.000+0000",
    "title": "按时地方",
    "content": "<p>岁的大叔大叔</p>",
    "shareSwitch": "0",
    "sendTime": "2017-12-19T00:00:00.000+0000",
    "shareContent": "",
    "shareTitle": "",
    "createTime": "2017-12-19T15:23:49.000+0000",
    "deleteTime": null,
    "shareIcon": "",
    "shareTime": 5,
    "sendType": null,
    "shareUrl": "",
    "shareTooltip": "",
    "createUser": "SYSTEM",
    "sendStatus": "0",
    "id": 14
    }, {
    "updateUser": "SYSTEM",
    "updateTime": "2017-12-19T10:01:18.000+0000",
    "title": "按时地方搜索",
    "content": "<p>阿萨德法撒旦法撒的发送到</p>",
    "shareSwitch": "0",
    "sendTime": null,
    "shareContent": "",
    "shareTitle": "",
    "createTime": "2017-12-19T16:00:56.000+0000",
    "deleteTime": null,
    "shareIcon": "",
    "shareTime": 5,
    "sendType": null,
    "shareUrl": "",
    "shareTooltip": "",
    "createUser": "SYSTEM",
    "sendStatus": "0",
    "id": 15
    }],
    "count": 10,
    "limit": 10,
    "page": 1
    }
    0 回复
  • @贤心 还有一个就是怎么样才能获得你的QQ号,或者你在的QQ群?
    0 回复
  • 纸飞机
    纸飞机 (管理员)
    2017-12-19
    @云淡风轻379
    layui开发者交流三群:479865389
    0 回复
  • 0 回复
  • @贤心 在吗
    0 回复
本帖已设置禁止回复