Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-06-17 13:32:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77804a41751300d5bdfda2b4bbc41570a00c977a
77804a41
1 parent
e95b96c5
fix 修复多选规则组件只读状态显示问题
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/components/MultiRuleField/index.vue
src/components/MultiRuleField/index.vue
View file @
77804a4
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-1
3 15:31:34
* @LastEditTime: 2024-06-1
7 13:29:52
* @FilePath: /data-table/src/components/MultiRuleField/index.vue
* @Description: 多选规则确认控件
-->
...
...
@@ -17,7 +17,12 @@
<van-checkbox-group v-model="item.value" style="width: 100%">
<template v-for="(rule, idx) in item.component_props.options" :key="idx">
<div class="multi-rule-field-box">
<div v-if="item.component_props.readonly">
<div v-if="checkbox_value.includes(rule.value)" role="checkbox" class="van-checkbox van-checkbox--vertical" tabindex="0" aria-checked="true" data-v-3722f8ba="" style="margin-bottom: 0.25rem;"><div class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success" style="border-color: rgb(194, 145, 95); background-color: rgb(194, 145, 95);"></i></div><span class="van-checkbox__label">{{ rule.title }}</span></div>
<div v-else role="checkbox" class="van-checkbox van-checkbox--vertical" tabindex="0" aria-checked="false" data-v-3722f8ba="" style="margin-bottom: 0.25rem;"><div class="van-checkbox__icon van-checkbox__icon--square" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success" style=""></i></div><span class="van-checkbox__label">{{ rule.title }}</span></div>
</div>
<van-checkbox
v-else
:name="rule.value"
shape="square"
:checked-color="themeVars.radioColor"
...
...
@@ -67,6 +72,7 @@ const HideShow = computed(() => {
const themeVars = {
radioColor: styleColor.baseColor,
};
const checkbox_value = ref(props.item.component_props.default);
onMounted(() => {
$(".rule-box").css("color", themeVars.radioColor);
// 默认值
...
...
Please
register
or
login
to post a comment