Function useFiveWorks

  • Five Vue Hooks: 获取/设置当前的 Work

    Returns [works: DeepReadonly<Ref<Works | undefined>>, loadWorks: ((work: Work | Work[], state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number, userAction?: boolean) => Promise<void>)]

    [ work: 获取当前的 Work, loadWork: 设置 Work ]

    loadWork

    加载 Work 数据
    // param work Work 数据
    // param state 初始化姿态
    // - "inherit" 使用当前姿态
    // - "initial" 使用 Work 数据中的 initial 姿态
    // - State 自定义姿态
    // param duration 切换时间
    (work: Work, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number) => void
    const [ works, loadWorks ] = useFiveWorks;