iv-npm 1.0.42 → 1.0.45

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.42",
3
+ "version": "1.0.45",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -616,16 +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(props, function () {
627
- console.log(props, "11111111111111111111111122222222222222222222");
628
- });
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);
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
+
629
664
  /**
630
665
  * 获取数据-------------------------------------
631
666
  * */
@@ -633,41 +668,38 @@ var script = /*#__PURE__*/vue.defineComponent({
633
668
  var dataV = vue.ref();
634
669
 
635
670
  var getData = /*#__PURE__*/function () {
636
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
637
- var _a, _b, _yield$formatHTTP, items;
638
-
639
- 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) {
640
679
  while (1) {
641
- switch (_context.prev = _context.next) {
680
+ switch (_context2.prev = _context2.next) {
642
681
  case 0:
643
- if (_option === void 0) {
644
- _option = {
645
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
646
- type: 1
647
- })
648
- };
649
- }
650
-
651
- _context.next = 3;
682
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
683
+ _context2.next = 3;
652
684
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
653
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
685
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
654
686
  }, API_OPTION.getIVMrpOrgDropdown.option)));
655
687
 
656
688
  case 3:
657
- _yield$formatHTTP = _context.sent;
689
+ _yield$formatHTTP = _context2.sent;
658
690
  items = _yield$formatHTTP.items;
659
691
  dataV.value = tranListToTreeData(items);
660
692
 
661
693
  case 6:
662
694
  case "end":
663
- return _context.stop();
695
+ return _context2.stop();
664
696
  }
665
697
  }
666
- }, _callee);
698
+ }, _callee2);
667
699
  }));
668
700
 
669
- return function getData(_x) {
670
- return _ref2.apply(this, arguments);
701
+ return function getData() {
702
+ return _ref3.apply(this, arguments);
671
703
  };
672
704
  }();
673
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,16 +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(props, function () {
623
- console.log(props, "11111111111111111111111122222222222222222222");
624
- });
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);
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
+
625
660
  /**
626
661
  * 获取数据-------------------------------------
627
662
  * */
@@ -629,41 +664,38 @@ var script = /*#__PURE__*/defineComponent({
629
664
  var dataV = ref();
630
665
 
631
666
  var getData = /*#__PURE__*/function () {
632
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
633
- var _a, _b, _yield$formatHTTP, items;
634
-
635
- 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) {
636
675
  while (1) {
637
- switch (_context.prev = _context.next) {
676
+ switch (_context2.prev = _context2.next) {
638
677
  case 0:
639
- if (_option === void 0) {
640
- _option = {
641
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
642
- type: 1
643
- })
644
- };
645
- }
646
-
647
- _context.next = 3;
678
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
679
+ _context2.next = 3;
648
680
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
649
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
681
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
650
682
  }, API_OPTION.getIVMrpOrgDropdown.option)));
651
683
 
652
684
  case 3:
653
- _yield$formatHTTP = _context.sent;
685
+ _yield$formatHTTP = _context2.sent;
654
686
  items = _yield$formatHTTP.items;
655
687
  dataV.value = tranListToTreeData(items);
656
688
 
657
689
  case 6:
658
690
  case "end":
659
- return _context.stop();
691
+ return _context2.stop();
660
692
  }
661
693
  }
662
- }, _callee);
694
+ }, _callee2);
663
695
  }));
664
696
 
665
- return function getData(_x) {
666
- return _ref2.apply(this, arguments);
697
+ return function getData() {
698
+ return _ref3.apply(this, arguments);
667
699
  };
668
700
  }();
669
701
  /**
@@ -616,16 +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(props, function () {
627
- console.log(props, "11111111111111111111111122222222222222222222");
628
- });
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);
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
+
629
664
  /**
630
665
  * 获取数据-------------------------------------
631
666
  * */
@@ -633,41 +668,38 @@
633
668
  var dataV = vue.ref();
634
669
 
635
670
  var getData = /*#__PURE__*/function () {
636
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
637
- var _a, _b, _yield$formatHTTP, items;
638
-
639
- 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) {
640
679
  while (1) {
641
- switch (_context.prev = _context.next) {
680
+ switch (_context2.prev = _context2.next) {
642
681
  case 0:
643
- if (_option === void 0) {
644
- _option = {
645
- params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
646
- type: 1
647
- })
648
- };
649
- }
650
-
651
- _context.next = 3;
682
+ _option = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
683
+ _context2.next = 3;
652
684
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
653
- data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
685
+ data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
654
686
  }, API_OPTION.getIVMrpOrgDropdown.option)));
655
687
 
656
688
  case 3:
657
- _yield$formatHTTP = _context.sent;
689
+ _yield$formatHTTP = _context2.sent;
658
690
  items = _yield$formatHTTP.items;
659
691
  dataV.value = tranListToTreeData(items);
660
692
 
661
693
  case 6:
662
694
  case "end":
663
- return _context.stop();
695
+ return _context2.stop();
664
696
  }
665
697
  }
666
- }, _callee);
698
+ }, _callee2);
667
699
  }));
668
700
 
669
- return function getData(_x) {
670
- return _ref2.apply(this, arguments);
701
+ return function getData() {
702
+ return _ref3.apply(this, arguments);
671
703
  };
672
704
  }();
673
705
  /**