add
This commit is contained in:
1 parent
cba8f966ac
commit
00dd253202
4 files changed
+58
-10
No files matched your search
@@ -4,7 +4,7 @@ import { onMounted, ref, reactive } from 'vue'
|
||||
import type { BaseTableColumns } from 'tdesign-vue-next'
|
||||
import type { Classify } from '@/model/classify'
|
||||
import ClassifyDialog from '@/pages/carousal/components/CarousalDialog.vue'
|
||||
import { createCarousal } from '@/api/carousal'
|
||||
import { getCarousalList } from '@/api/carousal'
|
||||
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
@@ -19,7 +19,7 @@ const columns: BaseTableColumns = [
|
||||
},
|
||||
{
|
||||
title: '显示状态',
|
||||
colKey: 'targetType',
|
||||
colKey: 'status',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
@@ -32,15 +32,23 @@ const loading = ref(false)
|
||||
const data = ref([])
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
size: 10
|
||||
size: 10,
|
||||
total:0
|
||||
})
|
||||
const query = reactive({
|
||||
page:1,
|
||||
size:10,
|
||||
})
|
||||
const classifyDialogVisible = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const currentTableData = ref<Classify | {}>({})
|
||||
const fetchClassifyTableData = () => {
|
||||
const currentTableData = ref<{}>({})
|
||||
const fetchClassifyTableData = async () => {
|
||||
/* TODO: 获取轮播图表格数据 */
|
||||
const createCarousalApi = createCarousal(pagination)
|
||||
console.log(createCarousalApi,'api')
|
||||
query.page = pagination.page
|
||||
query.size = pagination.size
|
||||
const getCarousalListApi = await getCarousalList(query)
|
||||
currentTableData.value = getCarousalListApi.data
|
||||
pagination.total = getCarousalListApi.pagination.total
|
||||
}
|
||||
onMounted(fetchClassifyTableData)
|
||||
const editClick = (classify: Classify) => {
|
||||
|
||||
Reference in new issue
Block a user