Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
782d64ec
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
344
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
782d64ec
编写于
8月 26, 2021
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改vue3 template
上级
01a16f67
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
96 addition
and
109 deletion
+96
-109
server/resource/template/readme.txt.tpl
server/resource/template/readme.txt.tpl
+0
-2
server/resource/template/web/table.vue.tpl
server/resource/template/web/table.vue.tpl
+14
-27
web/package-lock.json
web/package-lock.json
+81
-79
web/src/utils/request.js
web/src/utils/request.js
+1
-1
未找到文件。
server/resource/template/readme.txt.tpl
浏览文件 @
782d64ec
...
...
@@ -5,5 +5,3 @@
项目github:"https://github.com/piexlmax/github.com/flipped-aurora/gin-vue-admin/server"
希望大家给个star多多鼓励
暂时不保存大家生成的结构体 只为方便一次性使用
\ No newline at end of file
server/resource/template/web/table.vue.tpl
浏览文件 @
782d64ec
...
...
@@ -24,13 +24,15 @@
<el-form-item>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-search"
@
click=
"onSubmit"
>
查询
</el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"openDialog"
>
新增
</el-button>
<el-popover
v-model=
"deleteVisible"
placement=
"top"
width=
"160"
>
<el-popover
v-model
:visible
=
"deleteVisible"
placement=
"top"
width=
"160"
>
<p>
确定要删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"deleteVisible = false"
>
取消
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"onDelete"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
icon=
"el-icon-delete"
size=
"mini"
type=
"danger"
style=
"margin-left: 10px;"
>
批量删除
</el-button>
<template
#reference
>
<el-button
icon=
"el-icon-delete"
size=
"mini"
type=
"danger"
style=
"margin-left: 10px;"
>
批量删除
</el-button>
</template>
</el-popover>
</el-form-item>
</el-form>
...
...
@@ -46,24 +48,24 @@
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"日期"
width=
"180"
>
<template
slot-scope=
"scope"
>
{{ "{{ scope.row.CreatedAt|formatDate
}}" }}
</template>
<template
#default
="
scope
"
>
{{ "{{ formatDate(scope.row.CreatedAt)
}}" }}
</template>
</el-table-column>
{{- range .Fields}}
{{- if .DictType}}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<template
slot-scope
=
"scope"
>
<template
#default
="
scope
"
>
{
{
"{{"
}
} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {
{
"}}"
}
}
</template>
</el-table-column>
{{- else if eq .FieldType "bool" }}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
>
<template
slot-scope=
"scope"
>
{{ "{
{
scope
.
row
.
"}}{{.FieldJson}}{{"
|
formatBoolean
}
}"
}}
</template>
<template
#default
="
scope
"
>
{
{
"{{"
}
} formatBoolean(scope.row.{{.FieldJson}}) {
{
"}}"
}
}
</template>
</el-table-column>
{{- else }}
<el-table-column
label=
"{{.FieldDesc}}"
prop=
"{{.FieldJson}}"
width=
"120"
/>
{{- end }}
{{- end }}
<el-table-column
label=
"按钮组"
>
<template
slot-scope
=
"scope"
>
<template
#default
="
scope
"
>
<el-button
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
class=
"table-button"
@
click=
"update{{.StructName}}(scope.row)"
>
变更
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
</template>
...
...
@@ -107,10 +109,12 @@
</el-form-item>
{{- end }}
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialog"
>
确 定
</el-button>
</div>
<template
#footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialog"
>
确 定
</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
...
...
@@ -128,23 +132,6 @@ import { formatTimeToStr } from '@/utils/date'
import
infoList
from
'
@/mixins/infoList
'
export
default
{
name
:
'
{{.StructName}}
'
,
filters
:
{
formatDate
:
function
(
time
)
{
if
(
time
!==
null
&&
time
!==
''
)
{
var
date
=
new
Date
(
time
)
return
formatTimeToStr
(
date
,
'
yyyy-MM-dd hh:mm:ss
'
)
}
else
{
return
''
}
},
formatBoolean
:
function
(
bool
)
{
if
(
bool
!=
null
)
{
return
bool
?
'
是
'
:
'
否
'
}
else
{
return
''
}
}
},
mixins
:
[
infoList
],
data
()
{
return
{
...
...
web/package-lock.json
浏览文件 @
782d64ec
...
...
@@ -1780,63 +1780,6 @@
"integrity"
:
"sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo="
,
"dev"
:
true
},
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"ssri"
:
{
"version"
:
"8.0.1"
,
"resolved"
:
"https://registry.nlark.com/ssri/download/ssri-8.0.1.tgz"
,
...
...
@@ -1845,28 +1788,6 @@
"requires"
:
{
"minipass"
:
"^3.1.1"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.5.0"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz"
,
"integrity"
:
"sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
}
}
}
},
...
...
@@ -11623,6 +11544,87 @@
}
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.5.0"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz"
,
"integrity"
:
"sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-particle-line"
:
{
"version"
:
"0.1.4"
,
"resolved"
:
"https://registry.npmjs.org/vue-particle-line/-/vue-particle-line-0.1.4.tgz"
,
...
...
web/src/utils/request.js
浏览文件 @
782d64ec
...
...
@@ -59,10 +59,10 @@ service.interceptors.request.use(
service
.
interceptors
.
response
.
use
(
response
=>
{
closeLoading
()
if
(
response
.
headers
[
'
new-token
'
])
{
store
.
commit
(
'
user/setToken
'
,
response
.
headers
[
'
new-token
'
])
}
debugger
if
(
response
.
data
.
code
===
0
||
response
.
headers
.
success
===
'
true
'
)
{
return
response
.
data
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录