(classNameLable: string, fallbackClassName: string)
| 13 | const replaced = useStageState().replacedUIlable; |
| 14 | |
| 15 | const applyStyle = (classNameLable: string, fallbackClassName: string) => { |
| 16 | // 先看看是否被用户用 applyStyle 指令替换了类名 |
| 17 | const className = replaced?.[classNameLable] ?? classNameLable; |
| 18 | if (Object.keys(styleObject.value.classNameStyles).includes(className)) { |
| 19 | const cijClassName = css(styleObject.value.classNameStyles?.[className] ?? ''); |
| 20 | return cijClassName; |
| 21 | } |
| 22 | return fallbackClassName; |
| 23 | }; |
| 24 | |
| 25 | const updateStyleObject = () => { |
| 26 | styleObject.value = WebGAL.styleObjects.get(ui) ?? { classNameStyles: {}, others: '' }; |
no outgoing calls
no test coverage detected