首页轮播图添加,浏览器title修改
This commit is contained in:
parent
703bc11088
commit
05e8706b90
|
@ -48,6 +48,8 @@
|
||||||
"serve-static": "1.13.2",
|
"serve-static": "1.13.2",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svg-sprite-loader": "4.1.3",
|
||||||
"svgo": "1.2.2",
|
"svgo": "1.2.2",
|
||||||
|
"swiper": "^4.5.1",
|
||||||
|
"vue-awesome-swiper": "^3.1.3",
|
||||||
"vue-template-compiler": "2.6.10"
|
"vue-template-compiler": "2.6.10"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.7 MiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
After Width: | Height: | Size: 441 KiB |
|
@ -1,6 +1,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||||
|
import 'swiper/dist/css/swiper.css'
|
||||||
|
|
||||||
import ElementUI from 'element-ui'
|
import ElementUI from 'element-ui'
|
||||||
import 'element-ui/lib/theme-chalk/index.css'
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
title: '大胜达',
|
||||||
title: 'Vue Admin Template',
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean} true | false
|
* @type {boolean} true | false
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: 龚祖望 573413756@qq.com
|
* @Author: 龚祖望 573413756@qq.com
|
||||||
* @Date: 2022-05-16 09:16:41
|
* @Date: 2022-05-16 09:16:41
|
||||||
* @LastEditors: 龚祖望 573413756@qq.com
|
* @LastEditors: 龚祖望 573413756@qq.com
|
||||||
* @LastEditTime: 2022-05-30 15:42:18
|
* @LastEditTime: 2022-06-15 16:09:03
|
||||||
* @FilePath: \dashengda\src\store\modules\user.js
|
* @FilePath: \dashengda\src\store\modules\user.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,6 +51,14 @@
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog .el-form-item {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.el-form-item__content .el-date-editor--daterange.el-input__inner {
|
.el-form-item__content .el-date-editor--daterange.el-input__inner {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,28 +2,60 @@
|
||||||
* @Author: 龚祖望 573413756@qq.com
|
* @Author: 龚祖望 573413756@qq.com
|
||||||
* @Date: 2022-05-16 09:16:41
|
* @Date: 2022-05-16 09:16:41
|
||||||
* @LastEditors: 龚祖望 573413756@qq.com
|
* @LastEditors: 龚祖望 573413756@qq.com
|
||||||
* @LastEditTime: 2022-05-18 16:40:24
|
* @LastEditTime: 2022-06-14 09:55:48
|
||||||
* @FilePath: \dashengda\src\views\dashboard\index.vue
|
* @FilePath: \dashengda\src\views\dashboard\index.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container" />
|
<div class="dashboard-container">
|
||||||
|
<swiper ref="mySwiper" :options="swiperOption" style="width:100%">
|
||||||
|
<swiper-slide>
|
||||||
|
<img class="slide-img" src="@/assets/images/slide1.png">
|
||||||
|
</swiper-slide>
|
||||||
|
<swiper-slide>
|
||||||
|
<img class="slide-img" src="@/assets/images/slide2.png">
|
||||||
|
</swiper-slide>
|
||||||
|
<swiper-slide>
|
||||||
|
<img class="slide-img" src="@/assets/images/slide3.png">
|
||||||
|
</swiper-slide>
|
||||||
|
</swiper>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
||||||
|
// import "swiper/css";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
|
components: { swiper, swiperSlide },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
swiperOption: {
|
||||||
|
loop: true,
|
||||||
|
autoplay: {
|
||||||
|
delay: 3000,
|
||||||
|
disableOnInteraction: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(['name'])
|
||||||
'name'
|
},
|
||||||
])
|
mounted() {
|
||||||
|
const imgs = document.getElementsByClassName('slide-img')
|
||||||
|
imgs.forEach(item => {
|
||||||
|
console.log('style', item.style)
|
||||||
|
item.style.height = (window.innerHeight - 115) + 'px'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
// @import "swiper/css/swiper.css";
|
||||||
.dashboard {
|
.dashboard {
|
||||||
&-container {
|
&-container {
|
||||||
margin: 30px;
|
margin: 30px;
|
||||||
|
@ -33,4 +65,11 @@ export default {
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.swiper-slide-active{
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -239,12 +239,14 @@ export default {
|
||||||
edit({ id, name, minValue, maxValue, unit }) {
|
edit({ id, name, minValue, maxValue, unit }) {
|
||||||
this.title = '编辑终端参数'
|
this.title = '编辑终端参数'
|
||||||
this.type = 1
|
this.type = 1
|
||||||
this.operateForm.id = id
|
|
||||||
this.operateForm.name = name
|
|
||||||
this.operateForm.minValue = minValue
|
|
||||||
this.operateForm.maxValue = maxValue
|
|
||||||
this.operateForm.unit = unit
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.operateForm.id = id
|
||||||
|
this.operateForm.name = name
|
||||||
|
this.operateForm.minValue = minValue
|
||||||
|
this.operateForm.maxValue = maxValue
|
||||||
|
this.operateForm.unit = unit
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.operateForm.validate((valid) => {
|
this.$refs.operateForm.validate((valid) => {
|
||||||
|
|
|
@ -279,9 +279,11 @@ export default {
|
||||||
edit(name, id) {
|
edit(name, id) {
|
||||||
this.title = '编辑终端类型'
|
this.title = '编辑终端类型'
|
||||||
this.type = 1
|
this.type = 1
|
||||||
this.operateForm.id = id
|
|
||||||
this.operateForm.name = name
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.operateForm.id = id
|
||||||
|
this.operateForm.name = name
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.operateForm.validate(valid => {
|
this.$refs.operateForm.validate(valid => {
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作">
|
<el-table-column align="center" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="edit()">编辑</el-button>
|
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row v-if="type === 0">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="密码:" prop="loginPwd">
|
<el-form-item label="密码:" prop="loginPwd">
|
||||||
<el-input v-model="operateForm.loginPwd" show-password />
|
<el-input v-model="operateForm.loginPwd" show-password />
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="medium" @click="closeDialog">取 消</el-button>
|
<el-button size="medium" @click="visible=false">取 消</el-button>
|
||||||
<el-button size="medium" type="primary" @click="submit">提 交</el-button>
|
<el-button size="medium" type="primary" @click="submit">提 交</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -237,10 +237,17 @@ export default {
|
||||||
this.type = 0
|
this.type = 0
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
edit() {
|
edit({ realName, loginName, mobile, gender, locked }) {
|
||||||
this.title = '编辑用户'
|
this.title = '编辑用户'
|
||||||
this.type = 1
|
this.type = 1
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.operateForm.realName = realName
|
||||||
|
this.operateForm.loginName = loginName
|
||||||
|
this.operateForm.mobile = mobile
|
||||||
|
this.operateForm.gender = gender
|
||||||
|
this.operateForm.locked = locked
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.operateForm.validate(valid => {
|
this.$refs.operateForm.validate(valid => {
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const defaultSettings = require('./src/settings.js')
|
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = defaultSettings.title || 'vue Admin Template' // page title
|
|
||||||
|
|
||||||
// If your port is set to 80,
|
// If your port is set to 80,
|
||||||
// use administrator privileges to execute the command line.
|
// use administrator privileges to execute the command line.
|
||||||
// For example, Mac: sudo npm run
|
// For example, Mac: sudo npm run
|
||||||
|
@ -50,15 +47,7 @@ module.exports = {
|
||||||
before: require('./mock/mock-server.js')
|
before: require('./mock/mock-server.js')
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
// provide the app's title in webpack's name field, so that
|
devtool: 'source-map'
|
||||||
// it can be accessed in index.html to inject the correct title.
|
|
||||||
name: name,
|
|
||||||
devtool: 'source-map',
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': resolve('src')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
// it can improve the speed of the first screen, it is recommended to turn on preload
|
// it can improve the speed of the first screen, it is recommended to turn on preload
|
||||||
|
|
Loading…
Reference in New Issue