Showing
1 changed file
with
6 additions
and
2 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-30 11:34:19 | 2 | * @Date: 2022-08-30 11:34:19 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-05-27 14:27:25 | 4 | + * @LastEditTime: 2024-06-06 15:17:01 |
| 5 | * @FilePath: /data-table/src/components/RadioField/index.vue | 5 | * @FilePath: /data-table/src/components/RadioField/index.vue |
| 6 | * @Description: 单项选择控件 | 6 | * @Description: 单项选择控件 |
| 7 | --> | 7 | --> |
| ... | @@ -17,7 +17,11 @@ | ... | @@ -17,7 +17,11 @@ |
| 17 | <van-radio-group @change="onChange(item)" v-model="radio_value" :direction="item.component_props.direction" | 17 | <van-radio-group @change="onChange(item)" v-model="radio_value" :direction="item.component_props.direction" |
| 18 | style="width: 100%"> | 18 | style="width: 100%"> |
| 19 | <div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper"> | 19 | <div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper"> |
| 20 | - <van-radio :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor" | 20 | + <div v-if="item.component_props.readonly" class="readonly-show"> |
| 21 | + <div v-if="item.component_props.default === x.value" role="radio" class="van-radio van-radio--vertical" tabindex="0" aria-checked="true" data-v-04873bb2="" style="margin-bottom: 0.25rem;"><div class="van-radio__icon van-radio__icon--round van-radio__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-radio__label">{{ x.title }}</span></div> | ||
| 22 | + <div v-else role="radio" class="van-radio van-radio--vertical" tabindex="0" aria-checked="false" data-v-04873bb2="" style="margin-bottom: 0.25rem;"><div class="van-radio__icon van-radio__icon--round" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success"><!----><!----><!----></i></div><span class="van-radio__label">{{ x.title }}</span></div> | ||
| 23 | + </div> | ||
| 24 | + <van-radio v-else :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor" | ||
| 21 | style="margin-bottom: 0.25rem">{{ x.title }}</van-radio> | 25 | style="margin-bottom: 0.25rem">{{ x.title }}</van-radio> |
| 22 | <div v-if="x.desc_text" class="van-multi-ellipsis--l3 rule-desc-text">{{ x.desc_text }}</div> | 26 | <div v-if="x.desc_text" class="van-multi-ellipsis--l3 rule-desc-text">{{ x.desc_text }}</div> |
| 23 | <div v-if="x.desc_type === 'text'" class="rule-box" @click="showRule(x)"> | 27 | <div v-if="x.desc_type === 'text'" class="rule-box" @click="showRule(x)"> | ... | ... |
-
Please register or login to post a comment