@douyinfe/semi-foundation 2.36.1-alpha.2 → 2.36.1-alpha.3
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.
|
@@ -171,14 +171,13 @@ export default class TextAreaFoundation extends BaseFoundation<TextAreaAdapter>
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
resizeTextarea = (
|
|
174
|
+
resizeTextarea = () => {
|
|
175
175
|
const { height } = this.getStates();
|
|
176
176
|
const { rows } = this.getProps();
|
|
177
177
|
const node = this._adapter.getRef();
|
|
178
178
|
const nodeSizingData = getSizingData(node);
|
|
179
179
|
|
|
180
180
|
if (!nodeSizingData) {
|
|
181
|
-
cb && cb();
|
|
182
181
|
return;
|
|
183
182
|
}
|
|
184
183
|
|
|
@@ -194,8 +193,6 @@ export default class TextAreaFoundation extends BaseFoundation<TextAreaAdapter>
|
|
|
194
193
|
node.style.height = `${newHeight}px`;
|
|
195
194
|
return;
|
|
196
195
|
}
|
|
197
|
-
|
|
198
|
-
cb && cb();
|
|
199
196
|
};
|
|
200
197
|
|
|
201
198
|
// e: MouseEvent
|
|
@@ -55,7 +55,7 @@ export default class TextAreaFoundation extends BaseFoundation<TextAreaAdapter>
|
|
|
55
55
|
handleFocus(e: any): void;
|
|
56
56
|
handleBlur(e: any): void;
|
|
57
57
|
handleKeyDown(e: any): void;
|
|
58
|
-
resizeTextarea: (
|
|
58
|
+
resizeTextarea: () => void;
|
|
59
59
|
handleMouseEnter(e: any): void;
|
|
60
60
|
handleMouseLeave(e: any): void;
|
|
61
61
|
isAllowClear(): boolean;
|
|
@@ -27,7 +27,7 @@ class TextAreaFoundation extends _foundation.default {
|
|
|
27
27
|
}
|
|
28
28
|
constructor(adapter) {
|
|
29
29
|
super(Object.assign(Object.assign({}, TextAreaFoundation.textAreaDefaultAdapter), adapter));
|
|
30
|
-
this.resizeTextarea =
|
|
30
|
+
this.resizeTextarea = () => {
|
|
31
31
|
const {
|
|
32
32
|
height
|
|
33
33
|
} = this.getStates();
|
|
@@ -37,7 +37,6 @@ class TextAreaFoundation extends _foundation.default {
|
|
|
37
37
|
const node = this._adapter.getRef();
|
|
38
38
|
const nodeSizingData = (0, _getSizingData.default)(node);
|
|
39
39
|
if (!nodeSizingData) {
|
|
40
|
-
cb && cb();
|
|
41
40
|
return;
|
|
42
41
|
}
|
|
43
42
|
const newHeight = (0, _calculateNodeHeight.default)(nodeSizingData, node.value || node.placeholder || 'x', rows
|
|
@@ -49,7 +48,6 @@ class TextAreaFoundation extends _foundation.default {
|
|
|
49
48
|
node.style.height = `${newHeight}px`;
|
|
50
49
|
return;
|
|
51
50
|
}
|
|
52
|
-
cb && cb();
|
|
53
51
|
};
|
|
54
52
|
}
|
|
55
53
|
init() {
|
|
@@ -55,7 +55,7 @@ export default class TextAreaFoundation extends BaseFoundation<TextAreaAdapter>
|
|
|
55
55
|
handleFocus(e: any): void;
|
|
56
56
|
handleBlur(e: any): void;
|
|
57
57
|
handleKeyDown(e: any): void;
|
|
58
|
-
resizeTextarea: (
|
|
58
|
+
resizeTextarea: () => void;
|
|
59
59
|
handleMouseEnter(e: any): void;
|
|
60
60
|
handleMouseLeave(e: any): void;
|
|
61
61
|
isAllowClear(): boolean;
|
|
@@ -20,7 +20,7 @@ export default class TextAreaFoundation extends BaseFoundation {
|
|
|
20
20
|
}
|
|
21
21
|
constructor(adapter) {
|
|
22
22
|
super(Object.assign(Object.assign({}, TextAreaFoundation.textAreaDefaultAdapter), adapter));
|
|
23
|
-
this.resizeTextarea =
|
|
23
|
+
this.resizeTextarea = () => {
|
|
24
24
|
const {
|
|
25
25
|
height
|
|
26
26
|
} = this.getStates();
|
|
@@ -30,7 +30,6 @@ export default class TextAreaFoundation extends BaseFoundation {
|
|
|
30
30
|
const node = this._adapter.getRef();
|
|
31
31
|
const nodeSizingData = getSizingData(node);
|
|
32
32
|
if (!nodeSizingData) {
|
|
33
|
-
cb && cb();
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
const newHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', rows
|
|
@@ -42,7 +41,6 @@ export default class TextAreaFoundation extends BaseFoundation {
|
|
|
42
41
|
node.style.height = `${newHeight}px`;
|
|
43
42
|
return;
|
|
44
43
|
}
|
|
45
|
-
cb && cb();
|
|
46
44
|
};
|
|
47
45
|
}
|
|
48
46
|
init() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.36.1-alpha.
|
|
3
|
+
"version": "2.36.1-alpha.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "6171181d396b5905d7da605bada6d1457c0e3cc4",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|