Merge branch 'feature/feature-20250430-h5' of https://e.coding.yili.com/yldc/ylst/ylst-survey-h5 into feature/feature-20250430-h5

This commit is contained in:
Huangzhe
2025-05-27 16:40:09 +08:00
3 changed files with 10 additions and 9 deletions

View File

@@ -34,15 +34,15 @@ function handleTouchMove(event: TouchEvent) {
watch( watch(
() => data.value, () => data.value,
(newVal) => { (newVal) => {
let width = document.getElementsByClassName('doc_content')[0]?.clientWidth
? document.getElementsByClassName('doc_content')[0]?.clientWidth
: document.body.clientWidth;
tableWidth.value = prop.value.length * 100; tableWidth.value = prop.value.length * 100;
if (prop.value.length <= 3) { if (prop.value.length <= 3) {
// tableWidth.value 判断是否铺满横屏 没有就铺满 // tableWidth.value 判断是否铺满横屏 没有就铺满
tableWidth.value = document.documentElement.clientWidth - 60; tableWidth.value = width;
} else { } else {
tableWidth.value = tableWidth.value = width - prop.value.length * 100 > 0 ? width : prop.value.length * 100;
document.documentElement.clientWidth - 60 - prop.value.length * 100 > 0
? document.documentElement.clientWidth
: prop.value.length * 100;
} }
}, },
{ {
@@ -58,6 +58,7 @@ watch(
ref="doc_content" ref="doc_content"
@touchstart="handleTouchStart" @touchstart="handleTouchStart"
@touchmove="handleTouchMove" @touchmove="handleTouchMove"
class="doc_content"
> >
<div <div
:style="{ :style="{

View File

@@ -13,7 +13,7 @@ export default {
select_random: 0, select_random: 0,
min_number: 1, min_number: 1,
max_number: 1, max_number: 1,
min_size: 0, min_size: 1,
max_size: 1, max_size: 1,
is_file: 0, is_file: 0,
file_type: '0' file_type: '0'

View File

@@ -53,12 +53,12 @@
input-align="right" input-align="right"
class="action-field" class="action-field"
placeholder="0" placeholder="0"
:min="0" :min="1"
:max="actionQuestion.config.max_size" :max="actionQuestion.config.max_size"
@blur="handleMinSizeBlur" @blur="handleMinSizeBlur"
@update:model-value=" @update:model-value="
(value) => { (value) => {
actionQuestion.config.min_size = value === '' ? 0 : value; actionQuestion.config.min_size = value === '' ? 1 : value;
} }
" "
> >
@@ -78,7 +78,7 @@
@blur="handleMaxSizeBlur" @blur="handleMaxSizeBlur"
@update:model-value=" @update:model-value="
(value) => { (value) => {
actionQuestion.config.max_size = value === '' ? 0 : value; actionQuestion.config.max_size = value === '' ? 1 : value;
} }
" "
> >