Showing
2 changed files
with
3 additions
and
3 deletions
| ... | @@ -100,7 +100,7 @@ const onBlur = (item) => { | ... | @@ -100,7 +100,7 @@ const onBlur = (item) => { |
| 100 | const handleEmit = (item) => { | 100 | const handleEmit = (item) => { |
| 101 | // 选中状态添加属性 | 101 | // 选中状态添加属性 |
| 102 | if (item.checked) { | 102 | if (item.checked) { |
| 103 | - affix_value.value[item.value] = `${item.title}: ${item.affix}`; | 103 | + affix_value.value[item.value] = item.affix ? `${item.title}: ${item.affix}` : ''; |
| 104 | } else { | 104 | } else { |
| 105 | // 为选中删除属性 | 105 | // 为选中删除属性 |
| 106 | delete affix_value.value[item.value] | 106 | delete affix_value.value[item.value] | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-30 11:34:19 | 2 | * @Date: 2022-08-30 11:34:19 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-02-01 10:32:14 | 4 | + * @LastEditTime: 2023-02-01 14:59:25 |
| 5 | * @FilePath: /data-table/src/components/RadioField/index.vue | 5 | * @FilePath: /data-table/src/components/RadioField/index.vue |
| 6 | * @Description: 单项选择控件 | 6 | * @Description: 单项选择控件 |
| 7 | --> | 7 | --> |
| ... | @@ -87,7 +87,7 @@ const onChange = (item) => { | ... | @@ -87,7 +87,7 @@ const onChange = (item) => { |
| 87 | } | 87 | } |
| 88 | const onBlur = (item) => { | 88 | const onBlur = (item) => { |
| 89 | clearAffix() | 89 | clearAffix() |
| 90 | - affix_value.value = `${item.title}: ${item.affix}` | 90 | + affix_value.value = item.affix ? `${item.title}: ${item.affix}` : ''; |
| 91 | // 发送自定义数据结构 | 91 | // 发送自定义数据结构 |
| 92 | props.item.value = { key: props.item.key, value: radio_value.value, affix: affix_value.value, type: "radio" }; | 92 | props.item.value = { key: props.item.key, value: radio_value.value, affix: affix_value.value, type: "radio" }; |
| 93 | emit("active", props.item.value); | 93 | emit("active", props.item.value); | ... | ... |
-
Please register or login to post a comment