企微助手 ,仓库名 短剧

38.86ab57876d7afd042918.js 3.3KB

1
  1. webpackJsonp([38],{vDma:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=l("c/Tr"),n=l.n(o),i={data:function(){return{height:0,columns:[],scrollTop:0,radio:1}},mounted:function(){var e=this;this.height=500,setTimeout(function(){var t=["name","sex","describe"];e.columns=n()({length:500},function(l,o){return{prop:o>2?t[2]:t[o],id:o,label:o>2?t[2]:t[o],fixed:o<3?"left":"",width:e.rnd(50,300),sortable:1===o,resizable:!0}});var l=n()({length:5e3},function(e,t){return{id:t+1,name:"pl"+t,sex:t,describe:"欢迎使用plx"+t}});e.datas=l,e.$refs.plxTable.reloadData(e.datas)})},methods:{rnd:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},setHei:function(e){this.height=e},scroll:function(e){var t=e.scrollTop;e.scrollLeft;this.scrollTop=t},setData:function(e){this.datas=n()({length:e},function(e,t){return{id:t+1,name:"pl"+t,sex:t,describe:"欢迎使用plx"+t}}),this.$refs.plxTable.reloadData(this.datas),2===this.radio&&this.$refs.plxTable.pagingScrollTopLeft(this.scrollTop)},selectable:function(e){return 2!==e.row.id},toggleSelection:function(e,t){var l=this;e?e.forEach(function(e){"固定选中"===t?l.$refs.plxTable.toggleRowSelection([{row:e,selected:!0}]):l.$refs.plxTable.toggleRowSelection([{row:e}])}):this.$refs.plxTable.clearSelection()},pagingScrollTopLeft:function(e){this.$refs.plxTable.pagingScrollTopLeft(e,e)},scrollBottom:function(){this.$refs.plxTable.scrollToRow(this.datas[this.datas.length-1])},selectionChange:function(e){console.log(e)}}},a={render:function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",[l("ux-grid",{ref:"plxTable",attrs:{height:e.height,checkboxConfig:{checkMethod:e.selectable,highlight:!0},"show-header-overflow":"ellipsis"},on:{"selection-change":e.selectionChange,"table-body-scroll":e.scroll}},[l("ux-table-column",{attrs:{type:"checkbox",width:"80"}}),e._v(" "),l("ux-table-column",{attrs:{type:"index",width:"100"}}),e._v(" "),e._l(e.columns,function(e){return l("ux-table-column",{key:e.id,attrs:{resizable:e.resizable,field:e.prop,title:e.label,sortable:e.sortable,width:e.width,fixed:e.fixed}})}),e._v(" "),l("ux-table-column",{attrs:{title:"额外信息",width:"60",field:"address"}})],2),e._v(" "),l("div",{staticStyle:{"margin-top":"20px"}},[l("el-button",{on:{click:function(t){return e.toggleSelection([e.datas[0],e.datas[2]])}}},[e._v("切换第一、第三行的选中状态")]),e._v(" "),l("el-button",{on:{click:function(t){return e.toggleSelection([e.datas[3]],"固定选中")}}},[e._v("选中第四行")]),e._v(" "),l("el-button",{on:{click:function(t){return e.toggleSelection()}}},[e._v("取消选择")]),e._v(" "),l("p",{staticStyle:{margin:"20px 0"}},[l("el-button",{on:{click:function(t){return e.setData(3)}}},[e._v("变化数据为3条")]),e._v(" "),l("el-button",{on:{click:function(t){return e.setData(2e3)}}},[e._v("变化数据为2000条")]),e._v(" "),l("el-button",{on:{click:function(t){return e.setData(5e3)}}},[e._v("变化数据为5000条")]),e._v(" "),l("el-radio-group",{staticStyle:{"margin-left":"30px"},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[l("el-radio",{attrs:{label:1}},[e._v("数据变化滚动到顶部")]),e._v(" "),l("el-radio",{attrs:{label:2}},[e._v("数据变化滚动不滚动到顶部")])],1)],1)],1)],1)},staticRenderFns:[]},r=l("VU/8")(i,a,!1,null,null,null);t.default=r.exports}});