@94ai/nf-search-form 3.2.25 → 3.2.26

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.
@@ -337,8 +337,10 @@ __sfc_main$3.props = {
337
337
  }
338
338
  };
339
339
  __sfc_main$3.setup = (__props, __ctx) => {
340
+ var _a;
340
341
  const emit = __ctx.emit;
341
342
  const props = __props;
343
+ const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
342
344
  const slotName = vueDemi.computed(() => {
343
345
  return props.itemOptions.slot || "";
344
346
  });
@@ -398,75 +400,75 @@ __sfc_main$3.setup = (__props, __ctx) => {
398
400
  return props.itemOptions.tooltip;
399
401
  });
400
402
  const isInput = vueDemi.computed(() => {
401
- var _a;
402
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-input";
403
+ var _a2;
404
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-input";
403
405
  });
404
406
  const isInputNumber = vueDemi.computed(() => {
405
- var _a;
406
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-input-number";
407
+ var _a2;
408
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-input-number";
407
409
  });
408
410
  const isSelect = vueDemi.computed(() => {
409
- var _a;
410
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
411
+ var _a2;
412
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
411
413
  return element === "el-select" || element === "custom-select" || element === "ai-select" || element === "ai-custom-select";
412
414
  });
413
415
  const isDatePickerDateRange = vueDemi.computed(() => {
414
- var _a, _b;
415
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
416
+ var _a2, _b;
417
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
416
418
  const type = (_b = props.itemOptions) == null ? void 0 : _b.type;
417
419
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
418
420
  const isDateRange = type === "datetimerange" || type === "daterange";
419
421
  return isDatePicker && isDateRange;
420
422
  });
421
423
  const isDatePickerMonthRange = vueDemi.computed(() => {
422
- var _a, _b;
423
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
424
+ var _a2, _b;
425
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
424
426
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
425
427
  const isMonthRange = ((_b = props.itemOptions) == null ? void 0 : _b.type) === "monthrange";
426
428
  return isDatePicker && isMonthRange;
427
429
  });
428
430
  const isDatePickerOthers = vueDemi.computed(() => {
429
- var _a;
430
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
431
+ var _a2;
432
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
431
433
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
432
434
  return isDatePicker && !isDatePickerDateRange.value && !isDatePickerMonthRange.value;
433
435
  });
434
436
  const isYearPickerYearRange = vueDemi.computed(() => {
435
- var _a;
436
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
437
+ var _a2;
438
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
437
439
  return element === "nf-double-year";
438
440
  });
439
441
  const isHalfYearPickerHalfYearRange = vueDemi.computed(() => {
440
- var _a, _b;
441
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
442
+ var _a2, _b;
443
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
442
444
  const isHalfYearRange = element === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) === "halfyearrange";
443
445
  return isHalfYearRange || element === "nf-double-half-year";
444
446
  });
445
447
  const isHalfYearPicker = vueDemi.computed(() => {
446
- var _a, _b;
447
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "halfyearrange";
448
+ var _a2, _b;
449
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "halfyearrange";
448
450
  });
449
451
  const isQuarterPickerQuarterRange = vueDemi.computed(() => {
450
- var _a, _b;
451
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
452
+ var _a2, _b;
453
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
452
454
  const isHalfYearRange = element === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) === "quarterrange";
453
455
  return isHalfYearRange || element === "nf-double-quarter";
454
456
  });
455
457
  const isQuarterPicker = vueDemi.computed(() => {
456
- var _a, _b;
457
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "quarterrange";
458
+ var _a2, _b;
459
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "quarterrange";
458
460
  });
459
461
  const isDoubleWeek = vueDemi.computed(() => {
460
- var _a;
461
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-double-week";
462
+ var _a2;
463
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-double-week";
462
464
  });
463
465
  const isCascader = vueDemi.computed(() => {
464
- var _a;
465
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-cascader";
466
+ var _a2;
467
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-cascader";
466
468
  });
467
469
  const isTimeSelect = vueDemi.computed(() => {
468
- var _a;
469
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-time-select" && props.itemOptions.type !== "datetimerange";
470
+ var _a2;
471
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-time-select" && props.itemOptions.type !== "datetimerange";
470
472
  });
