Skip to content

Commit

Permalink
chore: 统一格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
wangrongding committed Apr 18, 2024
1 parent c5ef61e commit 6c94435
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/components/ThemeSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- sun icon -->
<svg
class="swap-off fill-current w-10 h-10"
class="swap-off h-10 w-10 fill-current"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
Expand All @@ -18,7 +18,7 @@

<!-- moon icon -->
<svg
class="swap-on fill-current w-10 h-10"
class="swap-on h-10 w-10 fill-current"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
Expand Down
18 changes: 9 additions & 9 deletions src/components/bottom-panel/BottomPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ function toggleCanvasFullScreen() {
}
</script>
<template>
<div class="bottom-panel h-[300px] bg-[#17171e] pb-2 px-4 text-white flex flex-col">
<div class="bottom-panel flex h-[300px] flex-col bg-[#17171e] px-4 pb-2 text-white">
<!-- 刻度尺 -->
<div class="flex border-y justify-between border-[#272836] h-[40px] items-center gap-2">
<div class="flex h-[40px] items-center justify-between gap-2 border-y border-[#272836]">
<div class="flex gap-2">
<button class="tooltip btn-control" data-tip="撤销"><IconUndo /></button>
<button class="tooltip btn-control" data-tip="恢复"><IconRedo /></button>
<button class="tooltip btn-control" data-tip="分割"><IconCut /></button>
<button class="tooltip btn-control" data-tip="删除"><IconDelete /></button>
<button class="tooltip btn-control" data-tip="复制"><IconCopy /></button>
<button class="btn-control tooltip" data-tip="撤销"><IconUndo /></button>
<button class="btn-control tooltip" data-tip="恢复"><IconRedo /></button>
<button class="btn-control tooltip" data-tip="分割"><IconCut /></button>
<button class="btn-control tooltip" data-tip="删除"><IconDelete /></button>
<button class="btn-control tooltip" data-tip="复制"><IconCopy /></button>
</div>
<div class="flex items-center gap-2">
<button class="btn-control" @click="skipVideo(-5)"><IconPrev /></button>
Expand All @@ -53,7 +53,7 @@ function toggleCanvasFullScreen() {
<span>{{ `${formatSeconds(currentTime)} / ${formatSeconds(duration)}` }}</span>
</div>
<div class="flex gap-4">
<button class="tooltip btn-control" data-tip="放大"><IconZoomout /></button>
<button class="btn-control tooltip" data-tip="放大"><IconZoomout /></button>
<div class="flex items-center gap-2">
<input
type="range"
Expand All @@ -64,7 +64,7 @@ function toggleCanvasFullScreen() {
/>
{{ '40%' }}
</div>
<button class="tooltip btn-control" data-tip="缩小"><IconZoomin /></button>
<button class="btn-control tooltip" data-tip="缩小"><IconZoomin /></button>
<button class="tooltip" data-tip="适配到合适的大小">
<IconZoomToFit class="btn-control" />
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottom-panel/TrackList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const videoTrackList = computed<GetThumbnailBySeekOptions[]>(() => {
})
</script>
<template>
<div class="grid content-center flex-1 text-center h-full overflow-x-scroll">
<div class="grid h-full flex-1 content-center overflow-x-scroll text-center">
<div class="element-track">
<div class="flex gap-2 pl-[10px]">
<IconText />
Expand Down
8 changes: 4 additions & 4 deletions src/components/left-panel/LeftPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ const setActiveType = (id: number) => {
}
</script>
<template>
<div class="left-box w-[400px] flex bg-[#272836]">
<div class="w-[60px] bg-[#1c1c26] flex flex-col items-center">
<div class="left-box flex w-[400px] bg-[#272836]">
<div class="flex w-[60px] flex-col items-center bg-[#1c1c26]">
<div
v-for="(item, index) in typeList"
@click="setActiveType(item.id)"
:key="index"
class="h-[60px] text-sm w-[60px] hover:bg-[#272836] text-[#ababc0] hover:text-[white] select-none flex flex-col justify-center items-center cursor-pointer"
class="flex h-[60px] w-[60px] cursor-pointer select-none flex-col items-center justify-center text-sm text-[#ababc0] hover:bg-[#272836] hover:text-[white]"
:class="{ 'bg-[#272836] text-[white]': activeType === item.id }"
>
<component :is="item.icon" />
{{ item.name }}
</div>
</div>
<div class="text-white p-4 flex-1">
<div class="flex-1 p-4 text-white">
<VideoList />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/left-panel/VideoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const pause = (e: MouseEvent) => {
<p>视频素材:(开发中)</p>
<div class="grid grid-cols-2 gap-2">
<div
class="cursor-pointer video-item rounded-md relative"
class="video-item relative cursor-pointer rounded-md"
v-for="item in 10"
:key="item"
@click="addVideo(movie)"
Expand Down
4 changes: 2 additions & 2 deletions src/components/player/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ defineExpose({
<template>
<div
ref="contextMenu"
class="context-menu-container w-[200px] flex flex-col gap-1 absolute bg-[#1E1E29] border-[#505067] border text-[#D5D5E1] p-2"
class="context-menu-container absolute flex w-[200px] flex-col gap-1 border border-[#505067] bg-[#1E1E29] p-2 text-[#D5D5E1]"
>
<button
class="hover:bg-[#3B3B4F] text-left p-1 rounded-sm flex justify-between"
class="flex justify-between rounded-sm p-1 text-left hover:bg-[#3B3B4F]"
v-for="(item, index) in menuList"
:key="index"
@click="item.callback"
Expand Down
2 changes: 1 addition & 1 deletion src/views/main-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ onMounted(() => {
</button>
<dialog id="testModal" class="modal">
<div class="modal-box">
<h3 class="font-bold text-lg">Hello!</h3>
<h3 class="text-lg font-bold">Hello!</h3>
<p class="py-4">敬请期待,功能正在开发中...</p>
<div class="modal-action">
<form method="dialog">
Expand Down

0 comments on commit 6c94435

Please sign in to comment.