UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

35 lines (34 loc) 1.05 kB
import type Driver from 'driver.js'; import type { SchemaExpression } from 'jamis-core'; export type DriverOptions = Driver.DriverOptions; export interface TourStep { /** * Query selector representing the DOM Element */ element: string; /** * Color of stage when this step is active * @default #ffffff */ stageBackground?: string; /** * Options representing popover for this step */ popover?: Driver.PopoverOptions; } export interface TourConfig { /** 引导类型, steps代表多步骤, highlight代表单元素高亮 */ type: 'steps' | 'highlight'; /** * 步骤集合, 或单一步骤(在type=highlight时使用) */ steps: TourStep[] | TourStep | SchemaExpression; /** * 引导支持的可选项, 包括动画/透明度/背景等 */ driver?: DriverOptions; /** * 启动引导监测定时器超时参数. 只有在 endTimeOut 时间内, 且所有要被指引的元素已经露出时, 才会启动引导. */ endTimeOut?: number; }