| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="row">
- <view>
- <label for="">{{label}}</label>
- </view>
- <view >
- <radio :value="selectvalue" :checked="checked" color="rgb(100, 142, 184)" style="border-radius:0"/>
- </view>
- </view>
- </template>
- <script>
- export default {
- name:"radio",
- props:{
- //值
- selectvalue: {
- type: String,
- required: true,
- validator: function (value) {
- return value.length>0
- }
- },
- //标签
- label: {
- type: String,
- required: true,
- validator: function (value) {
- return value.length>0
- }
- },
- checked: {
- type: Boolean
- },
- },
- data() {
- return {
-
- };
- }
- }
- </script>
- <style scoped>
- .row{
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- width: 100%;
- border: 1px solid #eee;
- padding: 10px;
- margin-top: 10px;
- box-sizing: border-box;
- }
- </style>
|