From 4dd967c3e42115cfafd4170bbb079837e1fb652c Mon Sep 17 00:00:00 2001 From: shiyiya Date: Sun, 28 Jul 2024 21:51:14 +0800 Subject: [PATCH] fix(setting panel): typo --- packages/ui/package.json | 2 +- packages/ui/src/components/Setting.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/package.json b/packages/ui/package.json index 8e30de77..b4b30e76 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@oplayer/ui", - "version": "1.3.3-beta.1", + "version": "1.3.3-beta.2", "description": "ui plugin for oplayer", "type": "module", "main": "./dist/index.es.js", diff --git a/packages/ui/src/components/Setting.ts b/packages/ui/src/components/Setting.ts index a1f40147..51fd6a43 100644 --- a/packages/ui/src/components/Setting.ts +++ b/packages/ui/src/components/Setting.ts @@ -114,7 +114,7 @@ function createRow({ }) { let $item: HTMLElement = $.create(`div.${settingItemCls}`, { 'data-key': key, - role: Boolean(type) ? 'menuitem' : 'menuitemradio', + role: type == 'option' ? 'menuitemradio' : 'menuitem', 'aria-haspopup': type == 'selector' }) const res = { @@ -254,7 +254,7 @@ function createPanel( type == 'selector' && children.every((it) => !Boolean(it.type) || it.type == 'option') const optionPanel = createPanel(player, panels, children, { - key: key || 'name', + key: key || name, target, parent: panel, isSelectorOptionsPanel: nextIsSelectorOptionsPanel,