tntd 2.8.18 → 2.8.20

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.
Files changed (143) hide show
  1. package/es/tntd-virtual-tree/index.js +3 -2
  2. package/es/tntd-virtual-tree/index.js.map +1 -1
  3. package/es/tntd-virtual-tree/index.less +2 -2
  4. package/es/tntd-virtual-tree-select/index.js +6 -2
  5. package/es/tntd-virtual-tree-select/index.js.map +1 -1
  6. package/lib/tntd-virtual-tree/index.d.ts +2 -1
  7. package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
  8. package/lib/tntd-virtual-tree/index.js +5 -3
  9. package/lib/tntd-virtual-tree/index.js.map +1 -1
  10. package/lib/tntd-virtual-tree/index.less +2 -2
  11. package/lib/tntd-virtual-tree-select/index.d.ts +3 -1
  12. package/lib/tntd-virtual-tree-select/index.d.ts.map +1 -1
  13. package/lib/tntd-virtual-tree-select/index.js +9 -3
  14. package/lib/tntd-virtual-tree-select/index.js.map +1 -1
  15. package/package.json +1 -1
  16. package/es/alert/alert.js +0 -71
  17. package/es/alert/alert.js.map +0 -1
  18. package/es/alert/alert.less +0 -128
  19. package/es/cascader/cascader.js +0 -30
  20. package/es/cascader/cascader.js.map +0 -1
  21. package/es/cascader/cascader.less +0 -16
  22. package/es/checkbox/check.png +0 -0
  23. package/es/checkbox/checkbox.js +0 -48
  24. package/es/checkbox/checkbox.js.map +0 -1
  25. package/es/checkbox/checkbox.less +0 -69
  26. package/es/date-picker/DatePicker.js +0 -101
  27. package/es/date-picker/DatePicker.js.map +0 -1
  28. package/es/date-picker/index.less +0 -294
  29. package/es/input-number/inputNumber.js +0 -34
  30. package/es/input-number/inputNumber.js.map +0 -1
  31. package/es/input-number/inputNumber.less +0 -12
  32. package/es/modal/index.less +0 -36
  33. package/es/popconfirm/index.less +0 -32
  34. package/es/popconfirm/popconfirm.js +0 -43
  35. package/es/popconfirm/popconfirm.js.map +0 -1
  36. package/es/popover/index.less +0 -57
  37. package/es/popover/popover.js +0 -34
  38. package/es/popover/popover.js.map +0 -1
  39. package/es/progress/progress.js +0 -132
  40. package/es/progress/progress.js.map +0 -1
  41. package/es/progress/progress.less +0 -82
  42. package/es/query-form-backup/Field/Composition/FieldPopover.less +0 -35
  43. package/es/query-form-backup/Field/Composition/index.less +0 -114
  44. package/es/query-form-backup/index.less +0 -90
  45. package/es/radio/radio.js +0 -57
  46. package/es/radio/radio.js.map +0 -1
  47. package/es/radio/radio.less +0 -43
  48. package/es/spin/spin.js +0 -36
  49. package/es/spin/spin.js.map +0 -1
  50. package/es/spin/spin.less +0 -9
  51. package/es/steps/assets/background_left.svg +0 -12
  52. package/es/steps/assets/background_right.svg +0 -12
  53. package/es/steps/assets/horizontal_line.svg +0 -3
  54. package/es/steps/assets/vertical_line.svg +0 -3
  55. package/es/steps/stepStyle/icon.less +0 -51
  56. package/es/steps/stepStyle/progress-dot.less +0 -10
  57. package/es/steps/stepStyle/variables.less +0 -8
  58. package/es/steps/stepStyle/vertical.less +0 -41
  59. package/es/switch/index.less +0 -45
  60. package/es/tabs/tabs.less +0 -125
  61. package/es/time-picker/TimePicker.js +0 -36
  62. package/es/time-picker/TimePicker.js.map +0 -1
  63. package/es/time-picker/index.less +0 -38
  64. package/es/tntd-action/Action.js +0 -117
  65. package/es/tntd-action/Action.js.map +0 -1
  66. package/es/tntd-action/index.less +0 -59
  67. package/es/tntd-select/index.less +0 -7
  68. package/lib/alert/alert.d.ts +0 -12
  69. package/lib/alert/alert.d.ts.map +0 -1
  70. package/lib/alert/alert.js +0 -93
  71. package/lib/alert/alert.js.map +0 -1
  72. package/lib/alert/alert.less +0 -128
  73. package/lib/cascader/cascader.d.ts +0 -10
  74. package/lib/cascader/cascader.d.ts.map +0 -1
  75. package/lib/cascader/cascader.js +0 -49
  76. package/lib/cascader/cascader.js.map +0 -1
  77. package/lib/cascader/cascader.less +0 -16
  78. package/lib/checkbox/check.png +0 -0
  79. package/lib/checkbox/checkbox.d.ts +0 -16
  80. package/lib/checkbox/checkbox.d.ts.map +0 -1
  81. package/lib/checkbox/checkbox.js +0 -65
  82. package/lib/checkbox/checkbox.js.map +0 -1
  83. package/lib/checkbox/checkbox.less +0 -69
  84. package/lib/date-picker/DatePicker.d.ts +0 -21
  85. package/lib/date-picker/DatePicker.d.ts.map +0 -1
  86. package/lib/date-picker/DatePicker.js +0 -128
  87. package/lib/date-picker/DatePicker.js.map +0 -1
  88. package/lib/date-picker/index.less +0 -294
  89. package/lib/input-number/inputNumber.d.ts +0 -10
  90. package/lib/input-number/inputNumber.d.ts.map +0 -1
  91. package/lib/input-number/inputNumber.js +0 -54
  92. package/lib/input-number/inputNumber.js.map +0 -1
  93. package/lib/input-number/inputNumber.less +0 -12
  94. package/lib/modal/index.less +0 -36
  95. package/lib/popconfirm/index.less +0 -32
  96. package/lib/popconfirm/popconfirm.d.ts +0 -8
  97. package/lib/popconfirm/popconfirm.d.ts.map +0 -1
  98. package/lib/popconfirm/popconfirm.js +0 -61
  99. package/lib/popconfirm/popconfirm.js.map +0 -1
  100. package/lib/popover/index.less +0 -57
  101. package/lib/popover/popover.d.ts +0 -14
  102. package/lib/popover/popover.d.ts.map +0 -1
  103. package/lib/popover/popover.js +0 -55
  104. package/lib/popover/popover.js.map +0 -1
  105. package/lib/progress/progress.d.ts +0 -12
  106. package/lib/progress/progress.d.ts.map +0 -1
  107. package/lib/progress/progress.js +0 -148
  108. package/lib/progress/progress.js.map +0 -1
  109. package/lib/progress/progress.less +0 -82
  110. package/lib/query-form-backup/Field/Composition/FieldPopover.less +0 -35
  111. package/lib/query-form-backup/Field/Composition/index.less +0 -114
  112. package/lib/query-form-backup/index.less +0 -90
  113. package/lib/radio/radio.d.ts +0 -17
  114. package/lib/radio/radio.d.ts.map +0 -1
  115. package/lib/radio/radio.js +0 -75
  116. package/lib/radio/radio.js.map +0 -1
  117. package/lib/radio/radio.less +0 -43
  118. package/lib/spin/spin.d.ts +0 -9
  119. package/lib/spin/spin.d.ts.map +0 -1
  120. package/lib/spin/spin.js +0 -44
  121. package/lib/spin/spin.js.map +0 -1
  122. package/lib/spin/spin.less +0 -9
  123. package/lib/steps/assets/background_left.svg +0 -12
  124. package/lib/steps/assets/background_right.svg +0 -12
  125. package/lib/steps/assets/horizontal_line.svg +0 -3
  126. package/lib/steps/assets/vertical_line.svg +0 -3
  127. package/lib/steps/stepStyle/icon.less +0 -51
  128. package/lib/steps/stepStyle/progress-dot.less +0 -10
  129. package/lib/steps/stepStyle/variables.less +0 -8
  130. package/lib/steps/stepStyle/vertical.less +0 -41
  131. package/lib/switch/index.less +0 -45
  132. package/lib/tabs/tabs.less +0 -125
  133. package/lib/time-picker/TimePicker.d.ts +0 -9
  134. package/lib/time-picker/TimePicker.d.ts.map +0 -1
  135. package/lib/time-picker/TimePicker.js +0 -55
  136. package/lib/time-picker/TimePicker.js.map +0 -1
  137. package/lib/time-picker/index.less +0 -38
  138. package/lib/tntd-action/Action.d.ts +0 -6
  139. package/lib/tntd-action/Action.d.ts.map +0 -1
  140. package/lib/tntd-action/Action.js +0 -141
  141. package/lib/tntd-action/Action.js.map +0 -1
  142. package/lib/tntd-action/index.less +0 -59
  143. package/lib/tntd-select/index.less +0 -7
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":"AASA;;;sBAgBC"}
@@ -1,141 +0,0 @@
1
- "use strict";
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
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = WarpAction;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactDom = _interopRequireDefault(require("react-dom"));
10
- var _configProvider = require("antd/lib/config-provider");
11
- var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
- var _button = require("../button");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
- 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
- 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 && {}.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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
18
- 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."); }
19
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
20
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21
- 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; } }
22
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
23
- var __rest = void 0 && (void 0).__rest || function (s, e) {
24
- var t = {};
25
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
- }
29
- return t;
30
- };
31
- var defaultGetContainer = function defaultGetContainer() {
32
- return document.getElementById('subapp-viewport') || document.body;
33
- };
34
- function WarpAction(_a) {
35
- var _a$getContainer = _a.getContainer,
36
- getContainer = _a$getContainer === void 0 ? defaultGetContainer : _a$getContainer,
37
- other = __rest(_a, ["getContainer"]);
38
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
39
- var getPrefixCls = _ref.getPrefixCls,
40
- getContextPopupContainer = _ref.getPopupContainer;
41
- var _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer;
42
- return _react["default"].createElement(_LocaleReceiver["default"], {
43
- componentName: "TntdAction"
44
- }, function (locale) {
45
- return _react["default"].createElement(Action, Object.assign({
46
- getPopupContainer: _getContainer
47
- }, other, {
48
- locale: locale
49
- }));
50
- });
51
- });
52
- }
53
- function Action(_ref2) {
54
- var title = _ref2.title,
55
- hidden = _ref2.hidden,
56
- data = _ref2.data,
57
- afterClose = _ref2.afterClose,
58
- locale = _ref2.locale,
59
- className = _ref2.className,
60
- _ref2$width = _ref2.width,
61
- width = _ref2$width === void 0 ? 700 : _ref2$width,
62
- getPopupContainer = _ref2.getPopupContainer;
63
- var _useState = (0, _react.useState)(false),
64
- _useState2 = _slicedToArray(_useState, 2),
65
- visible = _useState2[0],
66
- setVisible = _useState2[1];
67
- var _useState3 = (0, _react.useState)({
68
- left: 400,
69
- bottom: 100,
70
- width: width
71
- }),
72
- _useState4 = _slicedToArray(_useState3, 2),
73
- offset = _useState4[0],
74
- setOffset = _useState4[1];
75
- var ref = (0, _react.useRef)();
76
- var refDom = (0, _react.useRef)();
77
- (0, _react.useEffect)(function () {
78
- ref.current = getPopupContainer();
79
- }, [getPopupContainer]);
80
- (0, _react.useEffect)(function () {
81
- var visible = data.length > 0;
82
- if (visible && ref.current) {
83
- var _offset = ref.current.getBoundingClientRect();
84
- setOffset({
85
- left: _offset.left + (_offset.width - width) / 2,
86
- bottom: 100,
87
- width: width
88
- });
89
- }
90
- setVisible(visible);
91
- }, [data, width]);
92
- var onMouseDown = function onMouseDown(e) {
93
- var startX = e.clientX - offset.left;
94
- var startY = e.clientY + offset.bottom;
95
- var onmousemove = function onmousemove(e) {
96
- if (e.buttons === 1) {
97
- refDom.current.style.left = e.clientX - startX + 'px';
98
- refDom.current.style.bottom = startY - e.clientY + 'px';
99
- } else {
100
- _onmouseup(e);
101
- }
102
- };
103
- var _onmouseup = function onmouseup(e) {
104
- setOffset(function (offset) {
105
- return Object.assign(Object.assign({}, offset), {
106
- left: e.clientX - startX,
107
- bottom: startY - e.clientY
108
- });
109
- });
110
- document.removeEventListener('mousemove', onmousemove);
111
- document.removeEventListener('mouseup', _onmouseup);
112
- };
113
- document.addEventListener('mousemove', onmousemove);
114
- document.addEventListener('mouseup', _onmouseup);
115
- };
116
- if (ref.current && visible && !hidden) {
117
- return _reactDom["default"].createPortal(_react["default"].createElement("div", {
118
- className: (0, _classnames["default"])('tnt-action', className),
119
- style: offset,
120
- onMouseDown: onMouseDown,
121
- ref: refDom
122
- }, _react["default"].createElement("div", {
123
- className: "fr",
124
- onClick: function onClick(e) {
125
- e.stopPropagation();
126
- }
127
- }, data), _react["default"].createElement(_button.Button, {
128
- shape: "circle",
129
- icon: "close",
130
- type: "tertiary",
131
- onClick: function onClick(e) {
132
- e.stopPropagation();
133
- setVisible(false);
134
- afterClose && afterClose();
135
- }
136
- }), _react["default"].createElement("span", {
137
- className: "tnt-action-text"
138
- }, title)), document.body);
139
- }
140
- return null;
141
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0D;AAC1D,0DAAgC;AAChC,6DAAwD;AACxD,4FAAmE;AACnE,4DAAmC;AACnC,sCAAkC;AAElC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAA;AAE7F,SAAwB,UAAU,CAAC,EAAgD;QAAhD,EAAE,YAAY,GAAG,mBAAmB,OAAY,EAAP,KAAK,cAA9C,gBAAgD,CAAF;IAC/E,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,EAAE,EAAE;QACjE,MAAM,aAAa,GAAG,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,YAAY,CAAA;QAE1F,OAAO,CACL,8BAAC,wBAAc,IAAC,aAAa,EAAC,YAAY,IACvC,CAAC,MAAM,EAAE,EAAE;YACV,OAAO,8BAAC,MAAM,kBAAC,iBAAiB,EAAE,aAAa,IAAM,KAAK,IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;QAChF,CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC;AAhBD,6BAgBC;AAED,SAAS,MAAM,CAAC,EACd,KAAK,EACL,MAAM,EACN,IAAI,EACJ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,GAAG,GAAG,EACX,iBAA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ACd,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAA;oBACnB,UAAU,CAAC,KAAK,CAAC,CAAA;oBACjB,UAAU,IAAI,UAAU,EAAE,CAAA;gBAC5B,CAAC,GACD;YACF,wCAAM,SAAS,EAAC,iBAAiB,IAAE,KAAK,CAAQ,CAC5C,EACN,QAAQ,CAAC,IAAI,CACd,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\nimport ReactDOM from 'react-dom'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport { Button } from '../button'\n\nconst defaultGetContainer = () => document.getElementById('subapp-viewport') || document.body\n\nexport default function WarpAction({ getContainer = defaultGetContainer, ...other }) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls, getPopupContainer: getContextPopupContainer }) => {\n const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer\n\n return (\n <LocaleReceiver componentName=\"TntdAction\">\n {(locale) => {\n return <Action getPopupContainer={_getContainer} {...other} locale={locale} />\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n\nfunction Action({\n title,\n hidden,\n data,\n afterClose,\n locale,\n className,\n width = 700,\n getPopupContainer,\n}) {\n const [visible, setVisible] = useState(false)\n const [offset, setOffset] = useState({ left: 400, bottom: 100, width })\n const ref = useRef()\n const refDom = useRef()\n\n useEffect(() => {\n ref.current = getPopupContainer()\n }, [getPopupContainer])\n\n useEffect(() => {\n const visible = data.length > 0\n if (visible && ref.current) {\n const offset = ref.current.getBoundingClientRect()\n setOffset({ left: offset.left + (offset.width - width) / 2, bottom: 100, width })\n }\n setVisible(visible)\n }, [data, width])\n\n const onMouseDown = (e) => {\n const startX = e.clientX - offset.left\n const startY = e.clientY + offset.bottom\n const onmousemove = (e) => {\n if (e.buttons === 1) {\n refDom.current.style.left = e.clientX - startX + 'px'\n refDom.current.style.bottom = startY - e.clientY + 'px'\n } else {\n onmouseup(e);\n }\n }\n const onmouseup = (e) => {\n setOffset((offset) => ({ ...offset, left: e.clientX - startX, bottom: startY - e.clientY }))\n document.removeEventListener('mousemove', onmousemove)\n document.removeEventListener('mouseup', onmouseup)\n }\n document.addEventListener('mousemove', onmousemove)\n document.addEventListener('mouseup', onmouseup)\n }\n\n if (ref.current && visible && !hidden) {\n return ReactDOM.createPortal(\n <div\n className={classNames('tnt-action', className)}\n style={offset}\n onMouseDown={onMouseDown}\n ref={refDom}\n >\n <div\n className=\"fr\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n >\n {data}\n </div>\n <Button\n shape=\"circle\"\n icon=\"close\"\n type=\"tertiary\"\n onClick={(e) => {\n e.stopPropagation()\n setVisible(false)\n afterClose && afterClose()\n }}\n />\n <span className=\"tnt-action-text\">{title}</span>\n </div>,\n document.body\n )\n }\n return null\n}\n"]}
@@ -1,59 +0,0 @@
1
- .tnt-action {
2
- position: fixed;
3
- // bottom: 100px;
4
- // width: @tnt-action-width;
5
- // left: calc(50vw - @tnt-action-width / 2);
6
- padding: 10px 16px;
7
- background-color: @text-color;
8
- border-radius: @border-radius-base;
9
- z-index: 200;
10
- cursor: grab;
11
- box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.25), 0px 1px 1px 0px #263354 inset;
12
- &-text {
13
- color: @white;
14
- margin-left: 20px;
15
- font-size: 14px;
16
- user-select: none;
17
- .num {
18
- display: inline-block;
19
- width: 16px;
20
- height: 16px;
21
- background: #454f64;
22
- border-radius: 8px;
23
- font-size: 10px;
24
- margin-right: 4px;
25
- vertical-align: text-bottom;
26
- text-align: center;
27
- }
28
- }
29
- > .tnt-btn-tertiary {
30
- opacity: 0.5;
31
- background: #454f64;
32
- color: @white;
33
- border-width: 0;
34
- width: @tnt-action-close-width;
35
- height: @tnt-action-close-width;
36
- min-width: @tnt-action-close-width;
37
- line-height: @tnt-action-close-width;
38
- margin-top: 4px;
39
- font-size: 14px;
40
- &:hover {
41
- opacity: 0.8;
42
- }
43
- }
44
- .fr {
45
- float: right;
46
- .ant-btn {
47
- margin-left: 10px;
48
- background: rgba(69, 79, 100, 0.5);
49
- color: @white;
50
- border-width: 0;
51
- .tntd-anticon {
52
- margin-right: 4px;
53
- }
54
- &:hover {
55
- background: rgba(69, 79, 100, 0.8);
56
- }
57
- }
58
- }
59
- }
@@ -1,7 +0,0 @@
1
- .tntd-select-empty-container {
2
- padding: 5px 12px;
3
-
4
- & > .ant-empty > .ant-empty-image > svg {
5
- width: 100%;
6
- }
7
- }