|
@@ -12,38 +12,31 @@
|
|
|
class="video-item"
|
|
|
x5-video-player-type="h5-page"
|
|
|
controlslist="nodownload"
|
|
|
- disablepictureinpicture=""
|
|
|
+ disable-picture-in-picture
|
|
|
webkit-playsinline=""
|
|
|
x-webkit-airplay=""
|
|
|
- playsinline=""
|
|
|
+ playsinline
|
|
|
:controls="controls"
|
|
|
autoplay
|
|
|
- :src="common.changeUrl(i.src)"
|
|
|
+ :src="changeUrl(i.src)"
|
|
|
></video>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup>
|
|
|
- import {
|
|
|
- reactive,
|
|
|
- toRefs,
|
|
|
- onBeforeMount,
|
|
|
- onMounted,
|
|
|
- nextTick,
|
|
|
- ref,
|
|
|
- computed,
|
|
|
- defineProps,
|
|
|
- } from 'vue';
|
|
|
- import { useStore } from 'vuex';
|
|
|
- import { custom } from '../constant.js';
|
|
|
- import { getApp, useApp } from '@/app';
|
|
|
- import common from '@/utils/common';
|
|
|
- import { Dialog } from '@/global_components';
|
|
|
- const videoNum = ref(0);
|
|
|
- const store = useStore();
|
|
|
- const type = ref('video');
|
|
|
- const hotData = computed(() => store.getters['tag/hotData']);
|
|
|
+<script setup lang="ts">
|
|
|
+ import { onMounted, nextTick, ref, computed, defineProps } from 'vue';
|
|
|
+ import { changeUrl } from '../common';
|
|
|
+ import { tagType } from '/@/store/modules/scene';
|
|
|
+
|
|
|
+ // const videoNum = ref(0);
|
|
|
+ // const type = ref('video');
|
|
|
+ // const hotData = computed(() => store.getters['tag/hotData']);
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
+ data: {
|
|
|
+ type: Object,
|
|
|
+ default: {} as any as tagType,
|
|
|
+ },
|
|
|
controls: {
|
|
|
type: Boolean,
|
|
|
default: true,
|
|
@@ -55,17 +48,10 @@
|
|
|
});
|
|
|
const loading = ref(true);
|
|
|
|
|
|
- const isEdit = computed(() => store.getters['tag/isEdit']);
|
|
|
const videoSrc = computed(() => {
|
|
|
- return hotData.value.media.video;
|
|
|
+ return props.data.media.video;
|
|
|
});
|
|
|
- const delVideo = () => {
|
|
|
- store.commit('tag/delMetas', { type: type.value, index: videoNum.value });
|
|
|
- };
|
|
|
|
|
|
- const initVideo = (file) => {
|
|
|
- store.commit('tag/setVideo', file);
|
|
|
- };
|
|
|
const filesError = (file) => {
|
|
|
loading.value = false;
|
|
|
// Dialog.toast({
|