布局添加1X5

This commit is contained in:
fangxiang 2022-09-28 15:00:17 +08:00
parent dca4010f1b
commit 67b41ece63
2 changed files with 27 additions and 6 deletions

View File

@ -150,7 +150,7 @@
emit-value emit-value
map-options map-options
v-model="item_data.rotation" v-model="item_data.rotation"
:options="[0, 90, 270]" :options="[0, 90, 180, 270]"
:label="$t('multimedia rotation')" :label="$t('multimedia rotation')"
:hint="$t('please select multimedia rotation')" :hint="$t('please select multimedia rotation')"
@update:model-value="onSelected" @update:model-value="onSelected"
@ -646,7 +646,6 @@ export default defineComponent({
setMediaUrlLabel(item_data.window_type); setMediaUrlLabel(item_data.window_type);
} }
console.log(item_data);
show_dialog.value = true; show_dialog.value = true;
}, },
resetData() { resetData() {

View File

@ -111,10 +111,31 @@ export default defineComponent({
let loading = ref(false); let loading = ref(false);
let layout = ref("1X3"); let layout = ref("1X3");
const select_options = ["1X3", "1X4", "1X6", "3X1", "4X1", "6X1"]; const row_values: number[] = [];
const row_values = [1, 1, 1, 3, 4, 6]; const col_values: number[] = [];
const col_values = [3, 4, 6, 1, 1, 1]; const select_options: string[] = [];
const rotation_options = ref(["0", "90", "180"]);
//
{
const target_row_col_values = [3, 4, 5, 6];
for (let i = 0; i < target_row_col_values.length; ++i) {
row_values.push(1);
col_values.push(target_row_col_values[i]);
select_options.push(row_values[i] + "X" + col_values[i]);
}
for (let i = 0; i < target_row_col_values.length; ++i) {
row_values.push(target_row_col_values[i]);
col_values.push(1);
select_options.push(
row_values[target_row_col_values.length + i] +
"X" +
col_values[target_row_col_values.length + i]
);
}
}
const rotation_options = ref(["0", "90", "180", "270"]);
const rotation = ref("0"); const rotation = ref("0");
rotation.value = rotation.value =
@ -175,6 +196,7 @@ export default defineComponent({
case "0": case "0":
case "90": case "90":
case "180": case "180":
case "270":
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
?.setSpecialVideoLayoutRotation(rotation.value ?? "0"); ?.setSpecialVideoLayoutRotation(rotation.value ?? "0");