feat:试销验证部分功能
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<ConfigTitle :quiz-index="copyConfig.title" :title="title" />
|
||||
<div class="choice-config">
|
||||
<div class="choice-config-inline">
|
||||
<div
|
||||
class="choice-config-inline"
|
||||
:class="{ 'choice-config-inline-disable': disableUpdateBtn }"
|
||||
>
|
||||
<span class="choice-config-label">此题必答</span>
|
||||
<a-switch
|
||||
v-model:checked="copyConfig.config.is_required"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="disableUpdateBtn"
|
||||
@change="switchChange"
|
||||
/>
|
||||
</div>
|
||||
@@ -31,6 +35,9 @@ export default {
|
||||
const copyConfig = computed(() => {
|
||||
return reactive(JSON.parse(JSON.stringify(props.config)));
|
||||
});
|
||||
const disableUpdateBtn = computed(() => {
|
||||
return props.config.permissions?.disable_update || false;
|
||||
});
|
||||
const title = computed(() => {
|
||||
const type = copyConfig.value?.config.quick_type || 0;
|
||||
const str =
|
||||
@@ -42,6 +49,7 @@ export default {
|
||||
};
|
||||
return {
|
||||
copyConfig,
|
||||
disableUpdateBtn,
|
||||
title,
|
||||
switchChange,
|
||||
};
|
||||
@@ -62,6 +70,13 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
&-disable {
|
||||
color: #8c8c8c;
|
||||
}
|
||||
&::v-deep .ant-switch-disabled {
|
||||
background-color: #d5ebc3;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&-label {
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user