@vtx/components 4.0.0-beta.7 → 4.0.0-beta.8
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-color-picker/index.js +138 -33
- package/es/vtx-color-picker/style/index.js +36 -12
- package/es/vtx-combogrid/Combogrid.js +11 -6
- package/es/vtx-combogrid/style/index.js +4 -4
- package/es/vtx-datagrid/Store/Provide.js +5 -4
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -2
- package/es/vtx-datagrid/ToolBar/index.js +2 -2
- package/es/vtx-datagrid/index.js +14 -9
- package/es/vtx-form-layout/FormItem.js +2 -1
- package/es/vtx-import2/index.js +1 -1
- package/es/vtx-input/TextArea/index.js +11 -6
- package/es/vtx-modal/style/index.js +5 -3
- package/es/vtx-page-layout/Content.js +1 -1
- package/es/vtx-page-layout/TabLayout.js +1 -7
- package/es/vtx-page-layout/TableLayout.js +14 -4
- package/es/vtx-page-layout/TableWrap.js +3 -2
- package/es/vtx-page-layout/TreeLayout.js +2 -8
- package/es/vtx-page-layout/container.js +6 -5
- package/es/vtx-provider/index.js +14 -8
- package/es/vtx-provider/locale/en_US.js +10 -2
- package/es/vtx-provider/locale/zh_CN.js +20 -2
- package/es/vtx-provider/useStyle/index.js +8 -4
- package/es/vtx-scrollable-row/index.js +38 -28
- package/es/vtx-search/index.js +5 -4
- package/es/vtx-select/index.js +25 -11
- package/es/vtx-tree/index.js +14 -13
- package/es/vtx-tree-select/index.js +4 -0
- package/es/vtx-wang-editor/index.js +227 -102
- package/es/vtx-wang-editor/wangEditorUtil.js +55 -9
- package/lib/vtx-color-picker/index.js +139 -34
- package/lib/vtx-color-picker/style/index.js +36 -12
- package/lib/vtx-combogrid/Combogrid.js +11 -6
- package/lib/vtx-combogrid/style/index.js +4 -4
- package/lib/vtx-datagrid/Store/Provide.js +5 -4
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -3
- package/lib/vtx-datagrid/ToolBar/index.js +2 -2
- package/lib/vtx-datagrid/index.js +15 -9
- package/lib/vtx-form-layout/FormItem.js +2 -1
- package/lib/vtx-import2/index.js +1 -1
- package/lib/vtx-input/TextArea/index.js +11 -6
- package/lib/vtx-modal/style/index.js +5 -3
- package/lib/vtx-page-layout/Content.js +1 -1
- package/lib/vtx-page-layout/TabLayout.js +3 -9
- package/lib/vtx-page-layout/TableLayout.js +14 -4
- package/lib/vtx-page-layout/TableWrap.js +3 -2
- package/lib/vtx-page-layout/TreeLayout.js +4 -10
- package/lib/vtx-page-layout/container.js +6 -5
- package/lib/vtx-provider/index.js +13 -8
- package/lib/vtx-provider/locale/en_US.js +10 -2
- package/lib/vtx-provider/locale/zh_CN.js +20 -2
- package/lib/vtx-provider/useStyle/index.js +8 -4
- package/lib/vtx-scrollable-row/index.js +38 -28
- package/lib/vtx-search/index.js +5 -4
- package/lib/vtx-select/index.js +25 -11
- package/lib/vtx-tree/index.js +14 -13
- package/lib/vtx-tree-select/index.js +4 -0
- package/lib/vtx-wang-editor/index.js +226 -103
- package/lib/vtx-wang-editor/wangEditorUtil.js +55 -10
- package/package.json +5 -3
|
@@ -5,73 +5,178 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.VtxColorPicker = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _antd = require("antd");
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _style = require("./style");
|
|
12
13
|
var _utils = require("../utils");
|
|
14
|
+
var _vtxProvider = require("../vtx-provider");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var _excluded = ["value", "onChange", "className", "style", "disabled"];
|
|
16
|
+
var _excluded = ["value", "onChange", "className", "style", "disabled", "format", "input", "panelStyle"];
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
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); }
|
|
16
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; }
|
|
17
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
20
|
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; }
|
|
19
21
|
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; }
|
|
20
22
|
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; }
|
|
21
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
24
|
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); }
|
|
23
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
27
|
-
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; } }
|
|
28
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
25
|
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; }
|
|
30
26
|
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; }
|
|
31
27
|
var VtxColorPicker = exports.VtxColorPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
28
|
+
var intl = (0, _vtxProvider.useIntl)();
|
|
32
29
|
var value = props.value,
|
|
33
|
-
|
|
30
|
+
_onChange = props.onChange,
|
|
34
31
|
className = props.className,
|
|
35
32
|
style = props.style,
|
|
36
33
|
disabled = props.disabled,
|
|
34
|
+
_props$format = props.format,
|
|
35
|
+
format = _props$format === void 0 ? 'hex' : _props$format,
|
|
36
|
+
_props$input = props.input,
|
|
37
|
+
input = _props$input === void 0 ? true : _props$input,
|
|
38
|
+
panelStyle = props.panelStyle,
|
|
37
39
|
rest = _objectWithoutProperties(props, _excluded);
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
var
|
|
40
|
+
var getVtxPresets = function getVtxPresets() {
|
|
41
|
+
return [{
|
|
42
|
+
label: intl.getMessage('colorPicker.basic', '基础颜色'),
|
|
43
|
+
key: 'basic',
|
|
44
|
+
colors: ['#0EBF37', '#1890FF', '#FAAD14', '#FF4D4F', '#898989', '#13C2C2', '#FA8C16', '#722ED1', '#EB2F96', '#2F54EB']
|
|
45
|
+
}, {
|
|
46
|
+
label: intl.getMessage('colorPicker.chart', '图表颜色'),
|
|
47
|
+
key: 'chart',
|
|
48
|
+
colors: ['#249AF8', '#1FC678', '#FFB737', '#4ABEFF', '#FD6865', '#A09CF7', '#1BCEBF', '#F58E44', '#27AD8E', '#F18F86', '#7996FF', '#5AD8A6', '#E9C140', '#79C2E6', '#FF9E9E', '#D396DE', '#3CBDCB', '#F29F64', '#85ACD7', '#FDA3C7']
|
|
49
|
+
}];
|
|
50
|
+
};
|
|
51
|
+
var getNormalPresets = function getNormalPresets() {
|
|
52
|
+
return [{
|
|
53
|
+
label: '',
|
|
54
|
+
key: '1',
|
|
55
|
+
colors: ['#F5222D', '#FA8C16', '#FAAD14', '#52C41A', '#389E0D', '#CF1322', '#1677FF', '#5B83FB', '#9254DE', '#5D7092']
|
|
56
|
+
}];
|
|
57
|
+
};
|
|
58
|
+
var getHorizontalPresets = function getHorizontalPresets(token) {
|
|
59
|
+
return [{
|
|
60
|
+
label: intl.getMessage('colorPicker.primary', '主要'),
|
|
61
|
+
key: '主要',
|
|
62
|
+
colors: ['#E6F4FF', '#BAE0FF', '#91CAFF', '#69B1FF', '#4096FF', '#1677FF', '#0958D9', '#003EB3', '#002C8C', '#001D66']
|
|
63
|
+
}, {
|
|
64
|
+
label: intl.getMessage('colorPicker.danger', '红色'),
|
|
65
|
+
key: '红色',
|
|
66
|
+
colors: ['#FFF1F0', '#FFCCC7', '#FFA39E', '#FF7875', '#FF4D4F', '#F5222D', '#CF1322', '#A8071A', '#820014', '#5C0011']
|
|
67
|
+
}, {
|
|
68
|
+
label: intl.getMessage('colorPicker.success', '绿色'),
|
|
69
|
+
key: '绿色',
|
|
70
|
+
colors: ['#F6FFED', '#D9F7BE', '#B7EB8F', '#95DE64', '#73D13D', '#52C41A', '#389E0D', '#237804', '#135200', '#092B00']
|
|
71
|
+
}, {
|
|
72
|
+
label: intl.getMessage('colorPicker.info', '青色'),
|
|
73
|
+
key: '青色',
|
|
74
|
+
colors: ['#E6FFFB', '#B5F5EC', '#87E8DE', '#5CDBD3', '#36CFC9', '#13C2C2', '#08979C', '#006D75', '#00474F', '#002329']
|
|
75
|
+
}];
|
|
76
|
+
};
|
|
77
|
+
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
50
78
|
getPrefixCls = _useContext.getPrefixCls;
|
|
51
|
-
var prefixCls = getPrefixCls('
|
|
52
|
-
var _useStyle = (0,
|
|
79
|
+
var prefixCls = getPrefixCls('color-picker', props.prefixCls);
|
|
80
|
+
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
53
81
|
wrapSSR = _useStyle.wrapSSR,
|
|
54
82
|
hashId = _useStyle.hashId;
|
|
83
|
+
var getChangeFun = (0, _react.useCallback)(function () {
|
|
84
|
+
switch (format) {
|
|
85
|
+
case 'hsb':
|
|
86
|
+
return 'toHsbString';
|
|
87
|
+
case 'rgb':
|
|
88
|
+
return 'toRgbString';
|
|
89
|
+
default:
|
|
90
|
+
return 'toHexString';
|
|
91
|
+
}
|
|
92
|
+
}, [format]);
|
|
93
|
+
var horizontalPanelRender = function horizontalPanelRender(_, _ref) {
|
|
94
|
+
var _ref$components = _ref.components,
|
|
95
|
+
Picker = _ref$components.Picker,
|
|
96
|
+
Presets = _ref$components.Presets;
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-horizontal")),
|
|
99
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Presets, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Picker, {})
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
var verticalPanelRender = function verticalPanelRender(_, _ref2) {
|
|
105
|
+
var _ref2$components = _ref2.components,
|
|
106
|
+
Picker = _ref2$components.Picker,
|
|
107
|
+
Presets = _ref2$components.Presets;
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-vertical")),
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Picker, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Presets, {})]
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
var panelStyleProps = _objectSpread(_objectSpread(_objectSpread({}, panelStyle === 'vtx' ? {
|
|
114
|
+
presets: getVtxPresets(),
|
|
115
|
+
styles: {
|
|
116
|
+
popupOverlayInner: {
|
|
117
|
+
width: 460
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
panelRender: horizontalPanelRender
|
|
121
|
+
} : {}), panelStyle === 'normal' ? {
|
|
122
|
+
presets: getNormalPresets(),
|
|
123
|
+
styles: {
|
|
124
|
+
popupOverlayInner: {
|
|
125
|
+
width: 258
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
panelRender: verticalPanelRender
|
|
129
|
+
} : {}), panelStyle === 'horizontal' ? {
|
|
130
|
+
presets: getHorizontalPresets(),
|
|
131
|
+
styles: {
|
|
132
|
+
popupOverlayInner: {
|
|
133
|
+
width: 504
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
panelRender: horizontalPanelRender
|
|
137
|
+
} : {});
|
|
55
138
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space.Compact, {
|
|
56
139
|
style: {
|
|
57
140
|
width: '100%'
|
|
58
141
|
},
|
|
59
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Input, {
|
|
142
|
+
children: [input && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Input, {
|
|
60
143
|
ref: ref,
|
|
61
|
-
value:
|
|
144
|
+
value: value,
|
|
62
145
|
placeholder: (0, _utils.getPlaceholder)(props.placeholder),
|
|
63
146
|
readOnly: true,
|
|
64
147
|
disabled: disabled,
|
|
65
|
-
className: (0, _classnames.default)(prefixCls,
|
|
148
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-input"), hashId),
|
|
66
149
|
style: style
|
|
67
|
-
}),
|
|
150
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ColorPicker, _objectSpread(_objectSpread({
|
|
68
151
|
animation: "slide-up",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
onChange:
|
|
72
|
-
|
|
73
|
-
|
|
152
|
+
allowClear: true,
|
|
153
|
+
className: (0, _classnames.default)(prefixCls, className, hashId),
|
|
154
|
+
onChange: function onChange(e, css) {
|
|
155
|
+
var _e$colors;
|
|
156
|
+
var res = undefined;
|
|
157
|
+
if (((_e$colors = e.colors) === null || _e$colors === void 0 ? void 0 : _e$colors.length) > 1) {
|
|
158
|
+
res = e === null || e === void 0 ? void 0 : e.toCssString();
|
|
159
|
+
} else {
|
|
160
|
+
var _e$getChangeFun;
|
|
161
|
+
res = e === null || e === void 0 || (_e$getChangeFun = e[getChangeFun(format)]) === null || _e$getChangeFun === void 0 ? void 0 : _e$getChangeFun.call(e);
|
|
162
|
+
}
|
|
163
|
+
if (e.cleared) {
|
|
164
|
+
res = undefined;
|
|
165
|
+
}
|
|
166
|
+
_onChange === null || _onChange === void 0 || _onChange(res, css);
|
|
167
|
+
},
|
|
168
|
+
value: value,
|
|
169
|
+
disabled: disabled
|
|
170
|
+
}, panelStyleProps), rest))]
|
|
74
171
|
}));
|
|
75
172
|
});
|
|
76
173
|
VtxColorPicker.displayName = 'VtxColorPicker';
|
|
174
|
+
VtxColorPicker.propTypes = {
|
|
175
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
|
|
176
|
+
onChange: _propTypes.default.func,
|
|
177
|
+
className: _propTypes.default.string,
|
|
178
|
+
style: _propTypes.default.object,
|
|
179
|
+
disabled: _propTypes.default.bool,
|
|
180
|
+
placeholder: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node])
|
|
181
|
+
};
|
|
77
182
|
var _default = exports.default = VtxColorPicker;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useStyle = useStyle;
|
|
7
|
-
require("rc-color-picker/assets/index.css");
|
|
8
7
|
var _vtxProvider = require("../../vtx-provider");
|
|
9
8
|
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); }
|
|
10
9
|
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; }
|
|
@@ -14,17 +13,42 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
14
13
|
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); }
|
|
15
14
|
var genVtxColorPickerStyle = function genVtxColorPickerStyle(token) {
|
|
16
15
|
var componentCls = token.componentCls;
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
return {
|
|
17
|
+
'.ant-color-picker-inner': _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty({}, "&-vertical, &-horizontal", {
|
|
18
|
+
'.ant-color-picker-presets': {
|
|
19
|
+
paddingTop: 4,
|
|
20
|
+
'.ant-color-picker-presets-items': {
|
|
21
|
+
'.ant-color-picker-presets-color': {
|
|
22
|
+
width: 18,
|
|
23
|
+
height: 18,
|
|
24
|
+
'&::before': {
|
|
25
|
+
width: "calc(18px + var(--ant-line-width) * 4)",
|
|
26
|
+
height: "calc(18px + var(--ant-line-width) * 4)"
|
|
27
|
+
},
|
|
28
|
+
'&::affter': {
|
|
29
|
+
width: "calc(18px / 13 * 5)",
|
|
30
|
+
height: "calc(18px / 13 * 8)"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}), "&-vertical", {
|
|
36
|
+
'.ant-collapse-header': {
|
|
37
|
+
display: 'none'
|
|
38
|
+
}
|
|
39
|
+
}), "&-horizontal", {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
gap: 12,
|
|
42
|
+
'.ant-color-picker-presets': {
|
|
43
|
+
flex: 1
|
|
44
|
+
},
|
|
45
|
+
'>div': {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
width: 234
|
|
49
|
+
}
|
|
50
|
+
}))
|
|
51
|
+
};
|
|
28
52
|
};
|
|
29
53
|
function useStyle(prefixCls) {
|
|
30
54
|
return (0, _vtxProvider.useStyle)('VtxColorPicker', function (token) {
|
|
@@ -14,7 +14,7 @@ var _vtxDatagrid = _interopRequireDefault(require("../vtx-datagrid"));
|
|
|
14
14
|
var _style = require("./style");
|
|
15
15
|
var _vtxProvider = require("../vtx-provider");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
var _excluded = ["setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "selectedRowKeys", "setSelectedRowKeys", "spread", "defaultPageSize", "customEnumText"];
|
|
17
|
+
var _excluded = ["setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "selectedRowKeys", "setSelectedRowKeys", "spread", "defaultPageSize", "customEnumText", "headFootHeight", "popoverWidth"];
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
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); }
|
|
20
20
|
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; }
|
|
@@ -35,10 +35,6 @@ function VtxCombogrid(props, ref) {
|
|
|
35
35
|
var intl = (0, _vtxProvider.useIntl)();
|
|
36
36
|
var _useContext = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
|
|
37
37
|
getPrefixCls = _useContext.getPrefixCls;
|
|
38
|
-
var prefixCls = getPrefixCls('', 'vtx-combogrid');
|
|
39
|
-
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
40
|
-
wrapSSR = _useStyle.wrapSSR,
|
|
41
|
-
hashId = _useStyle.hashId;
|
|
42
38
|
var _useState = (0, _react.useState)(!!props.defaultExpandSearch),
|
|
43
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
40
|
more = _useState2[0],
|
|
@@ -59,7 +55,16 @@ function VtxCombogrid(props, ref) {
|
|
|
59
55
|
defaultPageSize = props.defaultPageSize,
|
|
60
56
|
_props$customEnumText = props.customEnumText,
|
|
61
57
|
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
58
|
+
_props$headFootHeight = props.headFootHeight,
|
|
59
|
+
headFootHeight = _props$headFootHeight === void 0 ? 95 : _props$headFootHeight,
|
|
60
|
+
popoverWidth = props.popoverWidth,
|
|
62
61
|
rest = _objectWithoutProperties(props, _excluded);
|
|
62
|
+
var prefixCls = getPrefixCls('', 'vtx-combogrid');
|
|
63
|
+
var _useStyle = (0, _style.useStyle)(prefixCls, {
|
|
64
|
+
popoverWidth: popoverWidth
|
|
65
|
+
}),
|
|
66
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
67
|
+
hashId = _useStyle.hashId;
|
|
63
68
|
var TextEnum = _objectSpread({
|
|
64
69
|
indexTitle: intl.getMessage('indexTitle', '序号'),
|
|
65
70
|
actionMoreText: intl.getMessage('actionMoreText', '更多'),
|
|
@@ -94,7 +99,7 @@ function VtxCombogrid(props, ref) {
|
|
|
94
99
|
columns: columns,
|
|
95
100
|
startIndex: (current - 1) * pageSize + 1,
|
|
96
101
|
size: 'small',
|
|
97
|
-
headFootHeight:
|
|
102
|
+
headFootHeight: headFootHeight,
|
|
98
103
|
indexTitle: TextEnum.indexTitle,
|
|
99
104
|
onRowSelectionClear: clearSelectedRow,
|
|
100
105
|
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
@@ -11,10 +11,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
13
|
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); }
|
|
14
|
-
var genVtxStyle = function genVtxStyle(token) {
|
|
14
|
+
var genVtxStyle = function genVtxStyle(token, options) {
|
|
15
15
|
var componentCls = token.componentCls;
|
|
16
16
|
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&-popover", {
|
|
17
|
-
width: 550,
|
|
17
|
+
width: options.popoverWidth || 550,
|
|
18
18
|
'.ant-form-item': {
|
|
19
19
|
marginBottom: 12
|
|
20
20
|
}
|
|
@@ -38,11 +38,11 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
38
38
|
}
|
|
39
39
|
}));
|
|
40
40
|
};
|
|
41
|
-
function useStyle(prefixCls) {
|
|
41
|
+
function useStyle(prefixCls, options) {
|
|
42
42
|
return (0, _vtxProvider.useStyle)(prefixCls, function (token) {
|
|
43
43
|
var vtxToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
44
44
|
componentCls: ".".concat(prefixCls)
|
|
45
45
|
});
|
|
46
|
-
return [genVtxStyle(vtxToken)];
|
|
46
|
+
return [genVtxStyle(vtxToken, options)];
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -44,13 +44,14 @@ function useContainer() {
|
|
|
44
44
|
_props$indexFixed = props.indexFixed,
|
|
45
45
|
indexFixed = _props$indexFixed === void 0 ? false : _props$indexFixed,
|
|
46
46
|
_props$indexTitle = props.indexTitle,
|
|
47
|
-
indexTitle = _props$indexTitle === void 0 ? '序号' : _props$indexTitle,
|
|
47
|
+
indexTitle = _props$indexTitle === void 0 ? intl.getMessage('indexTitle', '序号') : _props$indexTitle,
|
|
48
48
|
_props$indexWidth = props.indexWidth,
|
|
49
49
|
indexWidth = _props$indexWidth === void 0 ? 70 : _props$indexWidth,
|
|
50
50
|
onColumnsSave = props.onColumnsSave,
|
|
51
51
|
disabledColumnKeys = props.disabledColumnKeys,
|
|
52
52
|
hideColumnSetting = props.hideColumnSetting,
|
|
53
|
-
customEnumText = props.customEnumText
|
|
53
|
+
_props$customEnumText = props.customEnumText,
|
|
54
|
+
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText;
|
|
54
55
|
var TextEnum = _objectSpread({
|
|
55
56
|
refreshText: intl.getMessage('tableToolBar.reload', '刷新'),
|
|
56
57
|
densityDefaultText: intl.getMessage('tableToolBar.densityDefault', '默认'),
|
|
@@ -79,8 +80,8 @@ function useContainer() {
|
|
|
79
80
|
noFixedTitle: intl.getMessage('tableToolBar.noFixedTitle', '不固定'),
|
|
80
81
|
rightFixedTitle: intl.getMessage('tableToolBar.rightFixedTitle', '固定在右侧'),
|
|
81
82
|
columnAll: intl.getMessage('tableToolBar.columnAll', '全部'),
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
paginationTotalText: intl.getMessage('pagination.total.total', '共'),
|
|
84
|
+
paginationItemText: intl.getMessage('pagination.total.item', '条')
|
|
84
85
|
}, customEnumText);
|
|
85
86
|
var isFirst = (0, _react.useRef)(true);
|
|
86
87
|
var actionRef = (0, _react.useRef)();
|
|
@@ -36,7 +36,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
36
36
|
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; }
|
|
37
37
|
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; }
|
|
38
38
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
39
|
-
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); }
|
|
39
|
+
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); } // omit 用于从对象中排除指定的属性,返回一个新对象
|
|
40
40
|
var ToolTipIcon = function ToolTipIcon(_ref) {
|
|
41
41
|
var title = _ref.title,
|
|
42
42
|
show = _ref.show,
|
|
@@ -365,7 +365,6 @@ function ColumnSetting(props) {
|
|
|
365
365
|
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
366
366
|
wrapSSR = _useStyle.wrapSSR,
|
|
367
367
|
hashId = _useStyle.hashId;
|
|
368
|
-
var localColumns = props.columns;
|
|
369
368
|
var _useContext8 = (0, _react.useContext)(_Provide.TableContext),
|
|
370
369
|
uniqueKey = _useContext8.uniqueKey,
|
|
371
370
|
columnsMap = _useContext8.columnsMap,
|
|
@@ -373,7 +372,9 @@ function ColumnSetting(props) {
|
|
|
373
372
|
defaultColumnKeyMap = _useContext8.defaultColumnKeyMap,
|
|
374
373
|
setSortKeyColumns = _useContext8.setSortKeyColumns,
|
|
375
374
|
saveColumns = _useContext8.saveColumns,
|
|
376
|
-
TextEnum = _useContext8.TextEnum
|
|
375
|
+
TextEnum = _useContext8.TextEnum,
|
|
376
|
+
tableColumn = _useContext8.tableColumn;
|
|
377
|
+
var localColumns = props.localColumns;
|
|
377
378
|
var checkedColumnKeys = props.checkedColumnKeys,
|
|
378
379
|
onColumnsSave = props.onColumnsSave;
|
|
379
380
|
|
|
@@ -29,9 +29,9 @@ function ToolBar(props) {
|
|
|
29
29
|
onRefresh = props.onRefresh,
|
|
30
30
|
hideColumnHeight = props.hideColumnHeight,
|
|
31
31
|
hideColumnSetting = props.hideColumnSetting,
|
|
32
|
-
columns = props.columns,
|
|
33
32
|
onColumnsSave = props.onColumnsSave,
|
|
34
33
|
uniqueKey = props.uniqueKey,
|
|
34
|
+
columns = props.columns,
|
|
35
35
|
TextEnum = props.TextEnum;
|
|
36
36
|
var _useStyle = (0, _style.useStyle)("".concat(prefix, "-toolbar")),
|
|
37
37
|
wrapSSR = _useStyle.wrapSSR,
|
|
@@ -80,7 +80,7 @@ function ToolBar(props) {
|
|
|
80
80
|
}), !hideColumnSetting && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
81
|
className: "".concat(prefix, "-toolbar-setting-item"),
|
|
82
82
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ColumnSetting.default, {
|
|
83
|
-
|
|
83
|
+
localColumns: columns,
|
|
84
84
|
uniqueKey: uniqueKey,
|
|
85
85
|
onColumnsSave: onColumnsSave
|
|
86
86
|
})
|
|
@@ -4,6 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.DEFAULT_HEIGHTS = void 0;
|
|
7
8
|
exports.VtxDatagrid = VtxDatagrid;
|
|
8
9
|
exports.indexColumnKey = exports.default = void 0;
|
|
9
10
|
var _ahooks = require("ahooks");
|
|
@@ -18,6 +19,7 @@ var _ToolBar = _interopRequireDefault(require("./ToolBar"));
|
|
|
18
19
|
var _Provide = require("./Store/Provide");
|
|
19
20
|
var _index = require("./style/index");
|
|
20
21
|
var _reactAntdColumnResize = require("react-antd-column-resize");
|
|
22
|
+
var _vtxProvider = require("../vtx-provider");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
24
|
var _excluded = ["toolbar", "toolbarClassName", "toolbarTilte", "buttonGroup", "refreshIconVisible", "hideColumnSetting", "hideColumnHeight", "onRefresh", "bordered", "startIndex", "autoFit", "headFootHeight", "columnResizable", "components", "className", "style", "emptyText", "onRowSelectionClear", "onColumnsSave", "uniqueKey", "prefixUrl", "hideSelectionClear", "customEnumText"];
|
|
23
25
|
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); }
|
|
@@ -38,8 +40,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
38
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
41
|
var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
|
|
40
42
|
var indexColumnKey = exports.indexColumnKey = '_serialNum';
|
|
43
|
+
var DEFAULT_HEIGHTS = exports.DEFAULT_HEIGHTS = {
|
|
44
|
+
HEAD_FOOT: 115,
|
|
45
|
+
ALERT: 49,
|
|
46
|
+
TOOLBAR: 56
|
|
47
|
+
};
|
|
41
48
|
function VtxTable(props) {
|
|
42
49
|
var _rest$dataSource, _rest$rowSelection, _rest$rowSelection3, _rest$rowSelection4;
|
|
50
|
+
var intl = (0, _vtxProvider.useIntl)();
|
|
43
51
|
var _useContext = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
|
|
44
52
|
getPrefixCls = _useContext.getPrefixCls;
|
|
45
53
|
var prefixCls = getPrefixCls('', 'vtx-datagrid');
|
|
@@ -75,7 +83,7 @@ function VtxTable(props) {
|
|
|
75
83
|
toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
|
|
76
84
|
toolbarClassName = props.toolbarClassName,
|
|
77
85
|
_props$toolbarTilte = props.toolbarTilte,
|
|
78
|
-
toolbarTilte = _props$toolbarTilte === void 0 ? '查询结果' : _props$toolbarTilte,
|
|
86
|
+
toolbarTilte = _props$toolbarTilte === void 0 ? intl.getMessage('datagrid.queryResults', '查询结果') : _props$toolbarTilte,
|
|
79
87
|
buttonGroup = props.buttonGroup,
|
|
80
88
|
_props$refreshIconVis = props.refreshIconVisible,
|
|
81
89
|
refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
|
|
@@ -89,14 +97,14 @@ function VtxTable(props) {
|
|
|
89
97
|
_props$autoFit = props.autoFit,
|
|
90
98
|
autoFit = _props$autoFit === void 0 ? true : _props$autoFit,
|
|
91
99
|
_props$headFootHeight = props.headFootHeight,
|
|
92
|
-
headFootHeight = _props$headFootHeight === void 0 ?
|
|
100
|
+
headFootHeight = _props$headFootHeight === void 0 ? DEFAULT_HEIGHTS.HEAD_FOOT : _props$headFootHeight,
|
|
93
101
|
_props$columnResizabl = props.columnResizable,
|
|
94
102
|
columnResizable = _props$columnResizabl === void 0 ? true : _props$columnResizabl,
|
|
95
103
|
components = props.components,
|
|
96
104
|
className = props.className,
|
|
97
105
|
style = props.style,
|
|
98
106
|
_props$emptyText = props.emptyText,
|
|
99
|
-
emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
|
|
107
|
+
emptyText = _props$emptyText === void 0 ? intl.getMessage('select.empty', '暂无数据') : _props$emptyText,
|
|
100
108
|
onRowSelectionClear = props.onRowSelectionClear,
|
|
101
109
|
onColumnsSave = props.onColumnsSave,
|
|
102
110
|
uniqueKey = props.uniqueKey,
|
|
@@ -132,14 +140,12 @@ function VtxTable(props) {
|
|
|
132
140
|
var resizeObserver = new ResizeObserver(function () {
|
|
133
141
|
calculateHeight();
|
|
134
142
|
});
|
|
135
|
-
// componentDidMount
|
|
136
143
|
if (autoFit && rootDomRef.current) {
|
|
137
144
|
resizeObserver.observe(rootDomRef.current, {
|
|
138
145
|
box: 'border-box'
|
|
139
146
|
});
|
|
140
147
|
}
|
|
141
148
|
return function () {
|
|
142
|
-
// componentWillUnmount
|
|
143
149
|
if (autoFit) {
|
|
144
150
|
resizeObserver.disconnect();
|
|
145
151
|
}
|
|
@@ -161,7 +167,7 @@ function VtxTable(props) {
|
|
|
161
167
|
showSizeChanger: true,
|
|
162
168
|
showQuickJumper: true,
|
|
163
169
|
showTotal: function showTotal(total) {
|
|
164
|
-
return "".concat(TextEnum.
|
|
170
|
+
return "".concat(TextEnum.paginationTotalText, " ").concat(total, " ").concat(TextEnum.paginationItemText);
|
|
165
171
|
}
|
|
166
172
|
}, pagination);
|
|
167
173
|
};
|
|
@@ -236,8 +242,8 @@ function VtxTable(props) {
|
|
|
236
242
|
selectedRowKeys: (_rest$rowSelection4 = rest.rowSelection) === null || _rest$rowSelection4 === void 0 ? void 0 : _rest$rowSelection4.selectedRowKeys,
|
|
237
243
|
onRowSelectionClear: onRowSelectionClear
|
|
238
244
|
}) : null;
|
|
239
|
-
alertHeight.current = !hideSelectionClear && hasAlert ?
|
|
240
|
-
toolbarHeight.current = toolbar ?
|
|
245
|
+
alertHeight.current = !hideSelectionClear && hasAlert ? DEFAULT_HEIGHTS.ALERT : 0;
|
|
246
|
+
toolbarHeight.current = toolbar ? DEFAULT_HEIGHTS.TOOLBAR : 0;
|
|
241
247
|
var _useAntdColumnResize = (0, _reactAntdColumnResize.useAntdColumnResize)(function () {
|
|
242
248
|
return {
|
|
243
249
|
columns: columns,
|
|
@@ -288,7 +294,7 @@ function VtxTable(props) {
|
|
|
288
294
|
hideColumnHeight: hideColumnHeight,
|
|
289
295
|
hideColumnSetting: hideColumnSetting,
|
|
290
296
|
onRefresh: onRefresh,
|
|
291
|
-
columns:
|
|
297
|
+
columns: tableColumn,
|
|
292
298
|
onColumnsSave: onColumnsSave,
|
|
293
299
|
uniqueKey: uniqueKey,
|
|
294
300
|
prefixUrl: prefixUrl,
|
|
@@ -106,7 +106,8 @@ function FormItem(props) {
|
|
|
106
106
|
children: label
|
|
107
107
|
}),
|
|
108
108
|
required: required,
|
|
109
|
-
hidden: hidden
|
|
109
|
+
hidden: hidden,
|
|
110
|
+
colon: label ? true : false
|
|
110
111
|
}, formItemLayout), {}, {
|
|
111
112
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Form.Item, _objectSpread(_objectSpread(_objectSpread({
|
|
112
113
|
noStyle: true
|
package/lib/vtx-import2/index.js
CHANGED
|
@@ -221,7 +221,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
|
|
|
221
221
|
if (xhr.status === 200) {
|
|
222
222
|
var res = JSON.parse(xhr.responseText);
|
|
223
223
|
if ((res === null || res === void 0 ? void 0 : res.result) == 0) {
|
|
224
|
-
_antd.message.success('上传成功');
|
|
224
|
+
_antd.message.success(intl.getMessage('import.success', '上传成功'));
|
|
225
225
|
chunkUpload(res.data);
|
|
226
226
|
} else {
|
|
227
227
|
_antd.message.error((res === null || res === void 0 ? void 0 : res.msg) || intl.getMessage('import.error', '上传失败'));
|
|
@@ -54,12 +54,17 @@ var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
54
54
|
}));
|
|
55
55
|
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
var wrapper = null;
|
|
58
|
+
if (showCount && 'value' in props) {
|
|
59
|
+
wrapper = function wrapper(element) {
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
className: (0, _classnames.default)(prefixCls, hashId),
|
|
62
|
+
"data-count": "".concat(len, "/").concat(maxLength),
|
|
63
|
+
children: element
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return wrapSSR(wrapper ? wrapper(render) : render);
|
|
63
68
|
});
|
|
64
69
|
var _default = exports.default = TextArea;
|
|
65
70
|
TextArea.propTypes = {
|
|
@@ -25,11 +25,13 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
|
|
|
25
25
|
padding: 0
|
|
26
26
|
},
|
|
27
27
|
'.ant-modal-body': {
|
|
28
|
-
|
|
28
|
+
height: 'calc(100% - 108px)',
|
|
29
29
|
padding: '12px 20px 8px 20px',
|
|
30
|
-
overflowY: 'auto'
|
|
31
|
-
height: '100%'
|
|
30
|
+
overflowY: 'auto'
|
|
32
31
|
}
|
|
32
|
+
},
|
|
33
|
+
'.ant-modal-container': {
|
|
34
|
+
padding: 0
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
}, '&-title', _defineProperty(_defineProperty(_defineProperty({
|
|
@@ -26,7 +26,7 @@ function Content(props) {
|
|
|
26
26
|
height = props.height;
|
|
27
27
|
var contentClass = (0, _classnames2.default)(_defineProperty(_defineProperty(_defineProperty({}, 'vtx-page-content-absolute', !relative), 'vtx-page-content-relative', relative), 'vtx-page-content-scroll-y', scrollY), className);
|
|
28
28
|
var newStyle = style;
|
|
29
|
-
if (
|
|
29
|
+
if (height !== undefined) {
|
|
30
30
|
newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
|
|
31
31
|
height: height
|
|
32
32
|
});
|
|
@@ -12,16 +12,10 @@ var _style = require("./style");
|
|
|
12
12
|
var _vtxProvider = require("../vtx-provider");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
|
-
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); } /**
|
|
15
|
+
/**
|
|
21
16
|
* 页面
|
|
22
17
|
* @param {*} props
|
|
23
|
-
*/
|
|
24
|
-
var Page = function Page(props) {
|
|
18
|
+
*/var Page = function Page(props) {
|
|
25
19
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
26
20
|
getPrefixCls = _useContext.getPrefixCls;
|
|
27
21
|
var prefix = getPrefixCls('page', props.prefixCls);
|
|
@@ -55,7 +49,7 @@ var Content = function Content(props) {
|
|
|
55
49
|
hashId = _useStyle2.hashId;
|
|
56
50
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
57
51
|
className: (0, _classnames.default)("".concat(prefix, "-tab-content"), className, hashId),
|
|
58
|
-
style:
|
|
52
|
+
style: style,
|
|
59
53
|
children: props.children
|
|
60
54
|
}));
|
|
61
55
|
};
|