Skip to content

Commit bd5bd83

Browse files
奇淼(piexlmaxtask
andauthored
2.5.3beta版本提升 (flipped-aurora#1116)
* element-ui升级至2.2.2 部分标签存在重大变化,请重新安装依赖 * popover变更 * 增加真实的天气信息获取 * 天气功能抽离方便二开清理 * 侧边栏css优化 * 版本提升为2.5.3beta Co-authored-by: task <121913992@qq.com>
1 parent af5761b commit bd5bd83

File tree

26 files changed

+135
-87
lines changed

26 files changed

+135
-87
lines changed

server/core/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ func RunWindowsServer() {
3737

3838
fmt.Printf(`
3939
欢迎使用 gin-vue-admin
40-
当前版本:v2.5.2
40+
当前版本:v2.5.3beta
4141
加群方式:微信号:shouzi_1994 QQ群:622360840
4242
插件市场:https://plugin.gin-vue-admin.com
4343
GVA讨论社区:https://support.qq.com/products/371961
4444
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
4545
默认前端文件运行地址:http://127.0.0.1:8080
46-
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/coffee
46+
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
4747
`, address)
4848
global.GVA_LOG.Error(s.ListenAndServe().Error())
4949
}

server/resource/autocode_template/web/table.vue.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
3434
<p>确定要删除吗?</p>
3535
<div style="text-align: right; margin-top: 8px;">
36-
<el-button size="small" type="text" @click="deleteVisible = false">取消</el-button>
36+
<el-button size="small" type="primary" link @click="deleteVisible = false">取消</el-button>
3737
<el-button size="small" type="primary" @click="onDelete">确定</el-button>
3838
</div>
3939
<template #reference>
@@ -69,8 +69,8 @@
6969
{{- end }}
7070
<el-table-column align="left" label="按钮组">
7171
<template #default="scope">
72-
<el-button type="text" icon="edit" size="small" class="table-button" @click="update{{.StructName}}Func(scope.row)">变更</el-button>
73-
<el-button type="text" icon="delete" size="small" @click="deleteRow(scope.row)">删除</el-button>
72+
<el-button type="primary" link icon="edit" size="small" class="table-button" @click="update{{.StructName}}Func(scope.row)">变更</el-button>
73+
<el-button type="primary" link icon="delete" size="small" @click="deleteRow(scope.row)">删除</el-button>
7474
</template>
7575
</el-table-column>
7676
</el-table>

web/src/core/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const viteLogo = (env) => {
1818
)
1919
console.log(
2020
chalk.green(
21-
`> 当前版本:v2.5.2`
21+
`> 当前版本:v2.5.3beta`
2222
)
2323
)
2424
console.log(

web/src/core/gin-vue-admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
register(app)
1111
console.log(`
1212
欢迎使用 Gin-Vue-Admin
13-
当前版本:v2.5.2
13+
当前版本:v2.5.3beta
1414
加群方式:微信:shouzi_1994 QQ群:622360840
1515
GVA讨论社区:https://support.qq.com/products/371961
1616
插件市场:https://plugin.gin-vue-admin.com

web/src/style/element_visiable.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
justify-content: center;
135135
align-items: center;
136136
}
137+
// 兼容久版用户升级
137138
.active {
138139
background: #4D70FF;
139140
border-radius: 2px;
@@ -142,6 +143,17 @@
142143
.el-pager li.active+li {
143144
border-left: 1px solid #ddd !important;
144145
}
146+
// end
147+
148+
149+
.is-active {
150+
background: #4D70FF;
151+
border-radius: 2px;
152+
color: #ffffff !important;
153+
}
154+
.el-pager li.is-active+li {
155+
border-left: 1px solid #ddd !important;
156+
}
145157
.el-pagination__sizes {
146158
.el-input {
147159
.el-input__suffix {
@@ -181,9 +193,6 @@
181193
padding: 2px 20px 12px 20px;
182194
border-bottom: 1px solid #E4E4E4;
183195
}
184-
.el-dialog__headerbtn {
185-
top: 16px;
186-
}
187196
.el-dialog__footer {
188197
padding: 0 16px 16px 0;
189198
.dialog-footer {

web/src/style/main.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,11 @@ li {
598598
.aside {
599599
.el-menu--collapse {
600600
>.el-menu-item{
601-
padding: 0 15px !important;
602-
601+
display: flex;
602+
justify-content: center;
603603
}
604604
}
605605
.el-sub-menu {
606-
.el-menu-item{
607-
padding: 0 20px;
608-
}
609606
.el-menu {
610607
.is-active {
611608
// 关闭三级菜单二级菜单样式

web/src/style/newLogin.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
width: 96vw;
1818
height: 94vh;
1919
background-color: rgba(255, 255, 255, .8);
20-
backdrop-filter: blur(5px);
2120
border-radius: 10px;
2221
display: flex;
2322
align-items: center;

web/src/view/about/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
</div>
9999
<el-button
100100
class="load-more"
101-
type="text"
101+
type="primary" link
102102
@click="loadMore"
103103
>Load more</el-button>
104104
</el-card>

web/src/view/dashboard/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="gva-card gva-top-card">
55
<div class="gva-top-card-left">
66
<div class="gva-top-card-left-title">早安,管理员,请开始一天的工作吧</div>
7-
<div class="gva-top-card-left-dot">今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。</div>
7+
<div class="gva-top-card-left-dot">{{ weatherInfo }}</div>
88
<div class="gva-top-card-left-rows">
99
<el-row v-auth="888">
1010
<el-col :span="8" :xs="24" :sm="8">
@@ -109,6 +109,8 @@ import echartsLine from '@/view/dashboard/dashboardCharts/echartsLine.vue'
109109
import dashboardTable from '@/view/dashboard/dashboardTable/dashboardTable.vue'
110110
import { ref } from 'vue'
111111
import { useRouter } from 'vue-router'
112+
import { useWeatherInfo } from '@/view/dashboard/weather.js'
113+
const weatherInfo = useWeatherInfo()
112114
113115
const toolCards = ref([
114116
{
@@ -205,7 +207,7 @@ export default {
205207
color: #343844;
206208
}
207209
&-dot {
208-
font-size: 14px;
210+
font-size: 16px;
209211
color: #6B7687;
210212
margin-top: 24px;
211213
}

web/src/view/dashboard/weather.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
import axios from 'axios'
3+
import { ref } from 'vue'
4+
5+
const weatherInfo = ref('今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。')
6+
const amapKey = '8e8baa8a7317586c29ec694895de6e0a'
7+
8+
export const useWeatherInfo = () => {
9+
ip()
10+
return weatherInfo
11+
}
12+
13+
export const ip = async() => {
14+
// key换成你自己的 https://console.amap.com/dev/index
15+
if (amapKey === '') {
16+
return false
17+
}
18+
const res = await axios.get('https://restapi.amap.com/v3/ip?key=' + amapKey)
19+
if (res.data.adcode) {
20+
getWeather(res.data.adcode)
21+
}
22+
}
23+
24+
const getWeather = async(code) => {
25+
const response = await axios.get('https://restapi.amap.com/v3/weather/weatherInfo?key=' + amapKey + '&extensions=base&city=' + code)
26+
if (response.data.status === '1') {
27+
const s = response.data.lives[0]
28+
weatherInfo.value = s.city + ' 天气:' + s.weather + ' 温度:' + s.temperature + '摄氏度 风向:' + s.winddirection + ' 风力:' + s.windpower + '级 空气湿度:' + s.humidity
29+
}
30+
}
31+

web/src/view/example/customer/customer.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
<el-table-column align="left" label="接入人ID" prop="sysUserId" width="120" />
2424
<el-table-column align="left" label="按钮组" min-width="160">
2525
<template #default="scope">
26-
<el-button size="small" type="text" icon="edit" @click="updateCustomer(scope.row)">变更</el-button>
27-
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
26+
<el-button size="small" type="primary" link icon="edit" @click="updateCustomer(scope.row)">变更</el-button>
27+
<el-popover v-model="scope.row.visible" placement="top" width="160">
2828
<p>确定要删除吗?</p>
2929
<div style="text-align: right; margin-top: 8px;">
30-
<el-button size="small" type="text" @click="scope.row.visible = false">取消</el-button>
30+
<el-button size="small" type="primary" link @click="scope.row.visible = false">取消</el-button>
3131
<el-button type="primary" size="small" @click="deleteCustomer(scope.row)">确定</el-button>
3232
</div>
3333
<template #reference>
34-
<el-button type="text" icon="delete" size="small" @click="scope.row.visible = true">删除</el-button>
34+
<el-button type="primary" link icon="delete" size="small" @click="scope.row.visible = true">删除</el-button>
3535
</template>
3636
</el-popover>
3737
</template>

web/src/view/example/upload/upload.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
</el-table-column>
5959
<el-table-column align="left" label="操作" width="160">
6060
<template #default="scope">
61-
<el-button size="small" icon="download" type="text" @click="downloadFile(scope.row)">下载</el-button>
62-
<el-button size="small" icon="delete" type="text" @click="deleteFileFunc(scope.row)">删除</el-button>
61+
<el-button size="small" icon="download" type="primary" link @click="downloadFile(scope.row)">下载</el-button>
62+
<el-button size="small" icon="delete" type="primary" link @click="deleteFileFunc(scope.row)">删除</el-button>
6363
</template>
6464
</el-table-column>
6565
</el-table>

web/src/view/init/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ const onSubmit = async() => {
162162
width: 96vw;
163163
height: 94vh;
164164
background-color: rgba(255,255,255,.8);
165-
backdrop-filter: blur(5px);
166165
border-radius: 10px;
167166
display: flex;
168167
align-items: center;

web/src/view/layout/aside/historyComponent/history.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:closable="!(historys.length === 1 && $route.name === defaultRouter)"
66
type="card"
77
@contextmenu.prevent="openContextMenu($event)"
8-
@tab-click="changeTab"
8+
@tab-change="changeTab"
99
@tab-remove="removeTab"
1010
>
1111
<el-tab-pane
@@ -18,6 +18,7 @@
1818
>
1919
<template #label>
2020
<span
21+
:tab="item"
2122
:style="{
2223
color: activeValue === name(item) ? userStore.activeColor : '#333',
2324
}"
@@ -200,13 +201,22 @@ const setTab = (route) => {
200201
delete obj.meta.matched
201202
obj.query = route.query
202203
obj.params = route.params
203-
console.log(obj)
204204
historys.value.push(obj)
205205
}
206206
window.sessionStorage.setItem('activeValue', getFmtString(route))
207207
}
208-
const changeTab = (component) => {
209-
const tab = component.instance.attrs.tab
208+
209+
const historyMap = ref({})
210+
211+
watch(()=>historys.value,()=>{
212+
historyMap.value={}
213+
historys.value.forEach((item)=>{
214+
historyMap.value[getFmtString(item)] = item
215+
})
216+
})
217+
218+
const changeTab = (name) => {
219+
const tab = historyMap.value[name]
210220
router.push({
211221
name: tab.name,
212222
query: tab.query,

web/src/view/superAdmin/api/api.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
<div class="gva-table-box">
3131
<div class="gva-btn-list">
3232
<el-button size="small" type="primary" icon="plus" @click="openDialog('addApi')">新增</el-button>
33-
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
33+
<el-popover v-model="deleteVisible" placement="top" width="160">
3434
<p>确定要删除吗?</p>
3535
<div style="text-align: right; margin-top: 8px;">
36-
<el-button size="small" type="text" @click="deleteVisible = false">取消</el-button>
36+
<el-button size="small" type="primary" link @click="deleteVisible = false">取消</el-button>
3737
<el-button size="small" type="primary" @click="onDelete">确定</el-button>
3838
</div>
3939
<template #reference>
@@ -63,13 +63,13 @@
6363
<el-button
6464
icon="edit"
6565
size="small"
66-
type="text"
66+
type="primary" link
6767
@click="editApiFunc(scope.row)"
6868
>编辑</el-button>
6969
<el-button
7070
icon="delete"
7171
size="small"
72-
type="text"
72+
type="primary" link
7373
@click="deleteApiFunc(scope.row)"
7474
>删除</el-button>
7575
</template>

web/src/view/superAdmin/authority/authority.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@
1818
<el-button
1919
icon="setting"
2020
size="small"
21-
type="text"
21+
type="primary" link
2222
@click="opdendrawer(scope.row)"
2323
>设置权限</el-button>
2424
<el-button
2525
icon="plus"
2626
size="small"
27-
type="text"
27+
type="primary" link
2828
@click="addAuthority(scope.row.authorityId)"
2929
>新增子角色</el-button>
3030
<el-button
3131
icon="copy-document"
3232
size="small"
33-
type="text"
33+
type="primary" link
3434
@click="copyAuthorityFunc(scope.row)"
3535
>拷贝</el-button>
3636
<el-button
3737
icon="edit"
3838
size="small"
39-
type="text"
39+
type="primary" link
4040
@click="editAuthority(scope.row)"
4141
>编辑</el-button>
4242
<el-button
4343
icon="delete"
4444
size="small"
45-
type="text"
45+
type="primary" link
4646
@click="deleteAuth(scope.row)"
4747
>删除</el-button>
4848
</template>

web/src/view/superAdmin/authority/components/menus.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<span>{{ node.label }}</span>
2020
<span>
2121
<el-button
22-
type="text"
22+
type="primary" link
2323
size="small"
2424
:style="{color:row.defaultRouter === data.name?'#E6A23C':'#85ce61'}"
2525
:disabled="!node.checked"
@@ -30,7 +30,7 @@
3030
</span>
3131
<span v-if="data.menuBtn.length">
3232
<el-button
33-
type="text"
33+
type="primary" link
3434
size="small"
3535
@click="() => OpenBtn(data)"
3636
>

web/src/view/superAdmin/dictionary/sysDictionary.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,25 @@
8585
<el-button
8686
size="small"
8787
icon="document"
88-
type="text"
88+
type="primary" link
8989
@click="toDetile(scope.row)"
9090
>详情</el-button>
9191
<el-button
9292
size="small"
9393
icon="edit"
94-
type="text"
94+
type="primary" link
9595
@click="updateSysDictionaryFunc(scope.row)"
9696
>变更</el-button>
9797
<el-popover
98-
v-model:visible="scope.row.visible"
98+
v-model="scope.row.visible"
9999
placement="top"
100100
width="160"
101101
>
102102
<p>确定要删除吗?</p>
103103
<div style="text-align: right; margin-top: 8px">
104104
<el-button
105105
size="small"
106-
type="text"
106+
type="primary" link
107107
@click="scope.row.visible = false"
108108
>取消</el-button>
109109
<el-button
@@ -114,7 +114,7 @@
114114
</div>
115115
<template #reference>
116116
<el-button
117-
type="text"
117+
type="primary" link
118118
icon="delete"
119119
size="small"
120120
style="margin-left: 10px"

0 commit comments

Comments
 (0)