Skip to content

Commit a8d746e

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

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+

0 commit comments

Comments
 (0)