471
473
  const isTimeSelectRange = vueDemi.computed(() => {
472
474
  return props.itemOptions.element === "el-time-select" && props.itemOptions.type === "datetimerange";
@@ -481,15 +483,15 @@ __sfc_main$3.setup = (__props, __ctx) => {
481
483
  return props.itemOptions.element === "nf-select-transfer";
482
484
  });
483
485
  const handleChange = (event) => {
484
- var _a, _b;
485
- if ((_b = (_a = props.itemOptions) == null ? void 0 : _a.events) == null ? void 0 : _b.change) {
486
- props.itemOptions.events.change(event, void 0);
486
+ var _a2, _b;
487
+ if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.change) {
488
+ props.itemOptions.events.change(event, instance);
487
489
  }
488
490
  };
489
491
  const handleInput = (event) => {
490
- var _a, _b;
491
- if ((_b = (_a = props.itemOptions) == null ? void 0 : _a.events) == null ? void 0 : _b.keyup) {
492
- props.itemOptions.events.keyup(event, void 0);
492
+ var _a2, _b;
493
+ if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.keyup) {
494
+ props.itemOptions.events.keyup(event, instance);
493
495
  }
494
496
  };
495
497
  return {
@@ -335,8 +335,10 @@ __sfc_main$3.props = {
335
335
  }
336
336
  };
337
337
  __sfc_main$3.setup = (__props, __ctx) => {
338
+ var _a;
338
339
  const emit = __ctx.emit;
339
340
  const props = __props;
341
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
340
342
  const slotName = computed(() => {
341
343
  return props.itemOptions.slot || "";
342
344
  });
@@ -396,75 +398,75 @@ __sfc_main$3.setup = (__props, __ctx) => {
396
398
  return props.itemOptions.tooltip;
397
399
  });
398
400
  const isInput = computed(() => {
399
- var _a;
400
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-input";
401
+ var _a2;
402
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-input";
401
403
  });
402
404
  const isInputNumber = computed(() => {
403
- var _a;
404
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-input-number";
405
+ var _a2;
406
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-input-number";
405
407
  });
406
408
  const isSelect = computed(() => {
407
- var _a;
408
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
409
+ var _a2;
410
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
409
411
  return element === "el-select" || element === "custom-select" || element === "ai-select" || element === "ai-custom-select";
410
412
  });
411
413
  const isDatePickerDateRange = computed(() => {
412
- var _a, _b;
413
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
414
+ var _a2, _b;
415
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
414
416
  const type = (_b = props.itemOptions) == null ? void 0 : _b.type;
415
417
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
416
418
  const isDateRange = type === "datetimerange" || type === "daterange";
417
419
  return isDatePicker && isDateRange;
418
420
  });
419
421
  const isDatePickerMonthRange = computed(() => {
420
- var _a, _b;
421
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
422
+ var _a2, _b;
423
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
422
424
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
423
425
  const isMonthRange = ((_b = props.itemOptions) == null ? void 0 : _b.type) === "monthrange";
424
426
  return isDatePicker && isMonthRange;
425
427
  });
426
428
  const isDatePickerOthers = computed(() => {
427
- var _a;
428
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
429
+ var _a2;
430
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
429
431
  const isDatePicker = element === "el-date-picker" || element === "nf-date-picker";
430
432
  return isDatePicker && !isDatePickerDateRange.value && !isDatePickerMonthRange.value;
431
433
  });
432
434
  const isYearPickerYearRange = computed(() => {
433
- var _a;
434
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
435
+ var _a2;
436
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
435
437
  return element === "nf-double-year";
436
438
  });
437
439
  const isHalfYearPickerHalfYearRange = computed(() => {
438
- var _a, _b;
439
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
440
+ var _a2, _b;
441
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
440
442
  const isHalfYearRange = element === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) === "halfyearrange";
441
443
  return isHalfYearRange || element === "nf-double-half-year";
442
444
  });
443
445
  const isHalfYearPicker = computed(() => {
444
- var _a, _b;
445
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "halfyearrange";
446
+ var _a2, _b;
447
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-half-year-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "halfyearrange";
446
448
  });
447
449
  const isQuarterPickerQuarterRange = computed(() => {
448
- var _a, _b;
449
- const element = (_a = props.itemOptions) == null ? void 0 : _a.element;
450
+ var _a2, _b;
451
+ const element = (_a2 = props.itemOptions) == null ? void 0 : _a2.element;
450
452
  const isHalfYearRange = element === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) === "quarterrange";
451
453
  return isHalfYearRange || element === "nf-double-quarter";
452
454
  });
453
455
  const isQuarterPicker = computed(() => {
454
- var _a, _b;
455
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "quarterrange";
456
+ var _a2, _b;
457
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-quarter-picker" && ((_b = props.itemOptions) == null ? void 0 : _b.type) !== "quarterrange";
456
458
  });
457
459
  const isDoubleWeek = computed(() => {
458
- var _a;
459
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "nf-double-week";
460
+ var _a2;
461
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "nf-double-week";
460
462
  });
461
463
  const isCascader = computed(() => {
462
- var _a;
463
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-cascader";
464
+ var _a2;
465
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-cascader";
464
466
  });
465
467
  const isTimeSelect = computed(() => {
466
- var _a;
467
- return ((_a = props.itemOptions) == null ? void 0 : _a.element) === "el-time-select" && props.itemOptions.type !== "datetimerange";
468
+ var _a2;
469
+ return ((_a2 = props.itemOptions) == null ? void 0 : _a2.element) === "el-time-select" && props.itemOptions.type !== "datetimerange";
468
470
  });
