Skip to content

Commit

Permalink
fix: 优化 radio 组件鼠标显示效果
Browse files Browse the repository at this point in the history
fix: radio disabled
  • Loading branch information
zhetengbiji committed Feb 18, 2020
1 parent 9a3fa6c commit cf7a1d7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/core/view/components/radio/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<template>
<uni-radio
v-on="$listeners"
<uni-radio
:disabled="disabled"
v-on="$listeners"
@click="_onClick">
<div class="uni-radio-wrapper">
<div
:class="radioChecked ? 'uni-radio-input-checked' : ''"
:style="radioChecked ? checkedStyle : ''"
<div
:class="radioChecked ? 'uni-radio-input-checked' : ''"
:style="radioChecked ? checkedStyle : ''"
class="uni-radio-input" />
<slot />
</div>
Expand Down Expand Up @@ -102,12 +103,17 @@ export default {
uni-radio {
-webkit-tap-highlight-color: transparent;
display: inline-block;
cursor: pointer;
}
uni-radio[hidden] {
display: none;
}
uni-radio[disabled] {
cursor: not-allowed;
}
uni-radio .uni-radio-wrapper {
display: -webkit-inline-flex;
display: inline-flex;
Expand All @@ -129,6 +135,10 @@ export default {
position: relative;
}
uni-radio:not([disabled]) .uni-radio-input:hover {
border-color: #007aff;
}
uni-radio .uni-radio-input.uni-radio-input-checked:before {
font: normal normal normal 14px/1 "uni";
content: "\EA08";
Expand All @@ -153,4 +163,4 @@ export default {
uni-radio-group {
display: block;
}
</style>
</style>

0 comments on commit cf7a1d7

Please sign in to comment.