功能:完善门店能力与用户安全配置
This commit is contained in:
@@ -33,12 +33,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* CommentsView page script.
|
||||
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
|
||||
*/
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { adminCommentApi, type AdminCommentVO } from '@/api/admin'
|
||||
import type { IdType } from '@/utils/id'
|
||||
|
||||
/** loading is a reactive state variable used by the template and event handlers. */
|
||||
const loading = ref(false)
|
||||
/** keyword is a reactive state variable used by the template and event handlers. */
|
||||
const keyword = ref('')
|
||||
const comments = ref<AdminCommentVO[]>([])
|
||||
|
||||
@@ -51,6 +57,7 @@ const columns = [
|
||||
{ title: '操作', key: 'action', width: 100 }
|
||||
]
|
||||
|
||||
/** loadComments is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
|
||||
const loadComments = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
@@ -62,6 +69,7 @@ const loadComments = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
/** deleteComment is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
|
||||
const deleteComment = async (id: IdType) => {
|
||||
await adminCommentApi.deleteComment(id)
|
||||
message.success('评论已删除')
|
||||
|
||||
Reference in New Issue
Block a user