@king-design/intact 2.0.0-beta.0 → 2.0.0-beta.1
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/form/index.spec.ts +2 -2
- package/components/table/index.spec.ts +1 -1
- package/components/table/useWidth.ts +4 -2
- package/es/components/form/index.spec.js +2 -2
- package/es/components/table/index.spec.js +1 -1
- package/es/components/table/useWidth.js +7 -2
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/index.ts +2 -2
- package/package.json +2 -2
|
@@ -74,10 +74,10 @@ describe('Form', () => {
|
|
|
74
74
|
expect(res).to.be.true;
|
|
75
75
|
|
|
76
76
|
instance.set('firstName', 'a');
|
|
77
|
-
await wait(
|
|
77
|
+
await wait(100);
|
|
78
78
|
expect(element.innerHTML).to.matchSnapshot();
|
|
79
79
|
instance.set('lastName', 'b');
|
|
80
|
-
await wait(
|
|
80
|
+
await wait(100);
|
|
81
81
|
expect(element.innerHTML).to.matchSnapshot();
|
|
82
82
|
});
|
|
83
83
|
|
|
@@ -68,10 +68,12 @@ export function useWidth(
|
|
|
68
68
|
|
|
69
69
|
function checkTableWidth(isMount: boolean) {
|
|
70
70
|
checkColumnMinWidth(false);
|
|
71
|
+
const {resizable, type} = instance.get();
|
|
71
72
|
|
|
72
|
-
if (
|
|
73
|
+
if (resizable) {
|
|
74
|
+
const hasBorder = type === 'grid' || type === 'border';
|
|
73
75
|
const _tableWidth = tableRef.value!.offsetWidth;
|
|
74
|
-
const containerWidth = scrollRef.value!.offsetWidth;
|
|
76
|
+
const containerWidth = scrollRef.value!.offsetWidth + (hasBorder ? -2 : 0);
|
|
75
77
|
if (_tableWidth < containerWidth) {
|
|
76
78
|
tableWidth.set(isMount ? null : containerWidth);
|
|
77
79
|
|
|
@@ -128,13 +128,13 @@ describe('Form', function () {
|
|
|
128
128
|
expect(res).to.be.true;
|
|
129
129
|
instance.set('firstName', 'a');
|
|
130
130
|
_context3.next = 9;
|
|
131
|
-
return wait(
|
|
131
|
+
return wait(100);
|
|
132
132
|
|
|
133
133
|
case 9:
|
|
134
134
|
expect(element.innerHTML).to.matchSnapshot();
|
|
135
135
|
instance.set('lastName', 'b');
|
|
136
136
|
_context3.next = 13;
|
|
137
|
-
return wait(
|
|
137
|
+
return wait(100);
|
|
138
138
|
|
|
139
139
|
case 13:
|
|
140
140
|
expect(element.innerHTML).to.matchSnapshot();
|
|
@@ -68,9 +68,14 @@ export function useWidth(scrollRef, getColumns) {
|
|
|
68
68
|
function checkTableWidth(isMount) {
|
|
69
69
|
checkColumnMinWidth(false);
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
var _instance$get3 = instance.get(),
|
|
72
|
+
resizable = _instance$get3.resizable,
|
|
73
|
+
type = _instance$get3.type;
|
|
74
|
+
|
|
75
|
+
if (resizable) {
|
|
76
|
+
var hasBorder = type === 'grid' || type === 'border';
|
|
72
77
|
var _tableWidth = tableRef.value.offsetWidth;
|
|
73
|
-
var containerWidth = scrollRef.value.offsetWidth;
|
|
78
|
+
var containerWidth = scrollRef.value.offsetWidth + (hasBorder ? -2 : 0);
|
|
74
79
|
|
|
75
80
|
if (_tableWidth < containerWidth) {
|
|
76
81
|
tableWidth.set(isMount ? null : containerWidth);
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* @king-design v2.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -55,4 +55,4 @@ export * from './components/transfer';
|
|
|
55
55
|
export * from './components/tree';
|
|
56
56
|
export * from './components/treeSelect';
|
|
57
57
|
export * from './components/upload';
|
|
58
|
-
export declare const version = "2.0.0-beta.
|
|
58
|
+
export declare const version = "2.0.0-beta.1";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* @king-design v2.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,5 +57,5 @@ export * from './components/transfer';
|
|
|
57
57
|
export * from './components/tree';
|
|
58
58
|
export * from './components/treeSelect';
|
|
59
59
|
export * from './components/upload';
|
|
60
|
-
export var version = '2.0.0-beta.
|
|
60
|
+
export var version = '2.0.0-beta.1';
|
|
61
61
|
/* generate end */
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* @king-design v2.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -60,6 +60,6 @@ export * from './components/tree';
|
|
|
60
60
|
export * from './components/treeSelect';
|
|
61
61
|
export * from './components/upload';
|
|
62
62
|
|
|
63
|
-
export const version = '2.0.0-beta.
|
|
63
|
+
export const version = '2.0.0-beta.1';
|
|
64
64
|
|
|
65
65
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"dayjs": "^1.10.7",
|
|
176
176
|
"downloadjs": "^1.4.7",
|
|
177
177
|
"enquire.js": "^2.1.6",
|
|
178
|
-
"intact": "^3.0.0-beta.
|
|
178
|
+
"intact": "^3.0.0-beta.20",
|
|
179
179
|
"monaco-editor": "^0.26.1",
|
|
180
180
|
"mxgraphx": "^4.0.7",
|
|
181
181
|
"resize-observer-polyfill": "^1.5.1",
|