修改模板.
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
#foreach($field in ${table.fields})
|
#foreach($field in ${table.fields})
|
||||||
#if(${vue.enums.containsKey(${field.propertyName})})
|
#if(${vue.enums.containsKey(${field.propertyName})})
|
||||||
|
|||||||
@@ -75,6 +75,11 @@
|
|||||||
box-shadow: 2px 2px 12px rgba(0, 0, 0, .15);
|
box-shadow: 2px 2px 12px rgba(0, 0, 0, .15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-descriptions {
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.usn {
|
.usn {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
import { ResponsiveValue } from '@arco-design/web-vue';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建卡片位置
|
|
||||||
*/
|
|
||||||
export type Position = 'head' | 'tail' | false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 卡片字段
|
|
||||||
*/
|
|
||||||
export interface CardRecord {
|
|
||||||
disabled?: boolean;
|
|
||||||
|
|
||||||
[name: string]: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* col 响应式值
|
|
||||||
*/
|
|
||||||
export interface ColResponsiveValue extends ResponsiveValue {
|
|
||||||
span?: number;
|
|
||||||
offset?: number;
|
|
||||||
order?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 显示的操作
|
|
||||||
*/
|
|
||||||
export interface HandleVisible {
|
|
||||||
disableAdd?: boolean;
|
|
||||||
disableSearchInput?: boolean;
|
|
||||||
disableFilter?: boolean;
|
|
||||||
disableSearch?: boolean;
|
|
||||||
disableReset?: boolean;
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,10 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
v-model:current="pagination.current"
|
v-model:current="pagination.current"
|
||||||
v-model:page-size="pagination.pageSize"
|
v-model:page-size="pagination.pageSize"
|
||||||
v-bind="pagination" />
|
v-bind="pagination"
|
||||||
|
:auto-adjust="false"
|
||||||
|
@change="page => emits('pageChange', page, pagination.pageSize)"
|
||||||
|
@page-size-change="limit => emits('pageChange', 1, limit)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作部分 -->
|
<!-- 操作部分 -->
|
||||||
@@ -28,20 +31,20 @@
|
|||||||
@click="emits('add')">
|
@click="emits('add')">
|
||||||
<icon-plus />
|
<icon-plus />
|
||||||
</div>
|
</div>
|
||||||
</a-space>
|
|
||||||
<!-- 左侧侧操作槽位 -->
|
<!-- 左侧侧操作槽位 -->
|
||||||
<slot name="leftHandle" />
|
<slot name="leftHandle" />
|
||||||
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右侧固定 -->
|
<!-- 右侧固定 -->
|
||||||
<div class="card-list-handler-right">
|
<div class="card-list-handler-right">
|
||||||
|
<a-space>
|
||||||
<!-- 右侧操作槽位 -->
|
<!-- 右侧操作槽位 -->
|
||||||
<slot name="rightHandle" />
|
<slot name="rightHandle" />
|
||||||
<a-space>
|
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<div v-if="!handleVisible.disableSearchInput"
|
<div v-if="!handleVisible.disableSearchInput"
|
||||||
class="header-input-wrapper"
|
class="header-input-wrapper"
|
||||||
:style="{width: searchInputWidth}">
|
:style="{width: searchInputWidth}">
|
||||||
<a-input :default-value="searchValue"
|
<a-input v-model="searchValueRef"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="输入名称/地址"
|
placeholder="输入名称/地址"
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -75,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 身体部分 -->
|
<!-- 身体部分 -->
|
||||||
<div class="card-list-layout-body">
|
<a-spin class="card-list-layout-body" :loading="loading">
|
||||||
<!-- 卡片列表 -->
|
<!-- 卡片列表 -->
|
||||||
<a-row v-if="list.length !== 0"
|
<a-row v-if="list.length !== 0"
|
||||||
:gutter="cardLayoutGutter">
|
:gutter="cardLayoutGutter">
|
||||||
@@ -133,7 +136,7 @@
|
|||||||
@click="emits('add')" />
|
@click="emits('add')" />
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@
|
|||||||
import { compile, computed, h, PropType } from 'vue';
|
import { compile, computed, h, PropType } from 'vue';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
import { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||||
import { Position, CardRecord, ColResponsiveValue, HandleVisible } from './types';
|
import { Position, CardRecord, ColResponsiveValue, HandleVisible } from '@/types/card';
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const headerWidth = computed(() => {
|
const headerWidth = computed(() => {
|
||||||
@@ -157,9 +160,23 @@
|
|||||||
return `calc(100% - ${menuWidth}px)`;
|
return `calc(100% - ${menuWidth}px)`;
|
||||||
});
|
});
|
||||||
|
|
||||||
const emits = defineEmits(['add', 'update:searchValue', 'search', 'reset']);
|
const searchValueRef = computed<string>({
|
||||||
|
get() {
|
||||||
|
return props.searchValue as string;
|
||||||
|
},
|
||||||
|
set(e) {
|
||||||
|
if (e) {
|
||||||
|
emits('update:searchValue', e);
|
||||||
|
} else {
|
||||||
|
emits('update:searchValue', null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
defineProps({
|
const emits = defineEmits(['add', 'update:searchValue', 'search',
|
||||||
|
'reset', 'pageChange']);
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
key: {
|
key: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => 'id'
|
default: () => 'id'
|
||||||
@@ -168,6 +185,10 @@
|
|||||||
type: Object as PropType<PaginationProps> | PropType<boolean>,
|
type: Object as PropType<PaginationProps> | PropType<boolean>,
|
||||||
default: () => false
|
default: () => false
|
||||||
},
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean as PropType<Boolean>,
|
||||||
|
default: () => false
|
||||||
|
},
|
||||||
cardHeight: Number,
|
cardHeight: Number,
|
||||||
searchInputWidth: {
|
searchInputWidth: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -267,6 +288,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-body {
|
&-body {
|
||||||
|
display: block;
|
||||||
margin-top: @top-height - 16px;
|
margin-top: @top-height - 16px;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from 'echarts/components';
|
} from 'echarts/components';
|
||||||
import Chart from './chart/index.vue';
|
import Chart from './chart/index.vue';
|
||||||
import Breadcrumb from './breadcrumb/index.vue';
|
import Breadcrumb from './breadcrumb/index.vue';
|
||||||
import CardList from './card-list/index.vue';
|
import CardList from './card/list/index.vue';
|
||||||
|
|
||||||
use([
|
use([
|
||||||
CanvasRenderer,
|
CanvasRenderer,
|
||||||
|
|||||||
88
orion-ops-ui/src/types/card.ts
Normal file
88
orion-ops-ui/src/types/card.ts
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
import { DescData, PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡片字段
|
||||||
|
*/
|
||||||
|
export interface CardField {
|
||||||
|
field: string;
|
||||||
|
label: string;
|
||||||
|
render: (record: CardRecord) => string;
|
||||||
|
span?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建卡片位置
|
||||||
|
*/
|
||||||
|
export type Position = 'head' | 'tail' | false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡片实体
|
||||||
|
*/
|
||||||
|
export interface CardRecord {
|
||||||
|
disabled?: boolean;
|
||||||
|
|
||||||
|
[name: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* col 响应式值
|
||||||
|
*/
|
||||||
|
export interface ColResponsiveValue extends ResponsiveValue {
|
||||||
|
span?: number;
|
||||||
|
offset?: number;
|
||||||
|
order?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示的操作
|
||||||
|
*/
|
||||||
|
export interface HandleVisible {
|
||||||
|
disableAdd?: boolean;
|
||||||
|
disableSearchInput?: boolean;
|
||||||
|
disableFilter?: boolean;
|
||||||
|
disableSearch?: boolean;
|
||||||
|
disableReset?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建卡片列表列布局
|
||||||
|
*/
|
||||||
|
export const useColLayout = (): ColResponsiveValue => {
|
||||||
|
return {
|
||||||
|
xs: 24,
|
||||||
|
sm: 12,
|
||||||
|
md: 8,
|
||||||
|
lg: 8,
|
||||||
|
xl: 6,
|
||||||
|
xxl: 4,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建创建卡片列表分页
|
||||||
|
*/
|
||||||
|
export const usePagination = (): PaginationProps => {
|
||||||
|
return reactive({
|
||||||
|
total: 0,
|
||||||
|
current: 1,
|
||||||
|
pageSize: 18,
|
||||||
|
showTotal: true,
|
||||||
|
showPageSize: true,
|
||||||
|
pageSizeOptions: [12, 18, 36, 48, 96]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转为卡片描述对象
|
||||||
|
*/
|
||||||
|
export const toCardDesc = (fields: CardField[], record: CardRecord): DescData[] => {
|
||||||
|
return fields.map(s => {
|
||||||
|
return {
|
||||||
|
field: s.field,
|
||||||
|
label: s.label,
|
||||||
|
value: s.render(record),
|
||||||
|
span: s.span || 3
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { PaginationProps, TableRowSelection } from '@arco-design/web-vue';
|
import { PaginationProps, TableRowSelection } from '@arco-design/web-vue';
|
||||||
import { ColResponsiveValue } from '@/components/card-list/types';
|
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,20 +27,6 @@ export const defaultRowSelection = (): TableRowSelection => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 卡片列表列布局
|
|
||||||
*/
|
|
||||||
export const useCardColLayout = (): ColResponsiveValue => {
|
|
||||||
return {
|
|
||||||
xs: 24,
|
|
||||||
sm: 12,
|
|
||||||
md: 8,
|
|
||||||
lg: 8,
|
|
||||||
xl: 6,
|
|
||||||
xxl: 4,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建列表分页
|
* 创建列表分页
|
||||||
*/
|
*/
|
||||||
@@ -56,21 +41,6 @@ export const usePagination = (): PaginationProps => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建卡片列表分页
|
|
||||||
*/
|
|
||||||
export const useCardPagination = (): PaginationProps => {
|
|
||||||
return reactive({
|
|
||||||
total: 0,
|
|
||||||
current: 1,
|
|
||||||
pageSize: 18,
|
|
||||||
showTotal: true,
|
|
||||||
showPageSize: true,
|
|
||||||
pageSizeOptions: [12, 18, 36, 48, 96]
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建行选择器
|
* 创建行选择器
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -156,6 +156,15 @@ export function replaceNumber(value: string) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重设对象
|
||||||
|
*/
|
||||||
|
export const resetObject = (obj: any) => {
|
||||||
|
Object.keys(obj).forEach(k => {
|
||||||
|
obj[k] = undefined;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前页面的缩放值
|
* 获取当前页面的缩放值
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<template #username="{ record }">
|
<template #username="{ record }">
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #handle="{ record }">
|
<template #handle="{ record }">
|
||||||
|
|||||||
@@ -3,15 +3,17 @@
|
|||||||
v-model:searchValue="formModel.name"
|
v-model:searchValue="formModel.name"
|
||||||
create-card-position="head"
|
create-card-position="head"
|
||||||
:card-height="180"
|
:card-height="180"
|
||||||
|
:loading="loading"
|
||||||
:list="list"
|
:list="list"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
:card-layout-cols="cardColLayout"
|
:card-layout-cols="cardColLayout"
|
||||||
@add="add"
|
@add="add"
|
||||||
@search="search"
|
@reset="reset"
|
||||||
@reset="reset">
|
@search="fetchTableData"
|
||||||
|
@page-change="fetchTableData">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<template #title="{ record }">
|
<template #title="{ record }">
|
||||||
{{ record.name }}
|
{{ record.id }}
|
||||||
</template>
|
</template>
|
||||||
<!-- 标题拓展 -->
|
<!-- 标题拓展 -->
|
||||||
<template #extra="{ index }">
|
<template #extra="{ index }">
|
||||||
@@ -19,10 +21,24 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 卡片 -->
|
<!-- 卡片 -->
|
||||||
<template #card="{ record }">
|
<template #card="{ record }">
|
||||||
{{ record }}
|
<a-descriptions class="card-descriptions"
|
||||||
|
:data="convert(record)"
|
||||||
|
:column="1">
|
||||||
|
<template #value="{ data }">
|
||||||
|
{{ data.field }}
|
||||||
|
<template v-if="data.field === 'id'">
|
||||||
|
<a-tag>{{ data.value }}</a-tag>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ data.value }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-descriptions>
|
||||||
|
</template>
|
||||||
|
<template #leftHandle>
|
||||||
|
<span>1</span>
|
||||||
</template>
|
</template>
|
||||||
</card-list>
|
</card-list>
|
||||||
{{ formModel }}
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -32,36 +48,59 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useCardPagination, useCardColLayout } from '@/types/table';
|
import { usePagination, useColLayout } from '@/types/card';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
import useLoading from '@/hooks/loading';
|
||||||
|
import { resetObject } from '@/utils';
|
||||||
|
import { convert } from '../types/card.fields';
|
||||||
|
|
||||||
const formModel = reactive({
|
const formModel = reactive({
|
||||||
name: undefined
|
name: undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
const cardColLayout = useCardColLayout();
|
const { loading, setLoading } = useLoading();
|
||||||
const pagination = useCardPagination();
|
const cardColLayout = useColLayout();
|
||||||
|
const pagination = usePagination();
|
||||||
const list = ref<Array<any>>([]);
|
const list = ref<Array<any>>([]);
|
||||||
|
|
||||||
for (let i = 0; i < 5; i++) {
|
// 切换页码
|
||||||
|
const fetchTableData = (page = 1, limit = pagination.pageSize, form = formModel) => {
|
||||||
|
console.log(page, limit, form);
|
||||||
|
setLoading(true);
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
const t = 90;
|
||||||
|
for (let i = 0; i < t; i++) {
|
||||||
list.value.push({
|
list.value.push({
|
||||||
id: i + 1,
|
id: i + 1,
|
||||||
name: `名称 ${i + 1}`,
|
name: `名称 ${i + 1}`,
|
||||||
host: `192.168.1.${i}`,
|
address: `192.168.1.${i}`,
|
||||||
disabled: i === 0
|
disabled: i === 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pagination.total = 270;
|
pagination.total = t;
|
||||||
|
pagination.current = page;
|
||||||
|
pagination.pageSize = limit;
|
||||||
|
setLoading(false);
|
||||||
|
} catch (e) {
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
};
|
||||||
|
fetchTableData();
|
||||||
|
|
||||||
const add = () => {
|
const add = () => {
|
||||||
console.log('add');
|
console.log('add');
|
||||||
};
|
};
|
||||||
const search = () => {
|
|
||||||
console.log('search');
|
|
||||||
};
|
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
console.log('reset');
|
console.log('reset');
|
||||||
|
resetObject(formModel);
|
||||||
|
fetchTableData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 编码 -->
|
<!-- 编码 -->
|
||||||
<template #code="{ record }">
|
<template #code="{ record }">
|
||||||
|
|||||||
30
orion-ops-ui/src/views/asset/host/types/card.fields.ts
Normal file
30
orion-ops-ui/src/views/asset/host/types/card.fields.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import { CardField, CardRecord, toCardDesc } from '@/types/card';
|
||||||
|
|
||||||
|
export const fields = [
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
label: 'id',
|
||||||
|
render: r => r.id,
|
||||||
|
}, {
|
||||||
|
field: 'name',
|
||||||
|
label: '主机名称',
|
||||||
|
render: r => r.name,
|
||||||
|
}, {
|
||||||
|
field: 'code',
|
||||||
|
label: '主机编码',
|
||||||
|
render: r => 'code',
|
||||||
|
}, {
|
||||||
|
field: 'address',
|
||||||
|
label: '主机地址',
|
||||||
|
render: r => 'address',
|
||||||
|
}, {
|
||||||
|
field: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
render: r => 'tag',
|
||||||
|
},
|
||||||
|
] as CardField[];
|
||||||
|
|
||||||
|
export const convert = (record: CardRecord) => {
|
||||||
|
return toCardDesc(fields, record);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 编码 -->
|
<!-- 编码 -->
|
||||||
<template #code="{ record }">
|
<template #code="{ record }">
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
:data="tableRenderData"
|
:data="tableRenderData"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
|
||||||
@page-size-change="(size) => fetchTableData(pagination.current, size)"
|
@page-size-change="(size) => fetchTableData(1, size)"
|
||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 状态 -->
|
<!-- 状态 -->
|
||||||
<template #status="{ record }">
|
<template #status="{ record }">
|
||||||
|
|||||||
Reference in New Issue
Block a user