mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
chore: 排版
This commit is contained in:
parent
f625384747
commit
8205357de9
@ -4,8 +4,9 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
|
||||
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
|
||||
<title>any-rule</title>
|
||||
<style>
|
||||
* {
|
||||
@ -13,9 +14,13 @@
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
input{
|
||||
outline: none;
|
||||
border:0 none;
|
||||
|
||||
a{
|
||||
text-decoration:none;
|
||||
}
|
||||
input {
|
||||
outline: none;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
li {
|
||||
|
19
src/App.vue
19
src/App.vue
@ -2,6 +2,9 @@
|
||||
<main>
|
||||
<header>
|
||||
<h1>正则大全</h1>
|
||||
<a href="https://github.com/any86/any-rule" target="_blank" class="github"><svg height="20" viewBox="0 0 16 16" version="1.1" width="20" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg><span> github</span></a>
|
||||
<a class="btn-msg" href="https://github.com/any86/any-rule" target="_blank">留言</a>
|
||||
|
||||
<input
|
||||
ref="searchInput"
|
||||
v-model="keyword"
|
||||
@ -84,7 +87,7 @@ export default {
|
||||
isOk: undefined,
|
||||
events: {
|
||||
blur: true,
|
||||
keyup: false
|
||||
keyup: true
|
||||
}
|
||||
}))
|
||||
};
|
||||
@ -162,7 +165,8 @@ main {
|
||||
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
width: 1000px;
|
||||
max-width: 1000px;
|
||||
width:100%;
|
||||
margin: auto;
|
||||
header {
|
||||
padding: 15px;
|
||||
@ -175,6 +179,16 @@ main {
|
||||
border-radius: $radius;
|
||||
box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
h1{display:inline-block;}
|
||||
.github{
|
||||
margin-left:15px;
|
||||
display:inline-flex;
|
||||
width:100px;
|
||||
height:30px;
|
||||
>span{padding-left:5px;}
|
||||
}
|
||||
.btn-msg{padding:5px;background:$primary;}
|
||||
|
||||
}
|
||||
ul.list {
|
||||
padding: 15px;
|
||||
@ -212,6 +226,7 @@ main {
|
||||
background: #eee;
|
||||
color: #000;
|
||||
border-radius: $radius;
|
||||
line-height:2;
|
||||
> .btn-copy {
|
||||
border-radius: $radius;
|
||||
margin-right: 15px;
|
||||
|
22
src/RULES.js
22
src/RULES.js
@ -1,15 +1,27 @@
|
||||
export default [{
|
||||
title: '是否手机号',
|
||||
rule: /^((13[0-9])|(15[^4,\D])|(18[0-9]))\d{8}$/,
|
||||
title: '手机号',
|
||||
rule: /^((13[0-9])|(15[^4,\D])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/,
|
||||
}, {
|
||||
title: '只能输入大写字母',
|
||||
title: '大写字母',
|
||||
rule: /^[A-Z]+$/,
|
||||
}, {
|
||||
title: '只能输如日期,如2000-01-01',
|
||||
title: '日期,如: 2000-01-01',
|
||||
rule: /^\d{4}(-)\d{1,2}\1\d{1,2}$/,
|
||||
}, {
|
||||
title: '只能是email地址',
|
||||
title: 'email地址',
|
||||
rule: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
||||
},{
|
||||
title: '国内电话号码,如: 0341-86091234',
|
||||
rule: /\d{3}-\d{8}|\d{4}-\d{7}/,
|
||||
},
|
||||
{
|
||||
title: '身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X',
|
||||
rule: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
||||
},
|
||||
|
||||
{
|
||||
title:'帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线',
|
||||
rule: /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/
|
||||
}
|
||||
|
||||
];
|
@ -1,3 +0,0 @@
|
||||
5. 开发的技术路线选择前后端分离的方式进行开发,后端java提供接口,前端通过http请求方式获取数据, 然后进行页面内容渲染和交互逻辑设计. 具体使用vue2的单页模式技术来开发, 其中包含了webpack / sass / canvas / axios / 字体图标等工具. 开发阶段的mock选择了webpack的反向代理, 用来实现局域网内的模拟测试.
|
||||
|
||||
6. 开发中使用的工具有vscode/蓝湖平台/禅道.
|
5
vue.config.js
Normal file
5
vue.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
publicPath: process.env.NODE_ENV === 'production'
|
||||
? '/any-rule/'
|
||||
: '/'
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user