uni-tr.js 3.9 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/uni-table/components/uni-tr/uni-tr"],{320:function(t,e,n){"use strict";n.r(e);var r=n(321),i=n(323);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n(325);var u,s=n(36),c=Object(s["default"])(i["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],u);c.options.__file="uni_modules/uni-table/components/uni-tr/uni-tr.vue",e["default"]=c.exports},321:function(t,e,n){"use strict";n.r(e);var r=n(322);n.d(e,"render",(function(){return r["render"]})),n.d(e,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(e,"components",(function(){return r["components"]}))},322:function(t,e,n){"use strict";var r;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return u})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return r}));var i=function(){var t=this,e=t.$createElement;t._self._c},o=!1,u=[];i._withStripped=!0},323:function(t,e,n){"use strict";n.r(e);var r=n(324),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},324:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(){n.e("uni_modules/uni-table/components/uni-tr/table-checkbox").then(function(){return resolve(n(498))}.bind(null,n)).catch(n.oe)},i={name:"uniTr",components:{tableCheckbox:r},props:{disabled:{type:Boolean,default:!1},keyValue:{type:[String,Number],default:""}},options:{virtualHost:!0},data:function(){return{value:!1,border:!1,selection:!1,widthThArr:[],ishead:!0,checked:!1,indeterminate:!1}},created:function(){var t=this;this.root=this.getTable(),this.head=this.getTable("uniThead"),this.head&&(this.ishead=!1,this.head.init(this)),this.border=this.root.border,this.selection=this.root.type,this.root.trChildren.push(this);var e=this.root.data.find((function(e){return e[t.root.rowKey]===t.keyValue}));e&&(this.rowData=e),this.root.isNodata()},mounted:function(){if(this.widthThArr.length>0){var t="selection"===this.selection?50:0;this.root.minWidth=Number(this.widthThArr.reduce((function(t,e){return Number(t)+Number(e)})))+t}},destroyed:function(){var t=this,e=this.root.trChildren.findIndex((function(e){return e===t}));this.root.trChildren.splice(e,1),this.root.isNodata()},methods:{minWidthUpdate:function(t){if(this.widthThArr.push(t),this.widthThArr.length>0){var e="selection"===this.selection?50:0;this.root.minWidth=Number(this.widthThArr.reduce((function(t,e){return Number(t)+Number(e)})))+e}},checkboxSelected:function(t){var e=this,n=this.root.data.find((function(t){return t[e.root.rowKey]===e.keyValue}));this.checked=t.checked,this.root.check(n||this,t.checked,n?this.keyValue:null)},change:function(t){var e=this;this.root.trChildren.forEach((function(n){n===e&&e.root.check(e,t.detail.value.length>0)}))},getTable:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uniTable",e=this.$parent,n=e.$options.name;while(n!==t){if(e=e.$parent,!e)return!1;n=e.$options.name}return e}}};e.default=i},325:function(t,e,n){"use strict";n.r(e);var r=n(326),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},326:function(t,e,n){}}]);
  2. //# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-table/components/uni-tr/uni-tr.js.map
  3. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  4. 'uni_modules/uni-table/components/uni-tr/uni-tr-create-component',
  5. {
  6. 'uni_modules/uni-table/components/uni-tr/uni-tr-create-component':(function(module, exports, __webpack_require__){
  7. __webpack_require__('2')['createComponent'](__webpack_require__(320))
  8. })
  9. },
  10. [['uni_modules/uni-table/components/uni-tr/uni-tr-create-component']]
  11. ]);