Skip to content

Commit 629a782

Browse files
committed
feat: github task checkbox
1 parent c0d6e71 commit 629a782

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

packages/docs/guide/support/bilibili.md

+6
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,11 @@ interface Props {
7070
* 尺寸比例
7171
*/
7272
ratio?: number
73+
74+
/**
75+
* 是否展示封面
76+
* @default true
77+
*/
78+
poster: boolean
7379
}
7480
```

packages/theme/src/client/components/Bili.vue

+11-4
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,31 @@ interface Props {
3939
* 尺寸比例
4040
*/
4141
ratio?: number
42+
43+
/**
44+
* 是否展示封面
45+
* @default true
46+
*/
47+
poster: boolean
4248
}
4349
const props = withDefaults(defineProps<Props>(), {
44-
ratio: 16 / 9
50+
ratio: 16 / 9,
51+
poster: true
4552
});
4653
4754
const VIDEO_LINK = 'https://player.bilibili.com/player.html';
4855
const { el, width, height, resize } = useSize<HTMLIFrameElement>(props);
4956
const loaded = ref(false);
5057
5158
const videoLink = computed(() => {
52-
const { aid, bvid, cid, autoplay, time, page } = props;
59+
const { aid, bvid, cid, autoplay, time, page, poster } = props;
5360
5461
return aid && cid
5562
? `${VIDEO_LINK}?aid=${aid}&cid=${cid}&t=${time}&autoplay=${
5663
autoplay ? 1 : 0
57-
}&p=${page}`
64+
}&p=${page}&poster=${poster ? 1 : 0}`
5865
: bvid
59-
? `${VIDEO_LINK}?bvid=${bvid}&t=${time}&autoplay=${autoplay ? 1 : 0}`
66+
? `${VIDEO_LINK}?bvid=${bvid}&t=${time}&autoplay=${autoplay ? 1 : 0}&poster=${poster ? 1 : 0}`
6067
: '';
6168
});
6269

0 commit comments

Comments
 (0)