✨(radio-group): 新增 radio-group 单选按钮组
This commit is contained in:
@@ -84,7 +84,7 @@ export default {
|
||||
|
||||
::: demo
|
||||
<template>
|
||||
<lay-notice-bar :scrollable="true" leftIcon="layui-icon-mute" :textlist="list" >
|
||||
<lay-notice-bar :scrollable="true" leftIcon="layui-icon-mute" :textlist="list">
|
||||
</lay-notice-bar>
|
||||
</template>
|
||||
|
||||
@@ -94,16 +94,14 @@ import { ref,reactive } from "vue"
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const list = reactive([
|
||||
const list = reactive([
|
||||
{ id: '1', text: '条目一' },
|
||||
{ id: '2', text: '条目二' },
|
||||
{ id: '3', text: '条目三' },
|
||||
{ id: '4', text: '条目四' },
|
||||
])
|
||||
return {
|
||||
|
||||
list,
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,39 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: title 事件回调
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-radio-group v-model="selected4" @change="change4">
|
||||
<lay-radio name="action" label="1">写作</lay-radio>
|
||||
<lay-radio name="action" label="2">画画</lay-radio>
|
||||
<lay-radio name="action" label="3">运动</lay-radio>
|
||||
</lay-radio-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const selected4 = ref("1");
|
||||
const change4 = function( current ) {
|
||||
console.log("当前值:" + current)
|
||||
}
|
||||
return {
|
||||
selected4,
|
||||
change4
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Radio 属性
|
||||
:::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user