mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	chore: update @pureadmin/table
				
					
				
			This commit is contained in:
		
							parent
							
								
									1848c43f0c
								
							
						
					
					
						commit
						384d5e9598
					
				@ -33,7 +33,7 @@
 | 
				
			|||||||
    "@logicflow/extension": "^1.1.16",
 | 
					    "@logicflow/extension": "^1.1.16",
 | 
				
			||||||
    "@pureadmin/components": "^1.0.6",
 | 
					    "@pureadmin/components": "^1.0.6",
 | 
				
			||||||
    "@pureadmin/descriptions": "^1.1.0",
 | 
					    "@pureadmin/descriptions": "^1.1.0",
 | 
				
			||||||
    "@pureadmin/table": "^0.0.1",
 | 
					    "@pureadmin/table": "^1.1.0",
 | 
				
			||||||
    "@vueuse/core": "^8.7.4",
 | 
					    "@vueuse/core": "^8.7.4",
 | 
				
			||||||
    "@vueuse/motion": "^2.0.0-beta.12",
 | 
					    "@vueuse/motion": "^2.0.0-beta.12",
 | 
				
			||||||
    "@vueuse/shared": "^8.7.4",
 | 
					    "@vueuse/shared": "^8.7.4",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										8
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@ -20,7 +20,7 @@ specifiers:
 | 
				
			|||||||
  "@logicflow/extension": ^1.1.16
 | 
					  "@logicflow/extension": ^1.1.16
 | 
				
			||||||
  "@pureadmin/components": ^1.0.6
 | 
					  "@pureadmin/components": ^1.0.6
 | 
				
			||||||
  "@pureadmin/descriptions": ^1.1.0
 | 
					  "@pureadmin/descriptions": ^1.1.0
 | 
				
			||||||
  "@pureadmin/table": ^0.0.1
 | 
					  "@pureadmin/table": ^1.1.0
 | 
				
			||||||
  "@pureadmin/theme": ^2.4.0
 | 
					  "@pureadmin/theme": ^2.4.0
 | 
				
			||||||
  "@types/element-resize-detector": 1.1.3
 | 
					  "@types/element-resize-detector": 1.1.3
 | 
				
			||||||
  "@types/js-cookie": ^3.0.1
 | 
					  "@types/js-cookie": ^3.0.1
 | 
				
			||||||
@ -126,7 +126,7 @@ dependencies:
 | 
				
			|||||||
  "@logicflow/extension": 1.1.16
 | 
					  "@logicflow/extension": 1.1.16
 | 
				
			||||||
  "@pureadmin/components": 1.0.6_vue@3.2.37
 | 
					  "@pureadmin/components": 1.0.6_vue@3.2.37
 | 
				
			||||||
  "@pureadmin/descriptions": 1.1.0
 | 
					  "@pureadmin/descriptions": 1.1.0
 | 
				
			||||||
  "@pureadmin/table": 0.0.1
 | 
					  "@pureadmin/table": 1.1.0
 | 
				
			||||||
  "@vueuse/core": 8.7.4_vue@3.2.37
 | 
					  "@vueuse/core": 8.7.4_vue@3.2.37
 | 
				
			||||||
  "@vueuse/motion": 2.0.0-beta.12_vue@3.2.37
 | 
					  "@vueuse/motion": 2.0.0-beta.12_vue@3.2.37
 | 
				
			||||||
  "@vueuse/shared": 8.7.4_vue@3.2.37
 | 
					  "@vueuse/shared": 8.7.4_vue@3.2.37
 | 
				
			||||||
@ -1368,10 +1368,10 @@ packages:
 | 
				
			|||||||
      - "@vue/composition-api"
 | 
					      - "@vue/composition-api"
 | 
				
			||||||
    dev: false
 | 
					    dev: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /@pureadmin/table/0.0.1:
 | 
					  /@pureadmin/table/1.1.0:
 | 
				
			||||||
    resolution:
 | 
					    resolution:
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        integrity: sha512-1/4gHelsRtDMfOVjVhpMcHl3Q1i/OghuUG4bwKOOZdnbFaP08lcCpY4T0Xf16ZYmk6INas4fWcnHicl0Tu1/eg==
 | 
					        integrity: sha512-KZEUUSpBLz1yvOU8aijIpQNxgwD8bv1o64AQuqITDQ/JqUScVfPcGKupg8pwnxY53fNgt68xRK7nLyaWXvc4nA==
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      element-plus: 2.2.6_vue@3.2.37
 | 
					      element-plus: 2.2.6_vue@3.2.37
 | 
				
			||||||
 | 
				
			|||||||
