This commit is contained in:
李想 2025-04-17 14:08:26 +08:00
parent c969d924fc
commit 593222567a
3 changed files with 18 additions and 2 deletions

View File

@ -22,7 +22,7 @@
</el-upload>
<el-dialog :visible.sync="dialogVisible" title="预览" width="500" append-to-body>
<video controls autoplay :src="'/dev-api' + dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto; height: 400px"></video>
<video controls autoplay :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto; height: 400px"></video>
</el-dialog>
</div>
</template>

View File

@ -70,7 +70,10 @@ import {
//日历组建
import VCalendar from 'v-calendar';
import { fileUrl } from '@/utils/filesAssist';
if (fileUrl) {
Vue.prototype.$fileUrl = fileUrl;
}
// datav组件 ,会导致生成文件无法打开
Vue.use(loading);
Vue.use(borderBox13);

13
src/utils/filesAssist.js Normal file
View File

@ -0,0 +1,13 @@
/**
* @param {String | null |undefined}}
* @return {String}
*/
export function fileUrl(url = '') {
console.log('_url', url);
let _url = url;
if (!_url.startsWith('http')) {
_url = window.location.origin + _url;
}
return _url;
}