iv-npm 1.0.38 → 1.0.41

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.38",
3
+ "version": "1.0.41",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -507,7 +507,7 @@ function _defineProperty(obj, key, value) {
507
507
  /*
508
508
  * @Author: Mr.Cong Wei
509
509
  * @Date: 2022-08-10 10:13:38
510
- * @LastEditTime: 2022-08-10 11:33:27
510
+ * @LastEditTime: 2022-08-10 11:34:28
511
511
  */
512
512
  var BASE_URL = "https://basis.nacho.cn";
513
513
  var DEFIND_OPTION = {
@@ -596,6 +596,10 @@ var script = /*#__PURE__*/vue.defineComponent({
596
596
  type: null,
597
597
  required: true
598
598
  },
599
+ params: {
600
+ type: Object,
601
+ required: false
602
+ },
599
603
  replaceFields: {
600
604
  type: Object,
601
605
  required: false
@@ -615,6 +619,16 @@ var script = /*#__PURE__*/vue.defineComponent({
615
619
  vue.onBeforeMount(function () {
616
620
  getData();
617
621
  });
622
+ /**
623
+ * 侦听器-------------------------------------
624
+ * */
625
+
626
+ console.log(props);
627
+ vue.watch(function () {
628
+ return props.params;
629
+ }, function () {
630
+ console.log(props.params, "11111111111111111111111122222222222222222222");
631
+ });
618
632
  /**
619
633
  * 获取数据-------------------------------------
620
634
  * */
@@ -622,34 +636,32 @@ var script = /*#__PURE__*/vue.defineComponent({
622
636
  var dataV = vue.ref();
623
637
 
624
638
  var getData = /*#__PURE__*/function () {
625
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
626
- var _option,
627
- _a,
628
- _yield$formatHTTP,
629
- items,
630
- _args = arguments;
639
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
640
+ var _a, _b, _yield$formatHTTP, items;
631
641
 
632
642
  return _regeneratorRuntime().wrap(function _callee$(_context) {
633
643
  while (1) {
634
644
  switch (_context.prev = _context.next) {
635
645
  case 0:
636
- _option = _args.length > 0 && _args[0] !== undefined ? _args[0] : {
637
- params: {
638
- type: 1
639
- }
640
- };
646
+ if (_option === void 0) {
647
+ _option = {
648
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
649
+ type: 1
650
+ })
651
+ };
652
+ }
653
+
641
654
  _context.next = 3;
642
655
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
643
- data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
656
+ data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
644
657
  }, API_OPTION.getIVMrpOrgDropdown.option)));
645
658
 
646
659
  case 3:
647
660
  _yield$formatHTTP = _context.sent;
648
661
  items = _yield$formatHTTP.items;
649
- console.log(items, "1238099999999999999999999");
650
662
  dataV.value = tranListToTreeData(items);
651
663
 
652
- case 7:
664
+ case 6:
653
665
  case "end":
654
666
  return _context.stop();
655
667
  }
@@ -657,7 +669,7 @@ var script = /*#__PURE__*/vue.defineComponent({
657
669
  }, _callee);
658
670
  }));
659
671
 
660
- return function getData() {
672
+ return function getData(_x) {
661
673
  return _ref2.apply(this, arguments);
662
674
  };
663
675
  }();
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, onBeforeMount, computed, unref, isRef, createElementVNode } from 'vue';
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, onBeforeMount, watch, computed, unref, isRef, createElementVNode } from 'vue';
2
2
 
3
3
  var _hoisted_1$1 = /*#__PURE__*/createTextVNode("npm包");
4
4
  /**
@@ -503,7 +503,7 @@ function _defineProperty(obj, key, value) {
503
503
  /*
504
504
  * @Author: Mr.Cong Wei
505
505
  * @Date: 2022-08-10 10:13:38
506
- * @LastEditTime: 2022-08-10 11:33:27
506
+ * @LastEditTime: 2022-08-10 11:34:28
507
507
  */
508
508
  var BASE_URL = "https://basis.nacho.cn";
509
509
  var DEFIND_OPTION = {
@@ -592,6 +592,10 @@ var script = /*#__PURE__*/defineComponent({
592
592
  type: null,
593
593
  required: true
594
594
  },
595
+ params: {
596
+ type: Object,
597
+ required: false
598
+ },
595
599
  replaceFields: {
596
600
  type: Object,
597
601
  required: false
@@ -611,6 +615,16 @@ var script = /*#__PURE__*/defineComponent({
611
615
  onBeforeMount(function () {
612
616
  getData();
613
617
  });
618
+ /**
619
+ * 侦听器-------------------------------------
620
+ * */
621
+
622
+ console.log(props);
623
+ watch(function () {
624
+ return props.params;
625
+ }, function () {
626
+ console.log(props.params, "11111111111111111111111122222222222222222222");
627
+ });
614
628
  /**
615
629
  * 获取数据-------------------------------------
616
630
  * */
@@ -618,34 +632,32 @@ var script = /*#__PURE__*/defineComponent({
618
632
  var dataV = ref();
619
633
 
620
634
  var getData = /*#__PURE__*/function () {
621
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
622
- var _option,
623
- _a,
624
- _yield$formatHTTP,
625
- items,
626
- _args = arguments;
635
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
636
+ var _a, _b, _yield$formatHTTP, items;
627
637
 
628
638
  return _regeneratorRuntime().wrap(function _callee$(_context) {
629
639
  while (1) {
630
640
  switch (_context.prev = _context.next) {
631
641
  case 0:
632
- _option = _args.length > 0 && _args[0] !== undefined ? _args[0] : {
633
- params: {
634
- type: 1
635
- }
636
- };
642
+ if (_option === void 0) {
643
+ _option = {
644
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
645
+ type: 1
646
+ })
647
+ };
648
+ }
649
+
637
650
  _context.next = 3;
638
651
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
639
- data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
652
+ data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
640
653
  }, API_OPTION.getIVMrpOrgDropdown.option)));
641
654
 
642
655
  case 3:
643
656
  _yield$formatHTTP = _context.sent;
644
657
  items = _yield$formatHTTP.items;
645
- console.log(items, "1238099999999999999999999");
646
658
  dataV.value = tranListToTreeData(items);
647
659
 
648
- case 7:
660
+ case 6:
649
661
  case "end":
650
662
  return _context.stop();
651
663
  }
@@ -653,7 +665,7 @@ var script = /*#__PURE__*/defineComponent({
653
665
  }, _callee);
654
666
  }));
655
667
 
656
- return function getData() {
668
+ return function getData(_x) {
657
669
  return _ref2.apply(this, arguments);
658
670
  };
659
671
  }();
@@ -507,7 +507,7 @@
507
507
  /*
508
508
  * @Author: Mr.Cong Wei
509
509
  * @Date: 2022-08-10 10:13:38
510
- * @LastEditTime: 2022-08-10 11:33:27
510
+ * @LastEditTime: 2022-08-10 11:34:28
511
511
  */
512
512
  var BASE_URL = "https://basis.nacho.cn";
513
513
  var DEFIND_OPTION = {
@@ -596,6 +596,10 @@
596
596
  type: null,
597
597
  required: true
598
598
  },
599
+ params: {
600
+ type: Object,
601
+ required: false
602
+ },
599
603
  replaceFields: {
600
604
  type: Object,
601
605
  required: false
@@ -615,6 +619,16 @@
615
619
  vue.onBeforeMount(function () {
616
620
  getData();
617
621
  });
622
+ /**
623
+ * 侦听器-------------------------------------
624
+ * */
625
+
626
+ console.log(props);
627
+ vue.watch(function () {
628
+ return props.params;
629
+ }, function () {
630
+ console.log(props.params, "11111111111111111111111122222222222222222222");
631
+ });
618
632
  /**
619
633
  * 获取数据-------------------------------------
620
634
  * */
@@ -622,34 +636,32 @@
622
636
  var dataV = vue.ref();
623
637
 
624
638
  var getData = /*#__PURE__*/function () {
625
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
626
- var _option,
627
- _a,
628
- _yield$formatHTTP,
629
- items,
630
- _args = arguments;
639
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_option) {
640
+ var _a, _b, _yield$formatHTTP, items;
631
641
 
632
642
  return _regeneratorRuntime().wrap(function _callee$(_context) {
633
643
  while (1) {
634
644
  switch (_context.prev = _context.next) {
635
645
  case 0:
636
- _option = _args.length > 0 && _args[0] !== undefined ? _args[0] : {
637
- params: {
638
- type: 1
639
- }
640
- };
646
+ if (_option === void 0) {
647
+ _option = {
648
+ params: assign((_a = props.params) !== null && _a !== void 0 ? _a : {}, {
649
+ type: 1
650
+ })
651
+ };
652
+ }
653
+
641
654
  _context.next = 3;
642
655
  return formatHTTP(fetch(formatUrl(BASE_URL, API_OPTION.getIVMrpOrgDropdown.url, _option.params), assign({
643
- data: (_a = _option.data) !== null && _a !== void 0 ? _a : null
656
+ data: (_b = _option.data) !== null && _b !== void 0 ? _b : null
644
657
  }, API_OPTION.getIVMrpOrgDropdown.option)));
645
658
 
646
659
  case 3:
647
660
  _yield$formatHTTP = _context.sent;
648
661
  items = _yield$formatHTTP.items;
649
- console.log(items, "1238099999999999999999999");
650
662
  dataV.value = tranListToTreeData(items);
651
663
 
652
- case 7:
664
+ case 6:
653
665
  case "end":
654
666
  return _context.stop();
655
667
  }
@@ -657,7 +669,7 @@
657
669
  }, _callee);
658
670
  }));
659
671
 
660
- return function getData() {
672
+ return function getData(_x) {
661
673
  return _ref2.apply(this, arguments);
662
674
  };
663
675
  }();