h-wx-js
v1.1.3
Published
Solve the problem of h5 webpage opening in wechat, input losing focus, and the bottom blank after the ios keyboard is folded up
Downloads
2
Maintainers
Readme
h-wx-js
Install
npm install h-wx-js
or
yarn add h-wx-js
ES Module
Example for how to import the ES module from another module:
import hwx from "h-wx-js";
hwx.watchInput(); // Global listening input
or
import { watchInput } from "h-wx-js";
watchInput();
<!-- vue -->
<div>
<input v-model="value" @blur="changeScroll" />
</div>
<script>
import { fixScroll } from "h-wx-js";
export default {
data () {
return {
value: ""
}
},
methods: {
changeScroll: function () {
fixScroll();
}
}
}
</script>
init font-size
// main.js
import { initFontSize } from "h-wx-js";
initFontSize();