mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
48
src/views/table/high/table-select/radio/index.vue
Normal file
48
src/views/table/high/table-select/radio/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useColumns } from "./columns";
|
||||
|
||||
const selectRef = ref();
|
||||
const {
|
||||
columns,
|
||||
pagination,
|
||||
selectValue,
|
||||
tableDataEdit,
|
||||
rowStyle,
|
||||
onRowClick
|
||||
} = useColumns(selectRef);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-select
|
||||
ref="selectRef"
|
||||
v-model="selectValue"
|
||||
class="!w-[200px]"
|
||||
placeholder="请选择"
|
||||
value-key="id"
|
||||
clearable
|
||||
>
|
||||
<template #empty>
|
||||
<div class="m-4">
|
||||
<pure-table
|
||||
row-key="id"
|
||||
alignWhole="center"
|
||||
:header-cell-style="{
|
||||
background: 'var(--el-fill-color-light)',
|
||||
color: 'var(--el-text-color-primary)'
|
||||
}"
|
||||
:row-style="rowStyle"
|
||||
:data="
|
||||
tableDataEdit.slice(
|
||||
(pagination.currentPage - 1) * pagination.pageSize,
|
||||
pagination.currentPage * pagination.pageSize
|
||||
)
|
||||
"
|
||||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
@row-click="onRowClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-select>
|
||||
</template>
|
||||
Reference in New Issue
Block a user