Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
upangka committed Oct 12, 2022
1 parent 304c0cc commit f6d7d4c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/components/icons/NextIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<i class="iconfont icon-next"></i>
</template>
3 changes: 3 additions & 0 deletions src/components/icons/PrevIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<i class="iconfont icon-lunbo"></i>
</template>
9 changes: 5 additions & 4 deletions src/components/libraries/carousel/CarouselComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</ul>

<a href="javascript:void(0)" class="prev" @click="toggle(false)">
<i class="iconfont icon-lunbo"></i
></a>
<PrevIcon></PrevIcon>
</a>
<a href="javascript:void(0)" class="next" @click="toggle(true)">
<i class="iconfont icon-next"></i
></a>
<NextIcon></NextIcon>
</a>
<div class="indicator">
<span
v-for="i in dotCount"
Expand All @@ -28,6 +28,7 @@
<script lang="ts" setup>
import { onUnmounted, computed, watch, ref } from "vue"
import type { Banner } from "@/types/category/Banner"
import NextIcon from "../../icons/NextIcon.vue"
interface Props {
slides: Banner[]
Expand Down
6 changes: 6 additions & 0 deletions src/components/libraries/more/LookMore.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<RouterLink to="/">
<span>查看全部</span>
<NextIcon></NextIcon>
</RouterLink>
</template>
13 changes: 10 additions & 3 deletions src/plugins/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/**
* 该插件用于安装组件
*/
import type { App } from "vue"

import SkeletonComponent from "@/components/libraries/skeleton/SkeletonComponent.vue"
import CarouselComponent from "@/components/libraries/carousel/CarouselComponent.vue"
import type { App } from "vue"
import NextIcon from "@/components/icons/NextIcon.vue"
import PrevIcon from "@/components/icons/PrevIcon.vue"
import LookMore from "@/components/libraries/more/LookMore.vue"

const UIPlugin = {
install(app: App) {
app.component("SkeletonComponent", SkeletonComponent),
app.component("CarouselComponent", CarouselComponent)
app.component("SkeletonComponent", SkeletonComponent)
app.component("CarouselComponent", CarouselComponent)
app.component("LookMore", LookMore)
app.component("NextIcon", NextIcon)
app.component("PrevIcon", PrevIcon)
},
}

Expand Down

0 comments on commit f6d7d4c

Please sign in to comment.