jobsys-newbie
Version:
Enhanced component based on ant-design-vue
38 lines (37 loc) • 19 kB
HTML
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="VuePress 2.0.0-beta.67">
<style>
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
</style>
<script>
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
</script>
<title>NewbiePassword | Newbie Component</title><meta name="description" content="Enhanced Vue components based on AntD.">
<link rel="preload" href="/docs/newbie/assets/style-398c75cc.css" as="style"><link rel="stylesheet" href="/docs/newbie/assets/style-398c75cc.css">
<link rel="modulepreload" href="/docs/newbie/assets/app-e5356031.js"><link rel="modulepreload" href="/docs/newbie/assets/NewbiePassword.html-3086c803.js"><link rel="modulepreload" href="/docs/newbie/assets/style-3dc3bceb.js"><link rel="modulepreload" href="/docs/newbie/assets/index-54e202a8.js"><link rel="modulepreload" href="/docs/newbie/assets/isNull-4293306c.js"><link rel="modulepreload" href="/docs/newbie/assets/isUndefined-aa0326a0.js"><link rel="modulepreload" href="/docs/newbie/assets/compact-item-45f3d050.js"><link rel="modulepreload" href="/docs/newbie/assets/FormItemContext-af84826a.js"><link rel="modulepreload" href="/docs/newbie/assets/statusUtils-41ec9e8f.js"><link rel="modulepreload" href="/docs/newbie/assets/vnode-8424d922.js"><link rel="modulepreload" href="/docs/newbie/assets/omit-dc457db2.js"><link rel="modulepreload" href="/docs/newbie/assets/CloseCircleFilled-7d1a9da0.js"><link rel="modulepreload" href="/docs/newbie/assets/index-2bac9f50.js"><link rel="modulepreload" href="/docs/newbie/assets/EyeOutlined-9657ac6a.js"><link rel="modulepreload" href="/docs/newbie/assets/NewbiePassword.html-dbf4a28b.js"><link rel="prefetch" href="/docs/newbie/assets/hooks.html-00cc23c0.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/index.html-89f7cf72.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieAddress.html-47b67690.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieButton.html-b67253b4.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieForm.html-b6dbee27.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieEditor.html-5db09ee2.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieFormDesigner.html-bd1c3f71.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieList.html-ac7d0807.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieModal.html-c13f0bf7.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieProvider.html-6128ffcc.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieSearch.html-6b6c26c0.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieTable.html-bc1b0a84.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieUploader.html-167fed4e.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/404.html-f9875e7b.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/hooks.html-adccea0a.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/index.html-3ebf1ebb.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieAddress.html-e037374a.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieButton.html-3aa8b13d.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieForm.html-15d8c6f5.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieEditor.html-40504152.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieFormDesigner.html-bf519d6d.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieList.html-2d0e9567.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieModal.html-fa7e4778.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieProvider.html-3069b4d1.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieSearch.html-254febfb.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieTable.html-0807cb3d.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/NewbieUploader.html-bd5b6c5d.js" as="script"><link rel="prefetch" href="/docs/newbie/assets/404.html-28bdd61b.js" as="script">
</head>
<body>
<div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/docs/newbie/" class=""><!----><span class="site-name">Newbie Component</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/docs/newbie/" class="" aria-label="首页"><!--[--><!--]--> 首页 <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="组件"><span class="title">组件</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="组件"><span class="title">组件</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/docs/newbie/components/address/NewbieAddress" class="" aria-label="NewbieAddress"><!--[--><!--]--> NewbieAddress <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/button/NewbieButton" class="" aria-label="NewbieButton"><!--[--><!--]--> NewbieButton <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/editor/NewbieEditor" class="" aria-label="NewbieEditor"><!--[--><!--]--> NewbieEditor <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/form/NewbieForm" class="" aria-label="NewbieForm"><!--[--><!--]--> NewbieForm <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/form-designer/NewbieFormDesigner" class="" aria-label="NewbieFormDesigner"><!--[--><!--]--> NewbieFormDesigner <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/list/NewbieList" class="" aria-label="NewbieList"><!--[--><!--]--> NewbieList <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/modal/NewbieModal" class="" aria-label="NewbieModal"><!--[--><!--]--> NewbieModal <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/password/NewbiePassword" class="router-link-active" aria-label="NewbiePassword"><!--[--><!--]--> NewbiePassword <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/provider/NewbieProvider" class="" aria-label="NewbieProvider"><!--[--><!--]--> NewbieProvider <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/search/NewbieSearch" class="" aria-label="NewbieSearch"><!--[--><!--]--> NewbieSearch <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/table/NewbieTable" class="" aria-label="NewbieTable"><!--[--><!--]--> NewbieTable <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/uploader/NewbieUploader" class="" aria-label="NewbieUploader"><!--[--><!--]--> NewbieUploader <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a href="/docs/newbie/hooks" class="" aria-label="组合式 API"><!--[--><!--]--> 组合式 API <!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><a href="/docs/newbie/" class="" aria-label="首页"><!--[--><!--]--> 首页 <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="组件"><span class="title">组件</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="组件"><span class="title">组件</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/docs/newbie/components/address/NewbieAddress" class="" aria-label="NewbieAddress"><!--[--><!--]--> NewbieAddress <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/button/NewbieButton" class="" aria-label="NewbieButton"><!--[--><!--]--> NewbieButton <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/editor/NewbieEditor" class="" aria-label="NewbieEditor"><!--[--><!--]--> NewbieEditor <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/form/NewbieForm" class="" aria-label="NewbieForm"><!--[--><!--]--> NewbieForm <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/form-designer/NewbieFormDesigner" class="" aria-label="NewbieFormDesigner"><!--[--><!--]--> NewbieFormDesigner <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/list/NewbieList" class="" aria-label="NewbieList"><!--[--><!--]--> NewbieList <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/modal/NewbieModal" class="" aria-label="NewbieModal"><!--[--><!--]--> NewbieModal <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/password/NewbiePassword" class="router-link-active" aria-label="NewbiePassword"><!--[--><!--]--> NewbiePassword <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/provider/NewbieProvider" class="" aria-label="NewbieProvider"><!--[--><!--]--> NewbieProvider <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/search/NewbieSearch" class="" aria-label="NewbieSearch"><!--[--><!--]--> NewbieSearch <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/table/NewbieTable" class="" aria-label="NewbieTable"><!--[--><!--]--> NewbieTable <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/docs/newbie/components/uploader/NewbieUploader" class="" aria-label="NewbieUploader"><!--[--><!--]--> NewbieUploader <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a href="/docs/newbie/hooks" class="" aria-label="组合式 API"><!--[--><!--]--> 组合式 API <!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading">NewbiePassword <!----></p><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/docs/newbie/components/password/NewbiePassword.html#props" class="router-link-active router-link-exact-active sidebar-item" aria-label="Props"><!--[--><!--]--> Props <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/docs/newbie/components/password/NewbiePassword.html#events" class="router-link-active router-link-exact-active sidebar-item" aria-label="Events"><!--[--><!--]--> Events <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/docs/newbie/components/password/NewbiePassword.html#示例" class="router-link-active router-link-exact-active sidebar-item" aria-label="示例"><!--[--><!--]--> 示例 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="newbiepassword" tabindex="-1"><a class="header-anchor" href="#newbiepassword" aria-hidden="true">#</a> NewbiePassword</h1><blockquote><p>密码输入框</p></blockquote><p>分为 4 个密码强度等级,每有以下字符的一种增强一个等级:数字,大写字母,小写字母,特殊字符 每个等级都有对应的颜色,当输入的密码包含对应的等级时,对应的等级颜色会高亮</p><p>Version: 1.0.0</p><h2 id="props" tabindex="-1"><a class="header-anchor" href="#props" aria-hidden="true">#</a> Props</h2><table><thead><tr><th>Prop name</th><th>Description</th><th>Type</th><th>Values</th><th>Default</th></tr></thead><tbody><tr><td>value</td><td>输入框的值</td><td>string</td><td>-</td><td>""</td></tr><tr><td>min</td><td>最小长度</td><td>number</td><td>-</td><td>8</td></tr><tr><td>max</td><td>最大长度</td><td>number</td><td>-</td><td>20</td></tr><tr><td>width</td><td>宽度</td><td>number|string</td><td>-</td><td>300</td></tr></tbody></table><h2 id="events" tabindex="-1"><a class="header-anchor" href="#events" aria-hidden="true">#</a> Events</h2><table><thead><tr><th>Event name</th><th>Properties</th><th>Description</th></tr></thead><tbody><tr><td>update:value</td><td></td><td></td></tr><tr><td>change</td><td><strong>event</strong> <code>Event</code> - 事件对象</td><td>输入框内容变化时的回调</td></tr></tbody></table><hr><h2 id="示例" tabindex="-1"><a class="header-anchor" href="#示例" aria-hidden="true">#</a> 示例</h2><hr><div class="newbie-password" style="width:300px;"><span class="ant-input-affix-wrapper ant-input-password css-1ugq3w3" style=""><!----><input maxlength="20" value type="password" minlength="8" class="ant-input css-1ugq3w3" style=""><span class="ant-input-suffix"><!----><!--[--><!----><!--[--><span role="img" aria-label="eye-invisible" tabindex="-1" class="anticon anticon-eye-invisible ant-input-password-icon"><svg focusable="false" class="" style="" data-icon="eye-invisible" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"></path><path d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"></path></svg></span><!----><!--]--><!--]--></span></span><div class="strength-indicator-container"><div class="strength-indicator"></div><div class="strength-indicator"></div><div class="strength-indicator"></div><div class="strength-indicator"></div></div><div class="error-message">密码必须包含数字、小写字母、大写字母和特殊符号</div></div><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">setup</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
<span class="token keyword">const</span> password <span class="token operator">=</span> <span class="token function">ref</span><span class="token punctuation">(</span><span class="token string">""</span><span class="token punctuation">)</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>NewbiePassword</span> <span class="token attr-name"><span class="token namespace">v-model:</span>value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>password<span class="token punctuation">"</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>300<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></div><!--[--><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: sinceow@163.com">sinceow</span><!----><!--]--><!--]--></span></div></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script type="module" src="/docs/newbie/assets/app-e5356031.js" defer></script>
</body>
</html>