Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-29 16:44:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ee550807075a2e619dbd240113d837c3b8414db0
ee550807
1 parent
9c44bcd8
fix 弹出框键盘高度调整
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
src/components/IdentityField/index.vue
src/components/NumberField/index.vue
src/components/IdentityField/index.vue
View file @
ee55080
...
...
@@ -44,13 +44,17 @@ const show = ref(false);
const openKeyboard = (e) => {
show.value = true;
// 键盘上移动
const height =
const target_to_view_height = window.innerHeight - e.target.getBoundingClientRect().y; // 元素到适口高度
let scroll_height = "";
if (target_to_view_height < 244) {
scroll_height =
window.innerHeight -
e.target.getBoundingClientRect().y -
e.target.getBoundingClientRect().height +
50;
document.body.style.paddingBottom = height + "px";
document.documentElement.scrollTop = height;
244;
document.body.style.paddingBottom = scroll_height + "px";
document.documentElement.scrollTop = scroll_height;
}
};
const blurKeyboard = () => {
show.value = false;
...
...
src/components/NumberField/index.vue
View file @
ee55080
...
...
@@ -56,13 +56,17 @@ const showKeyboard = (e) => {
showInteger.value = true;
}
// 键盘上移动
const height =
const target_to_view_height = window.innerHeight - e.target.getBoundingClientRect().y; // 元素到适口高度
let scroll_height = "";
if (target_to_view_height < 244) {
scroll_height =
window.innerHeight -
e.target.getBoundingClientRect().y +
e.target.getBoundingClientRect().y -
e.target.getBoundingClientRect().height +
244;
document.body.style.paddingBottom = height + "px";
document.documentElement.scrollTop = height;
document.body.style.paddingBottom = scroll_height + "px";
document.documentElement.scrollTop = scroll_height;
}
};
const blurKeyboard = () => {
if (props.item.component_props.type === "decimal") {
...
...
Please
register
or
login
to post a comment