fix:填空题题目设置字数最小,单行行数设置
This commit is contained in:
@@ -87,8 +87,7 @@
|
||||
input-align="right"
|
||||
class="action-field"
|
||||
placeholder="不限"
|
||||
:max="Number(actionQuestion.config.max)"
|
||||
@blur="emit('saveOption')"
|
||||
@blur="minVaule"
|
||||
@update:model-value="
|
||||
(value) => {
|
||||
actionQuestion.config.min = value;
|
||||
@@ -132,7 +131,7 @@
|
||||
v-model="actionQuestion.config.line_type"
|
||||
icon-size="0.4rem"
|
||||
direction="horizontal"
|
||||
@change="emit('saveOption')"
|
||||
@change="editLineHeight"
|
||||
>
|
||||
<van-radio :name="0">单行</van-radio>
|
||||
<van-radio :name="1">多行</van-radio>
|
||||
@@ -246,6 +245,22 @@ const confirm = ({ selectedValues }) => {
|
||||
selectTextTypeModel.value = false;
|
||||
emit('saveOption');
|
||||
};
|
||||
const minVaule = (e) => {
|
||||
console.log(actionQuestion.value.config.max);
|
||||
if (actionQuestion.value.config.max) {
|
||||
console.log(111);
|
||||
if (Number(e.target.value) > Number(actionQuestion.value.config.max)) {
|
||||
actionQuestion.value.config.min = actionQuestion.value.config.max;
|
||||
}
|
||||
}
|
||||
emit('saveOption');
|
||||
};
|
||||
const editLineHeight = () => {
|
||||
if (actionQuestion.value.config.line_type == 0) {
|
||||
actionQuestion.value.config.line_height = 1;
|
||||
}
|
||||
emit('saveOption');
|
||||
};
|
||||
|
||||
const actionQuestion = computed({
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user