Skip to content

Commit ebf16b0

Browse files
authored
fix: modify radio mobile display issues (#4025)
1 parent a7bcafa commit ebf16b0

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

examples/sites/demos/pc/app/radio/dynamic-disable-composition-api.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import { TinyRadio, TinyRadioButton, TinyRadioGroup } from '@opentiny/vue'
2424
2525
const radio = ref('禁用')
2626
const radio1 = ref('6')
27-
const radio2 = ref('1')
27+
const radio2 = ref('3')
2828
const dataArr = ref([
29-
{ lable: '3', value: '备选项 1' },
29+
{ lable: '9', value: '备选项 1' },
3030
{ lable: '6', value: '备选项 2' },
31-
{ lable: '9', value: '备选项 3' }
31+
{ lable: '3', value: '备选项 3' }
3232
])
3333
</script>
3434

examples/sites/demos/pc/app/radio/dynamic-disable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export default {
3333
radio1: '6',
3434
radio2: '3',
3535
dataArr: [
36-
{ lable: '3', value: '备选项 1' },
36+
{ lable: '9', value: '备选项 1' },
3737
{ lable: '6', value: '备选项 2' },
38-
{ lable: '9', value: '备选项 3' }
38+
{ lable: '3', value: '备选项 3' }
3939
]
4040
}
4141
}

packages/vue/src/radio/src/mobile-first.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
v-bind="a($attrs, ['class', 'style', 'onClick'], true)"
2525
>
2626
<span
27+
v-if="!state.isDisplayOnly"
2728
data-tag="tiny-radio-content"
2829
:class="
2930
m(

packages/vue/src/radio/src/token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const classes = {
2-
'radio-default': 'radio inline-flex items-center leading-4 cursor-pointer sm:flex-row py-px sm:py-0 h-fit',
2+
'radio-default': 'radio inline-flex items-center leading-4 cursor-pointer sm:flex-row py-px sm:py-0 h-fit',
33
'radio-label-common': 'relative text-center w-7 h-7 mr-2 sm:mr-0',
44
'radio-label-size-common': 'sm:w-4 sm:h-4',
55
'radio-label-size-medium': 'sm:w-6 sm:h-6',
@@ -38,7 +38,7 @@ export const classes = {
3838
'pc-show': 'hidden sm:block',
3939
'mobile-show': 'block sm:hidden',
4040
'readonly-is-checked': 'sm:m-0 cursor-default',
41-
'readonly-is-not-checked': 'sm:hidden cursor-default',
41+
'readonly-is-not-checked': 'hidden cursor-default',
4242
'not-readonly-common': 'mr-5 align-middle sm:[&:last-child]:mr-0',
4343
'hidden-radio': 'sm:hidden',
4444
'not-readly-common-label': 'sm:py-0 sm:pl-2 -ml-0.5 sm:ml-0',

0 commit comments

Comments
 (0)