import { BasicState, BasicProps, EditSetting } from '../type' export class Props extends BasicProps { public editSetting: EditSetting = { key: 'gaea-backTop', name: '回到顶部', isContainer: false, defaultPosition: { left: '0', top: '0' }, editors: [ '单位为rem(已知手机设备的屏幕宽度为10rem)', { field: 'icon', text: 'icon', type: 'image' }, { field: "displayThreshold", type: "number", text: "出现高度阀值" }, { field: "left", type: "number", text: "位置坐标x" }, { field: "top", type: "number", text: "位置坐标y" }, ] } public style: React.CSSProperties = { display: 'block', width: '100px', height: '100px', overflow: 'hidden', left: '0rem', top: '0rem', }; //图标出现高度阀值 public displayThreshold = 0 //默认x坐标 public left: number = 0; //默认y坐标 public top: number = 0; public imgStyle: React.CSSProperties = { display: 'block', width: '100%', maxWidth: '100%' }; public icon: { url: string, width: number, height: number, } } export class State extends BasicState { show: boolean; viewportTop: number; viewportLeft: number; }