@ -117,7 +117,7 @@ export default defineComponent({
 | 
				
			|||||||
      <>
 | 
					      <>
 | 
				
			||||||
        <div
 | 
					        <div
 | 
				
			||||||
          {...attrs}
 | 
					          {...attrs}
 | 
				
			||||||
          class="w-99/100 mt-6 p-2 bg-white"
 | 
					          class="w-99/100 mt-6  pt-2 pl-2 pr-2 pb-1 bg-white"
 | 
				
			||||||
          v-loading={props.loading}
 | 
					          v-loading={props.loading}
 | 
				
			||||||
          element-loading-svg={loadingSvg}
 | 
					          element-loading-svg={loadingSvg}
 | 
				
			||||||
          element-loading-svg-view-box="-10, -10, 50, 50"
 | 
					          element-loading-svg-view-box="-10, -10, 50, 50"
 | 
				
			||||||
 | 
				
			|||||||
@ -8,9 +8,11 @@ import { useI18n } from "../src/plugins/i18n";
 | 
				
			|||||||
import { MotionPlugin } from "@vueuse/motion";
 | 
					import { MotionPlugin } from "@vueuse/motion";
 | 
				
			||||||
import VirtualScroller from "vue-virtual-scroller";
 | 
					import VirtualScroller from "vue-virtual-scroller";
 | 
				
			||||||
import { useTable } from "../src/plugins/vxe-table";
 | 
					import { useTable } from "../src/plugins/vxe-table";
 | 
				
			||||||
import PureDescriptions from "@pureadmin/descriptions";
 | 
					 | 
				
			||||||
import { injectResponsiveStorage } from "/@/utils/storage/responsive";
 | 
					import { injectResponsiveStorage } from "/@/utils/storage/responsive";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import Table from "@pureadmin/table";
 | 
				
			||||||
 | 
					import PureDescriptions from "@pureadmin/descriptions";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "uno.css";
 | 
					import "uno.css";
 | 
				
			||||||
import "animate.css";
 | 
					import "animate.css";
 | 
				
			||||||
// 引入重置样式
 | 
					// 引入重置样式
 | 
				
			||||||
@ -53,6 +55,7 @@ getServerConfig(app).then(async config => {
 | 
				
			|||||||
    .use(MotionPlugin)
 | 
					    .use(MotionPlugin)
 | 
				
			||||||
    .use(useI18n)
 | 
					    .use(useI18n)
 | 
				
			||||||
    .use(ElementPlus)
 | 
					    .use(ElementPlus)
 | 
				
			||||||
 | 
					    .use(Table)
 | 
				
			||||||
    .use(PureDescriptions)
 | 
					    .use(PureDescriptions)
 | 
				
			||||||
    .use(useTable)
 | 
					    .use(useTable)
 | 
				
			||||||
    .use(VirtualScroller);
 | 
					    .use(VirtualScroller);
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,6 @@ import { useColumns } from "./columns";
 | 
				
			|||||||
import { handleTree } from "/@/utils/tree";
 | 
					import { handleTree } from "/@/utils/tree";
 | 
				
			||||||
import { getDeptList } from "/@/api/system";
 | 
					import { getDeptList } from "/@/api/system";
 | 
				
			||||||
import { FormInstance } from "element-plus";
 | 
					import { FormInstance } from "element-plus";
 | 
				
			||||||
import { PureTable } from "@pureadmin/table";
 | 
					 | 
				
			||||||
import { reactive, ref, onMounted } from "vue";
 | 
					import { reactive, ref, onMounted } from "vue";
 | 
				
			||||||
import { TableProBar } from "/@/components/ReTable";
 | 
					import { TableProBar } from "/@/components/ReTable";
 | 
				
			||||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
					import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
import { useColumns } from "./columns";
 | 
					import { useColumns } from "./columns";
 | 
				
			||||||
import { getRoleList } from "/@/api/system";
 | 
					import { getRoleList } from "/@/api/system";
 | 
				
			||||||
import { PureTable } from "@pureadmin/table";
 | 
					 | 
				
			||||||
import { reactive, ref, onMounted } from "vue";
 | 
					import { reactive, ref, onMounted } from "vue";
 | 
				
			||||||
import { type FormInstance } from "element-plus";
 | 
					import { type FormInstance } from "element-plus";
 | 
				
			||||||
import { TableProBar } from "/@/components/ReTable";
 | 
					import { TableProBar } from "/@/components/ReTable";
 | 
				
			||||||
 | 
					import { type PaginationProps } from "@pureadmin/table";
 | 
				
			||||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
					import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
@ -18,13 +18,18 @@ const form = reactive({
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let dataList = ref([]);
 | 
					let dataList = ref([]);
 | 
				
			||||||
let pageSize = ref(10);
 | 
					 | 
				
			||||||
let totalPage = ref(0);
 | 
					 | 
				
			||||||
let loading = ref(true);
 | 
					let loading = ref(true);
 | 
				
			||||||
const { columns } = useColumns();
 | 
					const { columns } = useColumns();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const formRef = ref<FormInstance>();
 | 
					const formRef = ref<FormInstance>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const pagination = reactive<PaginationProps>({
 | 
				
			||||||
 | 
					  total: 0,
 | 
				
			||||||
 | 
					  pageSize: 10,
 | 
				
			||||||
 | 
					  currentPage: 1,
 | 
				
			||||||
 | 
					  background: true
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function handleUpdate(row) {
 | 
					function handleUpdate(row) {
 | 
				
			||||||
  console.log(row);
 | 
					  console.log(row);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -49,7 +54,7 @@ async function onSearch() {
 | 
				
			|||||||
  loading.value = true;
 | 
					  loading.value = true;
 | 
				
			||||||
  let { data } = await getRoleList();
 | 
					  let { data } = await getRoleList();
 | 
				
			||||||
  dataList.value = data.list;
 | 
					  dataList.value = data.list;
 | 
				
			||||||
  totalPage.value = data.total;
 | 
					  pagination.total = data.total;
 | 
				
			||||||
  setTimeout(() => {
 | 
					  setTimeout(() => {
 | 
				
			||||||
    loading.value = false;
 | 
					    loading.value = false;
 | 
				
			||||||
  }, 500);
 | 
					  }, 500);
 | 
				
			||||||
@ -122,8 +127,12 @@ onMounted(() => {
 | 
				
			|||||||
          :data="dataList"
 | 
					          :data="dataList"
 | 
				
			||||||
          :columns="columns"
 | 
					          :columns="columns"
 | 
				
			||||||
          :checkList="checkList"
 | 
					          :checkList="checkList"
 | 
				
			||||||
 | 
					          :pagination="pagination"
 | 
				
			||||||
 | 
					          :paginationSmall="size === 'small' ? true : false"
 | 
				
			||||||
          :header-cell-style="{ background: '#fafafa', color: '#606266' }"
 | 
					          :header-cell-style="{ background: '#fafafa', color: '#606266' }"
 | 
				
			||||||
          @selection-change="handleSelectionChange"
 | 
					          @selection-change="handleSelectionChange"
 | 
				
			||||||
 | 
					          @size-change="handleSizeChange"
 | 
				
			||||||
 | 
					          @current-change="handleCurrentChange"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <template #operation="{ row }">
 | 
					          <template #operation="{ row }">
 | 
				
			||||||
            <el-button
 | 
					            <el-button
 | 
				
			||||||
@ -188,17 +197,6 @@ onMounted(() => {
 | 
				
			|||||||
            </el-dropdown>
 | 
					            </el-dropdown>
 | 
				
			||||||
          </template>
 | 
					          </template>
 | 
				
			||||||
        </PureTable>
 | 
					        </PureTable>
 | 
				
			||||||
        <el-pagination
 | 
					 | 
				
			||||||
          class="flex justify-end mt-4"
 | 
					 | 
				
			||||||
          :small="size === 'small' ? true : false"
 | 
					 | 
				
			||||||
          v-model:page-size="pageSize"
 | 
					 | 
				
			||||||
          :page-sizes="[10, 20, 30, 50]"
 | 
					 | 
				
			||||||
          :background="true"
 | 
					 | 
				
			||||||
          layout="total, sizes, prev, pager, next, jumper"
 | 
					 | 
				
			||||||
          :total="totalPage"
 | 
					 | 
				
			||||||
          @size-change="handleSizeChange"
 | 
					 | 
				
			||||||
          @current-change="handleCurrentChange"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
    </TableProBar>
 | 
					    </TableProBar>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,10 +2,10 @@
 | 
				
			|||||||
import tree from "./tree.vue";
 | 
					import tree from "./tree.vue";
 | 
				
			||||||
import { useColumns } from "./columns";
 | 
					import { useColumns } from "./columns";
 | 
				
			||||||
import { getUserList } from "/@/api/system";
 | 
					import { getUserList } from "/@/api/system";
 | 
				
			||||||
import { PureTable } from "@pureadmin/table";
 | 
					 | 
				
			||||||
import { reactive, ref, onMounted } from "vue";
 | 
					import { reactive, ref, onMounted } from "vue";
 | 
				
			||||||
import { TableProBar } from "/@/components/ReTable";
 | 
					 | 
				
			||||||
import { type FormInstance } from "element-plus";
 | 
					import { type FormInstance } from "element-plus";
 | 
				
			||||||
 | 
					import { TableProBar } from "/@/components/ReTable";
 | 
				
			||||||
 | 
					import { type PaginationProps } from "@pureadmin/table";
 | 
				
			||||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
					import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
@ -18,13 +18,18 @@ const form = reactive({
 | 
				
			|||||||
  status: ""
 | 
					  status: ""
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
let dataList = ref([]);
 | 
					let dataList = ref([]);
 | 
				
			||||||
let pageSize = ref(10);
 | 
					 | 
				
			||||||
let totalPage = ref(0);
 | 
					 | 
				
			||||||
let loading = ref(true);
 | 
					let loading = ref(true);
 | 
				
			||||||
const { columns } = useColumns();
 | 
					const { columns } = useColumns();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const formRef = ref<FormInstance>();
 | 
					const formRef = ref<FormInstance>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const pagination = reactive<PaginationProps>({
 | 
				
			||||||
 | 
					  total: 0,
 | 
				
			||||||
 | 
					  pageSize: 10,
 | 
				
			||||||
 | 
					  currentPage: 1,
 | 
				
			||||||
 | 
					  background: true
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function handleUpdate(row) {
 | 
					function handleUpdate(row) {
 | 
				
			||||||
  console.log(row);
 | 
					  console.log(row);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -49,7 +54,7 @@ async function onSearch() {
 | 
				
			|||||||
  loading.value = true;
 | 
					  loading.value = true;
 | 
				
			||||||
  let { data } = await getUserList();
 | 
					  let { data } = await getUserList();
 | 
				
			||||||
  dataList.value = data.list;
 | 
					  dataList.value = data.list;
 | 
				
			||||||
  totalPage.value = data.total;
 | 
					  pagination.total = data.total;
 | 
				
			||||||
  setTimeout(() => {
 | 
					  setTimeout(() => {
 | 
				
			||||||
    loading.value = false;
 | 
					    loading.value = false;
 | 
				
			||||||
  }, 500);
 | 
					  }, 500);
 | 
				
			||||||
@ -134,8 +139,12 @@ onMounted(() => {
 | 
				
			|||||||
            :data="dataList"
 | 
					            :data="dataList"
 | 
				
			||||||
            :columns="columns"
 | 
					            :columns="columns"
 | 
				
			||||||
            :checkList="checkList"
 | 
					            :checkList="checkList"
 | 
				
			||||||
 | 
					            :pagination="pagination"
 | 
				
			||||||
 | 
					            :paginationSmall="size === 'small' ? true : false"
 | 
				
			||||||
            :header-cell-style="{ background: '#fafafa', color: '#606266' }"
 | 
					            :header-cell-style="{ background: '#fafafa', color: '#606266' }"
 | 
				
			||||||
            @selection-change="handleSelectionChange"
 | 
					            @selection-change="handleSelectionChange"
 | 
				
			||||||
 | 
					            @size-change="handleSizeChange"
 | 
				
			||||||
 | 
					            @current-change="handleCurrentChange"
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
            <template #operation="{ row }">
 | 
					            <template #operation="{ row }">
 | 
				
			||||||
              <el-button
 | 
					              <el-button
 | 
				
			||||||
@ -200,17 +209,6 @@ onMounted(() => {
 | 
				
			|||||||
              </el-dropdown>
 | 
					              </el-dropdown>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
          </PureTable>
 | 
					          </PureTable>
 | 
				
			||||||
          <el-pagination
 | 
					 | 
				
			||||||
            class="flex justify-end mt-4"
 | 
					 | 
				
			||||||
            :small="size === 'small' ? true : false"
 | 
					 | 
				
			||||||
            v-model:page-size="pageSize"
 | 
					 | 
				
			||||||
            :page-sizes="[10, 20, 30, 50]"
 | 
					 | 
				
			||||||
            :background="true"
 | 
					 | 
				
			||||||
            layout="total, sizes, prev, pager, next, jumper"
 | 
					 | 
				
			||||||
            :total="totalPage"
 | 
					 | 
				
			||||||
            @size-change="handleSizeChange"
 | 
					 | 
				
			||||||
            @current-change="handleCurrentChange"
 | 
					 | 
				
			||||||
          />
 | 
					 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </TableProBar>
 | 
					      </TableProBar>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -28,6 +28,7 @@
 | 
				
			|||||||
      "node",
 | 
					      "node",
 | 
				
			||||||
      "vite/client",
 | 
					      "vite/client",
 | 
				
			||||||
      "element-plus/global",
 | 
					      "element-plus/global",
 | 
				
			||||||
 | 
					      "@pureadmin/table/volar",
 | 
				
			||||||
      "unplugin-vue-define-options",
 | 
					      "unplugin-vue-define-options",
 | 
				
			||||||
      "@pureadmin/descriptions/volar"
 | 
					      "@pureadmin/descriptions/volar"
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user