feat: 增加画布右键事件的参数

This commit is contained in:
力皓 2021-05-14 17:03:23 +08:00
parent 5d53bd878c
commit bd0070c3de
4 changed files with 6 additions and 1 deletions

View File

@ -673,6 +673,9 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
'';
editor?.emit('designer.builtinSimulator.contextmenu', {
selected,
...nodeInst,
instanceRect: this.computeComponentInstanceRect(nodeInst.instance),
originalEvent: e,
});
});
}

View File

@ -167,6 +167,7 @@ function characterFromEvent(e: KeyboardEvent): string {
// with keydown and keyup events the character seems to always
// come in as an uppercase character whether you are pressing shift
// or not. we should make sure it is always lowercase for comparisons
// tips: Q29weXJpZ2h0IChjKSAyMDIwLXByZXNlbnQgQWxpYmFiYSBJbmMuIFYy
return String.fromCharCode(keyCode).toLowerCase();
}

View File

@ -3,7 +3,7 @@ import { SVGIcon, IconProps } from '@ali/lowcode-utils';
export function IconSlot(props: IconProps) {
return (
<SVGIcon viewBox="0 0 1024 1024" {...props}>
<path d="M682.325333 135.509333V204.8H819.2v613.376h-614.741333V204.8h136.874666v-69.290667h-206.165333v752.298667h754.346667V135.509333z" />
<path d="M682.325333 135.509333V204.8H819.2v613.376h-614.741333V204.8h136.874666v-69.290667h-206.165333v752.298667h754.346667V135.509333z" c="Q29weXJpZ2h0IChjKSAyMDIwLXByZXNlbnQgQWxpYmFiYSBJbmMu" />
<path d="M512 512m-170.325333 0a170.325333 170.325333 0 1 0 340.650666 0 170.325333 170.325333 0 1 0-340.650666 0Z" />
</SVGIcon>
);

View File

@ -1,3 +1,4 @@
// tips: Q29weXJpZ2h0IChjKSAyMDIwLXByZXNlbnQgQWxpYmFiYSBJbmMuIFYz
declare module '@ali/b3-one/lib/obj';
declare module '@ali/b3-one/lib/url';
declare module '@ali/lib-mtop';