tdesign-vue-next icon indicating copy to clipboard operation
tdesign-vue-next copied to clipboard

[RadioButton] 填充型按钮样式在使用布尔值时不符合预期的失去了切换动画效果

Open SuperManito opened this issue 1 year ago • 5 comments

tdesign-vue-next 版本

1.10.2

重现链接

文档绑定的两个工具都看不了

重现步骤

填充型按钮样式在使用布尔值时不符合预期的失去了切换动画效果

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

SuperManito avatar Sep 29 '24 03:09 SuperManito

👋 @SuperManito,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] avatar Sep 29 '24 03:09 github-actions[bot]

image

            <t-radio-group variant="default-filled" :default-value="true">
              <t-radio-button :value="false">
                <NIcon :size="18">
                  <i-mdi-format-list-bulleted style="vertical-align: -0.2em" />
                </NIcon>
              </t-radio-button>
              <t-radio-button :value="true">
                <NIcon :size="18">
                  <i-material-symbols-grid-view-outline-rounded style="vertical-align: -0.2em" />
                </NIcon>
              </t-radio-button>
            </t-radio-group>

SuperManito avatar Sep 29 '24 03:09 SuperManito

经过调试,定位到问题位于 group.tsx#L104

innerValuevalue 的 watch 没有正常触发,除了布尔值还需考虑 number<0 | 1>

SuperManito avatar Sep 29 '24 04:09 SuperManito

stackblitz 是正常的,codesandbox刚刚修复了之前需要跳到devbox打开的问题,现在应该也可以了

uyarn avatar Sep 30 '24 08:09 uyarn

stackblitz 是正常的,codesandbox刚刚修复了之前需要跳到devbox打开的问题,现在应该也可以了

用沙盒复现不出来,但确实在我的项目上出现了,我还调试了一下,可能是是Vue的问题

SuperManito avatar Oct 01 '24 12:10 SuperManito

是Vue 3.4?

uyarn avatar Oct 24 '24 12:10 uyarn

是Vue 3.4?

3.5

SuperManito avatar Oct 24 '24 13:10 SuperManito

https://stackblitz.com/edit/pyruco-g8f114?file=package.json,src%2Fdemo.vue 这个沙盒是3.5的版本 也可以正常触发动画 可以打开看看 还有什么相关信息可以补充吗 你的场景watch innerValue没触发?

uyarn avatar Oct 25 '24 10:10 uyarn

https://stackblitz.com/edit/pyruco-g8f114?file=package.json,src%2Fdemo.vue 这个沙盒是3.5的版本 也可以正常触发动画 可以打开看看 还有什么相关信息可以补充吗 你的场景watch innerValue没触发?

我又检查了一遍我项目的代码,是我自己写法的问题,有一些巧合的原因使我有了这样的误判,给您添麻烦了,抱歉

SuperManito avatar Oct 26 '24 06:10 SuperManito