Skip to content

Commit 9a4f3d2

Browse files
committed
feat: v1.0.34
1 parent f6205b8 commit 9a4f3d2

File tree

4 files changed

+62
-8
lines changed

4 files changed

+62
-8
lines changed

.github/workflows/release-cdn.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # 仅在推送匹配 'v*' 的标签时触发
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Step 1: 检出代码
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
# Step 2: 设置 Node.js 环境(根据需要调整 Node.js 版本)
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '16' # 您的项目需要的 Node.js 版本
22+
23+
# Step 3: 安装依赖并构建项目
24+
- name: Install dependencies and build
25+
run: |
26+
npm install
27+
npm run build # 运行构建命令
28+
29+
# Step 4: 创建 Release 并上传构建文件
30+
- name: Create Release
31+
id: create_release
32+
uses: actions/create-release@v1
33+
with:
34+
tag_name: ${{ github.ref_name }}
35+
release_name: Release ${{ github.ref_name }}
36+
draft: false
37+
prerelease: false
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Upload Build Artifacts
42+
uses: actions/upload-release-asset@v1
43+
with:
44+
upload_url: ${{ steps.create_release.outputs.upload_url }}
45+
asset_path: ./dist # 构建输出的目录
46+
asset_name: dist.zip # 将构建的目录压缩为一个 ZIP 文件
47+
asset_content_type: application/zip

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-files-preview",
3-
"version": "1.0.33",
3+
"version": "1.0.34",
44
"private": false,
55
"description": "A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.",
66
"author": "SmallTeddy",
@@ -42,7 +42,6 @@
4242
"unpub": "npm unpublish",
4343
"pub": "cd dist && npm publish --access=public"
4444
},
45-
"jsdelivr": "",
4645
"publishConfig": {
4746
"access": "public"
4847
},
@@ -54,6 +53,7 @@
5453
"@vue-office/docx": "1.6.2",
5554
"@vue-office/excel": "1.7.8",
5655
"@vueuse/core": "11.1.0",
56+
"codemirror": "^6.0.1",
5757
"epubjs": "0.3.93",
5858
"highlight.js": "11.10.0",
5959
"markdown-it": "14.1.0",

packages/auto-imports.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-nocheck
44
// noinspection JSUnusedGlobalSymbols
55
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
67
export {}
78
declare global {
89
const EffectScope: typeof import('vue')['EffectScope']
@@ -66,6 +67,6 @@ declare global {
6667
// for type re-export
6768
declare global {
6869
// @ts-ignore
69-
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
70+
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
7071
import('vue')
7172
}

packages/preview/supports/video-preview/index.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,22 @@ onBeforeUnmount(() => {
5757
top: 0;
5858
width: 100vw !important;
5959
height: 100vh !important;
60-
overflow: auto;
60+
overflow: hidden; /* 隐藏溢出内容,保持全屏体验 */
61+
background: rgba(0, 0, 0, 0.8); /* 背景色可提高视频对比度 */
62+
display: flex; /* 使用 flexbox 来居中视频 */
63+
align-items: center; /* 垂直居中 */
64+
justify-content: center; /* 水平居中 */
6165
}
6266
6367
.player-video-main {
6468
width: 100%;
65-
object-fit: scale-down;
69+
height: auto; /* 使视频保持宽高比 */
70+
max-height: 100%; /* 限制最大高度以防溢出 */
71+
object-fit: contain; /* 保持宽高比,可能会出现黑边 */
6672
transition: .2s;
73+
}
6774
68-
&.video-mirror {
69-
transform: rotateY(180deg);
70-
}
75+
.player-video-main.video-mirror {
76+
transform: rotateY(180deg);
7177
}
7278
</style>

0 commit comments

Comments
 (0)