dfish-widget 1.0.70 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -2282,22 +2282,21 @@ var script$1l = {
2282
2282
  /*
2283
2283
  @options: {
2284
2284
  mode: {
2285
- 'default': 一个template只有一个实例,且每次都是新实例
2285
+ 'multiple': 默认值,一个template可以多个实例
2286
+ 'single': 一个template只有一个实例,且每次都是新实例
2286
2287
  'component': 一个template只有一个实例
2287
- 'multiple': 一个template可以多个实例
2288
- },
2289
- init(pop): Function, 对话框mounted后执行
2288
+ }
2290
2289
  }
2291
2290
  */
2292
2291
  createPop(commander, template, props, options = {}) {
2293
2292
  return new Promise((resolve, reject) => {
2294
- const mode = options.mode || 'default';
2293
+ const mode = options.mode || 'multiple';
2295
2294
  const pop = this.getPops(template)[0];
2296
2295
  if (pop) {
2297
2296
  if (mode === 'component') {
2298
2297
  Object.assign(pop, {props, options, resolve, reject});
2299
2298
  return
2300
- } else if (mode === 'default') {
2299
+ } else if (mode === 'single') {
2301
2300
  let index = this.pops.indexOf(pop);
2302
2301
  this.pops.splice(index, 1);
2303
2302
  }
@@ -3861,10 +3860,6 @@ const O = {},
3861
3860
  if (this.x.timeout) {
3862
3861
  setTimeout(this.close, this.x.timeout);
3863
3862
  }
3864
- let o = this.getPop();
3865
- if (o && o.options && o.options.init) {
3866
- o.options.init(this);
3867
- }
3868
3863
  });
3869
3864
  },
3870
3865
  unmounted() {
@@ -7442,7 +7437,8 @@ const {leafSymbol: leafSymbol$1} = $$1.symbol;
7442
7437
  })),
7443
7438
  this.x.text ?
7444
7439
  h('span', {
7445
- class: this.$options.name + '-text'
7440
+ class: this.$options.name + '-text',
7441
+ title: this.x.text
7446
7442
  }, this.x.text) : null
7447
7443
  ]
7448
7444
  },