diff --git a/.env.development b/.env.development
index a28efa9..7010158 100644
--- a/.env.development
+++ b/.env.development
@@ -1,4 +1,4 @@
-VITE_ENABLE_MOCK=true
+VITE_ENABLE_MOCK=false
VITE_API_PREFIX=/api
VITE_PROXY_ENDPOINT=https://bright.yilibili.com
diff --git a/components.d.ts b/components.d.ts
index 2766cd7..34cb577 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -8,23 +8,30 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
Copyright: typeof import('./src/components/Copyright.vue')['default']
+ ImageUpload: typeof import('./src/components/ImageUpload.vue')['default']
RegularPage: typeof import('./src/components/RegularPage.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
TAside: typeof import('tdesign-vue-next')['Aside']
TAvatar: typeof import('tdesign-vue-next')['Avatar']
TButton: typeof import('tdesign-vue-next')['Button']
- TCheckbox: typeof import('tdesign-vue-next')['Checkbox']
- TCol: typeof import('tdesign-vue-next')['Col']
+ TCard: typeof import('tdesign-vue-next')['Card']
TDialog: typeof import('tdesign-vue-next')['Dialog']
TDropdown: typeof import('tdesign-vue-next')['Dropdown']
THeader: typeof import('tdesign-vue-next')['Header']
TIcon: typeof import('tdesign-vue-next')['Icon']
+ TImageViewer: typeof import('tdesign-vue-next')['ImageViewer']
TInput: typeof import('tdesign-vue-next')['Input']
+ TInputNumber: typeof import('tdesign-vue-next')['InputNumber']
TLayout: typeof import('tdesign-vue-next')['Layout']
- TLink: typeof import('tdesign-vue-next')['Link']
TMenu: typeof import('tdesign-vue-next')['Menu']
TMenuItem: typeof import('tdesign-vue-next')['MenuItem']
+ TPopconfirm: typeof import('tdesign-vue-next')['Popconfirm']
+ TRadioButton: typeof import('tdesign-vue-next')['RadioButton']
+ TRadioGroup: typeof import('tdesign-vue-next')['RadioGroup']
TSpace: typeof import('tdesign-vue-next')['Space']
+ TTable: typeof import('tdesign-vue-next')['Table']
+ TTag: typeof import('tdesign-vue-next')['Tag']
+ TUpload: typeof import('tdesign-vue-next')['Upload']
}
}
diff --git a/src/api/carousal.ts b/src/api/carousal.ts
new file mode 100644
index 0000000..7771609
--- /dev/null
+++ b/src/api/carousal.ts
@@ -0,0 +1,29 @@
+import httpClient from './httpClient'
+import type { CreateCarousalsRequest, GetCarousalsRequest } from '@/model/carousals'
+
+export const createCarousal = (createCarousalsRequest: CreateCarousalsRequest) => {
+ return httpClient.post('/carousals', createCarousalsRequest)
+}
+
+export const getCarousalList = (getCarousalsRequest:GetCarousalsRequest) => {
+ return httpClient.get('/carousals',getCarousalsRequest)
+}
+export const getCarousalItem = (id:string) => {
+ return httpClient.get(`/carousals/${id}`)
+}
+
+export const updateCarousalItem = (id:number,updateCarousalsRequest: CreateCarousalsRequest) => {
+ return httpClient.put(`/carousals/${id}`,updateCarousalsRequest)
+}
+
+export const deleteCarousal = (id:string | number) => {
+ return httpClient.delete(`/carousals/${id}`)
+}
+
+export const activeCarousal = (id: string | number) => {
+ return httpClient.put(`/carousals/${id}/active`)
+}
+
+export const inactiveCarousal = (id: string | number ) => {
+ return httpClient.put(`/carousals/${id}/inactive`)
+}
\ No newline at end of file
diff --git a/src/components/ImageUpload.vue b/src/components/ImageUpload.vue
new file mode 100644
index 0000000..ede5ae7
--- /dev/null
+++ b/src/components/ImageUpload.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/model/carousals.ts b/src/model/carousals.ts
new file mode 100644
index 0000000..7bd74a5
--- /dev/null
+++ b/src/model/carousals.ts
@@ -0,0 +1,12 @@
+export interface CreateCarousalsRequest {
+ imageUrl:string,
+ targetType:string,
+ targetUrl?:string,
+ targetId?:string
+}
+export interface GetCarousalsRequest {
+ page:number,
+ size:number,
+ order?:[string]
+}
+
diff --git a/src/pages/carousal/components/CarousalDialog.vue b/src/pages/carousal/components/CarousalDialog.vue
new file mode 100644
index 0000000..e92d8de
--- /dev/null
+++ b/src/pages/carousal/components/CarousalDialog.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/carousal/index.vue b/src/pages/carousal/index.vue
new file mode 100644
index 0000000..b26b01d
--- /dev/null
+++ b/src/pages/carousal/index.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+ 创建轮播图
+
+
+
+
+
+
+
+
![test]()
+
+ 预览
+
+
+
+
+
+
+
+
+ {{row.status === 'active' ? '显示中' : '已关闭'}}
+
+
+
+
+ {{
+ role.label
+ }}
+
+
+
+ 编辑
+ {{ row.status === 'active' ? '关闭显示' : '开启显示'}}
+ 删除
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index c1a3dd8..cbe0493 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -14,6 +14,15 @@ export const asyncRoutes: RouteRecordRaw[] = [
icon: 'system-3'
}
},
+ {
+ name: 'carousal',
+ path: 'carousal',
+ component: () => import('@/pages/carousal/index.vue'),
+ meta: {
+ title: '轮播图管理',
+ icon: 'system-3'
+ }
+ },
]
const router = createRouter({