奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with
34902 additions and
16443 deletions
-
.dockerignore
-
Dockerfile
-
docker-compose.yaml
-
docker/docker-start.sh
-
docker/etc/nginx/nginx.conf.tpl
-
dockerfile_server
-
package-lock.json
-
package.json
-
server/Dockerfile
-
server/config.yaml
-
web/.docker-compose/nginx/conf.d/my.conf
-
web/.dockerignore
-
web/Dockerfile
-
web/package-lock.json
-
web/src/core/element_lazy.js
-
web/src/core/gin-vue-admin.js
-
web/src/main.js
|
|
@ -1,119 +0,0 @@ |
|
|
|
# Created by .ignore support plugin (hsz.mobi) |
|
|
|
### Node template |
|
|
|
# Logs |
|
|
|
logs |
|
|
|
*.log |
|
|
|
npm-debug.log* |
|
|
|
yarn-debug.log* |
|
|
|
yarn-error.log* |
|
|
|
lerna-debug.log* |
|
|
|
|
|
|
|
# Diagnostic reports (https://nodejs.org/api/report.html) |
|
|
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
|
|
|
|
|
|
|
# Runtime data |
|
|
|
pids |
|
|
|
*.pid |
|
|
|
*.seed |
|
|
|
*.pid.lock |
|
|
|
|
|
|
|
# Directory for instrumented libs generated by jscoverage/JSCover |
|
|
|
lib-cov |
|
|
|
|
|
|
|
# Coverage directory used by tools like istanbul |
|
|
|
coverage |
|
|
|
*.lcov |
|
|
|
|
|
|
|
# nyc test coverage |
|
|
|
.nyc_output |
|
|
|
|
|
|
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) |
|
|
|
.grunt |
|
|
|
|
|
|
|
# Bower dependency directory (https://bower.io/) |
|
|
|
bower_components |
|
|
|
|
|
|
|
# node-waf configuration |
|
|
|
.lock-wscript |
|
|
|
|
|
|
|
# Compiled binary addons (https://nodejs.org/api/addons.html) |
|
|
|
build/Release |
|
|
|
|
|
|
|
# Dependency directories |
|
|
|
node_modules/ |
|
|
|
jspm_packages/ |
|
|
|
|
|
|
|
# Snowpack dependency directory (https://snowpack.dev/) |
|
|
|
web_modules/ |
|
|
|
|
|
|
|
# TypeScript cache |
|
|
|
*.tsbuildinfo |
|
|
|
|
|
|
|
# Optional npm cache directory |
|
|
|
.npm |
|
|
|
|
|
|
|
# Optional eslint cache |
|
|
|
.eslintcache |
|
|
|
|
|
|
|
# Microbundle cache |
|
|
|
.rpt2_cache/ |
|
|
|
.rts2_cache_cjs/ |
|
|
|
.rts2_cache_es/ |
|
|
|
.rts2_cache_umd/ |
|
|
|
|
|
|
|
# Optional REPL history |
|
|
|
.node_repl_history |
|
|
|
|
|
|
|
# Output of 'npm pack' |
|
|
|
*.tgz |
|
|
|
|
|
|
|
# Yarn Integrity file |
|
|
|
.yarn-integrity |
|
|
|
|
|
|
|
# dotenv environment variables file |
|
|
|
.env |
|
|
|
.env.test |
|
|
|
|
|
|
|
# parcel-bundler cache (https://parceljs.org/) |
|
|
|
.cache |
|
|
|
.parcel-cache |
|
|
|
|
|
|
|
# Next.js build output |
|
|
|
.next |
|
|
|
|
|
|
|
# Nuxt.js build / generate output |
|
|
|
.nuxt |
|
|
|
dist |
|
|
|
|
|
|
|
# Gatsby files |
|
|
|
.cache/ |
|
|
|
# Comment in the public line in if your project uses Gatsby and not Next.js |
|
|
|
# https://nextjs.org/blog/next-9-1#public-directory-support |
|
|
|
# public |
|
|
|
|
|
|
|
# vuepress build output |
|
|
|
.vuepress/dist |
|
|
|
|
|
|
|
# Serverless directories |
|
|
|
.serverless/ |
|
|
|
|
|
|
|
# FuseBox cache |
|
|
|
.fusebox/ |
|
|
|
|
|
|
|
# DynamoDB Local files |
|
|
|
.dynamodb/ |
|
|
|
|
|
|
|
# TernJS port file |
|
|
|
.tern-port |
|
|
|
|
|
|
|
# Stores VSCode versions used for testing VSCode extensions |
|
|
|
.vscode-test |
|
|
|
|
|
|
|
# yarn v2 |
|
|
|
|
|
|
|
.yarn/cache |
|
|
|
.yarn/unplugged |
|
|
|
.yarn/build-state.yml |
|
|
|
.pnp.* |
|
|
|
|
|
|
|
**/node_modules |
|
|
@ -1,41 +0,0 @@ |
|
|
|
FROM golang:alpine as builder |
|
|
|
RUN apk add --update --no-cache yarn make g++ |
|
|
|
RUN yarn global add cross-env node-sass |
|
|
|
|
|
|
|
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct \ |
|
|
|
GO111MODULE=on \ |
|
|
|
CGO_ENABLED=1 |
|
|
|
WORKDIR /go/src/gin-vue-admin |
|
|
|
RUN go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct |
|
|
|
COPY server/ ./ |
|
|
|
RUN go env && go list && go build -v -a -ldflags "-extldflags \"-static\" " -o gvadmin . |
|
|
|
|
|
|
|
WORKDIR /web |
|
|
|
COPY web/ ./ |
|
|
|
RUN yarn install && yarn run build |
|
|
|
|
|
|
|
|
|
|
|
FROM nginx:alpine |
|
|
|
LABEL MAINTAINER="rikugun" |
|
|
|
|
|
|
|
RUN apk add --no-cache gettext tzdata && \ |
|
|
|
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ |
|
|
|
echo "Asia/Shanghai" > /etc/timezone && \ |
|
|
|
date && \ |
|
|
|
apk del tzdata |
|
|
|
|
|
|
|
COPY docker/etc/nginx/nginx.conf.tpl /etc/nginx/nginx.conf.tpl |
|
|
|
WORKDIR /app |
|
|
|
#copy web |
|
|
|
COPY --from=builder /web/dist/ /var/www/ |
|
|
|
#copy go app |
|
|
|
COPY --from=builder /go/src/gin-vue-admin/gvadmin ./ |
|
|
|
COPY --from=builder /go/src/gin-vue-admin/db.db ./ |
|
|
|
COPY --from=builder /go/src/gin-vue-admin/config.yaml ./ |
|
|
|
COPY --from=builder /go/src/gin-vue-admin/resource ./resource |
|
|
|
COPY docker/docker-start.sh ./ |
|
|
|
|
|
|
|
ENV API_SERVER="http://localhost:8888/" |
|
|
|
EXPOSE 80 |
|
|
|
|
|
|
|
ENTRYPOINT ["./docker-start.sh"] |
|
|
@ -10,8 +10,8 @@ networks: |
|
|
|
services: |
|
|
|
web: |
|
|
|
build: |
|
|
|
context: ./ |
|
|
|
dockerfile: ./dockerfile_web |
|
|
|
context: ./web |
|
|
|
dockerfile: ./Dockerfile |
|
|
|
container_name: gva-web |
|
|
|
restart: always |
|
|
|
ports: |
|
|
@ -25,8 +25,8 @@ services: |
|
|
|
|
|
|
|
server: |
|
|
|
build: |
|
|
|
context: ./ |
|
|
|
dockerfile: ./dockerfile_server |
|
|
|
context: ./server |
|
|
|
dockerfile: ./Dockerfile |
|
|
|
container_name: gva-server |
|
|
|
restart: always |
|
|
|
ports: |
|
|
|
|
|
@ -1,4 +0,0 @@ |
|
|
|
#!/bin/sh |
|
|
|
envsubst '$API_SERVER' < /etc/nginx/nginx.conf.tpl > /etc/nginx/nginx.conf |
|
|
|
env nginx |
|
|
|
./gvadmin |
|
|
@ -1,56 +0,0 @@ |
|
|
|
daemon on; |
|
|
|
worker_processes 50; |
|
|
|
#error_log /dev/stdout warn; |
|
|
|
error_log /var/log/nginx/error.log error; |
|
|
|
|
|
|
|
|
|
|
|
events { |
|
|
|
worker_connections 1024; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
http { |
|
|
|
include mime.types; |
|
|
|
default_type application/octet-stream; |
|
|
|
# See http://licson.net/post/optimizing-nginx-for-large-file-delivery/ for more detail |
|
|
|
# This optimizes the server for HLS fragment delivery |
|
|
|
sendfile off; |
|
|
|
#tcp_nopush on; |
|
|
|
keepalive_timeout 65; |
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
|
|
|
'$status $body_bytes_sent "$http_referer" ' |
|
|
|
'"$http_user_agent" "$http_x_forwarded_for"'; |
|
|
|
#access_log /dev/stdout combined; |
|
|
|
|
|
|
|
# ssl_ciphers HIGH:!aNULL:!MD5; |
|
|
|
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|
|
|
# ssl_session_cache shared:SSL:10m; |
|
|
|
# ssl_session_timeout 10m; |
|
|
|
|
|
|
|
server { |
|
|
|
listen 80; |
|
|
|
|
|
|
|
# Uncomment these lines to enable SSL. |
|
|
|
# Update the ssl paths with your own certificate and private key. |
|
|
|
# listen 443 ssl; |
|
|
|
# ssl_certificate /opt/certs/example.com.crt; |
|
|
|
# ssl_certificate_key /opt/certs/example.com.key; |
|
|
|
location / { |
|
|
|
root /var/www; |
|
|
|
try_files $uri $uri/ /index.html; |
|
|
|
index index.html; |
|
|
|
} |
|
|
|
|
|
|
|
location /v1/ { |
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
proxy_set_header X-Forwarded-Port $server_port; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
proxy_set_header Connection "upgrade"; |
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_pass ${API_SERVER} ; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -1,21 +0,0 @@ |
|
|
|
FROM golang:alpine |
|
|
|
|
|
|
|
ENV GO111MODULE=on |
|
|
|
ENV GOPROXY=https://goproxy.io,direct |
|
|
|
WORKDIR /go/src/gin-vue-admin |
|
|
|
COPY server/ ./ |
|
|
|
|
|
|
|
RUN go env && go mod tidy && go build -o server . |
|
|
|
|
|
|
|
FROM alpine:latest |
|
|
|
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" |
|
|
|
|
|
|
|
WORKDIR /go/src/gin-vue-admin |
|
|
|
|
|
|
|
COPY --from=0 /go/src/gin-vue-admin/server ./ |
|
|
|
COPY --from=0 /go/src/gin-vue-admin/config.docker.yaml ./ |
|
|
|
COPY --from=0 /go/src/gin-vue-admin/resource ./resource |
|
|
|
|
|
|
|
EXPOSE 8888 |
|
|
|
|
|
|
|
ENTRYPOINT ./server -c config.docker.yaml |
|
|
@ -1,3 +1,6 @@ |
|
|
|
{ |
|
|
|
"lockfileVersion": 1 |
|
|
|
"name": "gin-vue-admin", |
|
|
|
"lockfileVersion": 2, |
|
|
|
"requires": true, |
|
|
|
"packages": {} |
|
|
|
} |
|
|
@ -2,19 +2,18 @@ FROM golang:alpine |
|
|
|
|
|
|
|
ENV GO111MODULE=on |
|
|
|
ENV GOPROXY=https://goproxy.io,direct |
|
|
|
|
|
|
|
WORKDIR /go/src/gin-vue-admin |
|
|
|
COPY . . |
|
|
|
|
|
|
|
RUN go env && go build -o server . |
|
|
|
|
|
|
|
FROM alpine:latest |
|
|
|
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" |
|
|
|
|
|
|
|
WORKDIR /go/src/gin-vue-admin |
|
|
|
COPY --from=0 /go/src/gin-vue-admin/server ./ |
|
|
|
COPY --from=0 /go/src/gin-vue-admin/config.yaml ./ |
|
|
|
COPY --from=0 /go/src/gin-vue-admin/resource ./resource |
|
|
|
|
|
|
|
COPY --from=0 /go/src/gin-vue-admin ./ |
|
|
|
|
|
|
|
EXPOSE 8888 |
|
|
|
|
|
|
|
ENTRYPOINT ./server |
|
|
|
ENTRYPOINT ./server -c config.docker.yaml |
|
|
@ -43,7 +43,7 @@ system: |
|
|
|
env: 'public' # Change to "develop" to skip authentication for development mode |
|
|
|
addr: 8888 |
|
|
|
db-type: 'mysql' |
|
|
|
oss-type: 'local' # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置 |
|
|
|
oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置 |
|
|
|
use-multipoint: false |
|
|
|
|
|
|
|
# captcha configuration |
|
|
@ -85,7 +85,7 @@ autocode: |
|
|
|
web-form: /view |
|
|
|
web-table: /view |
|
|
|
|
|
|
|
# qiniu configuration (请自行申请七牛对应的 公钥 私钥 bucket 和 域名地址) |
|
|
|
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址) |
|
|
|
qiniu: |
|
|
|
zone: 'ZoneHuaDong' |
|
|
|
bucket: '' |
|
|
|
|
|
@ -0,0 +1 @@ |
|
|
|
node_modules/ |
|
|
@ -1,7 +1,7 @@ |
|
|
|
FROM node:12.16.1 |
|
|
|
|
|
|
|
WORKDIR /gva_web/ |
|
|
|
COPY web/ . |
|
|
|
COPY . . |
|
|
|
|
|
|
|
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org |
|
|
|
RUN cnpm install || npm install |
|
|
@ -15,4 +15,3 @@ COPY --from=0 /gva_web/dist /usr/share/nginx/html |
|
|
|
RUN cat /etc/nginx/nginx.conf |
|
|
|
RUN cat /etc/nginx/conf.d/my.conf |
|
|
|
RUN ls -al /usr/share/nginx/html |
|
|
|
CMD ls -al /usr/share/nginx/html |
|
|
@ -0,0 +1,119 @@ |
|
|
|
/* |
|
|
|
* |
|
|
|
* 按需加载element |
|
|
|
* |
|
|
|
* |
|
|
|
* */ |
|
|
|
|
|
|
|
import Vue from 'vue' |
|
|
|
// 按需引入element
|
|
|
|
import { |
|
|
|
Button, |
|
|
|
Select, |
|
|
|
Dialog, |
|
|
|
Form, |
|
|
|
Input, |
|
|
|
FormItem, |
|
|
|
Option, |
|
|
|
Loading, |
|
|
|
Message, |
|
|
|
Container, |
|
|
|
Card, |
|
|
|
Dropdown, |
|
|
|
DropdownMenu, |
|
|
|
DropdownItem, |
|
|
|
Row, |
|
|
|
Col, |
|
|
|
Menu, |
|
|
|
Submenu, |
|
|
|
MenuItem, |
|
|
|
Aside, |
|
|
|
Main, |
|
|
|
Badge, |
|
|
|
Header, |
|
|
|
Tabs, |
|
|
|
Breadcrumb, |
|
|
|
BreadcrumbItem, |
|
|
|
Scrollbar, |
|
|
|
Avatar, |
|
|
|
TabPane, |
|
|
|
Divider, |
|
|
|
Table, |
|
|
|
TableColumn, |
|
|
|
Cascader, |
|
|
|
Checkbox, |
|
|
|
CheckboxGroup, |
|
|
|
Pagination, |
|
|
|
Tag, |
|
|
|
Drawer, |
|
|
|
Tree, |
|
|
|
Popover, |
|
|
|
Switch, |
|
|
|
Collapse, |
|
|
|
CollapseItem, |
|
|
|
Tooltip, |
|
|
|
DatePicker, |
|
|
|
InputNumber, |
|
|
|
Steps, |
|
|
|
Upload, |
|
|
|
Progress, |
|
|
|
MessageBox, |
|
|
|
Image |
|
|
|
} from 'element-ui' |
|
|
|
|
|
|
|
Vue.use(Button) |
|
|
|
Vue.use(Select) |
|
|
|
Vue.use(Dialog) |
|
|
|
Vue.use(Form) |
|
|
|
Vue.use(FormItem) |
|
|
|
Vue.use(Input) |
|
|
|
Vue.use(Option) |
|
|
|
Vue.use(Container) |
|
|
|
Vue.use(Card) |
|
|
|
Vue.use(Dropdown) |
|
|
|
Vue.use(DropdownMenu) |
|
|
|
Vue.use(DropdownItem) |
|
|
|
Vue.use(Row) |
|
|
|
Vue.use(Col) |
|
|
|
Vue.use(Menu) |
|
|
|
Vue.use(Submenu) |
|
|
|
Vue.use(MenuItem) |
|
|
|
Vue.use(Aside) |
|
|
|
Vue.use(Main) |
|
|
|
Vue.use(Badge) |
|
|
|
Vue.use(Header) |
|
|
|
Vue.use(Tabs) |
|
|
|
Vue.use(Breadcrumb) |
|
|
|
Vue.use(BreadcrumbItem) |
|
|
|
Vue.use(Avatar) |
|
|
|
Vue.use(TabPane) |
|
|
|
Vue.use(Divider) |
|
|
|
Vue.use(Table) |
|
|
|
Vue.use(TableColumn) |
|
|
|
Vue.use(Checkbox) |
|
|
|
Vue.use(Cascader) |
|
|
|
Vue.use(Tag) |
|
|
|
Vue.use(Pagination) |
|
|
|
Vue.use(Drawer) |
|
|
|
Vue.use(Tree) |
|
|
|
Vue.use(CheckboxGroup) |
|
|
|
Vue.use(Popover) |
|
|
|
Vue.use(InputNumber) |
|
|
|
Vue.use(Switch) |
|
|
|
Vue.use(Collapse) |
|
|
|
Vue.use(CollapseItem) |
|
|
|
Vue.use(Tooltip) |
|
|
|
Vue.use(DatePicker) |
|
|
|
Vue.use(Steps) |
|
|
|
Vue.use(Upload) |
|
|
|
Vue.use(Progress) |
|
|
|
Vue.use(Scrollbar) |
|
|
|
Vue.use(Loading.directive) |
|
|
|
Vue.use(Image) |
|
|
|
|
|
|
|
Vue.prototype.$loading = Loading.service |
|
|
|
Vue.prototype.$message = Message |
|
|
|
Vue.prototype.$confirm = MessageBox.confirm |
|
|
|
Dialog.props.closeOnClickModal.default = false |
|
|
|
|
|
|
|
console.warn('[GIN-VUE-ADMIN]--按需加载elementUI成功,如出现element-ui组件无法使用问题,请至/src/core/element_lazy 下引入对应组件即可') |
|
|
@ -0,0 +1,27 @@ |
|
|
|
/* |
|
|
|
* gin-vue-admin web框架组 |
|
|
|
* |
|
|
|
* */ |
|
|
|
import Vue from 'vue' |
|
|
|
import './element_lazy' // 按需加载element
|
|
|
|
import uploader from 'vue-simple-uploader' |
|
|
|
import APlayer from '@moefe/vue-aplayer' |
|
|
|
// time line css
|
|
|
|
import '../../node_modules/timeline-vuejs/dist/timeline-vuejs.css' |
|
|
|
// 路由守卫
|
|
|
|
import Bus from '@/utils/bus' |
|
|
|
Vue.use(Bus) |
|
|
|
Vue.use(APlayer, { |
|
|
|
defaultCover: 'https://github.com/u3u.png', |
|
|
|
productionTip: true |
|
|
|
}) |
|
|
|
Vue.use(uploader) |
|
|
|
|
|
|
|
console.log(`
|
|
|
|
欢迎使用 Gin-Vue-Admin |
|
|
|
当前版本:V2.4.2 |
|
|
|
加群方式:微信:shouzi_1994 QQ群:622360840 |
|
|
|
默认自动化文档地址:http://127.0.0.1:${process.env.VUE_APP_SERVER_PORT}/swagger/index.html
|
|
|
|
默认前端文件运行地址:http://127.0.0.1:${process.env.VUE_APP_CLI_PORT}
|
|
|
|
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
|
|
|
|
`)
|
|
|
@ -1,155 +1,20 @@ |
|
|
|
import Vue from 'vue' |
|
|
|
import App from './App.vue' |
|
|
|
|
|
|
|
// 按需引入element
|
|
|
|
import { |
|
|
|
Button, |
|
|
|
Select, |
|
|
|
Dialog, |
|
|
|
Form, |
|
|
|
Input, |
|
|
|
FormItem, |
|
|
|
Option, |
|
|
|
Loading, |
|
|
|
Message, |
|
|
|
Container, |
|
|
|
Card, |
|
|
|
Dropdown, |
|
|
|
DropdownMenu, |
|
|
|
DropdownItem, |
|
|
|
Row, |
|
|
|
Col, |
|
|
|
Menu, |
|
|
|
Submenu, |
|
|
|
MenuItem, |
|
|
|
Aside, |
|
|
|
Main, |
|
|
|
Badge, |
|
|
|
Header, |
|
|
|
Tabs, |
|
|
|
Breadcrumb, |
|
|
|
BreadcrumbItem, |
|
|
|
Scrollbar, |
|
|
|
Avatar, |
|
|
|
TabPane, |
|
|
|
Divider, |
|
|
|
Table, |
|
|
|
TableColumn, |
|
|
|
Cascader, |
|
|
|
Checkbox, |
|
|
|
CheckboxGroup, |
|
|
|
Pagination, |
|
|
|
Tag, |
|
|
|
Drawer, |
|
|
|
Tree, |
|
|
|
Popover, |
|
|
|
Switch, |
|
|
|
Collapse, |
|
|
|
CollapseItem, |
|
|
|
Tooltip, |
|
|
|
DatePicker, |
|
|
|
InputNumber, |
|
|
|
Steps, |
|
|
|
Upload, |
|
|
|
Progress, |
|
|
|
MessageBox, |
|
|
|
Image |
|
|
|
} from 'element-ui' |
|
|
|
|
|
|
|
Vue.use(Button) |
|
|
|
Vue.use(Select) |
|
|
|
Vue.use(Dialog) |
|
|
|
Vue.use(Form) |
|
|
|
Vue.use(FormItem) |
|
|
|
Vue.use(Input) |
|
|
|
Vue.use(Option) |
|
|
|
Vue.use(Container) |
|
|
|
Vue.use(Card) |
|
|
|
Vue.use(Dropdown) |
|
|
|
Vue.use(DropdownMenu) |
|
|
|
Vue.use(DropdownItem) |
|
|
|
Vue.use(Row) |
|
|
|
Vue.use(Col) |
|
|
|
Vue.use(Menu) |
|
|
|
Vue.use(Submenu) |
|
|
|
Vue.use(MenuItem) |
|
|
|
Vue.use(Aside) |
|
|
|
Vue.use(Main) |
|
|
|
Vue.use(Badge) |
|
|
|
Vue.use(Header) |
|
|
|
Vue.use(Tabs) |
|
|
|
Vue.use(Breadcrumb) |
|
|
|
Vue.use(BreadcrumbItem) |
|
|
|
Vue.use(Avatar) |
|
|
|
Vue.use(TabPane) |
|
|
|
Vue.use(Divider) |
|
|
|
Vue.use(Table) |
|
|
|
Vue.use(TableColumn) |
|
|
|
Vue.use(Checkbox) |
|
|
|
Vue.use(Cascader) |
|
|
|
Vue.use(Tag) |
|
|
|
Vue.use(Pagination) |
|
|
|
Vue.use(Drawer) |
|
|
|
Vue.use(Tree) |
|
|
|
Vue.use(CheckboxGroup) |
|
|
|
Vue.use(Popover) |
|
|
|
Vue.use(InputNumber) |
|
|
|
Vue.use(Switch) |
|
|
|
Vue.use(Collapse) |
|
|
|
Vue.use(CollapseItem) |
|
|
|
Vue.use(Tooltip) |
|
|
|
Vue.use(DatePicker) |
|
|
|
Vue.use(Steps) |
|
|
|
Vue.use(Upload) |
|
|
|
Vue.use(Progress) |
|
|
|
Vue.use(Scrollbar) |
|
|
|
Vue.use(Loading.directive) |
|
|
|
Vue.use(Image) |
|
|
|
|
|
|
|
Vue.prototype.$loading = Loading.service |
|
|
|
Vue.prototype.$message = Message |
|
|
|
Vue.prototype.$confirm = MessageBox.confirm |
|
|
|
Dialog.props.closeOnClickModal.default = false |
|
|
|
|
|
|
|
// 引入gin-vue-admin前端初始化相关内容
|
|
|
|
import './core/gin-vue-admin' |
|
|
|
// 引入封装的router
|
|
|
|
import router from '@/router/index' |
|
|
|
|
|
|
|
// time line css
|
|
|
|
import '../node_modules/timeline-vuejs/dist/timeline-vuejs.css' |
|
|
|
|
|
|
|
import '@/permission' |
|
|
|
import { store } from '@/store' |
|
|
|
Vue.config.productionTip = false |
|
|
|
|
|
|
|
// 路由守卫
|
|
|
|
import Bus from '@/utils/bus' |
|
|
|
Vue.use(Bus) |
|
|
|
|
|
|
|
import APlayer from '@moefe/vue-aplayer' |
|
|
|
|
|
|
|
Vue.use(APlayer, { |
|
|
|
defaultCover: 'https://github.com/u3u.png', |
|
|
|
productionTip: true |
|
|
|
}) |
|
|
|
|
|
|
|
import { auth } from '@/directive/auth' |
|
|
|
// 按钮权限指令
|
|
|
|
auth(Vue) |
|
|
|
|
|
|
|
import uploader from 'vue-simple-uploader' |
|
|
|
Vue.use(uploader) |
|
|
|
|
|
|
|
export default new Vue({ |
|
|
|
render: h => h(App), |
|
|
|
router, |
|
|
|
store |
|
|
|
}).$mount('#app') |
|
|
|
|
|
|
|
console.log(`
|
|
|
|
欢迎使用 Gin-Vue-Admin |
|
|
|
当前版本:V2.4.2 |
|
|
|
加群方式:微信:shouzi_1994 QQ群:622360840 |
|
|
|
默认自动化文档地址:http://127.0.0.1:${process.env.VUE_APP_SERVER_PORT}/swagger/index.html
|
|
|
|
默认前端文件运行地址:http://127.0.0.1:${process.env.VUE_APP_CLI_PORT}
|
|
|
|
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
|
|
|
|
`)
|