iter: d02 select/radioGroup 补 disabled + 修复 select 箭头旋转

This commit is contained in:
ui-arch-bot
2026-10-23 16:47:03 +08:00
parent 84277a744e
commit 6b9fa95d1e
11 changed files with 75 additions and 15 deletions
+6 -1
View File
@@ -6,7 +6,12 @@ export function radioGroup(props: RadioGroupProps): HTMLElement {
const groupName = `ua-radio-${Math.random().toString(36).slice(2, 8)}`; // 组内唯一 name
const radios: HTMLInputElement[] = [];
for (const opt of props.options) {
const input = h('input', { type: 'radio', name: groupName, class: 'ua-radio' }) as HTMLInputElement;
const input = h('input', {
type: 'radio',
name: groupName,
class: 'ua-radio',
disabled: props.disabled, // 布尔或信号禁用,h() 直接透传
}) as HTMLInputElement;
input.value = opt.value;
radios.push(input);
input.addEventListener('change', () => {