iv-npm 1.0.43 → 1.0.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iv-npm",
3
- "version": "1.0.43",
3
+ "version": "1.0.46",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -616,18 +616,51 @@ var script = /*#__PURE__*/vue.defineComponent({
616
616
  * 生命周期-------------------------------------
617
617
  * */
618
618
 
619
- vue.onBeforeMount(function () {
620
- getData();
619
+ vue.onBeforeMount(function () {// getData();
621
620
  });
622
621
  /**
623
622
  * 侦听器-------------------------------------
624
623
  * */
625
624
 
626
- vue.watch(function () {
627
- return props.params;
628
- }, function () {
629
- console.log(props.params, "11111111111111111111111122222222222222222222");
630
- });
625
+ vue.watchEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
626
+ var _a;
627
+
628
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
629
+ while (1) {
630
+ switch (_context.prev = _context.next) {
631
+ case 0:
632
+ console.log(props.params, "props11111111111111111111111122222222222222222222");
633
+ getData({
634
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
635
+ type: 1
636
+ })
637
+ });
638
+
639
+ case 2:
640
+ case "end":
641
+ return _context.stop();
642
+ }
643
+ }
644
+ }, _callee);
645
+ }))); // watch(props, () => {
646
+ // console.log(
647
+ // props.params,
648
+ // "props11111111111111111111111122222222222222222222"
649
+ // );
650
+ // });
651
+ // watch(
652
+ // () => props.params,
653
+ // () => {
654
+ // console.log(
655
+ // props.params,
656
+ // "props.params11111111111111111111111122222222222222222222"
657
+ // );
658
+ // },
659
+ // {
660
+ // deep: true,
661
+ // }
662
+ // );
663
+
631
664
  /**
632
665
  * 获取数据-------------------------------------
633
666
  * */
@@ -635,41 +668,38 @@ var script = /*#__PURE__*/vue.defineComponent({
635
668
  var dataV = vue.ref();
636
669
 
637
670
  var getData = /*#__PURE__*/function () {
638
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
639
- var _a, _b, _yield$formatHTTP, items;
640
-
641
- return _regeneratorRuntime().wrap(function _callee$(_context) {
671
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
672
+ var _option,
673
+ _a,
674
+ _yield$formatHTTP,
675
+ items,
676
+ _args2 = arguments;
677
+
678
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
642
679
  while (1) {
643
- switch (_context.prev = _context.next) {
680
+ switch (_context2.prev = _context2.next) {
644
681
  case 0:
645
- if (_option === void 0) {
646
- _option = {
647
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
648
- type: 1
649
- })
650
- };
651
- }
652
-
653
- _context.next = 3;
682
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
683
+ _context2.next = 3;
654
684
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
655
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
685
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
656
686
  }, API_OPTION.getIVMrpOrgDropdown.option)));
657
687
 
658
688
  case 3:
659
- _yield$formatHTTP = _context.sent;
689
+ _yield$formatHTTP = _context2.sent;
660
690
  items = _yield$formatHTTP.items;
661
691
  dataV.value = tranListToTreeData(items);
662
692
 
663
693
  case 6:
664
694
  case "end":
665
- return _context.stop();
695
+ return _context2.stop();
666
696
  }
667
697
  }
668
- }, _callee);
698
+ }, _callee2);
669
699
  }));
670
700
 
671
- return function getData(_x) {
672
- return _ref2.apply(this, arguments);
701
+ return function getData() {
702
+ return _ref3.apply(this, arguments);
673
703
  };
674
704
  }();
675
705
  /**
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, onBeforeMount, watch, computed, unref, isRef, createElementVNode } from 'vue';
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, onBeforeMount, watchEffect, computed, unref, isRef, createElementVNode } from 'vue';
2
2
 
3
3
  var _hoisted_1$1 = /*#__PURE__*/createTextVNode("npm包");
4
4
  /**
@@ -612,18 +612,51 @@ var script = /*#__PURE__*/defineComponent({
612
612
  * 生命周期-------------------------------------
613
613
  * */
614
614
 
615
- onBeforeMount(function () {
616
- getData();
615
+ onBeforeMount(function () {// getData();
617
616
  });
618
617
  /**
619
618
  * 侦听器-------------------------------------
620
619
  * */
621
620
 
622
- watch(function () {
623
- return props.params;
624
- }, function () {
625
- console.log(props.params, "11111111111111111111111122222222222222222222");
626
- });
621
+ watchEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
622
+ var _a;
623
+
624
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
625
+ while (1) {
626
+ switch (_context.prev = _context.next) {
627
+ case 0:
628
+ console.log(props.params, "props11111111111111111111111122222222222222222222");
629
+ getData({
630
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
631
+ type: 1
632
+ })
633
+ });
634
+
635
+ case 2:
636
+ case "end":
637
+ return _context.stop();
638
+ }
639
+ }
640
+ }, _callee);
641
+ }))); // watch(props, () => {
642
+ // console.log(
643
+ // props.params,
644
+ // "props11111111111111111111111122222222222222222222"
645
+ // );
646
+ // });
647
+ // watch(
648
+ // () => props.params,
649
+ // () => {
650
+ // console.log(
651
+ // props.params,
652
+ // "props.params11111111111111111111111122222222222222222222"
653
+ // );
654
+ // },
655
+ // {
656
+ // deep: true,
657
+ // }
658
+ // );
659
+
627
660
  /**
628
661
  * 获取数据-------------------------------------
629
662
  * */
