Skip to content

Commit

Permalink
fix(directive): fix default options
Browse files Browse the repository at this point in the history
  • Loading branch information
mirari committed May 31, 2021
1 parent db67d3f commit c7ffa87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Directive, DirectiveBinding, VNode } from 'vue'

export type ICreateViewer = (el: HTMLElement, options: ViewerJs.Options, rebuild: boolean, observer: boolean) => void

const directive = ({ name = 'viewer', debug = false }) => {
const directive = ({ name = 'viewer', debug = false } = {}) => {
async function createViewer(el: HTMLElement, options: ViewerJs.Options, rebuild = false, observer = false) {
await nextTick()
// 如果启用了元素监听,但和上次比较没有变化,就不重新初始化或更新
Expand Down

0 comments on commit c7ffa87

Please sign in to comment.