-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
813 additions
and
812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_USE_MOCK = "staging" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ dist | |
/public | ||
/docs | ||
.husky | ||
.local | ||
/bin | ||
*html | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
node: true | ||
}, | ||
extends: ['standard', 'plugin:vue/essential', 'plugin:prettier/recommended'], | ||
parserOptions: { | ||
ecmaVersion: 2016, | ||
// 对Babel解析器的包装使其与 ESLint 兼容。 | ||
parser: 'babel-eslint', | ||
// 代码是 ECMAScript 模块 | ||
sourceType: 'module', | ||
}, | ||
plugins: ['vue'], | ||
rules: { | ||
// 'prettier/prettier': 'error', | ||
'no-unused-vars': 'off', | ||
'vue/no-multiple-template-root': 'off', | ||
camelcase: 0, | ||
'vue/component-tags-order': [ | ||
'error', | ||
{ | ||
order: ['template', 'script', 'style'] | ||
} | ||
] | ||
}, | ||
root: true, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: ['standard', 'plugin:vue/essential', 'plugin:prettier/recommended'], | ||
parserOptions: { | ||
ecmaVersion: 2016, | ||
// 对Babel解析器的包装使其与 ESLint 兼容。 | ||
parser: 'babel-eslint', | ||
// 代码是 ECMAScript 模块 | ||
sourceType: 'module', | ||
}, | ||
plugins: ['vue'], | ||
rules: { | ||
// 'prettier/prettier': 'error', | ||
'no-unused-vars': 'off', | ||
'vue/no-multiple-template-root': 'off', | ||
camelcase: 0, | ||
'vue/component-tags-order': [ | ||
'error', | ||
{ | ||
order: ['template', 'script', 'style'], | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
/** | ||
* 用于打包和输出gzip | ||
* https://github.com/anncwb/vite-plugin-compression/blob/main/README.zh_CN.md | ||
* https://github.com/anncwb/vite-plugin-compression/blob/main/README.zh_CN.md | ||
*/ | ||
import viteCompression from 'vite-plugin-compression'; | ||
import viteCompression from 'vite-plugin-compression' | ||
|
||
export function configCompressPlugin(compress, deleteOriginFile) { | ||
let options = {} | ||
if (compress === 'gzip') { | ||
options = { | ||
ext: '.gz', | ||
algorithm: 'gzip', | ||
} | ||
} | ||
if (compress === 'brotli') { | ||
options = { | ||
ext: '.br', | ||
algorithm: 'brotliCompress', | ||
} | ||
} | ||
const plugin = [ | ||
viteCompression({ | ||
verbose: true, | ||
threshold: 1500, | ||
deleteOriginFile, | ||
...options, | ||
}), | ||
] | ||
|
||
export function configCompressPlugin( compress, deleteOriginFile) { | ||
let options = {} | ||
if (compress == 'gzip') { | ||
options = { | ||
ext: '.gz', | ||
algorithm: 'gzip', | ||
} | ||
} | ||
if (compress == 'brotli') { | ||
options = { | ||
ext: '.br', | ||
algorithm: 'brotliCompress', | ||
} | ||
} | ||
const plugin = [ | ||
viteCompression({ | ||
verbose: true, | ||
threshold: 1500, | ||
deleteOriginFile, | ||
...options | ||
}) | ||
] | ||
|
||
return plugin | ||
} | ||
return plugin | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<template> | ||
<svg aria-hidden="true"> | ||
<use :xlink:href="symbolId" :fill="color" /> | ||
</svg> | ||
<svg aria-hidden="true"> | ||
<use :xlink:href="symbolId" :fill="color" /> | ||
</svg> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, defineProps, ref } from 'vue' | ||
const props = defineProps({ | ||
// route object | ||
prefix: { | ||
type: String, | ||
default: 'icon' | ||
}, | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
color: { | ||
type: String, | ||
default: '#333' | ||
} | ||
// route object | ||
prefix: { | ||
type: String, | ||
default: 'icon', | ||
}, | ||
name: { | ||
type: String, | ||
required: true, | ||
}, | ||
color: { | ||
type: String, | ||
default: '#333', | ||
}, | ||
}) | ||
const symbolId = computed(() => `#${props.prefix}-${props.name}`) | ||
</script> |
Oops, something went wrong.