@sooloer/pages 0.1.13 → 0.1.15
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/dist/table/demo/basic.js
CHANGED
|
@@ -11,7 +11,7 @@ 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 { ProTable } from "../..";
|
|
14
|
-
import { ConfigProvider } from 'antd';
|
|
14
|
+
import { Button, ConfigProvider } from 'antd';
|
|
15
15
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
16
16
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
17
17
|
import { columns, fetchData, total } from "./data";
|
|
@@ -80,6 +80,7 @@ export default (function () {
|
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
+
extraAction: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, null, "sdfsd")),
|
|
83
84
|
dataSource: dataSource,
|
|
84
85
|
pagination: {
|
|
85
86
|
size: 'small',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
var _excluded = ["loading", "height", "columns", "pagination", "setting", "rowKey", "dataSource", "globalCheckable", "globalCheckboxText", "onGlobalCheckboxChange"],
|
|
2
|
+
var _excluded = ["loading", "height", "columns", "pagination", "setting", "rowKey", "dataSource", "globalCheckable", "globalCheckboxText", "onGlobalCheckboxChange", "extraAction"],
|
|
3
3
|
_excluded2 = ["getContainer"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
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; }
|
|
@@ -44,6 +44,7 @@ var ElTable = function ElTable(_ref) {
|
|
|
44
44
|
_ref$globalCheckboxTe = _ref.globalCheckboxText,
|
|
45
45
|
globalCheckboxText = _ref$globalCheckboxTe === void 0 ? '全选所有数据' : _ref$globalCheckboxTe,
|
|
46
46
|
onGlobalCheckboxChange = _ref.onGlobalCheckboxChange,
|
|
47
|
+
extraAction = _ref.extraAction,
|
|
47
48
|
args = _objectWithoutProperties(_ref, _excluded);
|
|
48
49
|
var _useState = useState('small'),
|
|
49
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -98,7 +99,7 @@ var ElTable = function ElTable(_ref) {
|
|
|
98
99
|
checked: globalChecked,
|
|
99
100
|
onChange: handleGlobalChange,
|
|
100
101
|
className: "sooloer-table-global-checkbox"
|
|
101
|
-
}, globalCheckboxText)), /*#__PURE__*/React.createElement(Col, {
|
|
102
|
+
}, globalCheckboxText), extraAction), /*#__PURE__*/React.createElement(Col, {
|
|
102
103
|
flex: "none"
|
|
103
104
|
}, "\u7B2C ".concat(range[0], " - ").concat(range[1], " \u6761\uFF0C\u5171 ").concat(total, " \u6761\u8BB0\u5F55")));
|
|
104
105
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGlobalStyle } from 'styled-components';
|
|
2
|
-
var Style = createGlobalStyle([".sooloer-table{height:100%;> .", "-spin-nested-loading{height:100%;> .", "-spin-container{height:100%;}}&.pagination-hidden{.", "-table{height:100%;}}.", "-table{height:calc(100% - 48px);}.", "-table-container{height:100%;}.", "-table-body{height:100%;}.", "-table-placeholder{> td{border-bottom:none !important;}}.", "-pagination-total-text{flex:1;}.", "-table-expanded-row{> td{padding:0 !important;}.", "-table{margin-block:8px !important;margin-inline
|
|
2
|
+
var Style = createGlobalStyle([".sooloer-table{height:100%;> .", "-spin-nested-loading{height:100%;> .", "-spin-container{height:100%;}}&.pagination-hidden{.", "-table{height:100%;}}.", "-table{height:calc(100% - 48px);}.", "-table-container{height:100%;}.", "-table-body{height:100%;}.", "-table-placeholder{> td{border-bottom:none !important;}}.", "-pagination-total-text{flex:1;}.", "-table-expanded-row{> td{padding:0 !important;}.", "-table{margin-block:8px !important;margin-inline:0 !important;}}&-global-checkbox{margin-left:12px;}.sooloer-table-pagination{margin:12px 0 !important;}}"], function (props) {
|
|
3
3
|
return props.prefix;
|
|
4
4
|
}, function (props) {
|
|
5
5
|
return props.prefix;
|