ll-plus 2.3.6 → 2.3.7

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.
Files changed (68) hide show
  1. package/es/components/api-component/index.d.ts +203 -87
  2. package/es/components/api-component/src/api-component.vue.d.ts +203 -87
  3. package/es/components/api-component/src/api-component.vue2.mjs +34 -28
  4. package/es/components/api-component/src/api-component.vue2.mjs.map +1 -1
  5. package/es/components/api-component/src/components/api-url.vue.d.ts +115 -45
  6. package/es/components/api-component/src/components/api-url.vue2.mjs.map +1 -1
  7. package/es/components/api-component/src/components/params-table-row.vue2.mjs +3 -3
  8. package/es/components/api-component/src/components/params-table-row.vue2.mjs.map +1 -1
  9. package/es/components/api-component/src/config/api-component.d.ts +32 -13
  10. package/es/components/api-component/src/config/api-component.mjs +18 -27
  11. package/es/components/api-component/src/config/api-component.mjs.map +1 -1
  12. package/es/components/api-component/src/config/api-url.d.ts +17 -15
  13. package/es/components/api-component/src/config/api-url.mjs +17 -1
  14. package/es/components/api-component/src/config/api-url.mjs.map +1 -1
  15. package/es/components/table/src/components/main-table.vue2.mjs +1 -7
  16. package/es/components/table/src/components/main-table.vue2.mjs.map +1 -1
  17. package/es/components/tree-search/index.d.ts +15 -4
  18. package/es/components/tree-search/src/components/header-search.vue.d.ts +2 -3
  19. package/es/components/tree-search/src/components/header-search.vue2.mjs +4 -6
  20. package/es/components/tree-search/src/components/header-search.vue2.mjs.map +1 -1
  21. package/es/components/tree-search/src/config/tree-search.d.ts +6 -0
  22. package/es/components/tree-search/src/config/tree-search.mjs +6 -0
  23. package/es/components/tree-search/src/config/tree-search.mjs.map +1 -1
  24. package/es/components/tree-search/src/tree-search.vue.d.ts +15 -4
  25. package/es/components/tree-search/src/tree-search.vue2.mjs +2 -4
  26. package/es/components/tree-search/src/tree-search.vue2.mjs.map +1 -1
  27. package/index.full.js +81 -74
  28. package/index.full.min.js +21 -21
  29. package/index.full.min.js.map +1 -1
  30. package/index.full.min.mjs +18 -18
  31. package/index.full.min.mjs.map +1 -1
  32. package/index.full.mjs +82 -75
  33. package/lib/components/api-component/index.d.ts +203 -87
  34. package/lib/components/api-component/src/api-component.vue.d.ts +203 -87
  35. package/lib/components/api-component/src/api-component.vue2.js +33 -27
  36. package/lib/components/api-component/src/api-component.vue2.js.map +1 -1
  37. package/lib/components/api-component/src/components/api-url.vue.d.ts +115 -45
  38. package/lib/components/api-component/src/components/api-url.vue2.js.map +1 -1
  39. package/lib/components/api-component/src/components/params-table-row.vue2.js +3 -3
  40. package/lib/components/api-component/src/components/params-table-row.vue2.js.map +1 -1
  41. package/lib/components/api-component/src/config/api-component.d.ts +32 -13
  42. package/lib/components/api-component/src/config/api-component.js +18 -27
  43. package/lib/components/api-component/src/config/api-component.js.map +1 -1
  44. package/lib/components/api-component/src/config/api-url.d.ts +17 -15
  45. package/lib/components/api-component/src/config/api-url.js +17 -1
  46. package/lib/components/api-component/src/config/api-url.js.map +1 -1
  47. package/lib/components/table/src/components/main-table.vue2.js +1 -7
  48. package/lib/components/table/src/components/main-table.vue2.js.map +1 -1
  49. package/lib/components/tree-search/index.d.ts +15 -4
  50. package/lib/components/tree-search/src/components/header-search.vue.d.ts +2 -3
  51. package/lib/components/tree-search/src/components/header-search.vue2.js +3 -5
  52. package/lib/components/tree-search/src/components/header-search.vue2.js.map +1 -1
  53. package/lib/components/tree-search/src/config/tree-search.d.ts +6 -0
  54. package/lib/components/tree-search/src/config/tree-search.js +6 -0
  55. package/lib/components/tree-search/src/config/tree-search.js.map +1 -1
  56. package/lib/components/tree-search/src/tree-search.vue.d.ts +15 -4
  57. package/lib/components/tree-search/src/tree-search.vue2.js +2 -4
  58. package/lib/components/tree-search/src/tree-search.vue2.js.map +1 -1
  59. package/package.json +1 -1
  60. package/types/packages/components/api-component/index.d.ts +203 -87
  61. package/types/packages/components/api-component/src/api-component.vue.d.ts +203 -87
  62. package/types/packages/components/api-component/src/components/api-url.vue.d.ts +115 -45
  63. package/types/packages/components/api-component/src/config/api-component.d.ts +32 -13
  64. package/types/packages/components/api-component/src/config/api-url.d.ts +17 -15
  65. package/types/packages/components/tree-search/index.d.ts +15 -4
  66. package/types/packages/components/tree-search/src/components/header-search.vue.d.ts +2 -3
  67. package/types/packages/components/tree-search/src/config/tree-search.d.ts +6 -0
  68. package/types/packages/components/tree-search/src/tree-search.vue.d.ts +15 -4
