初始化
This commit is contained in:
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@@ -0,0 +1,4 @@
|
||||
public
|
||||
src/assets
|
||||
dist
|
||||
node_modules
|
||||
16
.eslintrc.cjs
Normal file
16
.eslintrc.cjs
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser'
|
||||
},
|
||||
extends: ['@nuxtjs/eslint-config-typescript', 'plugin:prettier/recommended'],
|
||||
plugins: [],
|
||||
rules: {
|
||||
'vue/no-v-html': 'off'
|
||||
}
|
||||
};
|
||||
78
.eslintrc.js
Normal file
78
.eslintrc.js
Normal file
@@ -0,0 +1,78 @@
|
||||
// @ts-check
|
||||
const { defineConfig } = require('eslint-define-config');
|
||||
|
||||
module.exports = defineConfig({
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
extends: [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended'
|
||||
],
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
jsxPragma: 'React',
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'vue/script-setup-uses-vars': 'error',
|
||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'vue/custom-event-name-casing': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_'
|
||||
}
|
||||
],
|
||||
'no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_'
|
||||
}
|
||||
],
|
||||
'space-before-function-paren': 'off',
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/one-component-per-file': 'off',
|
||||
'vue/html-closing-bracket-newline': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/attribute-hyphenation': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
html: {
|
||||
void: 'always',
|
||||
normal: 'never',
|
||||
component: 'always'
|
||||
},
|
||||
svg: 'always',
|
||||
math: 'always'
|
||||
}
|
||||
],
|
||||
'vue/v-on-event-hyphenation': 'off',
|
||||
'vue/multi-word-component-names': 'off'
|
||||
}
|
||||
});
|
||||
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
16
.prettierrc.cjs
Normal file
16
.prettierrc.cjs
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
/*打印宽度,超过后,会将属性换行*/
|
||||
printWidth: 120,
|
||||
/*禁止使用尾随逗号,对象和数组最后一个逗号去掉*/
|
||||
trailingComma: 'none',
|
||||
/*在对象字面量中的括号之间添加空格*/
|
||||
bracketSpacing: true,
|
||||
/*使用单引号而不是双引号来定义字符串*/
|
||||
singleQuote: true,
|
||||
/*当箭头函数只有一个参数时,省略参数前后的括号*/
|
||||
arrowParens: 'avoid',
|
||||
/*script和style标签中间的内容缩进*/
|
||||
vueIndentScriptAndStyle: true,
|
||||
// 将>多行 HTML(HTML、JSX、Vue、Angular)元素放在最后一行的末尾,而不是单独放在下一行(不适用于自闭合元素
|
||||
bracketSameLine: false
|
||||
};
|
||||
75
README.md
Normal file
75
README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# WebsotCms
|
||||
|
||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm run dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm run build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm run preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||
11
ecosystem.config.cjs
Normal file
11
ecosystem.config.cjs
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: '网宿软件',
|
||||
port: '16880',
|
||||
exec_mode: 'cluster',
|
||||
instances: 'max',
|
||||
script: './.output/server/index.mjs'
|
||||
}
|
||||
]
|
||||
}
|
||||
45
nuxt.config.ts
Normal file
45
nuxt.config.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2024-04-03',
|
||||
devtools: {enabled: false},
|
||||
modules: ["@element-plus/nuxt",'@unocss/nuxt', "@nuxt/image"],
|
||||
css: [
|
||||
'element-plus/dist/index.css',
|
||||
'element-plus/theme-chalk/display.css',
|
||||
'@/assets/css/main.css'
|
||||
],
|
||||
ssr: false,
|
||||
plugins: [
|
||||
'@/plugins/element-ui'
|
||||
],
|
||||
app: {
|
||||
head: {
|
||||
viewport: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no',
|
||||
title: '首页',
|
||||
meta: [
|
||||
{ name: 'keywords', content: '企业官网,建站系统,websoftCMS,网站源码,java,nuxt,antd,vue3' },
|
||||
{
|
||||
name: 'description',
|
||||
content: 'weSite企业建站系统,助力企业信息化建设和转型,主要产品有:企业官网,电商系统,微信公众号,微信小程序应用等,使用目前最流行的技术栈打造。https://websoft.top'
|
||||
}
|
||||
],
|
||||
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
port: 16880
|
||||
},
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
// 开发环境配置
|
||||
// tenantId: '5',
|
||||
// apiServer: 'http://127.0.0.1:30000/api',
|
||||
|
||||
// 生产环境
|
||||
apiServer: 'https://common-api.websoft.top/api',
|
||||
globalTitle: '网宿软件',
|
||||
domain: 'websoft.top'
|
||||
},
|
||||
// 私有配置项
|
||||
}
|
||||
})
|
||||
24069
package-lock.json
generated
Normal file
24069
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
71
package.json
Normal file
71
package.json
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build --dotenv .env.production",
|
||||
"dev": "nuxt dev --dotenv .env.development",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
"lint:js": "eslint --ext \".ts,.vue\" --ignore-path .gitignore .",
|
||||
"lint:prettier": "prettier --check .",
|
||||
"lint": "yarn lint:js && yarn lint:prettier",
|
||||
"lintfix": "prettier --write --list-different . && yarn lint:js --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^6.0.0",
|
||||
"@ant-design/icons-vue": "^6.1.0",
|
||||
"@antv/g2": "^5.1.22",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"ant-design-vue": "^3.2.11",
|
||||
"axios": "^1.7.4",
|
||||
"dayjs": "^1.11.5",
|
||||
"dayjs-nuxt": "^1.1.2",
|
||||
"element-plus": "^2.2.28",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"js-md5": "^0.7.3",
|
||||
"less": "^4.1.3",
|
||||
"nuxt": "^3.12.4",
|
||||
"qrcode": "^1.5.4",
|
||||
"qrcode.vue": "^3.3.3",
|
||||
"sass": "^1.57.1",
|
||||
"uuid": "^10.0.0",
|
||||
"vue": "latest",
|
||||
"vue-i18n": "^9.14.0",
|
||||
"vue-qrcode": "^2.2.2",
|
||||
"vue-router": "^4.1.5",
|
||||
"xgplayer": "^3.0.5",
|
||||
"xgplayer-mp4": "^3.0.5"
|
||||
},
|
||||
"packageManager": "pnpm@9.3.0+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631",
|
||||
"devDependencies": {
|
||||
"@element-plus/nuxt": "^1.0.9",
|
||||
"@nuxt/devtools": "^0.6.1",
|
||||
"@nuxt/image": "^1.7.0",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
||||
"@nuxtjs/i18n": "^8.5.2",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"@unocss/nuxt": "^0.62.2",
|
||||
"@unocss/preset-attributify": "^0.62.2",
|
||||
"@unocss/preset-icons": "^0.62.2",
|
||||
"@unocss/preset-uno": "^0.62.2",
|
||||
"@vitejs/plugin-legacy": "^2.0.1",
|
||||
"@vitejs/plugin-vue": "^3.0.3",
|
||||
"dayjs-nuxt": "^1.1.2",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"nuxt": "^3.6.5",
|
||||
"prettier": "^3.2.5",
|
||||
"sass-embedded": "^1.77.8",
|
||||
"typescript": "^5.3.3",
|
||||
"unocss": "^0.62.2",
|
||||
"vite": "^3.0.9",
|
||||
"vite-plugin-compression": "^0.5.1"
|
||||
}
|
||||
}
|
||||
14020
pnpm-lock.yaml
generated
Normal file
14020
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
4
tsconfig.json
Normal file
4
tsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
||||
6
uno.config.ts
Normal file
6
uno.config.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// uno.config.ts
|
||||
import { defineConfig } from 'unocss'
|
||||
|
||||
export default defineConfig({
|
||||
// ...UnoCSS options
|
||||
})
|
||||
17
vite.config.ts
Normal file
17
vite.config.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
// 引入Unocss
|
||||
import Unocss from 'unocss/vite';
|
||||
import { presetUno, presetAttributify, presetIcons } from 'unocss'
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
Unocss({ // 使用Unocss
|
||||
presets: [
|
||||
presetUno(),
|
||||
presetAttributify(),
|
||||
presetIcons()],
|
||||
})
|
||||
]
|
||||
})
|
||||
11
webstorm.config.js
Normal file
11
webstorm.config.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, './'),
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'@': path.resolve('Vue3-admin/src'),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user