@vtx/modals2 5.0.53 → 5.0.56

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.
@@ -11,14 +11,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { useMemoizedFn } from 'ahooks';
14
+ import dayjs from 'dayjs';
14
15
  import React, { useMemo, useState } from 'react';
16
+ import { VmCustom } from "../_components";
15
17
  import useGetConfig from "../_hooks/useGetConfig";
16
18
  import VtxBaseModal from "../vtx-base-modal";
17
19
  import VtxCarModal from "../vtx-car-modal";
18
20
  import VtxRestaurantModal from "../vtx-restaurant-modal";
19
21
  import { AlarmInfo, BaseInfo, Calendar, ExceptionInfo, Restaurant, SyInfo } from "./components";
20
22
  import "./style";
21
- import { VmCustom } from "../_components";
22
23
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
23
24
  var TABS_BASE = 'base';
24
25
  var TABS_SY = 'sy';
@@ -96,6 +97,7 @@ var VtxCcCpModal = function VtxCcCpModal(props) {
96
97
  date: date
97
98
  };
98
99
  }, [id, date]);
100
+ var tabContents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {})), TABS_RESTAURANT, /*#__PURE__*/_jsx(Restaurant, {})), TABS_SY, /*#__PURE__*/_jsx(SyInfo, {})), TABS_WARNNING, /*#__PURE__*/_jsx(AlarmInfo, {})), TABS_EXECEPTION, /*#__PURE__*/_jsx(ExceptionInfo, {})), TABS_CALENDAR, /*#__PURE__*/_jsx(Calendar, {}));
99
101
  // 自定义页签可配置多个,包含custom即可
100
102
  if (tabsData !== null && tabsData !== void 0 && tabsData.length) {
101
103
  tabsData.forEach(function (ele) {
@@ -118,7 +120,7 @@ var VtxCcCpModal = function VtxCcCpModal(props) {
118
120
  tabs: tabsData,
119
121
  tabChose: tabChose,
120
122
  date: date,
121
- contents: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {})), TABS_RESTAURANT, /*#__PURE__*/_jsx(Restaurant, {})), TABS_SY, /*#__PURE__*/_jsx(SyInfo, {})), TABS_WARNNING, /*#__PURE__*/_jsx(AlarmInfo, {})), TABS_EXECEPTION, /*#__PURE__*/_jsx(ExceptionInfo, {})), TABS_CALENDAR, /*#__PURE__*/_jsx(Calendar, {}))
123
+ contents: tabContents
122
124
  })
123
125
  }), carModal.visible && /*#__PURE__*/_jsx(VtxCarModal, _objectSpread(_objectSpread({}, carModal), {}, {
124
126
  theme: theme,
@@ -14,6 +14,7 @@ import { request } from '@vtx/utils';
14
14
  import { useEffect, useState } from 'react';
15
15
  import VmCustom from "../_components/vm-custom";
16
16
  import VtxBaseModal from "../vtx-base-modal";
17
+ import VtxDefaultModal from "../vtx-default-modal";
17
18
  import { Appraise, Base, Build, File, Score } from "./components";
18
19
  import "./style";
19
20
 
@@ -88,7 +89,7 @@ export default (function (props) {
88
89
  });
89
90
  }
90
91
  return /*#__PURE__*/_jsx(_Fragment, {
91
- children: visible && /*#__PURE__*/_jsx(VtxBaseModal, {
92
+ children: visible && config !== null && config !== void 0 && config.length ? /*#__PURE__*/_jsx(VtxBaseModal, {
92
93
  type: "wr",
93
94
  visible: visible,
94
95
  theme: theme,
@@ -114,6 +115,12 @@ export default (function (props) {
114
115
  }].filter(function (item) {
115
116
  return !!item;
116
117
  })
118
+ }) : /*#__PURE__*/_jsx(VtxDefaultModal, {
119
+ visible: visible,
120
+ theme: theme,
121
+ title: title,
122
+ id: id,
123
+ onCancel: onCancel
117
124
  })
118
125
  });
119
126
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/modals2",
3
- "version": "5.0.53",
3
+ "version": "5.0.56",
4
4
  "description": "弹窗组件",
5
5
  "license": "MIT",
6
6
  "module": "lib/index.js",