Skip to content
/ h-wx-js Public

Solve the problem of h5 webpage opening in wechat, input losing focus, and the bottom blank after the ios keyboard is folded up.

License

Notifications You must be signed in to change notification settings

hvuejs/h-wx-js

Repository files navigation

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();

About

Solve the problem of h5 webpage opening in wechat, input losing focus, and the bottom blank after the ios keyboard is folded up.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published