package/index.full.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import require$$0, { warn, defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createVNode, createElementVNode, createElementBlock, createTextVNode, createCommentVNode, watchEffect, Fragment, renderList, toDisplayString, withModifiers, inject, computed, useAttrs, mergeProps, normalizeStyle, withDirectives, vShow, provide, reactive, normalizeProps, guardReactiveProps, renderSlot, createSlots, onBeforeUnmount, onMounted, createApp, nextTick, resolveDynamicComponent, getCurrentInstance, h, isRef, toRef, onUnmounted, toRefs } from 'vue';
1
+ import require$$0, { warn, defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createVNode, createElementVNode, createElementBlock, createTextVNode, createCommentVNode, watchEffect, Fragment, renderList, toDisplayString, withModifiers, inject, computed, useAttrs, mergeProps, normalizeStyle, withDirectives, vShow, provide, normalizeProps, guardReactiveProps, renderSlot, createSlots, onBeforeUnmount, onMounted, createApp, nextTick, reactive, resolveDynamicComponent, getCurrentInstance, h, isRef, toRef, onUnmounted, toRefs } from 'vue';
2
2
  import { Form as Form$1, Button as Button$1, Cascader as Cascader$1, Checkbox as Checkbox$1, Row, Col, DatePicker as DatePicker$1, RangePicker, theme, Drawer as Drawer$1, InputNumber as InputNumber$1, RadioGroup as RadioGroup$1, Radio as Radio$1, CheckboxGroup as CheckboxGroup$1, Select as Select$1, Tabs, TabPane, InputSearch, FormItem as FormItem$1, Input as Input$1, Modal as Modal$1, RadioButton as RadioButton$1, Segmented as Segmented$1, SelectOption as SelectOption$1, SelectOptGroup as SelectOptGroup$1, Steps as Steps$1, Switch as Switch$1, Popover, Textarea as Textarea$1, TimePicker as TimePicker$1, TimeRangePicker, Tree as Tree$1, message } from 'ant-design-vue';
3
3
  import * as monaco from 'monaco-editor';
4
4
  import require$$1$1 from 'fs';
@@ -2551,37 +2551,27 @@ const bodyList = [
2551
2551
  }
2552
2552
  ];
