forked from lvyunqi/QimenIDC-Client-V2
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit b43d3a3
Showing
633 changed files
with
53,092 additions
and
0 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,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,23 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:nuxt/recommended", | ||
"plugin:vue/vue3-recommended", | ||
], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
parser: "@typescript-eslint/parser", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
"max-len": [2, { code: 210, tabWidth: 4, ignoreUrls: true }], | ||
"vue/prop-name-casing": ["error"], | ||
"vue/multi-word-component-names": 0, | ||
}, | ||
}; |
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,8 @@ | ||
node_modules | ||
*.log* | ||
.nuxt | ||
.nitro | ||
.cache | ||
.output | ||
.env | ||
dist |
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,6 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"printWidth": 160, | ||
"vueIndentScriptAndStyle": true | ||
} |
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,3 @@ | ||
{ | ||
"nuxt.isNuxtApp": false | ||
} |
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,42 @@ | ||
# Nuxt 3 Minimal Starter | ||
|
||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. | ||
|
||
## Setup | ||
|
||
Make sure to install the dependencies: | ||
|
||
```bash | ||
# yarn | ||
yarn install | ||
|
||
# npm | ||
npm install | ||
|
||
# pnpm | ||
pnpm install --shamefully-hoist | ||
``` | ||
|
||
## Development Server | ||
|
||
Start the development server on http://localhost:3000 | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Production | ||
|
||
Build the application for production: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
Locally preview production build: | ||
|
||
```bash | ||
npm run preview | ||
``` | ||
|
||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
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,87 @@ | ||
import { $themeConfig } from './theme.config'; | ||
import { useAppStore } from '@/stores/index'; | ||
|
||
export default { | ||
init(setLocale: any) { | ||
const store = useAppStore(); | ||
|
||
// set default styles | ||
let val: any = localStorage.getItem('theme'); // light, dark, system | ||
val = val || $themeConfig.theme; | ||
store.toggleTheme(val); | ||
|
||
val = localStorage.getItem('menu'); // vertical, collapsible-vertical, horizontal | ||
val = val || $themeConfig.menu; | ||
store.toggleMenu(val); | ||
|
||
val = localStorage.getItem('layout'); // full, boxed-layout | ||
val = val || $themeConfig.layout; | ||
store.toggleLayout(val); | ||
|
||
val = localStorage.getItem('i18n_locale'); // en, da, de, el, es, fr, hu, it, ja, pl, pt, ru, sv, tr, zh | ||
|
||
val = val || $themeConfig.locale; | ||
|
||
const list = store.languageList; | ||
const item = list.find((item: any) => item.code === val); | ||
if (item) { | ||
this.toggleLanguage(item, setLocale); | ||
} | ||
|
||
val = localStorage.getItem('rtlClass'); // rtl, ltr | ||
val = val || $themeConfig.rtlClass; | ||
store.toggleRTL(val); | ||
|
||
val = localStorage.getItem('animation'); // animate__fadeIn, animate__fadeInDown, animate__fadeInUp, animate__fadeInLeft, animate__fadeInRight, animate__slideInDown, animate__slideInLeft, animate__slideInRight, animate__zoomIn | ||
val = val || $themeConfig.animation; | ||
store.toggleAnimation(val); | ||
|
||
val = localStorage.getItem('navbar'); // navbar-sticky, navbar-floating, navbar-static | ||
val = val || $themeConfig.navbar; | ||
store.toggleNavbar(val); | ||
|
||
val = localStorage.getItem('semidark'); | ||
val = val === 'true' ? true : $themeConfig.semidark; | ||
store.toggleSemidark(val); | ||
}, | ||
|
||
toggleLanguage(item: any, setLocale: any) { | ||
const store = useAppStore(); | ||
|
||
let lang: any = null; | ||
if (item) { | ||
lang = item; | ||
} else { | ||
let code = store.locale || null; | ||
if (!code) { | ||
code = localStorage.getItem('i18n_locale'); | ||
} | ||
|
||
item = store.languageList.find((d: any) => d.code === code); | ||
if (item) { | ||
lang = item; | ||
} | ||
} | ||
|
||
if (!lang) { | ||
lang = store.languageList.find((d: any) => d.code === 'en'); | ||
} | ||
|
||
store.toggleLocale(lang.code, setLocale); | ||
return lang; | ||
}, | ||
|
||
changeAnimation(type = 'add') { | ||
const store = useAppStore(); | ||
if (store.animation) { | ||
const eleanimation: any = document.querySelector('.animation'); | ||
if (type === 'add') { | ||
eleanimation?.classList.add('animate__animated'); | ||
eleanimation?.classList.add(store.animation); | ||
} else { | ||
eleanimation?.classList.remove('animate__animated'); | ||
eleanimation?.classList.remove(store.animation); | ||
} | ||
} | ||
}, | ||
}; |
Oops, something went wrong.