当前位置:网站首页>006_ radio
006_ radio
2022-06-30 01:49:00 【Free and bound javajavascript】
1. Radio Radio buttons
1.1. Radio select from a set of alternatives .
1.2. Radio attribute
Parameters | explain | type | Optional value | The default value is |
value / v-model | Binding value | string / number / boolean | nothing | nothing |
label | Radio Of value | string / number / boolean | nothing | nothing |
disabled | Whether to disable | boolean | nothing | false |
border | Show border or not | boolean | nothing | false |
size | Radio box group size , Only for buttons Radio Or with a border Radio It works | string | medium / small / mini | nothing |
name | Native name attribute | string | nothing | nothing |
1.3. Radio event
Event name | explain | Callback Arguments |
change | Event triggered when the binding value changes | Selected Radio label value |
1.4. Radio-group attribute
Parameters | explain | type | Optional value | The default value is |
value / v-model | Binding value | string / number / boolean | nothing | nothing |
size | Radio box group size , Only for buttons Radio Or with a border Radio It works | string | medium / small / mini | nothing |
disabled | Whether to disable | boolean | nothing | false |
text-color | In the form of buttons Radio Text color when activated | string | nothing | #ffffff |
fill | In the form of buttons Radio Fill color and border color when active | string | nothing | #409EFF |
1.5. Radio-group event
Event name | explain | Callback Arguments |
change | Event triggered when the binding value changes | Selected Radio label value |
1.6. Radio-button attribute
Parameters | explain | type | Optional value | The default value is |
label | Radio Of value | string / number | nothing | nothing |
disabled | Whether to disable | boolean | nothing | false |
name | Native name attribute | string | nothing | nothing |
2. Radio Radio box example
2.1. Use the scaffold to create a new one named element-ui-radio Front end projects , At the same time to install Element plug-in unit .

2.2. To write App.vue
<template>
<div id="app">
<h1> Basic usage </h1>
<template>
<el-radio v-model="base_radio" label="1"> Options </el-radio>
<el-radio v-model="base_radio" label="2"> Options </el-radio>
</template>
<h1> Disabled state </h1>
<template>
<el-radio disabled v-model="disabled_radio" label=" Ban "> Options </el-radio>
<el-radio disabled v-model="disabled_radio" label=" Check and disable "> Options </el-radio>
</template>
<h1> Radio box group </h1>
<template>
<el-radio-group v-model="group_radio">
<el-radio :label="3"> Options </el-radio>
<el-radio :label="6"> Options </el-radio>
<el-radio :label="9"> Options </el-radio>
</el-radio-group>
</template>
<h1> Button style </h1>
<div>
<el-radio-group v-model="button_radio1" text-color="#F56C6C" fill="#67C23A">
<el-radio-button label=" Shanghai "></el-radio-button>
<el-radio-button label=" Beijing "></el-radio-button>
<el-radio-button label=" Guangzhou "></el-radio-button>
<el-radio-button label=" Shenzhen "></el-radio-button>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-radio-group v-model="button_radio2" size="medium">
<el-radio-button label=" Shanghai " ></el-radio-button>
<el-radio-button label=" Beijing "></el-radio-button>
<el-radio-button label=" Guangzhou "></el-radio-button>
<el-radio-button label=" Shenzhen "></el-radio-button>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-radio-group v-model="button_radio3" size="small">
<el-radio-button label=" Shanghai "></el-radio-button>
<el-radio-button label=" Beijing " disabled ></el-radio-button>
<el-radio-button label=" Guangzhou "></el-radio-button>
<el-radio-button label=" Shenzhen "></el-radio-button>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-radio-group v-model="button_radio4" disabled size="mini">
<el-radio-button label=" Shanghai "></el-radio-button>
<el-radio-button label=" Beijing "></el-radio-button>
<el-radio-button label=" Guangzhou "></el-radio-button>
<el-radio-button label=" Shenzhen "></el-radio-button>
</el-radio-group>
</div>
<h1> With borders </h1>
<div>
<el-radio v-model="border_radio1" label="1" border> Options 1</el-radio>
<el-radio v-model="border_radio1" label="2" border> Options 2</el-radio>
</div>
<div style="margin-top: 20px">
<el-radio v-model="border_radio2" label="1" border size="medium"> Options 1</el-radio>
<el-radio v-model="border_radio2" label="2" border size="medium"> Options 2</el-radio>
</div>
<div style="margin-top: 20px">
<el-radio-group v-model="border_radio3" size="small">
<el-radio label="1" border> Options 1</el-radio>
<el-radio label="2" border disabled> Options 2</el-radio>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-radio-group v-model="border_radio4" size="mini" disabled>
<el-radio label="1" border> Options 1</el-radio>
<el-radio label="2" border> Options 2</el-radio>
</el-radio-group>
</div>
</div>
</template>
<script>
export default {
data () {
return {
base_radio: '1',
disabled_radio: ' Check and disable ',
group_radio: 3,
button_radio1: ' Shanghai ',
button_radio2: ' Shanghai ',
button_radio3: ' Shanghai ',
button_radio4: ' Shanghai ',
border_radio1: '1',
border_radio2: '1',
border_radio3: '1',
border_radio4: '1'
}
}
}
</script>
2.3. Run the project

边栏推荐
猜你喜欢

Scala基础【入门及安装】

【机器学习Q&A】数据抽样和模型验证方法、超参数调优以及过拟合和欠拟合问题

cookie加密11

Cookie encryption 10

手势数字启蒙学习机
![[mrctf2020]ezpop-1 | PHP serialization](/img/65/9b7a3ae3552d8784b0c77a1130d762.png)
[mrctf2020]ezpop-1 | PHP serialization
![[graph neural network] summary of graph classification study [3]: evaluation of graph classification methods and future research directions](/img/b1/2afa73a14b2f41b7a65c4c2d261e6a.png)
[graph neural network] summary of graph classification study [3]: evaluation of graph classification methods and future research directions
![[pytorch actual combat] generate confrontation network Gan: generate cartoon character avatars](/img/8f/c0cc1c8d19060a60d92c0d72f8b93d.png)
[pytorch actual combat] generate confrontation network Gan: generate cartoon character avatars

DTW学习(dynamic time warping)——思想、代码实现

JS prototype and prototype chain (Lantern Festival meal)
随机推荐
207. curriculum - graph theory, depth traversal
Varnish foundation overview 1
手势数字启蒙学习机
[mrctf2020]ezpop-1 | PHP serialization
How to deal with occasional bugs?
js Array. Five convenient applications of from()
C language I want to pass
C语言 数素数
C语言 一元多项式求导
[machine learning Q & A] cosine similarity, cosine distance, Euclidean distance and the meaning of distance in machine learning
cookie加密9
AI落地制造业:智能机器人应具备这4种能力
Cookie加密12
假离婚变成真离婚,财产怎么办
Varnish 基础概览2
Unity2D--给动画添加关键帧并绑定事件
C语言 成绩排名
cookie加密8
【PyTorch实战】生成对抗网络GAN:生成动漫人物头像
Using face_ Recognition library reports an error reason: cudnn_ STATUS_ NOT_ SUPPORTED