bunny-admin-element-thin-i18n/other-views/table/virtual.vue

76 lines
1.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import { ref } from "vue";
import { list } from "./virtual/list";
defineOptions({
name: "VxeTable"
});
const selected = ref(0);
function tabClick({ index }) {
selected.value = index;
}
</script>
<template>
<el-card shadow="never">
<template #header>
<div class="card-header">
<span class="font-medium">
虚拟滚动采用
<el-link
href="https://vxetable.cn/#/table/scroll/scroll"
target="_blank"
style="margin: 0 4px 5px; font-size: 16px"
>
vxe-table
</el-link>
</span>
</div>
<el-link
class="mt-2"
href="https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/table/virtual"
target="_blank"
>
代码位置 src/views/table/virtual
</el-link>
</template>
<el-tabs @tab-click="tabClick">
<template v-for="(item, index) of list" :key="item.key">
<el-tab-pane :lazy="true">
<template #label>
<span
v-tippy="{
maxWidth: 'none',
content: ` ${index + 1} 个示例${item.content}`
}"
>
{{ item.title }}
</span>
</template>
<component :is="item.component" v-if="selected == index" />
</el-tab-pane>
</template>
</el-tabs>
</el-card>
</template>
<style scoped>
:deep(.el-tabs__nav-wrap)::after {
height: 1px;
}
:deep(.el-tabs__nav-next),
:deep(.el-tabs__nav-prev) {
font-size: 16px;
color: var(--el-text-color-primary);
}
:deep(.el-tabs__nav-next.is-disabled),
:deep(.el-tabs__nav-prev.is-disabled) {
opacity: 0.5;
}
</style>