dfish-widget 0.1.503 → 1.0.0

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
@@ -2,7 +2,7 @@ import lodash from 'lodash';
2
2
  import jquery from 'jquery';
3
3
  import http from 'axios';
4
4
  import Qs from 'qs';
5
- import { h, mergeProps, resolveComponent, openBlock, createBlock, withCtx, createVNode, toDisplayString, createCommentVNode, renderSlot, createTextVNode, Teleport, toRaw, defineAsyncComponent, Fragment, renderList, getCurrentInstance, ref, computed, onMounted, watch, createSlots, withModifiers } from 'vue';
5
+ import { h, mergeProps, resolveComponent, openBlock, createBlock, withCtx, createVNode, toDisplayString, createCommentVNode, renderSlot, createTextVNode, toRaw, Fragment, renderList, Teleport, getCurrentInstance, ref, computed, onMounted, watch, createSlots, withModifiers } from 'vue';
6
6
  import ResizeObserver from 'resize-observer-polyfill';
7
7
 
8
8
  let u = navigator.userAgent.toLowerCase();
@@ -1359,13 +1359,6 @@ $$1.vm = (a) => {
1359
1359
  return a.isView ? a : a.ownerView
1360
1360
  };
1361
1361
 
1362
- $$1.dialog = (a) => {
1363
- if (!a) return
1364
- a = $$1.vm(a);
1365
- while (a && !a.isDialog) a = a.ownerView;
1366
- return a
1367
- };
1368
-
1369
1362
  $$1.close = (a) => {
1370
1363
  let d = $$1.dialog(a);
1371
1364
  d && d.close();
@@ -1531,7 +1524,7 @@ $$1.ajax = function(cmd, args) {
1531
1524
  $$1.extend(config, {responseType: 'blob'});
1532
1525
  }
1533
1526
  lock && lock();
1534
- cmd.loading && ctx.exec({type: 'Loading'}, null, cmd.loading);
1527
+ cmd.loading && ctx.pop('w-loading', cmd.loading);
1535
1528
  return (cmd.data ? $$1.http.post(src, queryEncode(cmd.data, config), config) : $$1.http.get(src, config))
1536
1529
  .then(res => {
1537
1530
  lock && lock(false);
@@ -1539,7 +1532,7 @@ $$1.ajax = function(cmd, args) {
1539
1532
  if (cmd.filter) data = cmd.filter(res, ctx);
1540
1533
  if (cmd.success) cmd.success(data, ctx);
1541
1534
  if (cmd.complete) cmd.complete(res, ctx);
1542
- cmd.loading && ctx.cmd({type: 'Loading', hide: true});
1535
+ cmd.loading && ctx.pop('w-loading', false);
1543
1536
  if (cmd.download) {
1544
1537
  let disposition = res.headers['content-disposition'];
1545
1538
  if (disposition) {
@@ -1573,75 +1566,24 @@ $$1.extend($$1.ajax, {
1573
1566
  }
1574
1567
  }, http);
1575
1568
 
1576
- $$1.cmdHooks = {
1577
- Submit(cmd, args) {
1578
- $$1.urlFormat(cmd.src, args);
1579
- const vm = $$1.vm(this);
1580
- const submit = () => new Promise(rsv => this.$nextTick(() => {
1581
- let d = cmd.validate || false;
1582
- let f = vm.getFormList(d.range || cmd.range);
1583
- let g = d.range && d.range != cmd.range ? vm.getFormList(cmd.range) : f;
1584
- if (vm.valid(f, d.group)) {
1585
- cmd.context = cmd.context || this;
1586
- let post = vm.getPostData(g);
1587
- cmd.data = cmd.data ? $$1.extend(cmd.data, post) : post;
1588
- $$1.ajax(cmd, args).then(data => rsv(data));
1589
- }
1590
- }));
1591
- return submit()
1592
- },
1593
- Ajax(cmd, args) {
1594
- cmd.context = cmd.context || this;
1595
- return $$1.ajax(cmd, args)
1596
- },
1597
- Dialog(cmd, args) {
1598
- if (cmd.title) cmd.title = $$1.strFormat(cmd.title, args);
1599
- return $$1.vm(this).cmdDialog(cmd, args, this)
1600
- },
1601
- Alert(cmd, args) {
1602
- if (cmd.text) cmd.text = $$1.strFormat(cmd.text, args);
1603
- return $$1.vm(this).cmdDialog(cmd, args, this)
1604
- },
1605
- Confirm(cmd, args) {
1606
- if (cmd.text) cmd.text = $$1.strFormat(cmd.text, args);
1607
- return $$1.vm(this).cmdDialog(cmd, args, this)
1608
- },
1609
- Tip(cmd, args) {
1610
- if (cmd.text) cmd.text = $$1.strFormat(cmd.text, args);
1611
- return $$1.vm(this).cmdDialog(cmd, args, this)
1612
- },
1613
- Menu(cmd, args) {
1614
- return $$1.vm(this).cmdDialog(cmd, args, this)
1615
- },
1616
- Loading(cmd, args) {
1617
- return $$1.vm(this).cmdDialog(cmd, args, this)
1618
- },
1619
- };
1620
-
1621
- $$1.isCmd = function(a) {
1622
- return a && a.type && $$1.cmdHooks[a.type]
1623
- };
1624
-
1625
1569
  $$1.alert = function(text, position, timeout, yes) {
1626
- $$1.docView.cmd(typeof text === 'object' ? {type: 'Alert', title: '操作提示', ...text} : {
1627
- type: 'Alert', title: '操作提示', text, position, timeout, yes
1570
+ $$1.docView.pop('w-alert', typeof text === 'object' ? {title: '操作提示', ...text} : {
1571
+ title: '操作提示', text, position, timeout, yes
1628
1572
  });
1629
1573
  };
1630
1574
 
1631
1575
  $$1.confirm = function(text, yes, no, cover) {
1632
- $$1.docView.cmd(typeof text === 'object' ? {type: 'Confirm', title: '操作提示', ...text} : {
1633
- type: 'Confirm', title: '操作提示', text, yes, no, cover
1576
+ $$1.docView.pop('w-confirm', typeof text === 'object' ? {title: '操作提示', ...text} : {
1577
+ title: '操作提示', text, yes, no, cover
1634
1578
  });
1635
1579
  };
1636
1580
 
1637
- // $.directiveHooks = {
1638
- // colspan(el, v, n) {
1639
- // el.style.gridColumn = !v || v == -1 ? '' : `span ${v}`
1640
- // },
1641
- // rowspan(el, v, n) {
1642
- // el.style.gridRow = !v || v == -1 ? '' : `span ${v}`
1643
- // }
1644
- // }
1581
+ $$1.dialog = (a) => {
1582
+ if (!a) return
1583
+ a = $$1.vm(a);
1584
+ while (a && !a.isDialog) a = a.ownerView;
1585
+ return a
1586
+ };
1645
1587
 
1646
1588
  $$1.config = function(opt) {
1647
1589
  $$1.config_uid = uid(); //读取默认配置的地方有缓存,根据这个uid来判断是否刷新缓存
@@ -1817,25 +1759,32 @@ const bindCache = {};
1817
1759
  ...dftopt,
1818
1760
  }
1819
1761
  },
1820
- cmd(o, ...args) {
1821
- return this.exec(o, args)
1822
- },
1823
- exec(cmd, args, feat) {
1824
- if (typeof cmd === 'string') {
1825
- cmd = $$1.vm(this).commands[cmd];
1826
- }
1827
- if (cmd) {
1828
- if (typeof cmd === 'function') {
1829
- return cmd(args, this)
1830
- } else if (typeof cmd === 'object') {
1831
- let ncm = $$1.extendDeep({}, cmd);
1832
- feat && $$1.merge(ncm, feat);
1833
- if ($$1.cmdHooks[ncm.type]) {
1834
- return $$1.cmdHooks[ncm.type].call(this, ncm, args)
1835
- }
1836
- }
1837
- }
1838
- },
1762
+ ajax(cmd) {
1763
+ cmd.context = cmd.context || this;
1764
+ return $$1.ajax(cmd)
1765
+ },
1766
+ submit(cmd) {
1767
+ const vm = $$1.vm(this);
1768
+ return new Promise(rsv => this.$nextTick(() => {
1769
+ let d = cmd.validate || false;
1770
+ let f = vm.getFormList(d.range || cmd.range);
1771
+ let g = d.range && d.range != cmd.range ? vm.getFormList(cmd.range) : f;
1772
+ if (vm.valid(f, d.group)) {
1773
+ let post = vm.getPostData(g);
1774
+ cmd.data = cmd.data ? $$1.extend(cmd.data, post) : post;
1775
+ this.ajax(cmd).then(data => rsv(data));
1776
+ }
1777
+ }))
1778
+ },
1779
+ pop(template, props) {
1780
+ let vm = $$1.vm(this);
1781
+ if (props === false) {
1782
+ vm.getPops(template).forEach(p => vm.removePop(p));
1783
+ } else {
1784
+ let npr = $$1.extendDeep({}, props);
1785
+ return vm.createPop(template, npr, this)
1786
+ }
1787
+ },
1839
1788
  trigger(ev, ...args) {
1840
1789
  let type = ev.runType || ev.type || ev;
1841
1790
  let f = this.getOn(type);
@@ -2319,52 +2268,19 @@ script$1g.render = render$9;
2319
2268
  script$1g.__file = "src/template/TemplateLoading.vue";
2320
2269
 
2321
2270
  const templateHooks = {
2322
- Alert: script$1j,
2323
- Confirm: script$1i,
2324
- Tip: script$1h,
2325
- Loading: script$1g
2271
+ 'w-alert': script$1j,
2272
+ 'w-confirm': script$1i,
2273
+ 'w-tip': script$1h,
2274
+ 'w-loading': script$1g
2326
2275
  };
2327
2276
 
2328
2277
  var script$1f = {
2329
2278
  name: 'w-pop',
2330
2279
  props: ['p'],
2331
- methods: {
2332
- get() {
2333
- return new Promise((rs, rj) => this.$nextTick(() => {
2334
- if (this.$refs.root) {
2335
- rs(this.$refs.root);
2336
- } else {
2337
- this.$watch('asyncComp', c => this.$nextTick(() => {
2338
- this.error ? rj(this.error) : (this.$refs.root && rs(this.$refs.root));
2339
- }));
2340
- }
2341
- }))
2342
- }
2343
- },
2344
2280
  render() {
2345
- if (this.p.hidden) return h(Teleport, {to: '#w-dfish-pops'})
2346
- let props = $$1.lodash.omit(this.p.cmd, 'template');
2347
- let t = this.p.cmd.template;
2348
- let com;
2349
- if (t) {
2350
- if (typeof t === 'object') {
2351
- com = toRaw(t);
2352
- } else {
2353
- let loader = t;
2354
- if (typeof t === 'string') {
2355
- t = t.startsWith('@/') ? t.slice(2) : ($$1.x.templateDir || '') + t;
2356
- if (!t.endsWith('.vue')) t += '.vue';
2357
- loader = () => import(/* @vite-ignore */`@/${t}`);
2358
- }
2359
- com = defineAsyncComponent({
2360
- loader,
2361
- errorComponent: () => h(script$1j, {text: `${t} 不存在`, ref: 'error', icon: 'error', title: '操作提示', style: {width: 'auto', height: 'auto'}}),
2362
- });
2363
- }
2364
- } else {
2365
- com = toRaw(templateHooks[this.p.cmd.type]);
2366
- }
2367
- return com && h(com, props)
2281
+ let t = this.p.template;
2282
+ let com = toRaw(typeof t === 'string' ? templateHooks[t] : t);
2283
+ return com && h(com, this.p.props)
2368
2284
  }
2369
2285
  };
2370
2286
 
@@ -2988,48 +2904,43 @@ var script$18 = {
2988
2904
  });
2989
2905
  },
2990
2906
  showLoading(a) {
2991
- this.cmd({
2992
- type: 'Loading',
2993
- cover: true,
2994
- local: true,
2995
- hide: a === false ? true : false
2996
- });
2997
- },
2998
- cmdDialog(cmd, args, commander) {
2907
+ a = a == null ? true: a;
2908
+ if (a) {
2909
+ this.pop('w-loading', {
2910
+ type: 'Loading',
2911
+ cover: true,
2912
+ local: true,
2913
+ });
2914
+ } else {
2915
+ this.pop('w-loading', false);
2916
+ }
2917
+ },
2918
+ createPop(template, props, commander) {
2999
2919
  return new Promise((resolve, reject) => {
3000
- if (cmd.hide) {
3001
- let o = this.pops.find(v => cmd.hide === true ? v.cmd.type == cmd.type : v.cmd.orientUid == cmd.hide);
3002
- return o && this.removeDialog(o.cmd.orientUid)
3003
- }
3004
2920
  let uid = $$1.uid();
3005
- if (!cmd.orientUid) cmd.orientUid = uid;
2921
+ if (!props.orientUid) props.orientUid = uid;
3006
2922
  this.pops.push({
3007
- cmd,
3008
- args,
2923
+ template,
2924
+ props,
3009
2925
  commander,
3010
2926
  resolve,
3011
- reject,
3012
- hidden: false,
2927
+ reject
3013
2928
  });
3014
2929
  })
3015
2930
  },
3016
- removeDialog(u) {
3017
- this.$nextTick(() => {
3018
- let o = this.pops.find(v => v.cmd.orientUid == u);
3019
- if (o) {
3020
- if (this.pops.findIndex(v => v.cmd.orientUid != u && !v.hidden) > -1) {
3021
- o.hidden = true;
3022
- } else {
3023
- this.pops = [];
3024
- }
3025
- }
3026
- });
3027
- },
3028
- getDialogOptions(u) {
3029
- return this.pops.find(v => v.cmd.orientUid == u)
3030
- },
2931
+ removePop(p) {
2932
+ let i = typeof p === 'string' ? this.pops.findIndex(v => v.props.orientUid == p) : this.pops.indexOf(p);
2933
+ i > -1 && this.pops.splice(i, 1);
2934
+ },
2935
+ getPops({template, uid}) {
2936
+ return this.pops.filter(p => {
2937
+ if (template && template != p.template) return false
2938
+ if (uid && p.props.orientUid != uid) return false
2939
+ return true
2940
+ })
2941
+ },
3031
2942
  html_pops() {
3032
- return [this.pops.map(p => h(script$1f, {p}))]
2943
+ return [this.pops.map(p => h(script$1f, {key: p.props.orientUid, p}))]
3033
2944
  }
3034
2945
  }
3035
2946
  };
@@ -3820,7 +3731,7 @@ var script$14 = {
3820
3731
  },
3821
3732
  beforeCreate() {
3822
3733
  $$1.docView = this;
3823
- $$1.q('#app').append('<div id=w-dfish-pops></div>');
3734
+ $$1.q(document.body).prepend('<div id=w-dfish-pops></div>');
3824
3735
  },
3825
3736
  methods: {
3826
3737
  el() {
@@ -3830,15 +3741,14 @@ var script$14 = {
3830
3741
  return null
3831
3742
  },
3832
3743
  previewVideo(src) {
3833
- this.cmd({type: 'Dialog', template: script$16, data: {type: 'video', src}});
3744
+ this.pop(script$16, {data: {type: 'video', src}});
3834
3745
  },
3835
3746
  previewImage(imgs, options) {
3836
- this.cmd({type: 'Dialog', template: script$16, data: {type: 'image', imgs, options}});
3747
+ this.pop(script$16, {data: {type: 'image', imgs, options}});
3837
3748
  },
3838
3749
  //dateOptions: {value, format, minValue, maxValue, success}
3839
3750
  dateSheet(dateOptions, dialogOptions) {
3840
- this.exec({
3841
- type: 'Dialog',
3751
+ this.pop(script$15, {
3842
3752
  template: script$15,
3843
3753
  width: '100%',
3844
3754
  height: '55%',
@@ -3849,7 +3759,7 @@ var script$14 = {
3849
3759
  on: {
3850
3760
  'click:cover': $$1.close
3851
3761
  }
3852
- }, null, dialogOptions);
3762
+ });
3853
3763
  },
3854
3764
  html() {
3855
3765
  return [
@@ -4094,7 +4004,7 @@ const O = {},
4094
4004
  if (this.closed) return
4095
4005
  this.closeRelease();
4096
4006
  this.trigger('close');
4097
- this.ownerView.removeDialog(this.uid);
4007
+ this.ownerView.removePop(this.uid);
4098
4008
  },
4099
4009
  closeRelease() {
4100
4010
  this.x.autoHide && this.listenHide(F);
@@ -4167,7 +4077,7 @@ const O = {},
4167
4077
  this.maxHeight = h;
4168
4078
  },
4169
4079
  getOptions() {
4170
- return this.ownerView.getDialogOptions(this.uid)
4080
+ return this.ownerView.getPops({uid: this.uid})[0]
4171
4081
  },
4172
4082
  getCommander() {
4173
4083
  let o = this.getOptions();
@@ -4207,10 +4117,10 @@ const O = {},
4207
4117
  class: 'w-dialog-cover f-abs-full',
4208
4118
  onclick: e => this.trigger('click:cover', e)
4209
4119
  }) : null;
4120
+ let r = [cover || [], this.html_self(true)];
4210
4121
  return [
4211
- cover ? (to ? h(Teleport, {to}, cover) : cover) : [],
4212
4122
  // 套一层w-dialog-teleport的原因是为了让对话框里面的 $(this) 能正确返回
4213
- to ? h('div', {class: 'w-dialog-teleport', id: this.uid + 'teleport'}, h(Teleport, {to}, this.html_self(true))) : this.html_self(true),
4123
+ to ? h('div', {class: 'w-dialog-teleport', id: this.uid + 'teleport'}, h(Teleport, {to}, r)) : r,
4214
4124
  this.html_pops()
4215
4125
  ]
4216
4126
  }
@@ -4357,11 +4267,7 @@ var script$10 = {
4357
4267
  this.close();
4358
4268
  },
4359
4269
  cue(a) {
4360
- if ($$1.isCmd(a)) {
4361
- this.commander.exec(a, this.args);
4362
- } else if (typeof a === 'function') {
4363
- a(this.args);
4364
- }
4270
+ a && a(this.args);
4365
4271
  },
4366
4272
  },
4367
4273
  computed: {
@@ -4597,9 +4503,6 @@ var script$Y = {
4597
4503
  name: 'w-menubutton',
4598
4504
  mixins: [script$Z],
4599
4505
  methods: {
4600
- exec(...args) {
4601
- return this.parentMenu.getRoot().getCommander().exec(...args)
4602
- },
4603
4506
  drop() {
4604
4507
  if (this.showDrop) return
4605
4508
  this.closeSub();
@@ -5087,7 +4990,12 @@ var script$Q = {
5087
4990
  });
5088
4991
  },
5089
4992
  methods: {
4993
+ getCurrent() {
4994
+ const tr = $$1.q('.w-tr.z-on', this.el())[0];
4995
+ return tr && $$1(tr)
4996
+ },
5090
4997
  viewCurrent(f) {
4998
+ f = f || this.getCurrent();
5091
4999
  if (f) {
5092
5000
  f.expandToView();
5093
5001
  this.$nextTick(() => f.scrollIntoView({x: 'left'}));
@@ -5853,16 +5761,15 @@ var script$A = {
5853
5761
  let w = typeof a === 'string' ? a : a !== false ? 'z-err' : '';
5854
5762
  this.warnClass = w;
5855
5763
  if (!w && this._tip) {
5856
- $$1.close(this._tip);
5857
- this._tip = null;
5764
+ this.pop('w-tip', false);
5765
+ this._tip = null;
5858
5766
  }
5859
5767
  },
5860
5768
  showErrorTip(text) {
5861
5769
  this.scrollIntoView({
5862
5770
  ease: 200,
5863
5771
  success: () => {
5864
- this._tip = this.exec({
5865
- type: 'Tip',
5772
+ this._tip = this.pop('w-tip', {
5866
5773
  text,
5867
5774
  face: 'warn',
5868
5775
  independent: true,
@@ -8928,6 +8835,7 @@ const suffixHooks = {
8928
8835
  created() {
8929
8836
  this.$watch(() => this.x.modelValue, v => {
8930
8837
  if (this.emiting) return this.emiting = false
8838
+ if (v && typeof v === 'string') v = JSON.parse(v);
8931
8839
  this.list = Array.isArray(v) ? v.map(value => {return {value}}) : v ? [{value: v}] : [];
8932
8840
  }, {immediate: true});
8933
8841
  },
@@ -10010,7 +9918,6 @@ var script$8 = {
10010
9918
  e.stopPropagation();
10011
9919
  let c = this.x.picker;
10012
9920
  if (typeof c === 'function') c(this);
10013
- else this.cmd(c, this.x.modelValue);
10014
9921
  },
10015
9922
  closeDrop() {
10016
9923
  this.showDrop = false;
@@ -10246,14 +10153,12 @@ var script$5 = {
10246
10153
  e.stopPropagation();
10247
10154
  let c = this.x.picker;
10248
10155
  if (typeof c === 'function') c(this);
10249
- else this.cmd(c, this.formVal());
10250
10156
  },
10251
10157
  clickDropper(e) {
10252
10158
  e.stopPropagation();
10253
10159
  this.suggest(!this.showSuggest);
10254
10160
  let c = this.x.dropper;
10255
10161
  if (typeof c === 'function') c(this);
10256
- else this.cmd(c, this.formVal());
10257
10162
  },
10258
10163
  formText() {
10259
10164
  return this.input_title
@@ -10625,14 +10530,12 @@ var script$4 = {
10625
10530
  e.stopPropagation();
10626
10531
  let c = this.x.picker;
10627
10532
  if (typeof c === 'function') c(this);
10628
- else this.cmd(c, this.formVal());
10629
10533
  },
10630
10534
  clickDropper(e) {
10631
10535
  e.stopPropagation();
10632
10536
  this.suggest(true);
10633
10537
  let c = this.x.dropper;
10634
10538
  if (typeof c === 'function') c(this);
10635
- else this.cmd(c, this.formVal());
10636
10539
  },
10637
10540
  addStore(m) {
10638
10541
  if (m && typeof m !== 'string') {
@@ -10827,6 +10730,7 @@ var script$4 = {
10827
10730
  script$4.__file = "src/widgets/LinkBox.vue";
10828
10731
 
10829
10732
  var script$3 = {
10733
+ props: ['width', 'height', 'context'],
10830
10734
  data() {
10831
10735
  return {
10832
10736
  smallLeft: 0
@@ -10837,10 +10741,13 @@ var script$3 = {
10837
10741
  handler(v) {
10838
10742
  let m = this.context.max();
10839
10743
  let n = this.context.min();
10840
- this.smallLeft = (this.dialog.x.width - this.smallWidth) * (v / (m - n));
10744
+ this.smallLeft = (this.width - this.smallWidth) * (v / (m - n));
10841
10745
  }
10842
10746
  }
10843
10747
  },
10748
+ mounted() {
10749
+ console.log(this.context.x.modelValue);
10750
+ },
10844
10751
  methods: {
10845
10752
  refresh(e) {
10846
10753
  this.context.refresh(e);
@@ -10853,12 +10760,6 @@ var script$3 = {
10853
10760
  }
10854
10761
  },
10855
10762
  computed: {
10856
- dialog() {
10857
- return $$1.dialog(this)
10858
- },
10859
- context() {
10860
- return this.dialog.context
10861
- },
10862
10763
  bigSrc() {
10863
10764
  return this.context.x.big.src
10864
10765
  },
@@ -10866,7 +10767,7 @@ var script$3 = {
10866
10767
  return this.context.x.small.src
10867
10768
  },
10868
10769
  smallWidth() {
10869
- return this.dialog.x.height * (this.context.x.small.width / this.context.x.small.height)
10770
+ return this.height * (this.context.x.small.width / this.context.x.small.height)
10870
10771
  }
10871
10772
  }
10872
10773
  };
@@ -10874,7 +10775,13 @@ var script$3 = {
10874
10775
  function render(_ctx, _cache, $props, $setup, $data, $options) {
10875
10776
  const _component_w_dialog = resolveComponent("w-dialog");
10876
10777
 
10877
- return (openBlock(), createBlock(_component_w_dialog, { class: "w-jigsaw-dialog" }, {
10778
+ return (openBlock(), createBlock(_component_w_dialog, {
10779
+ ref: "dialog",
10780
+ class: "w-jigsaw-dialog",
10781
+ width: $props.width,
10782
+ height: $props.height,
10783
+ context: $props.context
10784
+ }, {
10878
10785
  default: withCtx(() => [
10879
10786
  createVNode("img", {
10880
10787
  class: "w-jigsaw-big",
@@ -10894,7 +10801,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
10894
10801
  }, "刷新")
10895
10802
  ]),
10896
10803
  _: 1 /* STABLE */
10897
- }))
10804
+ }, 8 /* PROPS */, ["width", "height", "context"]))
10898
10805
  }
10899
10806
 
10900
10807
  script$3.render = render;
@@ -10915,6 +10822,7 @@ const init_text = $$1.loc.form.jigsaw_drag_right;
10915
10822
  isSuccess: false,
10916
10823
  isError: false,
10917
10824
  dropper: null,
10825
+ showDrop: false,
10918
10826
  }
10919
10827
  },
10920
10828
  methods: {
@@ -10994,24 +10902,7 @@ const init_text = $$1.loc.form.jigsaw_drag_right;
10994
10902
  mouseenter(e) {
10995
10903
  if (this.dropper || !this.x.big || this.isSuccess || this.locked) return
10996
10904
  this.warn(false);
10997
- $$1.closePopup();
10998
- let width = Math.max($$1.number(this.x.dropWidth), $$1.bcr(this.el('main')).width);
10999
- let height = Math.ceil(width * (this.x.big.height / this.x.big.width));
11000
- this.dropper = this.cmd({
11001
- type: 'Dialog',
11002
- ownproperty: true,
11003
- template: script$3,
11004
- width,
11005
- height,
11006
- autoHide: true,
11007
- hoverDrop: true,
11008
- context: this,
11009
- snap: {
11010
- target: () => this.el('main'),
11011
- position: 'v'
11012
- },
11013
- onClose: () => this.dropper = null
11014
- });
10905
+ this.showDrop = true;
11015
10906
  },
11016
10907
  drop(e) {
11017
10908
  this.trigger(e, this.x.modelValue);
@@ -11046,15 +10937,35 @@ const init_text = $$1.loc.form.jigsaw_drag_right;
11046
10937
  ]
11047
10938
  },
11048
10939
  html_button() {
11049
- return h('button', {
11050
- ref: 'thumb',
11051
- class: ['w-jigsaw-thumb w-input-bbr f-i', this.isSuccess ? 'f-i-check' :
11052
- 'f-i-long-arrow-right'
11053
- ],
11054
- disabled: this.x.disabled,
11055
- onmousedown: this.dragstart,
11056
- ondrop: this.drop,
11057
- })
10940
+ let r = [
10941
+ h('button', {
10942
+ ref: 'thumb',
10943
+ class: ['w-jigsaw-thumb w-input-bbr f-i', this.isSuccess ? 'f-i-check' :
10944
+ 'f-i-long-arrow-right'
10945
+ ],
10946
+ disabled: this.x.disabled,
10947
+ onmousedown: this.dragstart,
10948
+ ondrop: this.drop,
10949
+ })
10950
+ ];
10951
+ if (!this.isSuccess && !this.isError && this.showDrop) {
10952
+ let width = Math.max($$1.number(this.x.dropWidth), $$1.bcr(this.el('main')).width);
10953
+ let height = Math.ceil(width * (this.x.big.height / this.x.big.width));
10954
+ r.push(h(script$3, {
10955
+ ownproperty: true,
10956
+ width,
10957
+ height,
10958
+ autoHide: true,
10959
+ hoverDrop: true,
10960
+ context: this,
10961
+ snap: {
10962
+ target: () => this.el('main'),
10963
+ position: 'v'
10964
+ },
10965
+ onClose: () => this.showDrop = null
10966
+ }));
10967
+ }
10968
+ return r
11058
10969
  }
11059
10970
  },
11060
10971
  computed: {