@king-design/intact 3.6.2-beta.1 → 3.6.2
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/components/table/demos/hidden.md +8 -2
- package/components/table/demos/sort.md +4 -4
- package/components/table/styles.ts +5 -3
- package/es/components/table/styles.js +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/table/demos/hidden/react.js +21 -3
- package/es/site/src/router/index.js +4 -33
- package/index.ts +2 -2
- package/package.json +2 -2
|
@@ -16,10 +16,16 @@ import {Table, TableColumn} from 'kpc';
|
|
|
16
16
|
</Table>
|
|
17
17
|
<p>无数据展示</p>
|
|
18
18
|
<Table data={this.get('data2')} resizable>
|
|
19
|
-
<TableColumn key="a" title="Title 1" />
|
|
20
|
-
<TableColumn key="b" title="Title 2"
|
|
19
|
+
<TableColumn key="a" title="Title 1" hidden />
|
|
20
|
+
<TableColumn key="b" title="Title 2" />
|
|
21
21
|
<TableColumn key="c" title="Title 3"/>
|
|
22
22
|
</Table>
|
|
23
|
+
<Table data={this.get('data2')} resizable checkType="none">
|
|
24
|
+
<TableColumn key="a" title="Title 1" hidden />
|
|
25
|
+
<TableColumn key="b" title="Title 2" />
|
|
26
|
+
<TableColumn key="c" title="Title 3" hidden />
|
|
27
|
+
<TableColumn key="d" title="Title 4"/>
|
|
28
|
+
</Table>
|
|
23
29
|
</div>
|
|
24
30
|
```
|
|
25
31
|
|
|
@@ -71,13 +71,13 @@ export default class extends Component<Props> {
|
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
```vue-methods
|
|
74
|
-
_onSort(
|
|
74
|
+
_onSort(sort?: TableSortValue<'name' | 'age'>) {
|
|
75
75
|
console.log(sort);
|
|
76
76
|
const data = this.data.slice(0);
|
|
77
77
|
data.sort((a, b) => {
|
|
78
|
-
return sort
|
|
79
|
-
(a[sort
|
|
80
|
-
(a[sort
|
|
78
|
+
return sort!.type === 'desc' ?
|
|
79
|
+
(a[sort!.key!] > b[sort!.key!] ? -1 : 1) :
|
|
80
|
+
(a[sort!.key!] > b[sort!.key!] ? 1 : -1);
|
|
81
81
|
});
|
|
82
82
|
this.data = data;
|
|
83
83
|
this.sort = sort;
|
|
@@ -128,7 +128,9 @@ export const makeStyles = cache(function makeStyles(k: string) {
|
|
|
128
128
|
position: relative;
|
|
129
129
|
background: ${table.thead.bgColor};
|
|
130
130
|
line-height: normal;
|
|
131
|
+
// hide all :before firstly, then show all :before except first th
|
|
131
132
|
&:before {
|
|
133
|
+
display: none;
|
|
132
134
|
content: '';
|
|
133
135
|
height: ${table.thead.delimiterHeight};
|
|
134
136
|
position: absolute;
|
|
@@ -138,12 +140,12 @@ export const makeStyles = cache(function makeStyles(k: string) {
|
|
|
138
140
|
top: 50%;
|
|
139
141
|
transform: translateY(-50%);
|
|
140
142
|
}
|
|
143
|
+
&:not(.${k}-hidden) ~ th:not(.${k}-hidden):before {
|
|
144
|
+
display: block;
|
|
145
|
+
}
|
|
141
146
|
&.${k}-fixed-right:before {
|
|
142
147
|
left: -2px;
|
|
143
148
|
}
|
|
144
|
-
&:first-of-type:before {
|
|
145
|
-
display: none;
|
|
146
|
-
}
|
|
147
149
|
}
|
|
148
150
|
.${k}-table-title {
|
|
149
151
|
display: inline-flex;
|
|
@@ -91,7 +91,7 @@ setDefault(function () {
|
|
|
91
91
|
});
|
|
92
92
|
export { table };
|
|
93
93
|
export var makeStyles = cache(function makeStyles(k) {
|
|
94
|
-
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";border-bottom-color:transparent;}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}
|
|
94
|
+
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";border-bottom-color:transparent;}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{display:none;content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:not(.", k, "-hidden)~th:not(.", k, "-hidden):before{display:block;}&.", k, "-fixed-right:before{left:-2px;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-hidden{display:none;}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
95
95
|
return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
|
|
96
96
|
}), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}thead{position:sticky;top:0;}}&.", k, "-fix-footer{min-height:0;.", k, "-table-wrapper{height:100%;}tfoot{position:sticky;bottom:0;}}.", k, "-table-phantom{position:static;}");
|
|
97
97
|
});
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.6.2
|
|
2
|
+
* @king-design v3.6.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -66,4 +66,4 @@ export * from './components/upload';
|
|
|
66
66
|
export * from './components/view';
|
|
67
67
|
export * from './components/virtualList';
|
|
68
68
|
export * from './components/wave';
|
|
69
|
-
export declare const version = "3.6.2
|
|
69
|
+
export declare const version = "3.6.2";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.6.2
|
|
2
|
+
* @king-design v3.6.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -67,5 +67,5 @@ export * from './components/upload';
|
|
|
67
67
|
export * from './components/view';
|
|
68
68
|
export * from './components/virtualList';
|
|
69
69
|
export * from './components/wave';
|
|
70
|
-
export var version = '3.6.2
|
|
70
|
+
export var version = '3.6.2';
|
|
71
71
|
/* generate end */
|
|
@@ -48,14 +48,32 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
48
48
|
resizable: true
|
|
49
49
|
}, /*#__PURE__*/React.createElement(TableColumn, {
|
|
50
50
|
key: "a",
|
|
51
|
-
title: "Title 1"
|
|
51
|
+
title: "Title 1",
|
|
52
|
+
hidden: true
|
|
52
53
|
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
53
54
|
key: "b",
|
|
54
|
-
title: "Title 2"
|
|
55
|
-
hidden: true
|
|
55
|
+
title: "Title 2"
|
|
56
56
|
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
57
57
|
key: "c",
|
|
58
58
|
title: "Title 3"
|
|
59
|
+
})), /*#__PURE__*/React.createElement(Table, {
|
|
60
|
+
data: this.state.data2,
|
|
61
|
+
resizable: true,
|
|
62
|
+
checkType: "none"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(TableColumn, {
|
|
64
|
+
key: "a",
|
|
65
|
+
title: "Title 1",
|
|
66
|
+
hidden: true
|
|
67
|
+
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
68
|
+
key: "b",
|
|
69
|
+
title: "Title 2"
|
|
70
|
+
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
71
|
+
key: "c",
|
|
72
|
+
title: "Title 3",
|
|
73
|
+
hidden: true
|
|
74
|
+
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
75
|
+
key: "d",
|
|
76
|
+
title: "Title 4"
|
|
59
77
|
})));
|
|
60
78
|
};
|
|
61
79
|
return Demo;
|
|
@@ -116,7 +116,7 @@ export default new Router({
|
|
|
116
116
|
// // }
|
|
117
117
|
// // },
|
|
118
118
|
{
|
|
119
|
-
path:
|
|
119
|
+
path: /demo\/(.*)/,
|
|
120
120
|
action: function () {
|
|
121
121
|
var _action3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(context) {
|
|
122
122
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -290,14 +290,15 @@ export default new Router({
|
|
|
290
290
|
return action;
|
|
291
291
|
}()
|
|
292
292
|
}, {
|
|
293
|
-
path:
|
|
293
|
+
path: /(.*)/,
|
|
294
|
+
name: 'otherwise',
|
|
294
295
|
action: function () {
|
|
295
296
|
var _action9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(context) {
|
|
296
297
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
297
298
|
while (1) switch (_context10.prev = _context10.next) {
|
|
298
299
|
case 0:
|
|
299
300
|
_context10.next = 2;
|
|
300
|
-
return import('../pages/
|
|
301
|
+
return import('../pages/document');
|
|
301
302
|
case 2:
|
|
302
303
|
_context10.t0 = _context10.sent.default;
|
|
303
304
|
_context10.t1 = {
|
|
@@ -318,36 +319,6 @@ export default new Router({
|
|
|
318
319
|
}
|
|
319
320
|
return action;
|
|
320
321
|
}()
|
|
321
|
-
}, {
|
|
322
|
-
path: /(.*)/,
|
|
323
|
-
name: 'otherwise',
|
|
324
|
-
action: function () {
|
|
325
|
-
var _action10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(context) {
|
|
326
|
-
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
327
|
-
while (1) switch (_context11.prev = _context11.next) {
|
|
328
|
-
case 0:
|
|
329
|
-
_context11.next = 2;
|
|
330
|
-
return import('../pages/document');
|
|
331
|
-
case 2:
|
|
332
|
-
_context11.t0 = _context11.sent.default;
|
|
333
|
-
_context11.t1 = {
|
|
334
|
-
path: context.params[0]
|
|
335
|
-
};
|
|
336
|
-
return _context11.abrupt("return", {
|
|
337
|
-
Page: _context11.t0,
|
|
338
|
-
data: _context11.t1
|
|
339
|
-
});
|
|
340
|
-
case 5:
|
|
341
|
-
case "end":
|
|
342
|
-
return _context11.stop();
|
|
343
|
-
}
|
|
344
|
-
}, _callee11);
|
|
345
|
-
}));
|
|
346
|
-
function action(_x9) {
|
|
347
|
-
return _action10.apply(this, arguments);
|
|
348
|
-
}
|
|
349
|
-
return action;
|
|
350
|
-
}()
|
|
351
322
|
}]
|
|
352
323
|
}, {
|
|
353
324
|
baseUrl: version
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.6.2
|
|
2
|
+
* @king-design v3.6.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -71,6 +71,6 @@ export * from './components/view';
|
|
|
71
71
|
export * from './components/virtualList';
|
|
72
72
|
export * from './components/wave';
|
|
73
73
|
|
|
74
|
-
export const version = '3.6.2
|
|
74
|
+
export const version = '3.6.2';
|
|
75
75
|
|
|
76
76
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "3.6.2
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"@emotion/css": "^11.5.0",
|
|
181
181
|
"dayjs": "^1.10.7",
|
|
182
182
|
"enquire.js": "^2.1.6",
|
|
183
|
-
"intact": "^3.0.
|
|
183
|
+
"intact": "^3.0.45",
|
|
184
184
|
"monaco-editor": "^0.26.1",
|
|
185
185
|
"mxgraphx": "^4.0.7",
|
|
186
186
|
"resize-observer-polyfill": "^1.5.1",
|