窗口
#
例子#
基本窗口import React from 'react';import { AveRenderer, Window } from 'ave-react';
export function App() { return <Window></Window>;}
AveRenderer.render(<App />);
运行之后会弹出这样的窗口:
#
APIexport interface IWindowComponentProps extends IComponentProps { title?: string; withBackground?: boolean; withCaption?: boolean; onInit?: (app: App) => void; onLanguageChange?: (app: App) => void;}
#
半透明窗口代码中可以这样实现:
export function App() { return ( <Window withBackground={false}> <Grid> <Grid dockMode={DockMode.Fill} style={{ opacity: 0.3, backgroundColor: new Vec4(100, 149, 237, 255), }} ></Grid> </Grid> </Window> );}
关于 grid 透明度,见:半透明 Grid。