fix table page
This commit is contained in:
		
							parent
							
								
									13f45bcfef
								
							
						
					
					
						commit
						a6d8dfea39
					
				@ -951,7 +951,8 @@ const _sfc_main = defineComponent({
 | 
				
			|||||||
    } },
 | 
					    } },
 | 
				
			||||||
    getRadioProps: { type: Function, default: () => {
 | 
					    getRadioProps: { type: Function, default: () => {
 | 
				
			||||||
    } },
 | 
					    } },
 | 
				
			||||||
    download: { default: "" }
 | 
					    download: { default: "" },
 | 
				
			||||||
 | 
					    serverpage: { type: Boolean, default: false }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  emits: [
 | 
					  emits: [
 | 
				
			||||||
    "change",
 | 
					    "change",
 | 
				
			||||||
@ -1128,8 +1129,12 @@ const _sfc_main = defineComponent({
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
    let pagecurrent;
 | 
					    let pagecurrent;
 | 
				
			||||||
    const change = function(page) {
 | 
					    const change = function(page) {
 | 
				
			||||||
      pagecurrent = page.current;
 | 
					      if (props.serverpage) {
 | 
				
			||||||
      datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
 | 
					        emit("change", page);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        pagecurrent = page.current;
 | 
				
			||||||
 | 
					        datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    const rowClick = function(data, evt) {
 | 
					    const rowClick = function(data, evt) {
 | 
				
			||||||
      emit("row", data, evt);
 | 
					      emit("row", data, evt);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										11
									
								
								lib/index.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								lib/index.js
									
									
									
									
									
								
							@ -19398,7 +19398,8 @@ const _sfc_main$D = defineComponent({
 | 
				
			|||||||
    } },
 | 
					    } },
 | 
				
			||||||
    getRadioProps: { type: Function, default: () => {
 | 
					    getRadioProps: { type: Function, default: () => {
 | 
				
			||||||
    } },
 | 
					    } },
 | 
				
			||||||
    download: { default: "" }
 | 
					    download: { default: "" },
 | 
				
			||||||
 | 
					    serverpage: { type: Boolean, default: false }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  emits: [
 | 
					  emits: [
 | 
				
			||||||
    "change",
 | 
					    "change",
 | 
				
			||||||
@ -19575,8 +19576,12 @@ const _sfc_main$D = defineComponent({
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
    let pagecurrent;
 | 
					    let pagecurrent;
 | 
				
			||||||
    const change3 = function(page) {
 | 
					    const change3 = function(page) {
 | 
				
			||||||
      pagecurrent = page.current;
 | 
					      if (props.serverpage) {
 | 
				
			||||||
      datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
 | 
					        emit("change", page);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        pagecurrent = page.current;
 | 
				
			||||||
 | 
					        datalist.value = tableDataSource.value.slice(page.limit * (page.current - 1), page.limit * page.current);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    const rowClick = function(data, evt) {
 | 
					    const rowClick = function(data, evt) {
 | 
				
			||||||
      emit("row", data, evt);
 | 
					      emit("row", data, evt);
 | 
				
			||||||
 | 
				
			|||||||
@ -53,6 +53,7 @@ export interface TableProps {
 | 
				
			|||||||
  getCheckboxProps?: Function;
 | 
					  getCheckboxProps?: Function;
 | 
				
			||||||
  getRadioProps?: Function;
 | 
					  getRadioProps?: Function;
 | 
				
			||||||
  download?: string;
 | 
					  download?: string;
 | 
				
			||||||
 | 
					  serverpage?: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const props = withDefaults(defineProps<TableProps>(), {
 | 
					const props = withDefaults(defineProps<TableProps>(), {
 | 
				
			||||||
@ -72,12 +73,13 @@ const props = withDefaults(defineProps<TableProps>(), {
 | 
				
			|||||||
  rowStyle: "",
 | 
					  rowStyle: "",
 | 
				
			||||||
  cellStyle: "",
 | 
					  cellStyle: "",
 | 
				
			||||||
  defaultExpandAll: false,
 | 
					  defaultExpandAll: false,
 | 
				
			||||||
  spanMethod: () => {},
 | 
					  spanMethod: () => { },
 | 
				
			||||||
  expandKeys: () => [],
 | 
					  expandKeys: () => [],
 | 
				
			||||||
  loading: false,
 | 
					  loading: false,
 | 
				
			||||||
  getCheckboxProps: () => {},
 | 
					  getCheckboxProps: () => { },
 | 
				
			||||||
  getRadioProps: () => {},
 | 
					  getRadioProps: () => { },
 | 
				
			||||||
  download: "",
 | 
					  download: "",
 | 
				
			||||||
 | 
					  serverpage: false
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const emit = defineEmits([
 | 
					const emit = defineEmits([
 | 
				
			||||||
@ -356,12 +358,16 @@ watch(
 | 
				
			|||||||
);
 | 
					);
 | 
				
			||||||
let pagecurrent: number;
 | 
					let pagecurrent: number;
 | 
				
			||||||
const change = function (page: any) {
 | 
					const change = function (page: any) {
 | 
				
			||||||
  // emit("change", page);
 | 
					  if (props.serverpage) {
 | 
				
			||||||
  pagecurrent = page.current;
 | 
					    emit("change", page);
 | 
				
			||||||
  datalist.value = tableDataSource.value.slice(
 | 
					  } else {
 | 
				
			||||||
    page.limit * (page.current - 1),
 | 
					    pagecurrent = page.current;
 | 
				
			||||||
    page.limit * page.current
 | 
					    datalist.value = tableDataSource.value.slice(
 | 
				
			||||||
  );
 | 
					      page.limit * (page.current - 1),
 | 
				
			||||||
 | 
					      page.limit * page.current
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const rowClick = function (data: any, evt: MouseEvent) {
 | 
					const rowClick = function (data: any, evt: MouseEvent) {
 | 
				
			||||||
@ -830,50 +836,27 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div v-if="defaultToolbar" class="layui-table-tool-self">
 | 
					        <div v-if="defaultToolbar" class="layui-table-tool-self">
 | 
				
			||||||
          <!-- 筛选 -->
 | 
					          <!-- 筛选 -->
 | 
				
			||||||
          <lay-dropdown
 | 
					          <lay-dropdown v-if="showToolbar('filter')" updateAtScroll :style="toolbarStyle('filter')">
 | 
				
			||||||
            v-if="showToolbar('filter')"
 | 
					 | 
				
			||||||
            updateAtScroll
 | 
					 | 
				
			||||||
            :style="toolbarStyle('filter')"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <div class="layui-inline" title="筛选" lay-event>
 | 
					            <div class="layui-inline" title="筛选" lay-event>
 | 
				
			||||||
              <i class="layui-icon layui-icon-slider"></i>
 | 
					              <i class="layui-icon layui-icon-slider"></i>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <template #content>
 | 
					            <template #content>
 | 
				
			||||||
              <div class="layui-table-tool-checkbox">
 | 
					              <div class="layui-table-tool-checkbox">
 | 
				
			||||||
                <lay-checkbox
 | 
					                <lay-checkbox v-for="column in tableHeadColumns[0]" v-model="tableColumnKeys" skin="primary"
 | 
				
			||||||
                  v-for="column in tableHeadColumns[0]"
 | 
					                  :disabled="column.children" :key="column.key" :value="column.key">{{ column.title }}</lay-checkbox>
 | 
				
			||||||
                  v-model="tableColumnKeys"
 | 
					 | 
				
			||||||
                  skin="primary"
 | 
					 | 
				
			||||||
                  :disabled="column.children"
 | 
					 | 
				
			||||||
                  :key="column.key"
 | 
					 | 
				
			||||||
                  :value="column.key"
 | 
					 | 
				
			||||||
                  >{{ column.title }}</lay-checkbox
 | 
					 | 
				
			||||||
                >
 | 
					 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
          </lay-dropdown>
 | 
					          </lay-dropdown>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <!-- 导出 -->
 | 
					          <!-- 导出 -->
 | 
				
			||||||
          <div
 | 
					          <div v-if="showToolbar('export')" class="layui-inline" title="导出" lay-event :style="toolbarStyle('export')"
 | 
				
			||||||
            v-if="showToolbar('export')"
 | 
					            @click="exportData()">
 | 
				
			||||||
            class="layui-inline"
 | 
					 | 
				
			||||||
            title="导出"
 | 
					 | 
				
			||||||
            lay-event
 | 
					 | 
				
			||||||
            :style="toolbarStyle('export')"
 | 
					 | 
				
			||||||
            @click="exportData()"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <i class="layui-icon layui-icon-export"></i>
 | 
					            <i class="layui-icon layui-icon-export"></i>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <!-- 打印 -->
 | 
					          <!-- 打印 -->
 | 
				
			||||||
          <div
 | 
					          <div v-if="showToolbar('print')" :style="toolbarStyle('print')" class="layui-inline" title="打印" lay-event
 | 
				
			||||||
            v-if="showToolbar('print')"
 | 
					            @click="print()">
 | 
				
			||||||
            :style="toolbarStyle('print')"
 | 
					 | 
				
			||||||
            class="layui-inline"
 | 
					 | 
				
			||||||
            title="打印"
 | 
					 | 
				
			||||||
            lay-event
 | 
					 | 
				
			||||||
            @click="print()"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <i class="layui-icon layui-icon-print"></i>
 | 
					            <i class="layui-icon layui-icon-print"></i>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -885,47 +868,26 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      <div class="layui-table-box">
 | 
					      <div class="layui-table-box">
 | 
				
			||||||
        <!-- 表头 -->
 | 
					        <!-- 表头 -->
 | 
				
			||||||
        <div
 | 
					        <div class="layui-table-header" :style="[{ 'padding-right': `${scrollWidthCell}px` }]">
 | 
				
			||||||
          class="layui-table-header"
 | 
					 | 
				
			||||||
          :style="[{ 'padding-right': `${scrollWidthCell}px` }]"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
          <div class="layui-table-header-wrapper" ref="tableHeader">
 | 
					          <div class="layui-table-header-wrapper" ref="tableHeader">
 | 
				
			||||||
            <table
 | 
					            <table class="layui-table" :lay-size="size" :lay-skin="skin" ref="tableHeaderTable">
 | 
				
			||||||
              class="layui-table"
 | 
					 | 
				
			||||||
              :lay-size="size"
 | 
					 | 
				
			||||||
              :lay-skin="skin"
 | 
					 | 
				
			||||||
              ref="tableHeaderTable"
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
              <colgroup>
 | 
					              <colgroup>
 | 
				
			||||||
                <template v-for="column in tableBodyColumns" :key="column">
 | 
					                <template v-for="column in tableBodyColumns" :key="column">
 | 
				
			||||||
                  <template v-if="tableColumnKeys.includes(column.key)">
 | 
					                  <template v-if="tableColumnKeys.includes(column.key)">
 | 
				
			||||||
                    <col
 | 
					                    <col :width="column.width" :style="{
 | 
				
			||||||
                      :width="column.width"
 | 
					                      minWidth: column.minWidth ? column.minWidth : '50px',
 | 
				
			||||||
                      :style="{
 | 
					                    }" />
 | 
				
			||||||
                        minWidth: column.minWidth ? column.minWidth : '50px',
 | 
					 | 
				
			||||||
                      }"
 | 
					 | 
				
			||||||
                    />
 | 
					 | 
				
			||||||
                  </template>
 | 
					                  </template>
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </colgroup>
 | 
					              </colgroup>
 | 
				
			||||||
              <thead>
 | 
					              <thead>
 | 
				
			||||||
                <template
 | 
					                <template v-for="(
 | 
				
			||||||
                  v-for="(
 | 
					 | 
				
			||||||
                    tableHeadColumn, tableHeadColumnIndex
 | 
					                    tableHeadColumn, tableHeadColumnIndex
 | 
				
			||||||
                  ) in tableHeadColumns"
 | 
					                  ) in tableHeadColumns" :key="tableHeadColumnIndex">
 | 
				
			||||||
                  :key="tableHeadColumnIndex"
 | 
					 | 
				
			||||||
                >
 | 
					 | 
				
			||||||
                  <tr>
 | 
					                  <tr>
 | 
				
			||||||
                    <template
 | 
					                    <template v-for="(column, columnIndex) in tableHeadColumn" :key="column">
 | 
				
			||||||
                      v-for="(column, columnIndex) in tableHeadColumn"
 | 
					                      <th v-if="tableColumnKeys.includes(column.key)" :colspan="column.colspan" :rowspan="column.rowspan"
 | 
				
			||||||
                      :key="column"
 | 
					                        class="layui-table-cell" :class="[
 | 
				
			||||||
                    >
 | 
					 | 
				
			||||||
                      <th
 | 
					 | 
				
			||||||
                        v-if="tableColumnKeys.includes(column.key)"
 | 
					 | 
				
			||||||
                        :colspan="column.colspan"
 | 
					 | 
				
			||||||
                        :rowspan="column.rowspan"
 | 
					 | 
				
			||||||
                        class="layui-table-cell"
 | 
					 | 
				
			||||||
                        :class="[
 | 
					 | 
				
			||||||
                          renderFixedClassName(column, columnIndex),
 | 
					                          renderFixedClassName(column, columnIndex),
 | 
				
			||||||
                          column.fixed
 | 
					                          column.fixed
 | 
				
			||||||
                            ? `layui-table-fixed-${column.fixed}`
 | 
					                            ? `layui-table-fixed-${column.fixed}`
 | 
				
			||||||
@ -939,26 +901,19 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
                          column.type == 'number'
 | 
					                          column.type == 'number'
 | 
				
			||||||
                            ? 'layui-table-cell-number'
 | 
					                            ? 'layui-table-cell-number'
 | 
				
			||||||
                            : '',
 | 
					                            : '',
 | 
				
			||||||
                        ]"
 | 
					                        ]" :style="[
 | 
				
			||||||
                        :style="[
 | 
					  {
 | 
				
			||||||
                          {
 | 
					    textAlign: column.align,
 | 
				
			||||||
                            textAlign: column.align,
 | 
					  },
 | 
				
			||||||
                          },
 | 
					  renderHeadFixedStyle(
 | 
				
			||||||
                          renderHeadFixedStyle(
 | 
					    column,
 | 
				
			||||||
                            column,
 | 
					    columnIndex,
 | 
				
			||||||
                            columnIndex,
 | 
					    tableHeadColumn
 | 
				
			||||||
                            tableHeadColumn
 | 
					  ),
 | 
				
			||||||
                          ),
 | 
					]">
 | 
				
			||||||
                        ]"
 | 
					 | 
				
			||||||
                      >
 | 
					 | 
				
			||||||
                        <template v-if="column.type == 'checkbox'">
 | 
					                        <template v-if="column.type == 'checkbox'">
 | 
				
			||||||
                          <lay-checkbox
 | 
					                          <lay-checkbox v-model="hasChecked" :is-indeterminate="!allChecked" skin="primary" value="all"
 | 
				
			||||||
                            v-model="hasChecked"
 | 
					                            @change="changeAll" />
 | 
				
			||||||
                            :is-indeterminate="!allChecked"
 | 
					 | 
				
			||||||
                            skin="primary"
 | 
					 | 
				
			||||||
                            value="all"
 | 
					 | 
				
			||||||
                            @change="changeAll"
 | 
					 | 
				
			||||||
                          />
 | 
					 | 
				
			||||||
                        </template>
 | 
					                        </template>
 | 
				
			||||||
                        <template v-else>
 | 
					                        <template v-else>
 | 
				
			||||||
                          <span>
 | 
					                          <span>
 | 
				
			||||||
@ -970,33 +925,16 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
                            </template>
 | 
					                            </template>
 | 
				
			||||||
                          </span>
 | 
					                          </span>
 | 
				
			||||||
                          <!-- 插槽 -->
 | 
					                          <!-- 插槽 -->
 | 
				
			||||||
                          <span
 | 
					                          <span v-if="column.sort" class="layui-table-sort layui-inline" lay-sort>
 | 
				
			||||||
                            v-if="column.sort"
 | 
					                            <i @click.stop="sortTable($event, column.key, 'asc')" class="layui-edge layui-table-sort-asc"
 | 
				
			||||||
                            class="layui-table-sort layui-inline"
 | 
					                              title="升序"></i>
 | 
				
			||||||
                            lay-sort
 | 
					                            <i @click.stop="
 | 
				
			||||||
                          >
 | 
					                              sortTable($event, column.key, 'desc')
 | 
				
			||||||
                            <i
 | 
					                              " class="layui-edge layui-table-sort-desc" title="降序"></i>
 | 
				
			||||||
                              @click.stop="sortTable($event, column.key, 'asc')"
 | 
					 | 
				
			||||||
                              class="layui-edge layui-table-sort-asc"
 | 
					 | 
				
			||||||
                              title="升序"
 | 
					 | 
				
			||||||
                            ></i>
 | 
					 | 
				
			||||||
                            <i
 | 
					 | 
				
			||||||
                              @click.stop="
 | 
					 | 
				
			||||||
                                sortTable($event, column.key, 'desc')
 | 
					 | 
				
			||||||
                              "
 | 
					 | 
				
			||||||
                              class="layui-edge layui-table-sort-desc"
 | 
					 | 
				
			||||||
                              title="降序"
 | 
					 | 
				
			||||||
                            ></i>
 | 
					 | 
				
			||||||
                          </span>
 | 
					                          </span>
 | 
				
			||||||
                          <span
 | 
					                          <span v-if="column.soul" class="layui-table-sort layui-inline soul-icon">
 | 
				
			||||||
                            v-if="column.soul"
 | 
					                            <i class="soul-icon soul-box" :class="column.soulclass || 'soul-icon-filter'"
 | 
				
			||||||
                            class="layui-table-sort layui-inline soul-icon"
 | 
					                              @click.stop="showsoul($event, column, column.key)">
 | 
				
			||||||
                          >
 | 
					 | 
				
			||||||
                            <i
 | 
					 | 
				
			||||||
                              class="soul-icon soul-box"
 | 
					 | 
				
			||||||
                              :class="column.soulclass || 'soul-icon-filter'"
 | 
					 | 
				
			||||||
                              @click.stop="showsoul($event, column, column.key)"
 | 
					 | 
				
			||||||
                            >
 | 
					 | 
				
			||||||
                              <!-- <div v-show="column.soulshow" @click.stop="" class="soulbox">
 | 
					                              <!-- <div v-show="column.soulshow" @click.stop="" class="soulbox">
 | 
				
			||||||
                                    11111
 | 
					                                    11111
 | 
				
			||||||
                                  </div> -->
 | 
					                                  </div> -->
 | 
				
			||||||
@ -1012,61 +950,29 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <!-- 表身 -->
 | 
					        <!-- 表身 -->
 | 
				
			||||||
        <div
 | 
					        <div class="layui-table-body layui-table-main" :style="{ height: height, maxHeight: maxHeight }" ref="tableBody">
 | 
				
			||||||
          class="layui-table-body layui-table-main"
 | 
					          <table class="layui-table" v-if="datalist.length > 0 && loading == false"
 | 
				
			||||||
          :style="{ height: height, maxHeight: maxHeight }"
 | 
					            :class="{ 'layui-table-even': props.even }" :lay-size="size" :lay-skin="skin">
 | 
				
			||||||
          ref="tableBody"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
          <table
 | 
					 | 
				
			||||||
            class="layui-table"
 | 
					 | 
				
			||||||
            v-if="datalist.length > 0 && loading == false"
 | 
					 | 
				
			||||||
            :class="{ 'layui-table-even': props.even }"
 | 
					 | 
				
			||||||
            :lay-size="size"
 | 
					 | 
				
			||||||
            :lay-skin="skin"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <colgroup>
 | 
					            <colgroup>
 | 
				
			||||||
              <template
 | 
					              <template v-for="(column, columnIndex) in tableBodyColumns" :key="columnIndex">
 | 
				
			||||||
                v-for="(column, columnIndex) in tableBodyColumns"
 | 
					 | 
				
			||||||
                :key="columnIndex"
 | 
					 | 
				
			||||||
              >
 | 
					 | 
				
			||||||
                <template v-if="tableColumnKeys.includes(column.key)">
 | 
					                <template v-if="tableColumnKeys.includes(column.key)">
 | 
				
			||||||
                  <col
 | 
					                  <col :width="column.width" :style="{
 | 
				
			||||||
                    :width="column.width"
 | 
					                    minWidth: column.minWidth ? column.minWidth : '50px',
 | 
				
			||||||
                    :style="{
 | 
					                  }" />
 | 
				
			||||||
                      minWidth: column.minWidth ? column.minWidth : '50px',
 | 
					 | 
				
			||||||
                    }"
 | 
					 | 
				
			||||||
                  />
 | 
					 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </template>
 | 
					              </template>
 | 
				
			||||||
            </colgroup>
 | 
					            </colgroup>
 | 
				
			||||||
            <tbody>
 | 
					            <tbody>
 | 
				
			||||||
              <!-- 渲染 -->
 | 
					              <!-- 渲染 -->
 | 
				
			||||||
              <template v-for="(children, index) in datalist" :key="index">
 | 
					              <template v-for="(children, index) in datalist" :key="index">
 | 
				
			||||||
                <table-row
 | 
					                <table-row :id="id" :index="index" :data="children" :columns="tableBodyColumns" :indent-size="indentSize"
 | 
				
			||||||
                  :id="id"
 | 
					                  :currentIndentSize="currentIndentSize" :tableColumnKeys="tableColumnKeys"
 | 
				
			||||||
                  :index="index"
 | 
					                  :expandSpace="childrenExpandSpace" :expandIndex="expandIndex" :cellStyle="cellStyle"
 | 
				
			||||||
                  :data="children"
 | 
					                  :cellClassName="cellClassName" :rowStyle="rowStyle" :rowClassName="rowClassName"
 | 
				
			||||||
                  :columns="tableBodyColumns"
 | 
					                  :spanMethod="spanMethod" :defaultExpandAll="defaultExpandAll" :getCheckboxProps="getCheckboxProps"
 | 
				
			||||||
                  :indent-size="indentSize"
 | 
					                  :getRadioProps="getRadioProps" v-model:expandKeys="tableExpandKeys"
 | 
				
			||||||
                  :currentIndentSize="currentIndentSize"
 | 
					                  v-model:selectedKeys="tableSelectedKeys" v-model:selectedKey="tableSelectedKey" @row="rowClick"
 | 
				
			||||||
                  :tableColumnKeys="tableColumnKeys"
 | 
					                  @row-double="rowDoubleClick" @row-contextmenu="rowContextmenu">
 | 
				
			||||||
                  :expandSpace="childrenExpandSpace"
 | 
					 | 
				
			||||||
                  :expandIndex="expandIndex"
 | 
					 | 
				
			||||||
                  :cellStyle="cellStyle"
 | 
					 | 
				
			||||||
                  :cellClassName="cellClassName"
 | 
					 | 
				
			||||||
                  :rowStyle="rowStyle"
 | 
					 | 
				
			||||||
                  :rowClassName="rowClassName"
 | 
					 | 
				
			||||||
                  :spanMethod="spanMethod"
 | 
					 | 
				
			||||||
                  :defaultExpandAll="defaultExpandAll"
 | 
					 | 
				
			||||||
                  :getCheckboxProps="getCheckboxProps"
 | 
					 | 
				
			||||||
                  :getRadioProps="getRadioProps"
 | 
					 | 
				
			||||||
                  v-model:expandKeys="tableExpandKeys"
 | 
					 | 
				
			||||||
                  v-model:selectedKeys="tableSelectedKeys"
 | 
					 | 
				
			||||||
                  v-model:selectedKey="tableSelectedKey"
 | 
					 | 
				
			||||||
                  @row="rowClick"
 | 
					 | 
				
			||||||
                  @row-double="rowDoubleClick"
 | 
					 | 
				
			||||||
                  @row-contextmenu="rowContextmenu"
 | 
					 | 
				
			||||||
                >
 | 
					 | 
				
			||||||
                  <template v-for="name in slotsData" #[name]="{ data }">
 | 
					                  <template v-for="name in slotsData" #[name]="{ data }">
 | 
				
			||||||
                    <slot :name="name" :data="data"></slot>
 | 
					                    <slot :name="name" :data="data"></slot>
 | 
				
			||||||
                  </template>
 | 
					                  </template>
 | 
				
			||||||
@ -1076,28 +982,21 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
                </table-row>
 | 
					                </table-row>
 | 
				
			||||||
              </template>
 | 
					              </template>
 | 
				
			||||||
              <tr v-if="hasTotalRow" class="layui-table-total">
 | 
					              <tr v-if="hasTotalRow" class="layui-table-total">
 | 
				
			||||||
                <template
 | 
					                <template v-for="(column, columnIndex) in columns" :key="columnIndex">
 | 
				
			||||||
                  v-for="(column, columnIndex) in columns"
 | 
					 | 
				
			||||||
                  :key="columnIndex"
 | 
					 | 
				
			||||||
                >
 | 
					 | 
				
			||||||
                  <template v-if="tableColumnKeys.includes(column.key)">
 | 
					                  <template v-if="tableColumnKeys.includes(column.key)">
 | 
				
			||||||
                    <td
 | 
					                    <td :style="[
 | 
				
			||||||
                      :style="[
 | 
					                      {
 | 
				
			||||||
                        {
 | 
					                        textAlign: column.align,
 | 
				
			||||||
                          textAlign: column.align,
 | 
					                        whiteSpace: column.ellipsisTooltip
 | 
				
			||||||
                          whiteSpace: column.ellipsisTooltip
 | 
					                          ? 'nowrap'
 | 
				
			||||||
                            ? 'nowrap'
 | 
					                          : 'normal',
 | 
				
			||||||
                            : 'normal',
 | 
					                      },
 | 
				
			||||||
                        },
 | 
					                      renderFixedStyle(column, columnIndex),
 | 
				
			||||||
                        renderFixedStyle(column, columnIndex),
 | 
					                    ]" :class="[
 | 
				
			||||||
                      ]"
 | 
					  'layui-table-cell',
 | 
				
			||||||
                      :class="[
 | 
					  renderFixedClassName(column, columnIndex),
 | 
				
			||||||
                        'layui-table-cell',
 | 
					  column.fixed ? `layui-table-fixed-${column.fixed}` : '',
 | 
				
			||||||
                        renderFixedClassName(column, columnIndex),
 | 
					]" v-html="renderTotalRowCell(column)"></td>
 | 
				
			||||||
                        column.fixed ? `layui-table-fixed-${column.fixed}` : '',
 | 
					 | 
				
			||||||
                      ]"
 | 
					 | 
				
			||||||
                      v-html="renderTotalRowCell(column)"
 | 
					 | 
				
			||||||
                    ></td>
 | 
					 | 
				
			||||||
                  </template>
 | 
					                  </template>
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </tr>
 | 
					              </tr>
 | 
				
			||||||
@ -1109,9 +1008,7 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
          </template>
 | 
					          </template>
 | 
				
			||||||
          <template v-if="loading == true">
 | 
					          <template v-if="loading == true">
 | 
				
			||||||
            <div class="layui-table-loading">
 | 
					            <div class="layui-table-loading">
 | 
				
			||||||
              <i
 | 
					              <i class="layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"></i>
 | 
				
			||||||
                class="layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"
 | 
					 | 
				
			||||||
              ></i>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </template>
 | 
					          </template>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -1120,41 +1017,17 @@ window.addEventListener("click", heddin);
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div v-if="page && page.total > 0" class="layui-table-page">
 | 
					      <div v-if="page && page.total > 0" class="layui-table-page">
 | 
				
			||||||
        <table-page
 | 
					        <table-page :total="page.total" :pages="page.pages" :theme="page.theme" :limits="page.limits"
 | 
				
			||||||
          :total="page.total"
 | 
					          :showSkip="page.showSkip" :show-page="page.showPage" :showRefresh="page.showRefresh" :showLimit="page.showLimit"
 | 
				
			||||||
          :pages="page.pages"
 | 
					          :showCount="page.showCount" :count="page.count" v-model:current="page.current" v-model:limit="page.limit"
 | 
				
			||||||
          :theme="page.theme"
 | 
					          @change="change">
 | 
				
			||||||
          :limits="page.limits"
 | 
					 | 
				
			||||||
          :showSkip="page.showSkip"
 | 
					 | 
				
			||||||
          :show-page="page.showPage"
 | 
					 | 
				
			||||||
          :showRefresh="page.showRefresh"
 | 
					 | 
				
			||||||
          :showLimit="page.showLimit"
 | 
					 | 
				
			||||||
          :showCount="page.showCount"
 | 
					 | 
				
			||||||
          :count="page.count"
 | 
					 | 
				
			||||||
          v-model:current="page.current"
 | 
					 | 
				
			||||||
          v-model:limit="page.limit"
 | 
					 | 
				
			||||||
          @change="change"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
        </table-page>
 | 
					        </table-page>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div v-for="(tableHeadColumn, tableHeadColumnIndex) in tableHeadColumns" :key="tableHeadColumnIndex">
 | 
				
			||||||
      v-for="(tableHeadColumn, tableHeadColumnIndex) in tableHeadColumns"
 | 
					 | 
				
			||||||
      :key="tableHeadColumnIndex"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <div v-for="(column, columnIndex) in tableHeadColumn" :key="column">
 | 
					      <div v-for="(column, columnIndex) in tableHeadColumn" :key="column">
 | 
				
			||||||
        <soultable
 | 
					        <soultable :top="soultop" :left="soulleft" v-show="soulkey == column.key" :show="soulkey == column.key" @asc="asc"
 | 
				
			||||||
          :top="soultop"
 | 
					          @desc="desc" @daochu="exportData" :list="datalist" :soulkey="column.key" @sx="sx"></soultable>
 | 
				
			||||||
          :left="soulleft"
 | 
					 | 
				
			||||||
          v-show="soulkey == column.key"
 | 
					 | 
				
			||||||
          :show="soulkey == column.key"
 | 
					 | 
				
			||||||
          @asc="asc"
 | 
					 | 
				
			||||||
          @desc="desc"
 | 
					 | 
				
			||||||
          @daochu="exportData"
 | 
					 | 
				
			||||||
          :list="datalist"
 | 
					 | 
				
			||||||
          :soulkey="column.key"
 | 
					 | 
				
			||||||
          @sx="sx"
 | 
					 | 
				
			||||||
        ></soultable>
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										154
									
								
								umd/index.js
									
									
									
									
									
								
							
							
						
						
									
										154
									
								
								umd/index.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user