npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-tomato

v1.0.5

Published

在开发中,如果H5页面在`Android`手机的浏览器或者APP中打开,如果页面中的交互触发了输入键盘的弹起(通常是 `input`或者`textarea`元素获取焦点), 那么页面如果底部有固定的元素,比如按钮(通常是通过`css`的`position: fixed`设置元素的定位); 这个时候底部固定的元素也会随之被弹起, 此时底部固定元素是以弹起的输入框作为底部的边界的。

Downloads

2

Readme

在开发中,如果H5页面在Android手机的浏览器或者APP中打开,如果页面中的交互触发了输入键盘的弹起(通常是 input或者textarea元素获取焦点), 那么页面如果底部有固定的元素,比如按钮(通常是通过cssposition: fixed设置元素的定位); 这个时候底部固定的元素也会随之被弹起, 此时底部固定元素是以弹起的输入框作为底部的边界的。

vue-tomato是一个Vue.js插件,目的是解决上面这个问题;解决的方式就是当输入键盘被弹起的时候,隐藏底部固定的元素。 当输入键盘收起的时候,再把隐藏的元素显示出来。

安装

yarn add vue-tomato

使用方式

  • 第一步,在项目中引入vue-tomato
    import Tomato from 'vue-tomato';
    // ...
    Vue.use(Tomato);
  • 第二步,在页面上指定的固定元素上添加指令v-tomato-toggle
    <button v-tomato-toggle class="btn">底部固定的按钮</button>
  • 可选配置,指令v-tomato-toggle接收一个绑定的值作为指令的配置,目前只有一个配置参数isFooterToggleActive。表示是否开启指令的相关功能,可以动态关闭;默认是开启的状态。
    <button v-tomato-toggle="conf" class="btn">底部固定的按钮</button>
    //...
    data() {
        return {
          conf: {
            // 是否启用
            isFooterToggleActive: true
          }
        }
    }
    //...

如果你的项目不是使用vue.js开发的话,可以简单看一下源码部分,然后根据自己的项目需求自定义解决方案。

最后,如果有什么意见和建议可以提 issues 或者 pull requests; 如果项目对你有帮助,也欢迎随手点个⭐ Star,支持一下。