|
@@ -97,6 +97,7 @@ export default defineComponent({
|
|
videoRef.value.forEach((item: any, child: any) => {
|
|
videoRef.value.forEach((item: any, child: any) => {
|
|
if (child !== index) {
|
|
if (child !== index) {
|
|
item?.onStop();
|
|
item?.onStop();
|
|
|
|
+ item?.onExitScreen();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -109,14 +110,26 @@ export default defineComponent({
|
|
(window.document.body.clientWidth || window.document.body.offsetWidth) +
|
|
(window.document.body.clientWidth || window.document.body.offsetWidth) +
|
|
'px'
|
|
'px'
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ onChnageLeftWidth(forms.index - 1);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ const onChnageLeftWidth = (index: number) => {
|
|
|
|
+ document.documentElement.style.setProperty(
|
|
|
|
+ '--window-page-position-left',
|
|
|
|
+ (window.document.body.clientWidth || window.document.body.offsetWidth) *
|
|
|
|
+ index +
|
|
|
|
+ 'px'
|
|
|
|
+ );
|
|
|
|
+ };
|
|
|
|
+
|
|
watch(
|
|
watch(
|
|
() => props.show,
|
|
() => props.show,
|
|
() => {
|
|
() => {
|
|
forms.show = props.show;
|
|
forms.show = props.show;
|
|
forms.index = props.startPosition + 1;
|
|
forms.index = props.startPosition + 1;
|
|
forms.preLoading = props.show;
|
|
forms.preLoading = props.show;
|
|
|
|
+ onChnageLeftWidth(props.startPosition);
|
|
// console.log(forms.preLoading, 'show');
|
|
// console.log(forms.preLoading, 'show');
|
|
// nextTick(() => {
|
|
// nextTick(() => {
|
|
// // 判断打开的内容是否为视频,是则自动播放
|
|
// // 判断打开的内容是否为视频,是则自动播放
|
|
@@ -139,6 +152,7 @@ export default defineComponent({
|
|
() => props.startPosition,
|
|
() => props.startPosition,
|
|
() => {
|
|
() => {
|
|
forms.index = props.startPosition + 1;
|
|
forms.index = props.startPosition + 1;
|
|
|
|
+ onChnageLeftWidth(props.startPosition);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
@@ -184,11 +198,11 @@ export default defineComponent({
|
|
: 'var(--van-padding-md)'
|
|
: 'var(--van-padding-md)'
|
|
}}
|
|
}}
|
|
onClick={() => {
|
|
onClick={() => {
|
|
- console.log(
|
|
|
|
- forms.index,
|
|
|
|
- 'index',
|
|
|
|
- props.images[forms.index - 1]
|
|
|
|
- );
|
|
|
|
|
|
+ // console.log(
|
|
|
|
+ // forms.index,
|
|
|
|
+ // 'index',
|
|
|
|
+ // props.images[forms.index - 1]
|
|
|
|
+ // );
|
|
|
|
|
|
onSave(props.images[forms.index - 1]);
|
|
onSave(props.images[forms.index - 1]);
|
|
}}
|
|
}}
|
|
@@ -208,6 +222,7 @@ export default defineComponent({
|
|
forms.index = index + 1;
|
|
forms.index = index + 1;
|
|
// forms.preLoading = true;
|
|
// forms.preLoading = true;
|
|
onPlay(index);
|
|
onPlay(index);
|
|
|
|
+ onChnageLeftWidth(index);
|
|
}}
|
|
}}
|
|
lazyRender>
|
|
lazyRender>
|
|
{props.images.map((url: string, index: number) => (
|
|
{props.images.map((url: string, index: number) => (
|
|
@@ -248,8 +263,8 @@ export default defineComponent({
|
|
src={url}
|
|
src={url}
|
|
onPlay={() => onPlay(index)}
|
|
onPlay={() => onPlay(index)}
|
|
preLoading={false}
|
|
preLoading={false}
|
|
- onEnterfullscreen={() => (forms.showButton = false)}
|
|
|
|
- onExitfullscreen={() => (forms.showButton = true)}
|
|
|
|
|
|
+ // onEnterfullscreen={() => (forms.showButton = false)}
|
|
|
|
+ // onExitfullscreen={() => (forms.showButton = true)}
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
)}
|
|
)}
|