PC网页适配SpecialVideo自动铺满宫格
This commit is contained in:
parent
05d932586c
commit
56e3180c32
|
@ -32,8 +32,7 @@
|
||||||
:y="
|
:y="
|
||||||
$refs.wall?.parentElement?.offsetTop +
|
$refs.wall?.parentElement?.offsetTop +
|
||||||
$refs.wall_content?.offsetTop +
|
$refs.wall_content?.offsetTop +
|
||||||
item.y * wall_content_client_height +
|
item.y * wall_content_client_height
|
||||||
$store.state.wall_row / ($store.state.landspace ? 2 : 1)
|
|
||||||
"
|
"
|
||||||
:zIndex="
|
:zIndex="
|
||||||
1 +
|
1 +
|
||||||
|
@ -77,6 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-show="$store.state.power_state"
|
v-show="$store.state.power_state"
|
||||||
|
id="wall_grids"
|
||||||
ref="wall_grids"
|
ref="wall_grids"
|
||||||
@touchstart="$store.commit('setSelectedWindow', '')"
|
@touchstart="$store.commit('setSelectedWindow', '')"
|
||||||
>
|
>
|
||||||
|
@ -579,15 +579,7 @@ export default defineComponent({
|
||||||
rect.height = rect.height ?? 0;
|
rect.height = rect.height ?? 0;
|
||||||
rect.left = rect.left ?? 0;
|
rect.left = rect.left ?? 0;
|
||||||
rect.top = rect.top ?? 0;
|
rect.top = rect.top ?? 0;
|
||||||
// moveWindow(window_id, evt);
|
|
||||||
if (wall.value) {
|
if (wall.value) {
|
||||||
// GlobalData.getInstance()
|
|
||||||
// .getCurrentClient()
|
|
||||||
// ?.resizeWindow(
|
|
||||||
// window_id,
|
|
||||||
// evt.width / wall.value.clientWidth,
|
|
||||||
// evt.height / wall.value.clientHeight
|
|
||||||
// );
|
|
||||||
const x =
|
const x =
|
||||||
rect.left -
|
rect.left -
|
||||||
(wall.value.parentElement?.offsetLeft ?? 0) -
|
(wall.value.parentElement?.offsetLeft ?? 0) -
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
v-if="$store.state.power_state && show_windows_flag"
|
v-if="$store.state.power_state && show_windows_flag"
|
||||||
>
|
>
|
||||||
<vue3-resize-drag
|
<vue3-resize-drag
|
||||||
:w="item.width * ($refs.wall?.clientWidth ?? 0)"
|
:w="item.width * ($refs.wall?.offsetWidth ?? 0)"
|
||||||
:h="item.height * ($refs.wall?.clientHeight ?? 0)"
|
:h="item.height * ($refs.wall?.offsetHeight ?? 0)"
|
||||||
:x="
|
:x="
|
||||||
($refs.wall?.parentElement?.offsetLeft ?? 0) +
|
($refs.wall?.parentElement?.offsetLeft ?? 0) +
|
||||||
($refs.wall?.offsetLeft ?? 0) +
|
($refs.wall?.offsetLeft ?? 0) +
|
||||||
item.x * ($refs.wall?.clientWidth ?? 0)
|
item.x * ($refs.wall?.offsetWidth ?? 0)
|
||||||
"
|
"
|
||||||
:y="
|
:y="
|
||||||
($refs.wall?.parentElement?.offsetTop ?? 0) +
|
($refs.wall?.parentElement?.offsetTop ?? 0) +
|
||||||
($refs.wall?.offsetTop ?? 0) +
|
($refs.wall?.offsetTop ?? 0) +
|
||||||
item.y * ($refs.wall?.clientHeight ?? 0)
|
item.y * ($refs.wall?.offsetHeight ?? 0)
|
||||||
"
|
"
|
||||||
:zIndex="
|
:zIndex="
|
||||||
$store.state.windows_sort.findIndex((element) => element == item.uuid)
|
$store.state.windows_sort.findIndex((element) => element == item.uuid)
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
</vue3-resize-drag>
|
</vue3-resize-drag>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
id="wall_grids"
|
||||||
ref="wall_grids"
|
ref="wall_grids"
|
||||||
@click="onWallGridsClick"
|
@click="onWallGridsClick"
|
||||||
v-if="$store.state.power_state"
|
v-if="$store.state.power_state"
|
||||||
|
@ -286,8 +287,9 @@ export default defineComponent({
|
||||||
const item_height = ref(0);
|
const item_height = ref(0);
|
||||||
|
|
||||||
const calcWallItemWH = () => {
|
const calcWallItemWH = () => {
|
||||||
item_witdh.value =
|
item_witdh.value = Math.floor(
|
||||||
wall?.value?.parentElement?.offsetWidth ?? 0 / wall_cols.value;
|
(wall?.value?.parentElement?.offsetWidth ?? 0) / wall_cols.value
|
||||||
|
);
|
||||||
if (wall.value && wall.value.parentElement) {
|
if (wall.value && wall.value.parentElement) {
|
||||||
if ($store.state.isSpecialVideo()) {
|
if ($store.state.isSpecialVideo()) {
|
||||||
const screen_info = SpecialVideoHelper.getScreenInfo(
|
const screen_info = SpecialVideoHelper.getScreenInfo(
|
||||||
|
@ -319,9 +321,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
item_witdh.value =
|
item_witdh.value =
|
||||||
Math.ceil(item_witdh.value + wall_cols.value) & ~wall_cols.value;
|
Math.ceil(item_witdh.value - wall_cols.value) & ~wall_cols.value;
|
||||||
item_height.value =
|
item_height.value =
|
||||||
Math.ceil(item_height.value + wall_rows.value) & ~wall_rows.value;
|
Math.ceil(item_height.value - wall_rows.value) & ~wall_rows.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const wallMouseDown = (evt: MouseEvent) => {
|
const wallMouseDown = (evt: MouseEvent) => {
|
||||||
|
@ -739,9 +741,9 @@ export default defineComponent({
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.setWindowGeometry(
|
?.setWindowGeometry(
|
||||||
window_id,
|
window_id,
|
||||||
x / wall.value.clientWidth,
|
x / wall.value.offsetWidth,
|
||||||
y / wall.value.clientHeight,
|
y / wall.value.clientHeight,
|
||||||
rect.width / wall.value.clientWidth,
|
rect.width / wall.value.offsetWidth,
|
||||||
rect.height / wall.value.clientHeight
|
rect.height / wall.value.clientHeight
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue