hookehuyr

fix 多选规则主题配置

...@@ -17,7 +17,12 @@ ...@@ -17,7 +17,12 @@
17 <template #input> 17 <template #input>
18 <van-checkbox-group v-model="item.value"> 18 <van-checkbox-group v-model="item.value">
19 <template v-for="(rule, idx) in item.component_props.rules" :key="idx"> 19 <template v-for="(rule, idx) in item.component_props.rules" :key="idx">
20 - <van-checkbox :name="idx" shape="square">{{ rule.rule_desc }}</van-checkbox> 20 + <van-checkbox
21 + :name="idx"
22 + shape="square"
23 + :checked-color="themeVars.radioColor"
24 + >{{ rule.rule_desc }}</van-checkbox
25 + >
21 <div class="rule-box" @click="showRule(rule)"> 26 <div class="rule-box" @click="showRule(rule)">
22 {{ rule.rule_link }}&nbsp;>> 27 {{ rule.rule_link }}&nbsp;>>
23 </div> 28 </div>
...@@ -43,10 +48,20 @@ ...@@ -43,10 +48,20 @@
43 </template> 48 </template>
44 49
45 <script setup> 50 <script setup>
51 +import { styleColor } from "@/constant.js";
52 +import $ from "jquery";
53 +
46 const props = defineProps({ 54 const props = defineProps({
47 item: Object, 55 item: Object,
48 }); 56 });
49 57
58 +// TAG: 自定义主题颜色
59 +const themeVars = {
60 + radioColor: styleColor.baseColor,
61 +};
62 +onMounted(() => {
63 + $(".rule-box").css("color", themeVars.radioColor);
64 +});
50 const show = ref(false); 65 const show = ref(false);
51 const checked = ref([]); 66 const checked = ref([]);
52 const showRule = (rule) => { 67 const showRule = (rule) => {
...@@ -92,7 +107,6 @@ const rules = [{ validator, message: validatorMessage }]; ...@@ -92,7 +107,6 @@ const rules = [{ validator, message: validatorMessage }];
92 font-size: 0.85rem; 107 font-size: 0.85rem;
93 margin-left: 1.8rem; 108 margin-left: 1.8rem;
94 padding-bottom: 0.5rem; 109 padding-bottom: 0.5rem;
95 - color: #1989fa;
96 } 110 }
97 } 111 }
98 .rule-wrapper { 112 .rule-wrapper {
......