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 🙏

© 2026 – Pkg Stats / Ryan Hefner

donot-remember

v0.0.3

Published

donot remember password

Readme

donot-remember

使浏览器不记住密码

浏览器记住密码,能够提高浏览器的用户粘性;

  • 现代浏览器都不再遵循标签属性设置,去忽略密码;
  • 但这也存在一定的安全隐患:
    • 登录浏览器后,浏览器记住密码的密码,会同步到浏览器厂商的服务器;
    • 提供电脑的登录密码,就可以查看浏览器保存的所有账号密码;

如果产品确实有这方面的安全考虑,需要避开浏览器记住密码功能

  • 市面上能搜索到的方法,有一下几种:
    • 通过标签属性设置,要求浏览器不记住密码,实验过失败;
    • 通过添加一个隐藏假密码输入框,骗过浏览器,实验过失败;
    • 通过把文本输入框的文字显示设置为*,模拟密码输入框,存在浏览器兼容问题;
    • 通过 js 程序将文本输入框的文字替换为*显示,模拟密码输入框,需要处理复杂粘贴退格删除等问题;
  • 通过文本框模拟密码框,还存在被第三方输入法读取到密码的风险;
    • 真实的密码框输入时,系统会强行使用原生输入法;
    • 文本框可以输入汉字,密码框不能输入汉字;

如果既要使用原生密码输入框的安全便捷性,又要不被浏览器记住密码,可以使用本插件;

Vue 自定义版本

<template>
  <div class="el-input el-input--prefix el-input--suffix" style="width: 240px">
    <div class="el-input__wrapper" tabindex="-1">
      <span class="el-input__prefix"
        ><span class="el-input__prefix-inner">
          <el-icon class="el-input__icon"><User /></el-icon></span
      ></span>
      <DoNotRemember
        class="el-input__inner"
        v-model="value"
        :type="type"
        color="#606266"
        placeholder-color="#a8abb2"
        font-size="14px"
        font-family="sans-serif"
        placeholder="请输入密码"
        style="width: 50%"
      ></DoNotRemember>
      <span class="el-input__suffix"
        ><span class="el-input__suffix-inner"
          ><el-icon class="el-input__icon el-input__password"
            ><Hide v-if="type === 'password'" @click="type = 'text'" />
            <View v-if="type === 'text'" @click="type = 'password'" /></el-icon></span
      ></span>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import DoNotRemember from 'donot-remember'
  import { User, View, Hide } from '@element-plus/icons-vue'
  import { ref } from 'vue'

  const type = ref<'password' | 'text'>('password')
  const value = ref('ABC')
</script>

ElementPlus 版本

<template>
  <DnrElm
    v-model="value"
    color="#606266"
    placeholder-color="#a8abb2"
    font-size="14px"
    font-family="sans-serif"
    show-password
    clearable
    :prefix-icon="User"
    placeholder="请输入密码"
    style="width: 240px"
  ></DnrElm>
</template>

<script lang="ts" setup>
  import { User } from '@element-plus/icons-vue'
  // @ts-ignore
  import DnrElm from 'donot-remember/dist/element-plus'
  import { ref } from 'vue'

  const value = ref('ABC')
</script>

AntDesignVue 版本

<template>
  <DnrAntd
    v-model:value="value"
    allow-clear
    color="#606266"
    placeholder-color="#a8abb2"
    font-size="14px"
    font-family="sans-serif"
    placeholder="请输入密码"
    style="width: 240px"
  >
    <template #prefix>
      <user-outlined />
    </template>
  </DnrAntd>
</template>

<script lang="ts" setup>
  import { UserOutlined, InfoCircleOutlined } from '@ant-design/icons-vue'
  import DnrAntd from 'donot-remember/dist/antd-vue'
  import { ref } from 'vue'

  const value = ref('ABC')
</script>