2553
2553
  const apiComponentProps = buildProps({
2554
- url: {
2555
- type: String,
2556
- default: ""
2554
+ value: {
2555
+ type: definePropType(Object),
2556
+ default: () => ({
2557
+ url: "",
2558
+ method: DEFAULT_METHOD,
2559
+ requestParams: [],
2560
+ headerParams: [],
2561
+ bodyParams: {
2562
+ none: null,
2563
+ "form-data": [],
2564
+ json: [],
2565
+ xml: [],
2566
+ raw: "",
2567
+ "x-www-form-urlencoded": []
2568
+ }
2569
+ })
2557
2570
  },
2558
2571
  disabled: {
2559
2572
  type: Boolean,
2560
2573
  default: false
2561
2574
  },
2562
- method: {
2563
- type: definePropType(String),
2564
- default: DEFAULT_METHOD
2565
- },
2566
- requestParams: {
2567
- type: definePropType(Array),
2568
- default: () => []
2569
- },
2570
- headerParams: {
2571
- type: definePropType(Array),
2572
- default: () => []
2573
- },
2574
- bodyParams: {
2575
- type: Object,
2576
- default: () => ({
2577
- none: null,
2578
- "form-data": [],
2579
- json: [],
2580
- xml: [],
2581
- raw: "",
2582
- "x-www-form-urlencoded": []
2583
- })
2584
- },
2585
2575
  isValid: {
2586
2576
  type: Boolean,
2587
2577
  default: false
@@ -2605,7 +2595,8 @@ const apiComponentProps = buildProps({
2605
2595
  }
2606
2596
  });
2607
2597
  const apiComponentEmits = {
2608
- change: (value) => !!value
2598
+ change: (value) => !!value,
2599
+ "update:value": (value) => !!value
2609
2600
  };
2610
2601
 
2611
2602
  const apiModalProps = buildProps({
@@ -2648,7 +2639,21 @@ const methods = [
2648
2639
  ];
2649
2640
  const apiUrlProps = buildProps({
2650
2641
  value: {
2651
- type: definePropType(Object)
2642
+ type: definePropType(Object),
2643
+ default: () => ({
2644
+ url: "",
2645
+ method: DEFAULT_METHOD,
2646
+ requestParams: [],
2647
+ headerParams: [],
2648
+ bodyParams: {
2649
+ none: null,
2650
+ "form-data": [],
2651
+ json: [],
2652
+ xml: [],
2653
+ raw: "",
2654
+ "x-www-form-urlencoded": []
2655
+ }
2656
+ })
2652
2657
  }
2653
2658
  });
2654
2659
  const apiUrlEmits = {
@@ -4289,10 +4294,10 @@ var _sfc_main$18 = /* @__PURE__ */ defineComponent({
4289
4294
  }, null, 8, ["value"])) : createCommentVNode("v-if", true),
4290
4295
  col.key === "static" ? (openBlock(), createBlock(_component_ll_switch, {
4291
4296
  key: 4,
4292
- value: innerData.value[col.key],
4293
- "onUpdate:value": ($event) => innerData.value[col.key] = $event,
4297
+ checked: innerData.value[col.key],
4298
+ "onUpdate:checked": ($event) => innerData.value[col.key] = $event,
4294
4299
  disabled: unref(disabled)
4295
- }, null, 8, ["value", "onUpdate:value", "disabled"])) : createCommentVNode("v-if", true),
4300
+ }, null, 8, ["checked", "onUpdate:checked", "disabled"])) : createCommentVNode("v-if", true),
4296
4301
  col.key === "description" ? (openBlock(), createBlock(_component_ll_input, {
4297
4302
  key: 5,
4298
4303
  value: innerData.value[col.key],
@@ -4549,15 +4554,9 @@ var _sfc_main$16 = /* @__PURE__ */ defineComponent({
4549
4554
  const bodyKey = ref("form-data");
4550
4555
  const computedRules = computed(() => props.isValid ? props.rules : {});
4551
4556
  provide("disabled", props.disabled);
4552
- const httpModel = reactive({
4553
- url: props.url,
4554
- method: props.method,
4555
- bodyParams: props.bodyParams,
4556
- requestParams: props.requestParams,
4557
- headerParams: props.headerParams
4558
- });
4557
+ const httpModel = ref(props.value);
4559
4558
  const computedRequestList = computed(() => {
4560
- if (httpModel.method === "GET") {
4559
+ if (httpModel.value.method === "GET") {
4561
4560
  return requestList.filter((item) => item.key !== "body");
4562
4561
  }
4563
4562
  return requestList;
@@ -4572,19 +4571,31 @@ var _sfc_main$16 = /* @__PURE__ */ defineComponent({
4572
4571
  }
4573
4572
  );
4574
4573
  const handleChange = (params) => {
4575
- httpModel.method = params.method;
4576
- httpModel.url = params.url;
4574
+ httpModel.value.method = params.method;
4575
+ httpModel.value.url = params.url;
4577
4576
  formItemContext.onFieldChange();
4578
- emits("change", httpModel);
4577
+ setValue();
4578
+ };
4579
+ const setValue = () => {
4580
+ emits("change", httpModel.value);
4581
+ emits("update:value", httpModel.value);
4579
4582
  };
4583
+ watch(
4584
+ () => props.value,
4585
+ (val) => {
4586
+ httpModel.value = val;
4587
+ },
4588
+ {
4589
+ deep: true
4590
+ }
4591
+ );
4580
4592
  watch(
4581
4593
  () => httpModel,
4582
- (n) => {
4583
- emits("change", n);
4594
+ () => {
4595
+ setValue();
4584
4596
  },
4585
4597
  {
4586
- deep: true,
4587
- immediate: true
4598
+ deep: true
4588
4599
  }
4589
4600
  );
4590
4601
  __expose({
@@ -4617,8 +4628,8 @@ var _sfc_main$16 = /* @__PURE__ */ defineComponent({
4617
4628
  {
4618
4629
  default: withCtx(() => [
4619
4630
  createVNode(ApiUrl, {
4620
- value: httpModel,
4621
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => httpModel = $event),
4631
+ value: httpModel.value,
4632
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => httpModel.value = $event),
4622
4633
  class: normalizeClass(unref(bem).m("header")),
4623
4634
  onChange: handleChange
4624
4635
  }, null, 8, ["value", "class"])
@@ -4637,13 +4648,13 @@ var _sfc_main$16 = /* @__PURE__ */ defineComponent({
4637
4648
  }, null, 8, ["active-key", "tabs", "class"]),
4638
4649
  withDirectives(createVNode(paramsTable, {
4639
4650
  columns: unref(paramsTableColumns),
4640
- "data-source": httpModel.requestParams
4651
+ "data-source": httpModel.value.requestParams
4641
4652
  }, null, 8, ["columns", "data-source"]), [
4642
4653
  [vShow, activeKey.value === "params"]
4643
4654
  ]),
4644
4655
  withDirectives(createVNode(paramsTable, {
4645
4656
  columns: unref(headersTableColumns),
4646
- "data-source": httpModel.headerParams
4657
+ "data-source": httpModel.value.headerParams
4647
4658
  }, null, 8, ["columns", "data-source"]), [
4648
4659
  [vShow, activeKey.value === "headers"]
4649
4660
  ]),
@@ -4658,31 +4669,31 @@ var _sfc_main$16 = /* @__PURE__ */ defineComponent({
4658
4669
  class: normalizeClass(unref(bem).m("body-tab"))
4659
4670
  }, null, 8, ["active-key", "tabs", "class"]),
4660
4671
  withDirectives(createVNode(JsonXml, {
4661
- value: httpModel.bodyParams["json"],
4662
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => httpModel.bodyParams["json"] = $event)
4672
+ value: httpModel.value.bodyParams["json"],
4673
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => httpModel.value.bodyParams["json"] = $event)
4663
4674
  }, null, 8, ["value"]), [
4664
4675
  [vShow, bodyKey.value === "json"]
4665
4676
  ]),
4666
4677
  withDirectives(createVNode(JsonXml, {
4667
- value: httpModel.bodyParams["xml"],
4668
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => httpModel.bodyParams["xml"] = $event)
4678
+ value: httpModel.value.bodyParams["xml"],
4679
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => httpModel.value.bodyParams["xml"] = $event)
4669
4680
  }, null, 8, ["value"]), [
4670
4681
  [vShow, bodyKey.value === "xml"]
4671
4682
  ]),
4672
4683
  bodyKey.value === "raw" ? (openBlock(), createBlock(_component_ll_code_editor, {
4673
4684
  key: 0,
4674
- value: httpModel.bodyParams["raw"],
4675
- "onUpdate:value": _cache[5] || (_cache[5] = ($event) => httpModel.bodyParams["raw"] = $event)
4685
+ value: httpModel.value.bodyParams["raw"],
4686
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => httpModel.value.bodyParams["raw"] = $event)
4676
4687
  }, null, 8, ["value"])) : createCommentVNode("v-if", true),
4677
4688
  withDirectives(createVNode(paramsTable, {
4678
4689
  columns: unref(paramsTableColumns),
4679
- "data-source": httpModel.bodyParams["x-www-form-urlencoded"]
4690
+ "data-source": httpModel.value.bodyParams["x-www-form-urlencoded"]
4680
4691
  }, null, 8, ["columns", "data-source"]), [
4681
4692
  [vShow, bodyKey.value === "x-www-form-urlencoded"]
4682
4693
  ]),
4683
4694
  withDirectives(createVNode(paramsTable, {
4684
4695
  columns: unref(formdataTableColumns),
4685
- "data-source": httpModel.bodyParams["form-data"]
4696
+ "data-source": httpModel.value.bodyParams["form-data"]
4686
4697
  }, null, 8, ["columns", "data-source"]), [
4687
4698
  [vShow, bodyKey.value === "form-data"]
4688
4699
  ]),
@@ -69387,13 +69398,7 @@ var _sfc_main$h = /* @__PURE__ */ defineComponent({
69387
69398
  ]),
69388
69399
  emptyText: withCtx(() => [
69389
69400
  renderSlot(_ctx.$slots, "emptyText", {}, () => [
69390
- createVNode(_component_ll_empty, null, {
69391
- content: withCtx(() => [
69392
- createTextVNode("\u6682\u65E0\u6570\u636E")
69393
- ]),
69394
- _: 1
69395
- /* STABLE */
69396
- })
69401
+ createVNode(_component_ll_empty)
69397
69402
  ])
69398
69403
  ]),
69399
69404
  _: 2
@@ -70252,6 +70257,12 @@ const THROTTLE_TIME = 300;
70252
70257
 
70253
70258
  const treeSearchOperateWayType = ["modal", "drawer", "none"];
70254
70259
  const treeSearchProps = buildProps({
70260
+ /**
70261
+ * @description input的value
70262
+ */
70263
+ searchValue: {
70264
+ type: String
70265
+ },
70255
70266
  /**
70256
70267
  * @description tree-operate操作栏的下拉菜单是否打开(用于如果展开的话,tree-operate不用隐藏)
70257
70268
  */
@@ -75848,10 +75859,9 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
75848
75859
  setup(__props, { emit: __emit }) {
75849
75860
  const props = __props;
75850
75861
  const emits = __emit;
75851
- const searchValue = ref("");
75852
75862
  const bem = createNamespace("tree-search");
75853
- const handleInputChange = () => {
75854
- props.onSearchInputChange && props.onSearchInputChange(searchValue.value);
75863
+ const handleInputChange = (e) => {
75864
+ props.onSearchInputChange && props.onSearchInputChange(e.target.value);
75855
75865
  };
75856
75866
  const handleClick = (e) => emits("click", e);
75857
75867
  const throttleInputChange = _.throttle(handleInputChange, props.throttleTime);
@@ -75867,8 +75877,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
75867
75877
  [
75868
75878
  createCommentVNode(" input "),
75869
75879
  createVNode(_component_a_input, {
75870
- value: searchValue.value,
75871
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
75880
+ value: props.searchValue,
75872
75881
  placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57",
75873
75882
  onChange: unref(throttleInputChange)
75874
75883
  }, {
@@ -76001,7 +76010,6 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
76001
76010
  const emits = __emit;
76002
76011
  const isCollapseMenu = ref(false);
76003
76012
  const newExpandedKeys = ref([]);
76004
- const searchValue = ref("");
76005
76013
  const bem = createNamespace("tree-search");
76006
76014
  const attrs = useAttrs();
76007
76015
  const getTreeDataKeys = (children) => {
@@ -76028,8 +76036,7 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
76028
76036
  }
76029
76037
  };
76030
76038
  const handleSearchInputChange = (v) => {
76031
- searchValue.value = v;
76032
- props.onSearchInputChange && props.onSearchInputChange(searchValue.value);
76039
+ props.onSearchInputChange && props.onSearchInputChange(v);
76033
76040
  };
76034
76041
  const handleClickAddBtn = () => emits("clickAdd");
76035
76042
  const handleTreeExpand = (expandedKeys, data) => {
@@ -76064,7 +76071,7 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
76064
76071
  createCommentVNode(" \u5934\u90E8\u641C\u7D22 "),
76065
76072
  createVNode(HeaderSearch, {
76066
76073
  "throttle-time": _ctx.throttleTime,
76067
- "search-value": searchValue.value,
76074
+ "search-value": _ctx.searchValue,
76068
76075
  "on-search-input-change": handleSearchInputChange,
76069
76076
  onClick: handleClickAddBtn
76070
76077
  }, null, 8, ["throttle-time", "search-value"]),