diff --git a/components.d.ts b/components.d.ts index 99c6524..060eda8 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,7 +8,20 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + HomeGoodsItem: typeof import('./components/guyu-home-container/home-goods-item.vue')['default'] + HomeNotice: typeof import('./components/guyu-home-container/home-notice.vue')['default'] + HomeRecommend: typeof import('./components/guyu-home-container/home-recommend.vue')['default'] + HomeSearch: typeof import('./components/guyu-home-container/home-search.vue')['default'] + HomeSwiper: typeof import('./components/guyu-home-container/home-swiper.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + ZPaging: typeof import('./components/z-paging/z-paging.vue')['default'] + ZPagingCell: typeof import('./components/z-paging-cell/z-paging-cell.vue')['default'] + ZPagingEmptyView: typeof import('./components/z-paging-empty-view/z-paging-empty-view.vue')['default'] + ZPagingLoadMore: typeof import('./components/z-paging/components/z-paging-load-more.vue')['default'] + ZPagingRefresh: typeof import('./components/z-paging/components/z-paging-refresh.vue')['default'] + ZPagingSwiper: typeof import('./components/z-paging-swiper/z-paging-swiper.vue')['default'] + ZPagingSwiperItem: typeof import('./components/z-paging-swiper-item/z-paging-swiper-item.vue')['default'] + ZTabs: typeof import('./components/z-tabs/z-tabs.vue')['default'] } } diff --git a/components/guyu-home-container/home-goods-item.vue b/components/guyu-home-container/home-goods-item.vue new file mode 100644 index 0000000..42e5923 --- /dev/null +++ b/components/guyu-home-container/home-goods-item.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/components/guyu-home-container/home-notice.vue b/components/guyu-home-container/home-notice.vue new file mode 100644 index 0000000..f619126 --- /dev/null +++ b/components/guyu-home-container/home-notice.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/components/guyu-home-container/home-recommend.vue b/components/guyu-home-container/home-recommend.vue new file mode 100644 index 0000000..8424787 --- /dev/null +++ b/components/guyu-home-container/home-recommend.vue @@ -0,0 +1,34 @@ + + + + + \ No newline at end of file diff --git a/components/guyu-home-container/home-search.vue b/components/guyu-home-container/home-search.vue new file mode 100644 index 0000000..e6edbbe --- /dev/null +++ b/components/guyu-home-container/home-search.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/components/guyu-home-container/home-swiper.vue b/components/guyu-home-container/home-swiper.vue new file mode 100644 index 0000000..7bde089 --- /dev/null +++ b/components/guyu-home-container/home-swiper.vue @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/pages/home/home-page.vue b/pages/home/home-page.vue index c758b18..5634caf 100644 --- a/pages/home/home-page.vue +++ b/pages/home/home-page.vue @@ -1,58 +1,16 @@ @@ -115,6 +38,12 @@ import { preloadHomeData, refreshHomeData } from '@/common/server/home'; +import HomeSearch from '@/components/guyu-home-container/home-search.vue'; +import HomeNotice from '@/components/guyu-home-container/home-notice.vue'; +import HomeSwiper from '@/components/guyu-home-container/home-swiper.vue'; +import HomeRecommend from '@/components/guyu-home-container/home-recommend.vue'; +import HomeGoodsItem from '@/components/guyu-home-container/home-goods-item.vue'; + onLoad(() => { }); @@ -123,57 +52,7 @@ onMounted(() => { if (!homeData.value) preloadHomeData(); }); const currendIndex = ref(0); -const swiperList = ref([1, 2, 3, 4]); -const dataList = reactive([ - { - id: 1, - title: "坂本日常", - color: "#90BB76", - url: "" - }, - { - id: 1, - title: "坂本日常", - color: "#FDA6AA", - url: "" - }, - { - id: 1, - title: "坂本日常", - color: "#96ABEB", - url: "" - }, - { - id: 1, - title: "坂本日常", - color: "#F9D051", - url: "" - } -]); - -const tabList = reactive([ - { - id: 1, - title: "全部" - }, - { - id: 1, - title: "吧唧" - }, - { - id: 1, - title: "立牌" - }, - { - id: 1, - title: "色纸" - }, - { - id: 1, - title: "拍立得" - } -]); const goodsLsit = reactive([ { @@ -283,21 +162,6 @@ const toDetails = (id) => { flex-direction: column; position: relative; align-items: center; - -} - -.news-text { - width: 600rpx; - height: 57.64rpx; - display: flex; - align-items: center; - margin-left: 18rpx; - padding-top: 20rpx; - - ::v-deep.uni-noticebar__content-text { - font-size: 22.22rpx; - font-family: "JiangChengYuanTi-300W", sans-serif; - } } .grid-container { diff --git a/vite.config.js b/vite.config.js index dedeb30..0725d95 100644 --- a/vite.config.js +++ b/vite.config.js @@ -69,7 +69,7 @@ export default defineConfig({ // 自动导入组件 Components({ dirs: [ - 'components/guyu-container', + 'components/**/*', ], // 指定组件目录 extensions: ['vue'], dts: true, // 生成类型声明文件(可选)