twmodule 0.0.52 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9555,25 +9555,25 @@ twFormItem_src_main.install = function (Vue) {
9555
9555
  };
9556
9556
 
9557
9557
  /* harmony default export */ var twFormItem = (twFormItem_src_main);
9558
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./packages/twTable/src/main.vue?vue&type=template&id=7c2bbe88&
9559
- var mainvue_type_template_id_7c2bbe88_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('TwTable',{attrs:{"tableInit":_vm.tableInit,"tableData":_vm.tableData,"columns":_vm.columns},on:{"cellClick":_vm.cellClick,"cellClickFBC":_vm.cellClickFBC,"changePage":_vm.changePage,"selectRow":_vm.selectRow}})],1)}
9560
- var mainvue_type_template_id_7c2bbe88_staticRenderFns = []
9558
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./packages/twTable/src/main.vue?vue&type=template&id=7a092108&
9559
+ var mainvue_type_template_id_7a092108_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('TwTableModule',{attrs:{"tableInit":_vm.tableInit,"tableData":_vm.tableData,"columns":_vm.columns},on:{"cellClick":_vm.cellClick,"cellClickFBC":_vm.cellClickFBC,"changePage":_vm.changePage,"selectRow":_vm.selectRow}})],1)}
9560
+ var mainvue_type_template_id_7a092108_staticRenderFns = []
9561
9561
 
9562
9562
 
9563
- // CONCATENATED MODULE: ./packages/twTable/src/main.vue?vue&type=template&id=7c2bbe88&
9563
+ // CONCATENATED MODULE: ./packages/twTable/src/main.vue?vue&type=template&id=7a092108&
9564
9564
 
