Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2023-01-17 18:05:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f2acbd447fa29af70dc037468b11ca73dfbca6de
f2acbd44
1 parent
60a0bcfe
测试新功能标记
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
src/components/RadioField/index.vue
src/components/RadioField/index.vue
View file @
f2acbd4
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-01-17 1
6:43:33
* @LastEditTime: 2023-01-17 1
8: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>
...
...
Please
register
or
login
to post a comment