mod(custom): 优化部分细节
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
<script setup>
|
||||
import { h } from 'vue'
|
||||
import api from './api'
|
||||
import { NDropdown, NButton } from 'naive-ui'
|
||||
import { NDropdown, NButton, NSwitch } from 'naive-ui'
|
||||
import TheIcon from '@/components/icon/TheIcon.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
@@ -374,6 +374,29 @@ const columns = ref([
|
||||
sorter: true,
|
||||
sortOrder: false,
|
||||
},
|
||||
{
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
slot: 'status',
|
||||
render: (row) => {
|
||||
return h(
|
||||
NSwitch,
|
||||
{
|
||||
value: row.status,
|
||||
checkedValue: 1,
|
||||
uncheckedValue: 2,
|
||||
onUpdateValue: async (value) => {
|
||||
await api.updateUserStatus({
|
||||
uid: row.uid,
|
||||
status: value,
|
||||
})
|
||||
await getList()
|
||||
},
|
||||
},
|
||||
{}
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
||||
Reference in New Issue
Block a user