sctj-components 1.0.38 → 1.0.39

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.
@@ -1424,13 +1424,13 @@ const _sfc_main$k = {
1424
1424
  }
1425
1425
  };
1426
1426
  const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-a2fe1763"]]);
1427
- const index_vue_vue_type_style_index_0_scoped_8906f38f_lang = "";
1427
+ const index_vue_vue_type_style_index_0_scoped_97e81d7d_lang = "";
1428
1428
  const _hoisted_1$e = { class: "table-container" };
1429
1429
  const _sfc_main$j = {
1430
1430
  __name: "index",
1431
1431
  props: {
1432
1432
  request: {
1433
- type: Function,
1433
+ type: [Function, String],
1434
1434
  default: () => {
1435
1435
  }
1436
1436
  },
@@ -1513,6 +1513,10 @@ const _sfc_main$j = {
1513
1513
  height: {
1514
1514
  type: String,
1515
1515
  default: "100%"
1516
+ },
1517
+ headers: {
1518
+ type: Object,
1519
+ default: () => ({})
1516
1520
  }
1517
1521
  },
1518
1522
  emits: ["selectionChange", "sortChange", "requestSuccess", "cellEnter", "cellLeave"],
@@ -1629,9 +1633,16 @@ const _sfc_main$j = {
1629
1633
  var _a;
1630
1634
  try {
1631
1635
  loading.value = true;
1632
- const res = await props.request({
1636
+ const res = typeof props.request == "function" ? await props.request({
1633
1637
  ...page,
1634
1638
  ...props.requestParams
1639
+ }) : await fetch(props.request, {
1640
+ method: "GET",
1641
+ params: {
1642
+ ...page,
1643
+ ...props.requestParams
1644
+ },
1645
+ headers: props.headers || {}
1635
1646
  });
1636
1647
  baseData.value = res == null ? void 0 : res[realResponseConfig.value.list];
1637
1648
  tableData.value = props.handleList ? props.handleList(res == null ? void 0 : res[realResponseConfig.value.list]) : res == null ? void 0 : res[realResponseConfig.value.list];
@@ -1746,7 +1757,7 @@ const _sfc_main$j = {
1746
1757
  };
1747
1758
  }
1748
1759
  };
1749
- const SCTJTable = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-8906f38f"]]);
1760
+ const SCTJTable = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-97e81d7d"]]);
1750
1761
  const index_vue_vue_type_style_index_0_scoped_45fb95db_lang = "";
1751
1762
  const _sfc_main$i = {};
1752
1763
  const _hoisted_1$d = { class: "table-container" };
@@ -1946,8 +1957,8 @@ const _sfc_main$g = {
1946
1957
  }
1947
1958
  };
1948
1959
  const SCTJTableTopActionContainer = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-056cfdde"]]);
1949
- const index_vue_vue_type_style_index_0_scoped_d913f5c9_lang = "";
1950
- const _withScopeId$4 = (n) => (pushScopeId("data-v-d913f5c9"), n = n(), popScopeId(), n);
1960
+ const index_vue_vue_type_style_index_0_scoped_a452313a_lang = "";
1961
+ const _withScopeId$4 = (n) => (pushScopeId("data-v-a452313a"), n = n(), popScopeId(), n);
1951
1962
  const _hoisted_1$b = {
1952
1963
  key: 0,
1953
1964
  class: "search-container"
@@ -1997,9 +2008,15 @@ const _sfc_main$f = {
1997
2008
  default: ""
1998
2009
  },
1999
2010
  request: {
2000
- type: Function,
2011
+ type: [Function, String],
2012
+ default: () => {
2013
+ },
2001
2014
  required: true
2002
2015
  },
2016
+ headers: {
2017
+ type: Object,
2018
+ default: () => ({})
2019
+ },
2003
2020
  selectOptions: {
2004
2021
  type: Object,
2005
2022
  default: () => ({
@@ -2099,7 +2116,13 @@ const _sfc_main$f = {
2099
2116
  var _a, _b;
2100
2117
  try {
2101
2118
  loading.value = true;
2102
- let res = await props.request(queryParams.value);
2119
+ let res = typeof props.request == "function" ? await props.request(queryParams.value) : await fetch(props.request, {
2120
+ method: "GET",
2121
+ params: {
2122
+ ...queryParams.value
2123
+ },
2124
+ headers: props.headers || {}
2125
+ });
2103
2126
  if (res.code !== 200)
2104
2127
  return;
2105
2128
  dataList.value = (_b = (_a = res == null ? void 0 : res.rows) != null ? _a : res.data) != null ? _b : [];
@@ -2454,7 +2477,7 @@ const _sfc_main$f = {
2454
2477
  };
2455
2478
  }
2456
2479
  };
2457
- const SCTJDialogTable = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-d913f5c9"]]);
2480
+ const SCTJDialogTable = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a452313a"]]);
2458
2481
  const index_vue_vue_type_style_index_0_scoped_80cb4921_lang = "";
2459
2482
  const _hoisted_1$a = { style: { "background": "#fff" } };
2460
2483
  const _sfc_main$e = {