@gm-pc/keyboard 1.13.3 → 1.14.0-alpha.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-pc/keyboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-pc#readme",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@gm-common/tool": "^2.10.0",
|
|
30
|
-
"@gm-pc/react": "^1.
|
|
31
|
-
"@gm-pc/table-x": "^1.
|
|
30
|
+
"@gm-pc/react": "^1.14.0-alpha.0",
|
|
31
|
+
"@gm-pc/table-x": "^1.14.0-alpha.0",
|
|
32
32
|
"classnames": "^2.2.5",
|
|
33
33
|
"lodash": "^4.17.19"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "68355f8611699df931fb04ab0fbfc5501d6392ae"
|
|
36
36
|
}
|
package/src/core/wrap.tsx
CHANGED
|
@@ -27,8 +27,6 @@ function scrollIntoViewFixedWidth(
|
|
|
27
27
|
scrollLeft
|
|
28
28
|
) {
|
|
29
29
|
table.scrollLeft = offsetLeft + offsetWidth - (table.offsetWidth - rightFixedWidth)
|
|
30
|
-
} else {
|
|
31
|
-
table.scrollLeft = 0
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
// 只 tablex 生效
|
|
@@ -44,7 +42,7 @@ function scrollIntoViewFixedWidth(
|
|
|
44
42
|
export default scrollIntoViewFixedWidth
|
|
45
43
|
|
|
46
44
|
function getTd(dom: HTMLElement) {
|
|
47
|
-
let parentNode = dom
|
|
45
|
+
let parentNode = dom?.parentNode as HTMLElement
|
|
48
46
|
while (
|
|
49
47
|
!(
|
|
50
48
|
parentNode.classList.contains('rt-td') ||
|
|
@@ -59,7 +57,7 @@ function getTd(dom: HTMLElement) {
|
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
function getTable(dom: HTMLElement) {
|
|
62
|
-
let parentNode = dom
|
|
60
|
+
let parentNode = dom?.parentNode as HTMLElement
|
|
63
61
|
while (
|
|
64
62
|
!(
|
|
65
63
|
parentNode.classList.contains('gm-table-x') ||
|