@vtx/components 4.0.0-beta.12 → 4.0.0-beta.14
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/es/vtx-combogrid/index.js +1 -1
- package/es/vtx-export/index.js +5 -1
- package/es/vtx-icon/index.js +41 -4
- package/es/vtx-tree/index.js +27 -9
- package/lib/vtx-combogrid/index.js +1 -1
- package/lib/vtx-export/index.js +5 -1
- package/lib/vtx-icon/index.js +59 -14
- package/lib/vtx-tree/index.js +27 -9
- package/package.json +2 -1
|
@@ -109,7 +109,7 @@ export { VtxCombogrid };
|
|
|
109
109
|
VtxCombogrid.propTypes = {
|
|
110
110
|
prefixCls: PropTypes.string,
|
|
111
111
|
placeholder: PropTypes.string,
|
|
112
|
-
value: PropTypes.string,
|
|
112
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
113
113
|
allowClear: PropTypes.bool,
|
|
114
114
|
disabled: PropTypes.bool,
|
|
115
115
|
className: PropTypes.string,
|
package/es/vtx-export/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import { useStyle } from "./style/index";
|
|
|
23
23
|
import { ConfigProvider, message, Spin, Dropdown, Menu, Button } from 'antd';
|
|
24
24
|
import classnames from 'classnames';
|
|
25
25
|
import { useIntl } from "../vtx-provider";
|
|
26
|
+
import VtxIcon from "../vtx-icon";
|
|
26
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
28
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -182,7 +183,10 @@ var VtxExport = function VtxExport(props) {
|
|
|
182
183
|
trigger: ['click'],
|
|
183
184
|
children: /*#__PURE__*/_jsxs(Button, {
|
|
184
185
|
icon: /*#__PURE__*/_jsx(ExportOutlined, {}),
|
|
185
|
-
children: [exportText, " ", /*#__PURE__*/_jsx(
|
|
186
|
+
children: [exportText, " ", /*#__PURE__*/_jsx(VtxIcon, {
|
|
187
|
+
type: "downOutlined",
|
|
188
|
+
fileType: "svg"
|
|
189
|
+
})]
|
|
186
190
|
})
|
|
187
191
|
}));
|
|
188
192
|
};
|
package/es/vtx-icon/index.js
CHANGED
|
@@ -10,6 +10,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import { lazy, memo, Suspense, useMemo } from 'react';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
var iconComponents = {
|
|
14
|
+
// 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
15
|
+
alignRightOutlined: /*#__PURE__*/lazy(function () {
|
|
16
|
+
return import("./svg/alignRightOutlined.js");
|
|
17
|
+
}),
|
|
18
|
+
columnHeightOutlined: /*#__PURE__*/lazy(function () {
|
|
19
|
+
return import("./svg/columnHeightOutlined.js");
|
|
20
|
+
}),
|
|
21
|
+
downOutlined: /*#__PURE__*/lazy(function () {
|
|
22
|
+
return import("./svg/downOutlined.js");
|
|
23
|
+
}),
|
|
24
|
+
fullscreen: /*#__PURE__*/lazy(function () {
|
|
25
|
+
return import("./svg/fullscreen.js");
|
|
26
|
+
}),
|
|
27
|
+
redoOutlined: /*#__PURE__*/lazy(function () {
|
|
28
|
+
return import("./svg/redoOutlined.js");
|
|
29
|
+
}),
|
|
30
|
+
rightOutlined: /*#__PURE__*/lazy(function () {
|
|
31
|
+
return import("./svg/rightOutlined.js");
|
|
32
|
+
}),
|
|
33
|
+
settingOutlined: /*#__PURE__*/lazy(function () {
|
|
34
|
+
return import("./svg/settingOutlined.js");
|
|
35
|
+
})
|
|
36
|
+
// 新增其他图标...
|
|
37
|
+
};
|
|
13
38
|
var VtxIcon = /*#__PURE__*/memo(function (_ref) {
|
|
14
39
|
var type = _ref.type,
|
|
15
40
|
_ref$size = _ref.size,
|
|
@@ -27,12 +52,24 @@ var VtxIcon = /*#__PURE__*/memo(function (_ref) {
|
|
|
27
52
|
if (!type) {
|
|
28
53
|
return null;
|
|
29
54
|
}
|
|
55
|
+
// const SvgComponent = useMemo(() => {
|
|
56
|
+
// // 动态导入并缓存结果
|
|
57
|
+
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
58
|
+
// }, [type]);
|
|
59
|
+
|
|
30
60
|
var SvgComponent = useMemo(function () {
|
|
31
|
-
//
|
|
32
|
-
return /*#__PURE__*/lazy(function () {
|
|
33
|
-
return
|
|
61
|
+
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
62
|
+
return iconComponents[type] || /*#__PURE__*/lazy(function () {
|
|
63
|
+
return Promise.resolve({
|
|
64
|
+
default: function _default() {
|
|
65
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
66
|
+
width: width,
|
|
67
|
+
height: height
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
34
71
|
});
|
|
35
|
-
}, [type]);
|
|
72
|
+
}, [type, width, height]);
|
|
36
73
|
|
|
37
74
|
// 默认返回空元素
|
|
38
75
|
if (fileType == 'svg') {
|
package/es/vtx-tree/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import { parseTreeData } from '@vtx/utils';
|
|
|
28
28
|
import classnames from 'classnames';
|
|
29
29
|
import { useStyle } from "./style/index";
|
|
30
30
|
import { VtxProvider, useIntl } from "../vtx-provider";
|
|
31
|
+
import VtxIcon from "../vtx-icon";
|
|
31
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
33
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
34
|
var getParentKey = function getParentKey(keyValue, key, tree) {
|
|
@@ -193,15 +194,29 @@ var VtxTree = /*#__PURE__*/forwardRef(function (propsAll, ref) {
|
|
|
193
194
|
};
|
|
194
195
|
});
|
|
195
196
|
useEffect(function () {
|
|
196
|
-
var
|
|
197
|
-
|
|
197
|
+
var element = treeRef.current;
|
|
198
|
+
if (!element) return; // 提前返回,避免后续问题
|
|
199
|
+
|
|
200
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
201
|
+
var _iterator2 = _createForOfIteratorHelper(entries),
|
|
202
|
+
_step2;
|
|
203
|
+
try {
|
|
204
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
205
|
+
var entry = _step2.value;
|
|
206
|
+
setHeight(entry.contentRect.height);
|
|
207
|
+
}
|
|
208
|
+
} catch (err) {
|
|
209
|
+
_iterator2.e(err);
|
|
210
|
+
} finally {
|
|
211
|
+
_iterator2.f();
|
|
212
|
+
}
|
|
198
213
|
});
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
setHeight(
|
|
214
|
+
resizeObserver.observe(element, {
|
|
215
|
+
box: 'border-box'
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
// 初始化高度
|
|
219
|
+
setHeight(element.offsetHeight);
|
|
205
220
|
return function () {
|
|
206
221
|
resizeObserver.disconnect();
|
|
207
222
|
};
|
|
@@ -284,7 +299,10 @@ var VtxTree = /*#__PURE__*/forwardRef(function (propsAll, ref) {
|
|
|
284
299
|
ref: treeRef,
|
|
285
300
|
children: /*#__PURE__*/_jsx(Tree, _objectSpread(_objectSpread(_objectSpread({}, props), {}, {
|
|
286
301
|
height: height,
|
|
287
|
-
switcherIcon: /*#__PURE__*/_jsx(
|
|
302
|
+
switcherIcon: /*#__PURE__*/_jsx(VtxIcon, {
|
|
303
|
+
type: "downOutlined",
|
|
304
|
+
fileType: "svg"
|
|
305
|
+
}),
|
|
288
306
|
showLine: {
|
|
289
307
|
showLeafIcon: false
|
|
290
308
|
},
|
|
@@ -117,7 +117,7 @@ var _default = exports.default = VtxCombogrid;
|
|
|
117
117
|
VtxCombogrid.propTypes = {
|
|
118
118
|
prefixCls: _propTypes.default.string,
|
|
119
119
|
placeholder: _propTypes.default.string,
|
|
120
|
-
value: _propTypes.default.string,
|
|
120
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),
|
|
121
121
|
allowClear: _propTypes.default.bool,
|
|
122
122
|
disabled: _propTypes.default.bool,
|
|
123
123
|
className: _propTypes.default.string,
|
package/lib/vtx-export/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var _index = require("./style/index");
|
|
|
17
17
|
var _antd = require("antd");
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
var _vtxProvider = require("../vtx-provider");
|
|
20
|
+
var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -189,7 +190,10 @@ var VtxExport = exports.VtxExport = function VtxExport(props) {
|
|
|
189
190
|
trigger: ['click'],
|
|
190
191
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Button, {
|
|
191
192
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ExportOutlined, {}),
|
|
192
|
-
children: [exportText, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
193
|
+
children: [exportText, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxIcon.default, {
|
|
194
|
+
type: "downOutlined",
|
|
195
|
+
fileType: "svg"
|
|
196
|
+
})]
|
|
193
197
|
})
|
|
194
198
|
}));
|
|
195
199
|
};
|
package/lib/vtx-icon/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,15 +7,55 @@ exports.default = exports.VtxIcon = void 0;
|
|
|
8
7
|
var _react = require("react");
|
|
9
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
9
|
var _excluded = ["type", "size", "className", "style", "color", "fileType"];
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
var iconComponents = {
|
|
21
|
+
// 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
22
|
+
alignRightOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
23
|
+
return Promise.resolve().then(function () {
|
|
24
|
+
return _interopRequireWildcard(require("./svg/alignRightOutlined.js"));
|
|
25
|
+
});
|
|
26
|
+
}),
|
|
27
|
+
columnHeightOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
28
|
+
return Promise.resolve().then(function () {
|
|
29
|
+
return _interopRequireWildcard(require("./svg/columnHeightOutlined.js"));
|
|
30
|
+
});
|
|
31
|
+
}),
|
|
32
|
+
downOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
33
|
+
return Promise.resolve().then(function () {
|
|
34
|
+
return _interopRequireWildcard(require("./svg/downOutlined.js"));
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
fullscreen: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
38
|
+
return Promise.resolve().then(function () {
|
|
39
|
+
return _interopRequireWildcard(require("./svg/fullscreen.js"));
|
|
40
|
+
});
|
|
41
|
+
}),
|
|
42
|
+
redoOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
43
|
+
return Promise.resolve().then(function () {
|
|
44
|
+
return _interopRequireWildcard(require("./svg/redoOutlined.js"));
|
|
45
|
+
});
|
|
46
|
+
}),
|
|
47
|
+
rightOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
48
|
+
return Promise.resolve().then(function () {
|
|
49
|
+
return _interopRequireWildcard(require("./svg/rightOutlined.js"));
|
|
50
|
+
});
|
|
51
|
+
}),
|
|
52
|
+
settingOutlined: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
53
|
+
return Promise.resolve().then(function () {
|
|
54
|
+
return _interopRequireWildcard(require("./svg/settingOutlined.js"));
|
|
55
|
+
});
|
|
56
|
+
})
|
|
57
|
+
// 新增其他图标...
|
|
58
|
+
};
|
|
20
59
|
var VtxIcon = exports.VtxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
21
60
|
var type = _ref.type,
|
|
22
61
|
_ref$size = _ref.size,
|
|
@@ -34,18 +73,24 @@ var VtxIcon = exports.VtxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
34
73
|
if (!type) {
|
|
35
74
|
return null;
|
|
36
75
|
}
|
|
76
|
+
// const SvgComponent = useMemo(() => {
|
|
77
|
+
// // 动态导入并缓存结果
|
|
78
|
+
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
79
|
+
// }, [type]);
|
|
80
|
+
|
|
37
81
|
var SvgComponent = (0, _react.useMemo)(function () {
|
|
38
|
-
//
|
|
39
|
-
return /*#__PURE__*/(0, _react.lazy)(function () {
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
82
|
+
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
83
|
+
return iconComponents[type] || /*#__PURE__*/(0, _react.lazy)(function () {
|
|
84
|
+
return Promise.resolve({
|
|
85
|
+
default: function _default() {
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
87
|
+
width: width,
|
|
88
|
+
height: height
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
});
|
|
47
92
|
});
|
|
48
|
-
}, [type]);
|
|
93
|
+
}, [type, width, height]);
|
|
49
94
|
|
|
50
95
|
// 默认返回空元素
|
|
51
96
|
if (fileType == 'svg') {
|
|
@@ -87,4 +132,4 @@ var VtxIcon = exports.VtxIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
87
132
|
);
|
|
88
133
|
}
|
|
89
134
|
});
|
|
90
|
-
var
|
|
135
|
+
var _default2 = exports.default = VtxIcon;
|
package/lib/vtx-tree/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var _utils2 = require("@vtx/utils");
|
|
|
15
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
16
|
var _index = require("./style/index");
|
|
17
17
|
var _vtxProvider = require("../vtx-provider");
|
|
18
|
+
var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
var _excluded = ["showSearch", "treeData", "searchPlaceholder", "renderMenuList", "fieldNames", "titleClassName", "expandAction", "maxButtonCount"];
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -201,15 +202,29 @@ var VtxTree = exports.VtxTree = /*#__PURE__*/(0, _react.forwardRef)(function (pr
|
|
|
201
202
|
};
|
|
202
203
|
});
|
|
203
204
|
(0, _react.useEffect)(function () {
|
|
204
|
-
var
|
|
205
|
-
|
|
205
|
+
var element = treeRef.current;
|
|
206
|
+
if (!element) return; // 提前返回,避免后续问题
|
|
207
|
+
|
|
208
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
209
|
+
var _iterator2 = _createForOfIteratorHelper(entries),
|
|
210
|
+
_step2;
|
|
211
|
+
try {
|
|
212
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
213
|
+
var entry = _step2.value;
|
|
214
|
+
setHeight(entry.contentRect.height);
|
|
215
|
+
}
|
|
216
|
+
} catch (err) {
|
|
217
|
+
_iterator2.e(err);
|
|
218
|
+
} finally {
|
|
219
|
+
_iterator2.f();
|
|
220
|
+
}
|
|
206
221
|
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
setHeight(
|
|
222
|
+
resizeObserver.observe(element, {
|
|
223
|
+
box: 'border-box'
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// 初始化高度
|
|
227
|
+
setHeight(element.offsetHeight);
|
|
213
228
|
return function () {
|
|
214
229
|
resizeObserver.disconnect();
|
|
215
230
|
};
|
|
@@ -292,7 +307,10 @@ var VtxTree = exports.VtxTree = /*#__PURE__*/(0, _react.forwardRef)(function (pr
|
|
|
292
307
|
ref: treeRef,
|
|
293
308
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tree, _objectSpread(_objectSpread(_objectSpread({}, props), {}, {
|
|
294
309
|
height: height,
|
|
295
|
-
switcherIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
310
|
+
switcherIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxIcon.default, {
|
|
311
|
+
type: "downOutlined",
|
|
312
|
+
fileType: "svg"
|
|
313
|
+
}),
|
|
296
314
|
showLine: {
|
|
297
315
|
showLeafIcon: false
|
|
298
316
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtx/components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.14",
|
|
4
4
|
"description": "React components for Vortex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"react-syntax-highlighter": "^15.6.6",
|
|
116
116
|
"safe-stable-stringify": "^2.5.0",
|
|
117
117
|
"signature_pad": "3.0.0-beta.4",
|
|
118
|
+
"swr": "1.3.0",
|
|
118
119
|
"uninstall": "^0.0.0",
|
|
119
120
|
"use-deep-compare": "^1.3.0",
|
|
120
121
|
"viewerjs": "1.3.3",
|