forked from zhongyidian/super_video
feat: 添加 Husky 和 commit 限制配置
This commit is contained in:
commit
27e0c23b3f
125 files changed
+5760
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
按钮组件
|
||||
传入背景图片
|
||||
-->
|
||||
|
||||
<template>
|
||||
<img class="cursor-pointer" :src="getStaticImage(image)" @click="handleClick" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getStaticImage } from '@/utils'
|
||||
import { useRouter, type RouteLocationRaw } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const props = defineProps<{
|
||||
image: string
|
||||
path?: RouteLocationRaw
|
||||
}>()
|
||||
|
||||
const handleClick = () => {
|
||||
if (props.path) {
|
||||
router.push(props.path)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
import ImgButton from './ImgButton.vue'
|
||||
|
||||
export { ImgButton }
|
||||
Reference in new issue
Block a user