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-02-10 11:06:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c6794cf2a120c095594a76e4d2e5121c1a7e695b
c6794cf2
1 parent
3072345f
🐞 fix(单选控件): 选项值变化时需要触发自定义事件回传数值
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/components/RadioField/index.vue
src/components/RadioField/index.vue
View file @
c6794cf
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-02-
01 18:58:00
* @LastEditTime: 2023-02-
10 11:04:38
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
...
...
@@ -68,6 +68,9 @@ const affix_value = ref('');
const onChange = (item) => {
clearAffix()
// 发送自定义数据结构
props.item.value = { key: props.item.key, value: radio_value.value, affix: affix_value.value, type: "radio" };
emit("active", props.item.value);
}
const onBlur = (item) => {
clearAffix()
...
...
@@ -86,6 +89,7 @@ const clearAffix = () => {
});
}
onMounted(() => {
radio_value.value = props.item.component_props.default ? props.item.component_props.default : '';
// 发送自定义数据结构
props.item.value = { key: props.item.key, value: radio_value.value, affix: affix_value.value, type: "radio" };
emit("active", props.item.value);
...
...
Please
register
or
login
to post a comment