测试
This commit is contained in:
parent
9fd888d5ff
commit
a895f23058
@ -63,6 +63,20 @@ function addTab(){
|
|||||||
})
|
})
|
||||||
globalTabState.tab = "/test"
|
globalTabState.tab = "/test"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const generateColumns = (length = 10, prefix = 'column-', props) =>
|
||||||
|
Array.from({ length }).map((_, columnIndex) => ({
|
||||||
|
...props,
|
||||||
|
key: `${prefix}${columnIndex}`,
|
||||||
|
dataKey: `${prefix}${columnIndex}`,
|
||||||
|
title: `Column ${columnIndex}`,
|
||||||
|
width: 150,
|
||||||
|
}))
|
||||||
|
|
||||||
|
const table = reactive({
|
||||||
|
columns: generateColumns(10)
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -80,7 +94,7 @@ function addTab(){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button @click="switchLocale()">切换 locale</el-button>
|
<el-button @click="switchLocale()">切换 locale</el-button>
|
||||||
<el-table mb-1 :data="[]" />
|
<el-table-v2 mb-1 :data="[]" :columns="table.columns"/>
|
||||||
<el-pagination :total="100" />
|
<el-pagination :total="100" />
|
||||||
|
|
||||||
<el-button @click="addTab()">添加tab</el-button>
|
<el-button @click="addTab()">添加tab</el-button>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import TabScaffold from "src/components/scaffold/TabScaffold.vue";
|
import TabScaffold from "src/components/scaffold/TabScaffold.vue";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {ref} from "vue";
|
|
||||||
import {useGlobalTabs} from "src/store/globalTabs";
|
import {useGlobalTabs} from "src/store/globalTabs";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
Loading…
Reference in New Issue
Block a user