9565
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=5ce39251&scoped=true&
9566
- var twTablevue_type_template_id_5ce39251_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('a-table',{class:_vm.tableInit.tableClassName?_vm.tableInit.tableClassName+' twTableStyle':'twTableStyle',attrs:{"columns":_vm.columns,"data-source":_vm.tableData,"bordered":"","rowKey":function (record, index) { return index },"pagination":false,"size":_vm.tableInit.size?_vm.tableInit.size:'small',"customRow":_vm.customRow,"customHeaderRow":_vm.customHeaderRow,"scroll":{y:_vm.tableInit.height?_vm.tableInit.height:'',x:_vm.tableInit.width?_vm.tableInit.width:''},"row-selection":_vm.tableInit.select?{ selectedRowKeys: _vm.selectedRowKeys, onChange: _vm.onSelectChange }:null,"rowClassName":_vm.rowClassName},scopedSlots:_vm._u([{key:"filterDropdown",fn:function(ref){
9565
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=39f359e6&scoped=true&
9566
+ var twTablevue_type_template_id_39f359e6_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('a-table',{class:_vm.tableInit.tableClassName?_vm.tableInit.tableClassName+' twTableStyle':'twTableStyle',attrs:{"columns":_vm.columns,"data-source":_vm.tableData,"bordered":"","rowKey":function (record, index) { return index },"pagination":false,"size":_vm.tableInit.size?_vm.tableInit.size:'small',"customRow":_vm.customRow,"customHeaderRow":_vm.customHeaderRow,"scroll":{y:_vm.tableInit.height?_vm.tableInit.height:'',x:_vm.tableInit.width?_vm.tableInit.width:''},"row-selection":_vm.tableInit.select?{ selectedRowKeys: _vm.selectedRowKeys, onChange: _vm.onSelectChange }:null,"rowClassName":_vm.rowClassName},scopedSlots:_vm._u([{key:"filterDropdown",fn:function(ref){
9567
9567
  var setSelectedKeys = ref.setSelectedKeys;
9568
9568
  var selectedKeys = ref.selectedKeys;
9569
9569
  var confirm = ref.confirm;
9570
9570
  var clearFilters = ref.clearFilters;
9571
9571
  var column = ref.column;
9572
9572
  return _c('div',{staticStyle:{"padding":"8px"}},[_c('a-input',{directives:[{name:"ant-ref",rawName:"v-ant-ref",value:(function (c) { return (_vm.searchInput = c); }),expression:"c => (searchInput = c)"}],staticStyle:{"width":"188px","margin-bottom":"8px","display":"block"},attrs:{"placeholder":("搜索 " + (column.title)),"value":selectedKeys[0]},on:{"change":function (e) { return setSelectedKeys(e.target.value ? [e.target.value] : []); },"pressEnter":function () { return _vm.handleSearch(selectedKeys, confirm, column.dataIndex); }}}),_c('a-button',{staticStyle:{"width":"80px","margin-right":"8px","padding-top":"1px"},attrs:{"type":"primary","icon":"search","size":"small"},on:{"click":function () { return _vm.handleSearch(selectedKeys, confirm, column.dataIndex); }}},[_vm._v(" 查询 ")]),_c('a-button',{staticStyle:{"width":"80px","padding-top":"1px"},attrs:{"size":"small"},on:{"click":function () { return _vm.handleReset(clearFilters); }}},[_vm._v(" 重置 ")])],1)}},{key:"filterIcon",fn:function(filtered){return _c('a-icon',{style:({ color: filtered ? '#108ee9' : undefined }),attrs:{"type":"search"}})}},{key:"customRender",fn:function(text, record, index, column){return [(_vm.searchText && _vm.searchedColumn === column.dataIndex)?_c('span',[_vm._l((text.toString().split(new RegExp(("(?<=" + _vm.searchText + ")|(?=" + _vm.searchText + ")"), 'i'))),function(fragment,i){return [(fragment.toLowerCase() === _vm.searchText.toLowerCase())?_c('mark',{key:i,staticClass:"highlight"},[_vm._v(_vm._s(fragment))]):[_vm._v(_vm._s(fragment))]]})],2):[_vm._v(" "+_vm._s(text)+" ")]]}},_vm._l((_vm.columns),function(item,index){return {key:item.dataIndex,fn:function(text, record){return _c('div',{},[(item.isEdit)?_c('span',[(item.isEdit.type === 'textBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'numberBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"number"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'textareaBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"textarea"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'text')?_c('el-input',{attrs:{"placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'number')?_c('el-input',{attrs:{"type":"number","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'textarea')?_c('el-input',{attrs:{"type":"textarea","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'select')?_c('el-select',{attrs:{"size":"mini"},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.name,"value":item.value}})}),1):_vm._e(),(item.isEdit.type === 'radio')?_c('el-radio-group',{on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(radioItem){return _c('el-radio',{attrs:{"label":radioItem.value}},[_vm._v(_vm._s(radioItem.name))])}),1):_vm._e(),(item.isEdit.type === 'checkBox')?_c('el-checkbox-group',{on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(checkItem){return _c('el-checkbox',{attrs:{"label":checkItem.value}},[_vm._v(_vm._s(checkItem.name))])}),1):_vm._e(),(item.isEdit.type === 'switch')?_c('el-switch',{attrs:{"active-color":item.isEdit.activeColor?item.isEdit.activeColor:'',"inactive-color":item.isEdit.defaultColor?item.isEdit.defaultColor:''},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'date')?_c('el-date-picker',{attrs:{"size":"mini","type":item.isEdit.dateType?item.isEdit.dateType:'date',"placeholder":"请选择","picker-options":_vm.processDate(item)},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e()],1):_vm._e(),(item.isBtn)?_c('span',_vm._l((item.isBtn.btnList),function(itemBtn){return _c('el-button',{style:({'color':itemBtn.color?itemBtn.color:''}),attrs:{"type":"text","icon":itemBtn.icon},on:{"click":function($event){return _vm.clickBtn(itemBtn,record)}}},[_vm._v(_vm._s(itemBtn.name))])}),1):_vm._e(),(item.isSpecial)?_c('span',[_c('span',{style:(item.isSpecial.textStyle),on:{"click":function($event){item.isSpecial.isClick?_vm.clickBtn(item,record):''}}},[_vm._v(_vm._s(text))])]):_vm._e(),(item.twEllipsis)?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":text,"placement":"top-start"}},[_c('div',{class:item.twEllipsis===1?'twEllipsis':'twEllipsis2'},[_vm._v(_vm._s(text))])])],1):_vm._e(),(item.isState)?_c('span',_vm._l((item.isState.stateList),function(stateItem){return (text === stateItem.value)?_c('span',{class:stateItem.class?stateItem.class+' cellSateStyle':'cellSateStyle',style:(stateItem.styles),on:{"click":function($event){item.isState.isClick?_vm.clickBtn(item,record):''}}},[_c('span',{staticStyle:{"display":"flex","align-items":"center"}},[(stateItem.icon)?_c('i',{class:stateItem.icon}):_vm._e(),(stateItem.img)?_c('img',{attrs:{"src":stateItem.img}}):_vm._e(),_c('span',[_vm._v(_vm._s(stateItem.name || text))])])]):_vm._e()}),0):_vm._e(),(item.isHtml)?_c('div',_vm._l((item.isHtml),function(htmlItem){return (text === htmlItem.value)?_c('div',{domProps:{"innerHTML":_vm._s(htmlItem.html)}}):_vm._e()}),0):_vm._e()])}}}),_vm._l((_vm.columnsChild),function(itemChild,index){return {key:itemChild.dataIndex,fn:function(text, record){return _c('div',{},[(itemChild.isEdit)?_c('span',[(itemChild.isEdit.type === 'textBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'numberBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"number"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'textareaBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"textarea"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'text')?_c('el-input',{attrs:{"placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'number')?_c('el-input',{attrs:{"type":"number","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'textarea')?_c('el-input',{attrs:{"type":"textarea","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'select')?_c('el-select',{attrs:{"size":"mini"},on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.name,"value":item.value}})}),1):_vm._e(),(itemChild.isEdit.type === 'radio')?_c('el-radio-group',{on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(radioItem){return _c('el-radio',{attrs:{"label":radioItem.value}},[_vm._v(_vm._s(radioItem.name))])}),1):_vm._e(),(itemChild.isEdit.type === 'checkBox')?_c('el-checkbox-group',{on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(checkItem){return _c('el-checkbox',{attrs:{"label":checkItem.value}},[_vm._v(_vm._s(checkItem.name))])}),1):_vm._e(),(itemChild.isEdit.type === 'switch')?_c('el-switch',{attrs:{"active-color":itemChild.isEdit.activeColor?itemChild.isEdit.activeColor:'',"inactive-color":itemChild.isEdit.defaultColor?itemChild.isEdit.defaultColor:''},on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e()],1):_vm._e(),(itemChild.isBtn)?_c('span',_vm._l((itemChild.isBtn.btnList),function(itemBtn){return _c('el-button',{style:({'color':itemBtn.color?itemBtn.color:''}),attrs:{"type":"text","icon":itemBtn.icon},on:{"click":function($event){return _vm.clickBtn(itemBtn,record)}}},[_vm._v(_vm._s(itemBtn.name))])}),1):_vm._e(),(itemChild.isSpecial)?_c('span',[_c('span',{style:(itemChild.isSpecial.textStyle),on:{"click":function($event){itemChild.isSpecial.isClick?_vm.clickBtn(itemChild,record):''}}},[_vm._v(_vm._s(text))])]):_vm._e(),(itemChild.twEllipsis)?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":text,"placement":"top-start"}},[_c('div',{class:itemChild.twEllipsis===1?'twEllipsis':'twEllipsis2'},[_vm._v(_vm._s(text))])])],1):_vm._e(),(itemChild.isState)?_c('span',_vm._l((itemChild.isState.stateList),function(stateItem){return (text === stateItem.value)?_c('span',{class:stateItem.class?stateItem.class+' cellSateStyle':'cellSateStyle',style:(stateItem.styles),on:{"click":function($event){itemChild.isState.isClick?_vm.clickBtn(itemChild,record):''}}},[_c('span',{staticStyle:{"display":"flex","align-items":"center"}},[(stateItem.icon)?_c('i',{class:stateItem.icon}):_vm._e(),(stateItem.img)?_c('img',{attrs:{"src":stateItem.img}}):_vm._e(),_c('span',[_vm._v(_vm._s(stateItem.name || text))])])]):_vm._e()}),0):_vm._e(),(itemChild.isHtml)?_c('div',_vm._l((itemChild.isHtml),function(htmlItem){return (text === htmlItem.value)?_c('div',{domProps:{"innerHTML":_vm._s(htmlItem.html)}}):_vm._e()}),0):_vm._e()])}}})],null,true)}),(_vm.tableInit.pagination)?_c('PaginationAnt',{staticStyle:{"float":"right"},attrs:{"total":_vm.tableInit.pagination.total,"currPage":_vm.tableInit.pagination.currPage,"pageSizes":[10,20,30,50,100]},on:{"paginaFunc":_vm.paginaFunc}}):_vm._e()],1)}
9573
- var twTablevue_type_template_id_5ce39251_scoped_true_staticRenderFns = []
9573
+ var twTablevue_type_template_id_39f359e6_scoped_true_staticRenderFns = []
9574
9574
 
9575
9575
 
9576
- // CONCATENATED MODULE: ./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=5ce39251&scoped=true&
9576
+ // CONCATENATED MODULE: ./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=39f359e6&scoped=true&
9577
9577
 
9578
9578
  // EXTERNAL MODULE: ./node_modules/_core-js@3.6.5@core-js/modules/es.array.for-each.js
9579
9579
  var es_array_for_each = __webpack_require__("fe59");
@@ -9828,7 +9828,7 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
9828
9828
  PaginationAnt: pagination
9829
9829
  },
9830
9830
  props: ['tableInit', 'tableData', 'columns'],
9831
- name: "twTable",
9831
+ name: "twTableModule",
9832
9832
  data: function data() {
9833
9833
  return {
9834
9834
  searchText: '',
@@ -9852,9 +9852,11 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
9852
9852
  mounted: function mounted() {
9853
9853
  var _this = this;
9854
9854
 
9855
- setTimeout(function () {
9856
- _this.tableData.splice(0, 1, _this.tableData[0]);
9857
- }, 300);
9855
+ if (this.tableData.length > 1) {
9856
+ setTimeout(function () {
9857
+ _this.tableData.splice(0, 1, _this.tableData[0]);
9858
+ }, 300);
9859
+ }
9858
9860
  },
9859
9861
  methods: {
9860
9862
  processDate: function processDate(item) {
@@ -9995,7 +9997,7 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
9995
9997
  if (i.isEdit && i.isEdit.type === 'checkBox') {
9996
9998
  //列是checkBox的时候,需要预制个空数组
9997
9999
  _this3.tableData.map(function (j) {
9998
- if (Object.prototype.toString.call(j[i.dataIndex]) !== '[object Array]') {
10000
+ if (j[i.dataIndex] && Object.prototype.toString.call(j[i.dataIndex]) !== '[object Array]') {
9999
10001
  j[i.dataIndex] = [];
10000
10002
  }
10001
10003
  });
@@ -10189,11 +10191,11 @@ const tableInit = {
10189
10191
 
10190
10192
  var twTable_component = Object(componentNormalizer["a" /* default */])(
10191
10193
  twTable_twTablevue_type_script_lang_js_,
10192
- twTablevue_type_template_id_5ce39251_scoped_true_render,
10193
- twTablevue_type_template_id_5ce39251_scoped_true_staticRenderFns,
10194
+ twTablevue_type_template_id_39f359e6_scoped_true_render,
10195
+ twTablevue_type_template_id_39f359e6_scoped_true_staticRenderFns,
10194
10196
  false,
10195
10197
  null,
10196
- "5ce39251",
10198
+ "39f359e6",
10197
10199
  null
10198
10200
 
10199
10201
  )
@@ -10213,7 +10215,7 @@ var twTable_component = Object(componentNormalizer["a" /* default */])(
10213
10215
  name: 'TwTable',
10214
10216
  props: ['tableInit', 'tableData', 'columns'],
10215
10217
  components: {
10216
- TwTable: twTable
10218
+ TwTableModule: twTable
10217
10219
  },
10218
10220
  data: function data() {
10219
10221
  return {};
@@ -10255,8 +10257,8 @@ var twTable_component = Object(componentNormalizer["a" /* default */])(
10255
10257
 
10256
10258
  var twTable_src_main_component = Object(componentNormalizer["a" /* default */])(
10257
10259
  packages_twTable_src_mainvue_type_script_lang_js_,
10258
- mainvue_type_template_id_7c2bbe88_render,
10259
- mainvue_type_template_id_7c2bbe88_staticRenderFns,
10260
+ mainvue_type_template_id_7a092108_render,
10261
+ mainvue_type_template_id_7a092108_staticRenderFns,
10260
10262
  false,
10261
10263
  null,
10262
10264
  null,
package/lib/twComp.umd.js CHANGED
@@ -9564,25 +9564,25 @@ twFormItem_src_main.install = function (Vue) {
9564
9564
  };
9565
9565
 
9566
9566
  /* harmony default export */ var twFormItem = (twFormItem_src_main);
9567
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./packages/twTable/src/main.vue?vue&type=template&id=7c2bbe88&
9568
- var mainvue_type_template_id_7c2bbe88_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('TwTable',{attrs:{"tableInit":_vm.tableInit,"tableData":_vm.tableData,"columns":_vm.columns},on:{"cellClick":_vm.cellClick,"cellClickFBC":_vm.cellClickFBC,"changePage":_vm.changePage,"selectRow":_vm.selectRow}})],1)}
9569
- var mainvue_type_template_id_7c2bbe88_staticRenderFns = []
9567
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./packages/twTable/src/main.vue?vue&type=template&id=7a092108&
9568
+ var mainvue_type_template_id_7a092108_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('TwTableModule',{attrs:{"tableInit":_vm.tableInit,"tableData":_vm.tableData,"columns":_vm.columns},on:{"cellClick":_vm.cellClick,"cellClickFBC":_vm.cellClickFBC,"changePage":_vm.changePage,"selectRow":_vm.selectRow}})],1)}
9569
+ var mainvue_type_template_id_7a092108_staticRenderFns = []
9570
9570
 
9571
9571
 
9572
- // CONCATENATED MODULE: ./packages/twTable/src/main.vue?vue&type=template&id=7c2bbe88&
9572
+ // CONCATENATED MODULE: ./packages/twTable/src/main.vue?vue&type=template&id=7a092108&
9573
9573
 
9574
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=5ce39251&scoped=true&
9575
- var twTablevue_type_template_id_5ce39251_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('a-table',{class:_vm.tableInit.tableClassName?_vm.tableInit.tableClassName+' twTableStyle':'twTableStyle',attrs:{"columns":_vm.columns,"data-source":_vm.tableData,"bordered":"","rowKey":function (record, index) { return index },"pagination":false,"size":_vm.tableInit.size?_vm.tableInit.size:'small',"customRow":_vm.customRow,"customHeaderRow":_vm.customHeaderRow,"scroll":{y:_vm.tableInit.height?_vm.tableInit.height:'',x:_vm.tableInit.width?_vm.tableInit.width:''},"row-selection":_vm.tableInit.select?{ selectedRowKeys: _vm.selectedRowKeys, onChange: _vm.onSelectChange }:null,"rowClassName":_vm.rowClassName},scopedSlots:_vm._u([{key:"filterDropdown",fn:function(ref){
9574
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9b9f7194-vue-loader-template"}!./node_modules/_vue-loader@15.9.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.3@vue-loader/lib??vue-loader-options!./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=39f359e6&scoped=true&
9575
+ var twTablevue_type_template_id_39f359e6_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('a-table',{class:_vm.tableInit.tableClassName?_vm.tableInit.tableClassName+' twTableStyle':'twTableStyle',attrs:{"columns":_vm.columns,"data-source":_vm.tableData,"bordered":"","rowKey":function (record, index) { return index },"pagination":false,"size":_vm.tableInit.size?_vm.tableInit.size:'small',"customRow":_vm.customRow,"customHeaderRow":_vm.customHeaderRow,"scroll":{y:_vm.tableInit.height?_vm.tableInit.height:'',x:_vm.tableInit.width?_vm.tableInit.width:''},"row-selection":_vm.tableInit.select?{ selectedRowKeys: _vm.selectedRowKeys, onChange: _vm.onSelectChange }:null,"rowClassName":_vm.rowClassName},scopedSlots:_vm._u([{key:"filterDropdown",fn:function(ref){
9576
9576
  var setSelectedKeys = ref.setSelectedKeys;
9577
9577
  var selectedKeys = ref.selectedKeys;
9578
9578
  var confirm = ref.confirm;
9579
9579
  var clearFilters = ref.clearFilters;
9580
9580
  var column = ref.column;
9581
9581
  return _c('div',{staticStyle:{"padding":"8px"}},[_c('a-input',{directives:[{name:"ant-ref",rawName:"v-ant-ref",value:(function (c) { return (_vm.searchInput = c); }),expression:"c => (searchInput = c)"}],staticStyle:{"width":"188px","margin-bottom":"8px","display":"block"},attrs:{"placeholder":("搜索 " + (column.title)),"value":selectedKeys[0]},on:{"change":function (e) { return setSelectedKeys(e.target.value ? [e.target.value] : []); },"pressEnter":function () { return _vm.handleSearch(selectedKeys, confirm, column.dataIndex); }}}),_c('a-button',{staticStyle:{"width":"80px","margin-right":"8px","padding-top":"1px"},attrs:{"type":"primary","icon":"search","size":"small"},on:{"click":function () { return _vm.handleSearch(selectedKeys, confirm, column.dataIndex); }}},[_vm._v(" 查询 ")]),_c('a-button',{staticStyle:{"width":"80px","padding-top":"1px"},attrs:{"size":"small"},on:{"click":function () { return _vm.handleReset(clearFilters); }}},[_vm._v(" 重置 ")])],1)}},{key:"filterIcon",fn:function(filtered){return _c('a-icon',{style:({ color: filtered ? '#108ee9' : undefined }),attrs:{"type":"search"}})}},{key:"customRender",fn:function(text, record, index, column){return [(_vm.searchText && _vm.searchedColumn === column.dataIndex)?_c('span',[_vm._l((text.toString().split(new RegExp(("(?<=" + _vm.searchText + ")|(?=" + _vm.searchText + ")"), 'i'))),function(fragment,i){return [(fragment.toLowerCase() === _vm.searchText.toLowerCase())?_c('mark',{key:i,staticClass:"highlight"},[_vm._v(_vm._s(fragment))]):[_vm._v(_vm._s(fragment))]]})],2):[_vm._v(" "+_vm._s(text)+" ")]]}},_vm._l((_vm.columns),function(item,index){return {key:item.dataIndex,fn:function(text, record){return _c('div',{},[(item.isEdit)?_c('span',[(item.isEdit.type === 'textBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'numberBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"number"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'textareaBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[item.dataIndex]?record[item.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"textarea"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},slot:"reference",model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}})],1)],1)],1):_vm._e(),(item.isEdit.type === 'text')?_c('el-input',{attrs:{"placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'number')?_c('el-input',{attrs:{"type":"number","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'textarea')?_c('el-input',{attrs:{"type":"textarea","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,item)},"input":function($event){return _vm.onCellFBC('change',record,item,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'select')?_c('el-select',{attrs:{"size":"mini"},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.name,"value":item.value}})}),1):_vm._e(),(item.isEdit.type === 'radio')?_c('el-radio-group',{on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(radioItem){return _c('el-radio',{attrs:{"label":radioItem.value}},[_vm._v(_vm._s(radioItem.name))])}),1):_vm._e(),(item.isEdit.type === 'checkBox')?_c('el-checkbox-group',{on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}},_vm._l((item.isEdit.dataList),function(checkItem){return _c('el-checkbox',{attrs:{"label":checkItem.value}},[_vm._v(_vm._s(checkItem.name))])}),1):_vm._e(),(item.isEdit.type === 'switch')?_c('el-switch',{attrs:{"active-color":item.isEdit.activeColor?item.isEdit.activeColor:'',"inactive-color":item.isEdit.defaultColor?item.isEdit.defaultColor:''},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e(),(item.isEdit.type === 'date')?_c('el-date-picker',{attrs:{"size":"mini","type":item.isEdit.dateType?item.isEdit.dateType:'date',"placeholder":"请选择","picker-options":_vm.processDate(item)},on:{"change":function($event){return _vm.clickBtn(record,item)}},model:{value:(record[item.dataIndex]),callback:function ($$v) {_vm.$set(record, item.dataIndex, $$v)},expression:"record[item.dataIndex]"}}):_vm._e()],1):_vm._e(),(item.isBtn)?_c('span',_vm._l((item.isBtn.btnList),function(itemBtn){return _c('el-button',{style:({'color':itemBtn.color?itemBtn.color:''}),attrs:{"type":"text","icon":itemBtn.icon},on:{"click":function($event){return _vm.clickBtn(itemBtn,record)}}},[_vm._v(_vm._s(itemBtn.name))])}),1):_vm._e(),(item.isSpecial)?_c('span',[_c('span',{style:(item.isSpecial.textStyle),on:{"click":function($event){item.isSpecial.isClick?_vm.clickBtn(item,record):''}}},[_vm._v(_vm._s(text))])]):_vm._e(),(item.twEllipsis)?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":text,"placement":"top-start"}},[_c('div',{class:item.twEllipsis===1?'twEllipsis':'twEllipsis2'},[_vm._v(_vm._s(text))])])],1):_vm._e(),(item.isState)?_c('span',_vm._l((item.isState.stateList),function(stateItem){return (text === stateItem.value)?_c('span',{class:stateItem.class?stateItem.class+' cellSateStyle':'cellSateStyle',style:(stateItem.styles),on:{"click":function($event){item.isState.isClick?_vm.clickBtn(item,record):''}}},[_c('span',{staticStyle:{"display":"flex","align-items":"center"}},[(stateItem.icon)?_c('i',{class:stateItem.icon}):_vm._e(),(stateItem.img)?_c('img',{attrs:{"src":stateItem.img}}):_vm._e(),_c('span',[_vm._v(_vm._s(stateItem.name || text))])])]):_vm._e()}),0):_vm._e(),(item.isHtml)?_c('div',_vm._l((item.isHtml),function(htmlItem){return (text === htmlItem.value)?_c('div',{domProps:{"innerHTML":_vm._s(htmlItem.html)}}):_vm._e()}),0):_vm._e()])}}}),_vm._l((_vm.columnsChild),function(itemChild,index){return {key:itemChild.dataIndex,fn:function(text, record){return _c('div',{},[(itemChild.isEdit)?_c('span',[(itemChild.isEdit.type === 'textBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'numberBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"number"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'textareaBox')?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":record[itemChild.dataIndex]?record[itemChild.dataIndex]+'':'',"placement":"top-start"}},[_c('el-popover',{attrs:{"placement":"bottom","width":"300","trigger":"click"}},[_c('el-input',{staticClass:"cellTextarea",attrs:{"type":"textarea","size":"mini","rows":3},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}),_c('el-input',{attrs:{"slot":"reference","placeholder":"请输入内容","size":"mini","type":"textarea"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},slot:"reference",model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}})],1)],1)],1):_vm._e(),(itemChild.isEdit.type === 'text')?_c('el-input',{attrs:{"placeholder":"请输入内容","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'number')?_c('el-input',{attrs:{"type":"number","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'textarea')?_c('el-input',{attrs:{"type":"textarea","size":"mini"},on:{"focus":function($event){return _vm.onCellFBC('focus',record,itemChild)},"input":function($event){return _vm.onCellFBC('change',record,itemChild,$event)},"blur":function($event){return _vm.onCellFBC('blur',record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e(),(itemChild.isEdit.type === 'select')?_c('el-select',{attrs:{"size":"mini"},on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.name,"value":item.value}})}),1):_vm._e(),(itemChild.isEdit.type === 'radio')?_c('el-radio-group',{on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(radioItem){return _c('el-radio',{attrs:{"label":radioItem.value}},[_vm._v(_vm._s(radioItem.name))])}),1):_vm._e(),(itemChild.isEdit.type === 'checkBox')?_c('el-checkbox-group',{on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}},_vm._l((itemChild.isEdit.dataList),function(checkItem){return _c('el-checkbox',{attrs:{"label":checkItem.value}},[_vm._v(_vm._s(checkItem.name))])}),1):_vm._e(),(itemChild.isEdit.type === 'switch')?_c('el-switch',{attrs:{"active-color":itemChild.isEdit.activeColor?itemChild.isEdit.activeColor:'',"inactive-color":itemChild.isEdit.defaultColor?itemChild.isEdit.defaultColor:''},on:{"change":function($event){return _vm.clickBtn(record,itemChild)}},model:{value:(record[itemChild.dataIndex]),callback:function ($$v) {_vm.$set(record, itemChild.dataIndex, $$v)},expression:"record[itemChild.dataIndex]"}}):_vm._e()],1):_vm._e(),(itemChild.isBtn)?_c('span',_vm._l((itemChild.isBtn.btnList),function(itemBtn){return _c('el-button',{style:({'color':itemBtn.color?itemBtn.color:''}),attrs:{"type":"text","icon":itemBtn.icon},on:{"click":function($event){return _vm.clickBtn(itemBtn,record)}}},[_vm._v(_vm._s(itemBtn.name))])}),1):_vm._e(),(itemChild.isSpecial)?_c('span',[_c('span',{style:(itemChild.isSpecial.textStyle),on:{"click":function($event){itemChild.isSpecial.isClick?_vm.clickBtn(itemChild,record):''}}},[_vm._v(_vm._s(text))])]):_vm._e(),(itemChild.twEllipsis)?_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":text,"placement":"top-start"}},[_c('div',{class:itemChild.twEllipsis===1?'twEllipsis':'twEllipsis2'},[_vm._v(_vm._s(text))])])],1):_vm._e(),(itemChild.isState)?_c('span',_vm._l((itemChild.isState.stateList),function(stateItem){return (text === stateItem.value)?_c('span',{class:stateItem.class?stateItem.class+' cellSateStyle':'cellSateStyle',style:(stateItem.styles),on:{"click":function($event){itemChild.isState.isClick?_vm.clickBtn(itemChild,record):''}}},[_c('span',{staticStyle:{"display":"flex","align-items":"center"}},[(stateItem.icon)?_c('i',{class:stateItem.icon}):_vm._e(),(stateItem.img)?_c('img',{attrs:{"src":stateItem.img}}):_vm._e(),_c('span',[_vm._v(_vm._s(stateItem.name || text))])])]):_vm._e()}),0):_vm._e(),(itemChild.isHtml)?_c('div',_vm._l((itemChild.isHtml),function(htmlItem){return (text === htmlItem.value)?_c('div',{domProps:{"innerHTML":_vm._s(htmlItem.html)}}):_vm._e()}),0):_vm._e()])}}})],null,true)}),(_vm.tableInit.pagination)?_c('PaginationAnt',{staticStyle:{"float":"right"},attrs:{"total":_vm.tableInit.pagination.total,"currPage":_vm.tableInit.pagination.currPage,"pageSizes":[10,20,30,50,100]},on:{"paginaFunc":_vm.paginaFunc}}):_vm._e()],1)}
9582
- var twTablevue_type_template_id_5ce39251_scoped_true_staticRenderFns = []
9582
+ var twTablevue_type_template_id_39f359e6_scoped_true_staticRenderFns = []
9583
9583
 
9584
9584
 
9585
- // CONCATENATED MODULE: ./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=5ce39251&scoped=true&
9585
+ // CONCATENATED MODULE: ./examples/components/comPage/twTable/twTable.vue?vue&type=template&id=39f359e6&scoped=true&
9586
9586
 
9587
9587
  // EXTERNAL MODULE: ./node_modules/_core-js@3.6.5@core-js/modules/es.array.for-each.js
9588
9588
  var es_array_for_each = __webpack_require__("fe59");
@@ -9837,7 +9837,7 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
9837
9837
  PaginationAnt: pagination
9838
9838
  },
9839
9839
  props: ['tableInit', 'tableData', 'columns'],
9840
- name: "twTable",
9840
+ name: "twTableModule",
9841
9841
  data: function data() {
9842
9842
  return {
9843
9843
  searchText: '',
@@ -9861,9 +9861,11 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
9861
9861
  mounted: function mounted() {
9862
9862
  var _this = this;
9863
9863
 
9864
- setTimeout(function () {
9865
- _this.tableData.splice(0, 1, _this.tableData[0]);
9866
- }, 300);
9864
+ if (this.tableData.length > 1) {
9865
+ setTimeout(function () {
9866
+ _this.tableData.splice(0, 1, _this.tableData[0]);
9867
+ }, 300);
9868
+ }
9867
9869
  },
9868
9870
  methods: {
9869
9871
  processDate: function processDate(item) {
@@ -10004,7 +10006,7 @@ var web_dom_collections_for_each = __webpack_require__("08ba");
10004
10006
  if (i.isEdit && i.isEdit.type === 'checkBox') {
10005
10007
  //列是checkBox的时候,需要预制个空数组
10006
10008
  _this3.tableData.map(function (j) {
10007
- if (Object.prototype.toString.call(j[i.dataIndex]) !== '[object Array]') {
10009
+ if (j[i.dataIndex] && Object.prototype.toString.call(j[i.dataIndex]) !== '[object Array]') {
10008
10010
  j[i.dataIndex] = [];
10009
10011
  }
10010
10012
  });
@@ -10198,11 +10200,11 @@ const tableInit = {
10198
10200
 
10199
10201
  var twTable_component = Object(componentNormalizer["a" /* default */])(
10200
10202
  twTable_twTablevue_type_script_lang_js_,
10201
- twTablevue_type_template_id_5ce39251_scoped_true_render,
10202
- twTablevue_type_template_id_5ce39251_scoped_true_staticRenderFns,
10203
+ twTablevue_type_template_id_39f359e6_scoped_true_render,
10204
+ twTablevue_type_template_id_39f359e6_scoped_true_staticRenderFns,
10203
10205
  false,
10204
10206
  null,
10205
- "5ce39251",
10207
+ "39f359e6",
10206
10208
  null
10207
10209
 
10208
10210
  )
@@ -10222,7 +10224,7 @@ var twTable_component = Object(componentNormalizer["a" /* default */])(
10222
10224
  name: 'TwTable',
10223
10225
  props: ['tableInit', 'tableData', 'columns'],
10224
10226
  components: {
10225
- TwTable: twTable
10227
+ TwTableModule: twTable
10226
10228
  },
10227
10229
  data: function data() {
10228
10230
  return {};
@@ -10264,8 +10266,8 @@ var twTable_component = Object(componentNormalizer["a" /* default */])(
10264
10266
 
10265
10267
  var twTable_src_main_component = Object(componentNormalizer["a" /* default */])(
10266
10268
  packages_twTable_src_mainvue_type_script_lang_js_,
10267
- mainvue_type_template_id_7c2bbe88_render,
10268
- mainvue_type_template_id_7c2bbe88_staticRenderFns,
10269
+ mainvue_type_template_id_7a092108_render,
10270
+ mainvue_type_template_id_7a092108_staticRenderFns,
10269
10271
  false,
10270
10272
  null,
10271
10273
  null,