From 65730989c489a2ec03948952ace74197aed50ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Tue, 22 Oct 2019 20:26:47 +0800 Subject: [PATCH 1/4] docs: add awesome-project --- README-zh.md | 8 +++++--- README.md | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README-zh.md b/README-zh.md index 32243a4..d248632 100644 --- a/README-zh.md +++ b/README-zh.md @@ -14,11 +14,13 @@ ## 相关项目 -[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) +- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) -[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) +- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) -[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) +- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) + +- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312) 写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目: diff --git a/README.md b/README.md index f15c935..b99f942 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,13 @@ For `typescript` version, you can use [vue-typescript-admin-template](https://gi ## Related Project -[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) +- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) -[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) +- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) -[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) +- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) + +- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312) ## Browsers support From 0e8fa655684f0929785d0c99d3e87210613dafbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Tue, 22 Oct 2019 20:27:25 +0800 Subject: [PATCH 2/4] perf: VS Code support webpack alias file jump --- jsconfig.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 jsconfig.json diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..ed079e2 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "@/*": ["src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} From f32b49e6621029c434b4f3bf0139fb014e58594e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Tue, 22 Oct 2019 20:29:20 +0800 Subject: [PATCH 3/4] perf[utils.js]: perf parseTime function --- src/utils/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index cd14bd5..7e3fc1a 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -6,7 +6,7 @@ * Parse the time to string * @param {(Object|string|number)} time * @param {string} cFormat - * @returns {string} + * @returns {string | null} */ export function parseTime(time, cFormat) { if (arguments.length === 0) { @@ -34,14 +34,11 @@ export function parseTime(time, cFormat) { s: date.getSeconds(), a: date.getDay() } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] + const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + const value = formatObj[key] // Note: getDay() returns 0 on Sunday if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 + return value.toString().padStart(2, '0') }) return time_str } From 5afac23d2fecfe6cfab14ec8efa273d02269adb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Tue, 22 Oct 2019 20:29:58 +0800 Subject: [PATCH 4/4] perf[SvgIcon]: change xlink:href to href --- src/components/SvgIcon/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index b07ded2..9a3318e 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -1,7 +1,7 @@