refactor: simplify link to bv

This commit is contained in:
YunYouJun
2022-06-05 18:30:49 +08:00
parent 8d7021bcfd
commit 34eb9b34e0
8 changed files with 1316 additions and 1169 deletions

View File

@@ -133,6 +133,7 @@ declare global {
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useDropZone: typeof import('@vueuse/core')['useDropZone']
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
const useElementHover: typeof import('@vueuse/core')['useElementHover']

View File

@@ -24,7 +24,7 @@ const triggerGtm = (val: string) => {
<template>
<a
:href="dish.link" target="_blank" class="tag rounded" p="x-2"
:href="dish.link || `https://www.bilibili.com/video/${dish.bv}`" target="_blank" class="tag rounded" p="x-2"
border="~ blue-200 dark:blue-800"
bg="blue-300 opacity-20"
@click="triggerGtm(dish.name)"

View File

@@ -133,6 +133,10 @@ export const meat: StuffItem[] = [
name: '骨头',
emoji: '🦴',
},
{
name: '鱼Todo',
emoji: '🐟',
},
]
/**

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,11 @@ export interface RecipeItem {
/**
* 链接
*/
link: string
link?: string
/**
* BiliBili video id
*/
bv?: string
/**
* 材料
*/