feat(custom): 订单列表改版
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<script setup>
|
||||
import { h, ref, resolveDirective, withDirectives } from 'vue'
|
||||
import api from '../api'
|
||||
import { NTag, NImage, NButton } from 'naive-ui'
|
||||
import { NTag, NImage, NButton, NDropdown } from 'naive-ui'
|
||||
import Upload from '@/components/Upload.vue'
|
||||
import Editor from '@/components/Editor.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const vPerms = resolveDirective('perms')
|
||||
|
||||
@@ -65,6 +66,56 @@ const columns = ref([
|
||||
),
|
||||
[[vPerms, ['/admin/game/edit']]]
|
||||
),
|
||||
withDirectives(
|
||||
h(
|
||||
'span',
|
||||
{
|
||||
class: 'ml-10',
|
||||
},
|
||||
{
|
||||
default: () => [
|
||||
h(
|
||||
NDropdown,
|
||||
{
|
||||
trigger: 'click',
|
||||
size: 'small',
|
||||
options: [
|
||||
{
|
||||
key: 0,
|
||||
label: '实时数据',
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
label: '数据统计',
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
label: '宙斯统计',
|
||||
},
|
||||
],
|
||||
onSelect: (e) => dropdownSelect(e),
|
||||
},
|
||||
{
|
||||
default: () =>
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
class: 'ml-5',
|
||||
type: 'primary',
|
||||
text: true,
|
||||
size: 'small',
|
||||
},
|
||||
{
|
||||
default: () => '操作',
|
||||
}
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
}
|
||||
),
|
||||
[[vPerms, ['待定']]]
|
||||
),
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -165,6 +216,14 @@ const clear = () => {
|
||||
showModal.value = false
|
||||
getList()
|
||||
}
|
||||
|
||||
const route = useRouter()
|
||||
|
||||
const paths = ['/game/game_data', '/game/game_statistics', '/game/game_zs']
|
||||
|
||||
const dropdownSelect = (e) => {
|
||||
route.push(paths[e])
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user