@@ -631,41 +664,38 @@ var script = /*#__PURE__*/defineComponent({
631
664
  var dataV = ref();
632
665
 
633
666
  var getData = /*#__PURE__*/function () {
634
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
635
- var _a, _b, _yield$formatHTTP, items;
636
-
637
- return _regeneratorRuntime().wrap(function _callee$(_context) {
667
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
668
+ var _option,
669
+ _a,
670
+ _yield$formatHTTP,
671
+ items,
672
+ _args2 = arguments;
673
+
674
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
638
675
  while (1) {
639
- switch (_context.prev = _context.next) {
676
+ switch (_context2.prev = _context2.next) {
640
677
  case 0:
641
- if (_option === void 0) {
642
- _option = {
643
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
644
- type: 1
645
- })
646
- };
647
- }
648
-
649
- _context.next = 3;
678
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
679
+ _context2.next = 3;
650
680
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
651
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
681
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
652
682
  }, API_OPTION.getIVMrpOrgDropdown.option)));
653
683
 
654
684
  case 3:
655
- _yield$formatHTTP = _context.sent;
685
+ _yield$formatHTTP = _context2.sent;
656
686
  items = _yield$formatHTTP.items;
657
687
  dataV.value = tranListToTreeData(items);
658
688
 
659
689
  case 6:
660
690
  case "end":
661
- return _context.stop();
691
+ return _context2.stop();
662
692
  }
663
693
  }
664
- }, _callee);
694
+ }, _callee2);
665
695
  }));
666
696
 
667
- return function getData(_x) {
668
- return _ref2.apply(this, arguments);
697
+ return function getData() {
698
+ return _ref3.apply(this, arguments);
669
699
  };
670
700
  }();
671
701
  /**
@@ -616,18 +616,51 @@
616
616
  * 生命周期-------------------------------------
617
617
  * */
618
618
 
619
- vue.onBeforeMount(function () {
620
- getData();
619
+ vue.onBeforeMount(function () {// getData();
621
620
  });
622
621
  /**
623
622
  * 侦听器-------------------------------------
624
623
  * */
625
624
 
626
- vue.watch(function () {
627
- return props.params;
628
- }, function () {
629
- console.log(props.params, "11111111111111111111111122222222222222222222");
630
- });
625
+ vue.watchEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
626
+ var _a;
627
+
628
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
629
+ while (1) {
630
+ switch (_context.prev = _context.next) {
631
+ case 0:
632
+ console.log(props.params, "props11111111111111111111111122222222222222222222");
633
+ getData({
634
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
635
+ type: 1
636
+ })
637
+ });
638
+
639
+ case 2:
640
+ case "end":
641
+ return _context.stop();
642
+ }
643
+ }
644
+ }, _callee);
645
+ }))); // watch(props, () => {
646
+ // console.log(
647
+ // props.params,
648
+ // "props11111111111111111111111122222222222222222222"
649
+ // );
650
+ // });
651
+ // watch(
652
+ // () => props.params,
653
+ // () => {
654
+ // console.log(
655
+ // props.params,
656
+ // "props.params11111111111111111111111122222222222222222222"
657
+ // );
658
+ // },
659
+ // {
660
+ // deep: true,
661
+ // }
662
+ // );
663
+
631
664
  /**
632
665
  * 获取数据-------------------------------------
633
666
  * */
@@ -635,41 +668,38 @@
635
668
  var dataV = vue.ref();
636
669
 
637
670
  var getData = /*#__PURE__*/function () {
638
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
639
- var _a, _b, _yield$formatHTTP, items;
640
-
641
- return _regeneratorRuntime().wrap(function _callee$(_context) {
671
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
672
+ var _option,
673
+ _a,
674
+ _yield$formatHTTP,
675
+ items,
676
+ _args2 = arguments;
677
+
678
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
642
679
  while (1) {
643
- switch (_context.prev = _context.next) {
680
+ switch (_context2.prev = _context2.next) {
644
681
  case 0:
645
- if (_option === void 0) {
646
- _option = {
647
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
648
- type: 1
649
- })
650
- };
651
- }
652
-
653
- _context.next = 3;
682
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
683
+ _context2.next = 3;
654
684
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
655
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
685
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
656
686
  }, API_OPTION.getIVMrpOrgDropdown.option)));
657
687
 
658
688
  case 3:
659
- _yield$formatHTTP = _context.sent;
689
+ _yield$formatHTTP = _context2.sent;
660
690
  items = _yield$formatHTTP.items;
661
691
  dataV.value = tranListToTreeData(items);
662
692
 
663
693
  case 6:
664
694
  case "end":
665
- return _context.stop();
695
+ return _context2.stop();
666
696
  }
667
697
  }
668
- }, _callee);
698
+ }, _callee2);
669
699
  }));
670
700
 
671
- return function getData(_x) {
672
- return _ref2.apply(this, arguments);
701
+ return function getData() {
702
+ return _ref3.apply(this, arguments);
673
703
  };
674
704
  }();
675
705
  /**