hookehuyr

测试新功能标记

<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-01-17 16:43:33
* @LastEditTime: 2023-01-17 18:05:14
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
......@@ -17,6 +17,7 @@
<van-field :name="item.key" :rules="item.rules">
<template #input>
<van-radio-group
@change="onChange(item)"
v-model="item.value"
:direction="item.component_props.direction"
style="width: 100%"
......@@ -30,6 +31,7 @@
style="margin-bottom: 0.25rem"
>{{ x.title }}</van-radio
>
<van-field v-model="value" label="" placeholder="请输入用户名" />
</van-radio-group>
</template>
</van-field>
......@@ -51,6 +53,15 @@ const themeVars = {
const HideShow = computed(() => {
return !props.item.component_props.disabled
})
// TEST: 测试新功能:选择其他选项时,下方出现输入框,如果其他项被选中,输入框值为最终录入值。
// 绑定值发生变化时回调,处理选项为其他时的输入项录入
const value = ref('');
const onChange = (item) => {
console.warn(item);
}
// onMounted(() => {
// props.item.value = '120'
// })
</script>
<style lang="less" scoped>
......