469
471
  const isTimeSelectRange = computed(() => {
470
472
  return props.itemOptions.element === "el-time-select" && props.itemOptions.type === "datetimerange";
@@ -479,15 +481,15 @@ __sfc_main$3.setup = (__props, __ctx) => {
479
481
  return props.itemOptions.element === "nf-select-transfer";
480
482
  });
481
483
  const handleChange = (event) => {
482
- var _a, _b;
483
- if ((_b = (_a = props.itemOptions) == null ? void 0 : _a.events) == null ? void 0 : _b.change) {
484
- props.itemOptions.events.change(event, void 0);
484
+ var _a2, _b;
485
+ if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.change) {
486
+ props.itemOptions.events.change(event, instance);
485
487
  }
486
488
  };
487
489
  const handleInput = (event) => {
488
- var _a, _b;
489
- if ((_b = (_a = props.itemOptions) == null ? void 0 : _a.events) == null ? void 0 : _b.keyup) {
490
- props.itemOptions.events.keyup(event, void 0);
490
+ var _a2, _b;
491
+ if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.keyup) {
492
+ props.itemOptions.events.keyup(event, instance);
491
493
  }
492
494
  };
493
495
  return {
@@ -183,7 +183,8 @@ import {
183
183
  computed,
184
184
  ref,
185
185
  watch,
186
- onBeforeMount
186
+ onBeforeMount,
187
+ getCurrentInstance
187
188
  } from 'vue-demi'
188
189
  import { NfSearchFormItemOption } from '@94ai/nf-search-form/lib/types'
189
190
  import { createUniqueString } from './tools'
@@ -207,6 +208,8 @@ const props = withDefaults(defineProps<{
207
208
  itemOptions: () => ({}),
208
209
  })
209
210
 
211
+ const instance = getCurrentInstance()?.proxy
212
+
210
213
  const slotName = computed(() => {
211
214
  return props.itemOptions.slot || ''
212
215
  })
@@ -373,12 +376,12 @@ const isSelectTransfer = computed(() => {
373
376
 
374
377
  const handleChange = (event) => {
375
378
  if (props.itemOptions?.events?.change) {
376
- props.itemOptions.events.change(event, this)
379
+ props.itemOptions.events.change(event, instance)
377
380
  }
378
381
  }
379
382
  const handleInput = (event) => {
380
383
  if (props.itemOptions?.events?.keyup) {
381
- props.itemOptions.events.keyup(event, this)
384
+ props.itemOptions.events.keyup(event, instance)
382
385
  }
383
386
  }
384
387
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.2.25",
3
+ "version": "3.2.26",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,20 +14,20 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-action": "^3.2.25",
18
- "@94ai/nf-double-half-year": "^3.2.25",
19
- "@94ai/nf-double-quarter": "^3.2.25",
20
- "@94ai/nf-double-week": "^3.2.25",
21
- "@94ai/nf-double-year": "^3.2.25",
22
- "@94ai/nf-drawer": "^3.2.25",
23
- "@94ai/nf-form": "^3.2.25",
24
- "@94ai/nf-form-item": "^3.2.25",
25
- "@94ai/nf-half-year-picker": "^3.2.25",
26
- "@94ai/nf-message": "^3.2.25",
27
- "@94ai/nf-quarter-picker": "^3.2.25",
28
- "@94ai/nf-select-transfer": "^3.2.25",
29
- "@94ai/nf-theme-chalk": "^3.2.25",
30
- "@94ai/nf-virtual-select": "^3.2.25",
17
+ "@94ai/nf-action": "^3.2.26",
18
+ "@94ai/nf-double-half-year": "^3.2.26",
19
+ "@94ai/nf-double-quarter": "^3.2.26",
20
+ "@94ai/nf-double-week": "^3.2.26",
21
+ "@94ai/nf-double-year": "^3.2.26",
22
+ "@94ai/nf-drawer": "^3.2.26",
23
+ "@94ai/nf-form": "^3.2.26",
24
+ "@94ai/nf-form-item": "^3.2.26",
25
+ "@94ai/nf-half-year-picker": "^3.2.26",
26
+ "@94ai/nf-message": "^3.2.26",
27
+ "@94ai/nf-quarter-picker": "^3.2.26",
28
+ "@94ai/nf-select-transfer": "^3.2.26",
29
+ "@94ai/nf-theme-chalk": "^3.2.26",
30
+ "@94ai/nf-virtual-select": "^3.2.26",
31
31
  "vue-cookies": "^1.8.3",
32
32
  "vue-demi": "^0.14.5",
33
33
  "vuedraggable": "^2.24.3"
@@ -45,5 +45,5 @@
45
45
  "types": "lib/index.d.ts",
46
46
  "main": "lib/nf-search-form.cjs.js",
47
47
  "module": "lib/nf-search-form.esm-bundler.js",
48
- "gitHead": "8cef5ebb5a3f98596f2f279bcfcd337d293767d2"
48
+ "gitHead": "3fc82ba76ea5963f800c942e7dddf4ec58d851c4"
49
49
  }