From 01e003d9f17701d8de4e017104c7f3204590749c Mon Sep 17 00:00:00 2001 From: dqjdda <201507802@qq.com> Date: Wed, 20 Nov 2019 22:24:31 +0800 Subject: [PATCH] =?UTF-8?q?cli3=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 7 ++++ src/assets/styles/variables.scss | 2 +- src/layout/components/Navbar.vue | 2 +- src/layout/components/TagsView/index.vue | 8 ++--- src/utils/index.js | 37 ++++++++++++++++++++ src/views/system/user/center/updateEmail.vue | 4 +-- src/views/tools/email/send.vue | 4 +-- 7 files changed, 54 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b21afa6..d0cdfef 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,13 @@ "git add" ] }, + "repository": { + "type": "git", + "url": "git+https://github.com/PanJiaChen/vue-element-admin.git" + }, + "bugs": { + "url": "https://github.com/elunez/eladmin/issues" + }, "dependencies": { "clipboard": "2.0.4", "@riophae/vue-treeselect": "0.1.0", diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index a19c27c..5688f25 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -19,7 +19,7 @@ $menuHover:#263445; $subMenuBg:#1f2d3d; $subMenuHover:#001528; -$sideBarWidth: 210px; +$sideBarWidth: 200px; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 69dd095..e8e6094 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -10,7 +10,7 @@ - + diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index d49d915..9dd84f9 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -17,10 +17,10 @@ diff --git a/src/utils/index.js b/src/utils/index.js index ffb5526..71bce1c 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -348,3 +348,40 @@ export function removeClass(ele, cls) { ele.className = ele.className.replace(reg, ' ') } } + +// 替换邮箱字符 +export function regEmail(email) { + if (String(email).indexOf('@') > 0) { + const str = email.split('@') + let _s = '' + if (str[0].length > 3) { + for (var i = 0; i < str[0].length - 3; i++) { + _s += '*' + } + } + var new_email = str[0].substr(0, 3) + _s + '@' + str[1] + } + return new_email +} + +// 替换手机字符 +export function regMobile(mobile) { + if (mobile.length > 7) { + var new_mobile = mobile.substr(0, 3) + '****' + mobile.substr(7) + } + return new_mobile +} + +// 下载文件 +export function downloadFile(obj, name, suffix) { + const url = window.URL.createObjectURL(new Blob([obj])) + const link = document.createElement('a') + link.style.display = 'none' + link.href = url + const fileName = parseTime(new Date()) + '-' + name + '.' + suffix + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) +} + diff --git a/src/views/system/user/center/updateEmail.vue b/src/views/system/user/center/updateEmail.vue index d571be0..55e3da8 100644 --- a/src/views/system/user/center/updateEmail.vue +++ b/src/views/system/user/center/updateEmail.vue @@ -23,7 +23,7 @@