From 006d65361cfc92342f2268d4c5b87666b7bfa73b Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期一, 03 八月 2020 16:11:24 +0800
Subject: [PATCH] app: desktop, 整理images
---
public/images/desktop/header-icon/notice.png | 0
public/images/desktop/header-icon/search.png | 0
public/images/desktop/header-icon/user.png | 0
public/images/desktop/header-icon/system.png | 0
public/images/desktop/message.png | 0
public/images/desktop/resize.png | 0
public/images/desktop/header-icon/help.png | 0
src/pages/desktop/index/components/NotificationCenter.vue | 7
src/pages/desktop/index/components/ToolsEntry.vue | 122 ++++++++-----------
public/images/desktop/safari.png | 0
src/pages/desktop/index/components/DFrame.vue | 71 ++++++-----
src/pages/desktop/index/App.vue | 38 -----
src/pages/desktop/index/components/WeatherNotice.vue | 2
/dev/null | 64 ----------
src/pages/desktop/index/store/modules/desktop.js | 2
src/pages/desktop/index/components/Tools.vue | 23 +--
public/images/desktop/background.png | 0
public/images/desktop/header-icon/SmartAI.png | 0
public/images/desktop/weather.png | 0
19 files changed, 111 insertions(+), 218 deletions(-)
diff --git a/public/images/apple.png b/public/images/apple.png
deleted file mode 100644
index cda6e36..0000000
--- a/public/images/apple.png
+++ /dev/null
Binary files differ
diff --git a/public/images/appstore.png b/public/images/appstore.png
deleted file mode 100644
index 840eda7..0000000
--- a/public/images/appstore.png
+++ /dev/null
Binary files differ
diff --git a/public/images/beian.png b/public/images/beian.png
deleted file mode 100644
index 9f76394..0000000
--- a/public/images/beian.png
+++ /dev/null
Binary files differ
diff --git a/public/images/blog.png b/public/images/blog.png
deleted file mode 100644
index ef363a0..0000000
--- a/public/images/blog.png
+++ /dev/null
Binary files differ
diff --git a/public/images/circle.png b/public/images/circle.png
deleted file mode 100644
index e2eedce..0000000
--- a/public/images/circle.png
+++ /dev/null
Binary files differ
diff --git a/src/pages/desktop/img/desktop.png b/public/images/desktop/background.png
similarity index 100%
rename from src/pages/desktop/img/desktop.png
rename to public/images/desktop/background.png
Binary files differ
diff --git a/public/images/header-icon/SmartAI.png b/public/images/desktop/header-icon/SmartAI.png
similarity index 100%
rename from public/images/header-icon/SmartAI.png
rename to public/images/desktop/header-icon/SmartAI.png
Binary files differ
diff --git a/public/images/header-icon/help.png b/public/images/desktop/header-icon/help.png
similarity index 100%
rename from public/images/header-icon/help.png
rename to public/images/desktop/header-icon/help.png
Binary files differ
diff --git a/public/images/header-icon/notice.png b/public/images/desktop/header-icon/notice.png
similarity index 100%
rename from public/images/header-icon/notice.png
rename to public/images/desktop/header-icon/notice.png
Binary files differ
diff --git a/public/images/header-icon/search.png b/public/images/desktop/header-icon/search.png
similarity index 100%
rename from public/images/header-icon/search.png
rename to public/images/desktop/header-icon/search.png
Binary files differ
diff --git a/public/images/header-icon/system.png b/public/images/desktop/header-icon/system.png
similarity index 100%
rename from public/images/header-icon/system.png
rename to public/images/desktop/header-icon/system.png
Binary files differ
diff --git a/public/images/header-icon/user.png b/public/images/desktop/header-icon/user.png
similarity index 100%
rename from public/images/header-icon/user.png
rename to public/images/desktop/header-icon/user.png
Binary files differ
diff --git a/public/images/message.png b/public/images/desktop/message.png
similarity index 100%
rename from public/images/message.png
rename to public/images/desktop/message.png
Binary files differ
diff --git a/public/images/resize.png b/public/images/desktop/resize.png
similarity index 100%
rename from public/images/resize.png
rename to public/images/desktop/resize.png
Binary files differ
diff --git a/public/images/safari.png b/public/images/desktop/safari.png
similarity index 100%
rename from public/images/safari.png
rename to public/images/desktop/safari.png
Binary files differ
diff --git a/public/images/weather.png b/public/images/desktop/weather.png
similarity index 100%
rename from public/images/weather.png
rename to public/images/desktop/weather.png
Binary files differ
diff --git a/public/images/doc.png b/public/images/doc.png
deleted file mode 100644
index 2c52dbe..0000000
--- a/public/images/doc.png
+++ /dev/null
Binary files differ
diff --git a/public/images/email.png b/public/images/email.png
deleted file mode 100644
index 2983252..0000000
--- a/public/images/email.png
+++ /dev/null
Binary files differ
diff --git a/public/images/finder.png b/public/images/finder.png
deleted file mode 100644
index 948134f..0000000
--- a/public/images/finder.png
+++ /dev/null
Binary files differ
diff --git a/public/images/frost.png b/public/images/frost.png
deleted file mode 100644
index 8dc7adc..0000000
--- a/public/images/frost.png
+++ /dev/null
Binary files differ
diff --git a/public/images/gitee.png b/public/images/gitee.png
deleted file mode 100644
index 51fd30b..0000000
--- a/public/images/gitee.png
+++ /dev/null
Binary files differ
diff --git a/public/images/github.png b/public/images/github.png
deleted file mode 100644
index 450473a..0000000
--- a/public/images/github.png
+++ /dev/null
Binary files differ
diff --git a/public/images/iBooks.png b/public/images/iBooks.png
deleted file mode 100644
index 0951df7..0000000
--- a/public/images/iBooks.png
+++ /dev/null
Binary files differ
diff --git a/public/images/launchpad.png b/public/images/launchpad.png
deleted file mode 100644
index ab92c0b..0000000
--- a/public/images/launchpad.png
+++ /dev/null
Binary files differ
diff --git a/public/images/logo.png b/public/images/logo.png
deleted file mode 100644
index dabfdaa..0000000
--- a/public/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/public/images/main.jpg b/public/images/main.jpg
deleted file mode 100644
index 400f79a..0000000
--- a/public/images/main.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/maps.png b/public/images/maps.png
deleted file mode 100644
index 04a9485..0000000
--- a/public/images/maps.png
+++ /dev/null
Binary files differ
diff --git a/public/images/preview.png b/public/images/preview.png
deleted file mode 100644
index 5ecf8cf..0000000
--- a/public/images/preview.png
+++ /dev/null
Binary files differ
diff --git a/public/images/sp1.jpg b/public/images/sp1.jpg
deleted file mode 100644
index f85e570..0000000
--- a/public/images/sp1.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/sp2.jpg b/public/images/sp2.jpg
deleted file mode 100644
index a86d3c2..0000000
--- a/public/images/sp2.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/sp3.jpg b/public/images/sp3.jpg
deleted file mode 100644
index 0bce638..0000000
--- a/public/images/sp3.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/sp4.jpg b/public/images/sp4.jpg
deleted file mode 100644
index 45219ea..0000000
--- a/public/images/sp4.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/sp5.jpg b/public/images/sp5.jpg
deleted file mode 100644
index b040ea5..0000000
--- a/public/images/sp5.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/sp6.jpg b/public/images/sp6.jpg
deleted file mode 100644
index bf9ebbd..0000000
--- a/public/images/sp6.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/split.jpg b/public/images/split.jpg
deleted file mode 100644
index 508ae83..0000000
--- a/public/images/split.jpg
+++ /dev/null
Binary files differ
diff --git a/public/images/test/video.png b/public/images/test/video.png
deleted file mode 100644
index f66c295..0000000
--- a/public/images/test/video.png
+++ /dev/null
Binary files differ
diff --git a/public/images/trash.png b/public/images/trash.png
deleted file mode 100644
index c1d758c..0000000
--- a/public/images/trash.png
+++ /dev/null
Binary files differ
diff --git a/src/pages/desktop/img/circle.png b/src/pages/desktop/img/circle.png
deleted file mode 100644
index e2eedce..0000000
--- a/src/pages/desktop/img/circle.png
+++ /dev/null
Binary files differ
diff --git a/src/pages/desktop/img/main.jpg b/src/pages/desktop/img/main.jpg
deleted file mode 100644
index 400f79a..0000000
--- a/src/pages/desktop/img/main.jpg
+++ /dev/null
Binary files differ
diff --git a/src/pages/desktop/img/trash.png b/src/pages/desktop/img/trash.png
deleted file mode 100644
index c1d758c..0000000
--- a/src/pages/desktop/img/trash.png
+++ /dev/null
Binary files differ
diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue
index 38d0b0e..9917b26 100644
--- a/src/pages/desktop/index/App.vue
+++ b/src/pages/desktop/index/App.vue
@@ -3,7 +3,6 @@
<tools></tools>
<desktop></desktop>
<tools-entry ref="dock_model"></tools-entry>
- <!-- <dock ref="dock_model"></dock> -->
<notice-tip ref="notice_tip_model"></notice-tip>
<notification-center></notification-center>
</div>
@@ -32,54 +31,27 @@
});
}
- // setTimeout(function () {
- // _that.$refs.dock_model.initDockItem();
- // }, 100);
- // axios.get(process.env.VUE_APP_USER_DATA_URL).then(function (res) {
-
- // });
-
let msgResp = require("./mock/messages.json")
if (msgResp.success) {
msgResp.data.forEach(function (item) {
_that.addMessage(item);
})
}
- // axios.get(process.env.VUE_APP_MESSAGE_URL).then(function (res) {
-
- // });
let weather = require("./mock/weather.json")
if (weather.success) {
_that.addWeather(weather.data.data);
}
- // axios.get(process.env.VUE_APP_WEATHER_URL).then(function (res) {
-
- // });
-
- setTimeout(function () {
- _that.addMessage({
- id: 'N1',
- icon: 'images/frost.png',
- tip: '鍒嗗竷寮忎换鍔¤皟搴�',
- title: '榛樿璐﹀彿',
- body: '璐﹀彿锛歠rost 瀵嗙爜锛歠rost',
- time: new Date()
- }, true);
- }, 3000);
-
setTimeout(function () {
_that.addMessage({
id: 'N2',
- icon: 'images/message.png',
+ icon: '/images/desktop/message.png',
tip: '娑堟伅',
- title: '瀹樻柟QQ',
- body: '1106088328',
+ title: 'SmartAi',
+ body: 'v1.0.0',
time: new Date()
}, true);
- }, 6000);
-
- console.log(this.$store.state.desktop)
+ }, 1000);
},
methods: {
addMessage: function (message, ding) {
@@ -112,7 +84,7 @@
width: 100%;
height: 100%;
background-size: 100% 100%;
- background-image: url("../../../assets/img/desktop/desktop.png");
+ background-image: url("/images/desktop/background.png");
background-attachment: fixed;
}
diff --git a/src/pages/desktop/index/components/Copyright.vue b/src/pages/desktop/index/components/Copyright.vue
deleted file mode 100644
index 7fd4f22..0000000
--- a/src/pages/desktop/index/components/Copyright.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-<template>
- <div class="copyright">
- <a
- target="_blank"
- href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44010302000485"
- >
- <img src="images/beian.png" />
- <span>绮ゅ叕缃戝畨澶� 44010302000485鍙�</span>
- </a>
- <br />
- <a href="http://www.miitbeian.gov.cn" target="blank">绮CP澶�18059277鍙�-1</a>
- </div>
-</template>
-
-<script>
-export default {
- name: "Copyright"
-}
-</script>
-
-<style scoped>
-.copyright {
- margin: 5px auto;
- text-align: center;
- font-size: 10px;
- font-weight: 100;
- bottom: 0;
- position: absolute;
- width: 100%;
-}
-
-.copyright a {
- color: #eaeaea;
- text-decoration: none;
-}
-
-.copyright img {
- width: 15px;
- height: 15px;
-}
-</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/DFrame.vue b/src/pages/desktop/index/components/DFrame.vue
index f79110a..c695a5b 100644
--- a/src/pages/desktop/index/components/DFrame.vue
+++ b/src/pages/desktop/index/components/DFrame.vue
@@ -19,11 +19,15 @@
</slot>
</div>
<div class="d-frame-content">
-
<iframe :src="data.url" v-if="data.url"></iframe>
<div v-html="data.html" v-if="data.html"></div>
<!-- <span class="d-frame-operation-resize" v-resize></span> -->
- <span class="d-frame-operation-resize" @mousedown="mousedown" @mousemove.prevent="mousemove" @mouseup="mouseup"></span>
+ <span
+ class="d-frame-operation-resize"
+ @mousedown="mousedown"
+ @mousemove.prevent="mousemove"
+ @mouseup="mouseup"
+ ></span>
</div>
</div>
</template>
@@ -42,7 +46,7 @@
width: this.data.width || 1024,
height: this.data.height || 512,
resizeObj: {
- startW : 0,
+ startW: 0,
startH: 0,
mouX: 0,
mouY: 0,
@@ -59,29 +63,29 @@
},
methods: {
//resize
- mousedown(e){
- debugger
- this.resizeObj.mouX = e.clientX;
- this.resizeObj.mouY = e.clientY;
- this.resizeObj.startW = this.width;
- this.resizeObj.startH = this.height;
- this.resizeObj.resizeLock = true;
- },
- mousemove(e){
- document.onmousemove = function(e){
- if(!this.resizeObj.resizeLock){
- return
- }
- e = e||window.event;
- e.preventDefault();
- this.width = this.resizeObj.startW + e.clientX-this.resizeObj.mouX;
- this.height = this.resizeObj.startH + e.clientY-this.resizeObj.mouY;
- }.bind(this)
- },
- mouseup(){
- this.resizeObj.resizeLock = false;
- document.onmousemove = null;
- },
+ mousedown(e) {
+ debugger
+ this.resizeObj.mouX = e.clientX;
+ this.resizeObj.mouY = e.clientY;
+ this.resizeObj.startW = this.width;
+ this.resizeObj.startH = this.height;
+ this.resizeObj.resizeLock = true;
+ },
+ mousemove(e) {
+ document.onmousemove = function (e) {
+ if (!this.resizeObj.resizeLock) {
+ return
+ }
+ e = e || window.event;
+ e.preventDefault();
+ this.width = this.resizeObj.startW + e.clientX - this.resizeObj.mouX;
+ this.height = this.resizeObj.startH + e.clientY - this.resizeObj.mouY;
+ }.bind(this)
+ },
+ mouseup() {
+ this.resizeObj.resizeLock = false;
+ document.onmousemove = null;
+ },
//resize end
closeFrame: function () {
this.$store.dispatch('desktop/closeFrame', this.data);
@@ -97,12 +101,12 @@
//鎵惧埌褰撳墠鐨刬frame
let curIframe = Array.from(document.querySelectorAll('iframe')).find(iframe => iframe.src.indexOf(data.url) >= 0);
//淇濆瓨褰撳墠搴旂敤蹇収
- html2canvas(curIframe.contentWindow.document.body,{
- dpi: window.devicePixelRatio*4,
+ html2canvas(curIframe.contentWindow.document.body, {
+ dpi: window.devicePixelRatio * 4,
logging: true, //鏌ョ湅html2canvas鍐呴儴鎵ц娴佺▼
removeContainer: true,
- imageTimeout : 0,
- useCORS : true //寮�鍚法鍩熼厤缃�
+ imageTimeout: 0,
+ useCORS: true //寮�鍚法鍩熼厤缃�
}).then(canvas => {
let shotSrc = canvas.toDataURL();
this.$store.commit('desktop/addMinDock', {
@@ -179,7 +183,8 @@
</script>
<style scoped>
-html,body{
+html,
+body {
heiht: 100%;
}
.d-frame {
@@ -210,7 +215,7 @@
.d-frame-title-operation i {
margin: 0 3px;
- font-size:18px;
+ font-size: 18px;
}
.d-frame-operation-close {
@@ -277,6 +282,6 @@
height: 15px;
z-index: 1000;
cursor: nwse-resize;
- background: url("/images/resize.png") no-repeat;
+ background: url("/images/desktop/resize.png") no-repeat;
}
</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/Dock.vue b/src/pages/desktop/index/components/Dock.vue
deleted file mode 100644
index 68e3d4a..0000000
--- a/src/pages/desktop/index/components/Dock.vue
+++ /dev/null
@@ -1,179 +0,0 @@
-<template>
- <div
- class="dock"
- v-if="this.$store.state.desktop.docks && this.$store.state.desktop.docks.length > 0"
- >
- <div class="dock-mask"></div>
- <div class="dock-container">
- <div v-for="dock in this.$store.state.desktop.docks" :key="dock.id" class="dock-item-wrap">
- <a @click="dockClick(dock)">
- <span>{{dock.alt}}</span>
- <img class="dock-item" :src="dock.src" :alt="dock.alt" />
- </a>
- <img v-show="dock.isOpen" class="dock-item-dot" :src="`${publicPath}images/circle.png`" />
- </div>
- <a class="dock-item-split">
- <img :src="`${publicPath}images/split.jpg`" alt="split" />
- </a>
- <div v-for="dock in this.$store.state.desktop.minDocks" :key="dock.id" class="dock-item-wrap">
- <a @click="dockClick(dock)">
- <span>{{dock.alt}}</span>
- <img class="dock-item" :src="dock.src" :alt="dock.alt" />
- </a>
- </div>
- <div class="dock-item-wrap">
- <a>
- <span>trash</span>
- <img class="dock-item" :src="`${publicPath}images/trash.png`" alt="trash" />
- </a>
- </div>
- </div>
- </div>
-</template>
-
-<script>
-
-export default {
- name: "Dock",
- data(){
- return {
- publicPath: process.env.BASE_URL
- }
- },
- mounted(){
- console.log(this.publicPath)
- },
- methods: {
- getOffsetTop: function (el) {
- if (el.offsetParent == null) {
- return el.offsetTop;
- }
- return el.offsetTop + this.getOffsetTop(el.offsetParent);
- },
- initDockItem: function () {
- const dockWrap = document.getElementsByClassName('dock-container')[0];
- this.resetDockItem();
- dockWrap.addEventListener('mousemove', e => this.mouseOnDockItem(e, dockWrap));
- dockWrap.addEventListener('mouseleave', () => this.resetDockItem());
- },
- resetDockItem: function () {
- const dockItems = document.getElementsByClassName('dock-item');
- const dockMask = document.getElementsByClassName('dock-mask')[0];
- for (let i = 0; i < dockItems.length; i++) {
- dockItems[i].width = 60;
- if (dockItems[i].parentNode.nextElementSibling) {
- dockItems[i].parentNode.nextElementSibling.style.marginLeft = "-35px";
- }
- }
- dockMask.style.width = dockItems.length * 60 + 40 + 'px';
- },
- mouseOnDockItem: function (e, dockWrap) {
- const dockItems = document.getElementsByClassName('dock-item');
- const dockMask = document.getElementsByClassName('dock-mask')[0];
- e = e || window.event;
- let originalMaskWidth = 0;
- for (let i = 0; i < dockItems.length; i++) {
- let x = e.clientX - (dockItems[i].offsetLeft + dockItems[i].offsetWidth / 2);
- let y = dockItems[i].offsetTop + this.getOffsetTop(dockWrap) + dockItems[i].offsetHeight
- / 2 - e.clientY;
- let imgScale = 1 - Math.sqrt(x * x + y * y) / 300;
- if (imgScale < 0.5) {
- imgScale = 0.5;
- }
- dockItems[i].width = 120 * imgScale;
- if (dockItems[i].parentNode.nextElementSibling) {
- dockItems[i].parentNode.nextElementSibling.style.marginLeft = (-5 - dockItems[i].width
- / 2) + "px";
- }
- originalMaskWidth += dockItems[i].width;
- }
- dockMask.style.width = originalMaskWidth + 40 + 'px';
- },
- dockClick: function (dock) {
- if (dock.type === '1') {
- window.open(dock.url);
- } else if (dock.type === '2') {
- this.$store.dispatch('desktop/addFrame', {
- id: dock.id,
- icon: dock.src,
- title: dock.alt,
- url: dock.url
- });
- } else if (dock.type === '3') {
- this.$store.commit('desktop/resetMinFrame', dock.id);
- this.resetDockItem();
- }
- }
- }
-}
-</script>
-
-<style scoped>
-.dock {
- width: 100%;
- height: 75px;
- z-index: 120;
- position: absolute;
- bottom: 0;
-}
-
-.dock .dock-mask {
- background-color: rgba(15, 15, 0, 0.45);
- width: 520px;
- height: 75px;
- border-radius: 5px;
- margin: 0 auto;
-}
-
-.dock .dock-container {
- position: absolute;
- bottom: 5px;
- text-align: center;
- width: 100%;
- z-index: 120;
-}
-
-.dock .dock-container .dock-item-wrap {
- display: inline-block;
-}
-
-.dock .dock-container .dock-item-wrap span {
- display: none;
- padding: 2px 0;
- border-radius: 5px;
- background-color: rgba(0, 0, 0, 0.45);
- position: absolute;
- top: -25px;
- width: 105px;
- color: #fff;
-}
-
-.dock .dock-container .dock-item-dot {
- position: absolute;
- bottom: -5px;
- color: #b9b9b9;
- width: 10px;
- height: 10px;
-}
-
-.dock .dock-container .dock-item-split {
- margin: 0 5px;
-}
-
-.dock .dock-container .dock-item-split img {
- width: 1px;
- height: 60px;
-}
-
-.dock .dock-container img {
- max-width: 130px;
-}
-
-.dock .dock-container img:hover {
- cursor: pointer;
-}
-
-.dock .dock-container a:hover span {
- display: unset;
-}
-</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/Launchpad.vue b/src/pages/desktop/index/components/Launchpad.vue
deleted file mode 100644
index 7c14203..0000000
--- a/src/pages/desktop/index/components/Launchpad.vue
+++ /dev/null
@@ -1,12 +0,0 @@
-<template>
- <div>launchpad</div>
-</template>
-
-<script>
-export default {
- name: "Launchpad"
-}
-</script>
-
-<style scoped>
-</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/NotificationCenter.vue b/src/pages/desktop/index/components/NotificationCenter.vue
index 32e2fdb..961d156 100644
--- a/src/pages/desktop/index/components/NotificationCenter.vue
+++ b/src/pages/desktop/index/components/NotificationCenter.vue
@@ -18,8 +18,6 @@
</div>
<weather-notice></weather-notice>
-
- <copyright></copyright>
</div>
<div class="notification-center-body" v-if="notificationCenterType === 1">
<message-notice
@@ -42,12 +40,11 @@
import Calender from './Calendar';
import WeatherNotice from './WeatherNotice';
import MessageNotice from './MessageNotice';
-import Copyright from './Copyright';
export default {
name: "NotificationCenter",
components: {
- WeatherNotice, MessageNotice, Copyright
+ WeatherNotice, MessageNotice
},
data() {
return {
@@ -78,7 +75,7 @@
height: calc(100% - 30px);
width: 300px;
background-color: rgba(200, 200, 200, 0.7);
- box-shadow: -1px 1px 2px rgba(0,0,0,.3);
+ box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.3);
z-index: 140;
}
diff --git a/src/pages/desktop/index/components/Preference.vue b/src/pages/desktop/index/components/Preference.vue
deleted file mode 100644
index a3cc41b..0000000
--- a/src/pages/desktop/index/components/Preference.vue
+++ /dev/null
@@ -1,64 +0,0 @@
-<template>
- <div class="preference" v-if="this.$store.state.desktop.preferenceVisiable">
- <div class="preference-item" @click="aboutUs()">鍏充簬鎴戜滑</div>
- <div class="preference-split"></div>
- <div class="preference-item" @click="exitWindow()">閫�鍑�</div>
- </div>
-</template>
-
-<script>
-export default {
- name: "Preference",
- methods: {
- aboutUs: function () {
- this.$store.dispatch('desktop/addFrame', {
- id: "SP0",
- icon: 'images/apple.png',
- title: '鍏充簬鎴戜滑',
- html: `<div style="position:absolute;top: 80px;left: 20px;">
- <div>浣滆�呴偖绠�: qq11419041@163.com</div>
- <div>浣跨敤缁勪欢锛歷ue銆乿uex銆乫ont-awesome</div>
- </div>
- <a href="https://gitee.com/justlive1/nitrogen" target="_blank" style="position:absolute;top: 30px;right:0;">
- <img height="140" src="https://gitee.com/justlive1/nitrogen/widgets/widget_1.svg" alt="Fork me on Gitee" />
- </a>`,
- width: 360,
- height: 170
- });
- },
- exitWindow: function () {
- window.close();
- }
- }
-}
-</script>
-
-<style scoped>
-.preference {
- position: absolute;
- left: 8px;
- top: 30px;
- background-color: rgba(75, 75, 75, 0.6);
- z-index: 120;
- color: #fff;
- width: 150px;
- cursor: pointer;
- padding: 5px 0;
-}
-
-.preference-item {
- padding: 2px 15px;
- font-weight: 300;
- font-size: small;
-}
-
-.preference-item:hover {
- background-color: rgba(49, 156, 241, 0.71);
-}
-
-.preference-split {
- height: 1px;
- background: #9a9a9a;
- margin: 5px 0;
-}
-</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue
index d49df91..fa642fd 100644
--- a/src/pages/desktop/index/components/Tools.vue
+++ b/src/pages/desktop/index/components/Tools.vue
@@ -5,38 +5,38 @@
:class="['tools-icon','tools-show-desktop', {clicked:this.$store.state.desktop.preferenceVisiable}]"
@click="togglePreference()"
>
- <img class="system" :src="`${publicPath}images/header-icon/system.png`" />
+ <img class="system" :src="`${publicPath}images/desktop/header-icon/system.png`" />
<!-- <span class="fa fa-apple"></span> -->
</div>
<div class="tools-icon">
<!-- <span class="fa fa-safari"></span> -->
- <img class="smart-ai" :src="`${publicPath}images/header-icon/SmartAI.png`" alt />
+ <img class="smart-ai" :src="`${publicPath}images/desktop/header-icon/SmartAI.png`" alt />
</div>
</div>
<div class="tools-middle">
<div v-for="dock in this.$store.state.desktop.minDocks" :key="dock.id" class="dock-item-wrap">
- <a @click="dockClick(dock)" >
+ <a @click="dockClick(dock)">
<img class="dock-item" :src="dock.src" :alt="dock.alt" />
- <img class="dock-shot" :src="dock.screenshot" :alt="dock.name">
+ <img class="dock-shot" :src="dock.screenshot" :alt="dock.name" />
</a>
</div>
</div>
<div class="tools-right">
<div class="tools-icon">
<!-- <span class="fa fa-battery-full"></span> -->
- <img :src="`${publicPath}images/header-icon/search.png`" alt />
+ <img :src="`${publicPath}images/desktop/header-icon/search.png`" alt />
</div>
<div class="tools-icon">
<!-- <span class="fa fa-battery-full"></span> -->
- <img :src="`${publicPath}images/header-icon/help.png`" alt />
+ <img :src="`${publicPath}images/desktop/header-icon/help.png`" alt />
</div>
<div class="tools-icon" @click="notificationCenterClick()">
<!-- <span class="fa fa-battery-full"></span> -->
- <img :src="`${publicPath}images/header-icon/notice.png`" alt />
+ <img :src="`${publicPath}images/desktop/header-icon/notice.png`" alt />
</div>
<div class="tools-icon">
<!-- <span class="fa fa-battery-full"></span> -->
- <img :src="`${publicPath}images/header-icon/user.png`" alt />
+ <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt />
</div>
<!-- <timer></timer> -->
<!-- <div class="tools-icon tools-notification-center" @click="notificationCenterClick()">
@@ -145,7 +145,6 @@
.tools .tools-middle {
float: left;
position: relative;
-
}
.tools .tools-middle::before {
width: 1px;
@@ -179,7 +178,7 @@
width: auto;
height: 70%;
}
-.dock-item-wrap .dock-shot{
+.dock-item-wrap .dock-shot {
visibility: hidden;
width: 100px;
height: 46px;
@@ -188,9 +187,9 @@
left: -50%;
}
.tools .tools-middle .dock-item-wrap:hover .dock-shot,
-.tools .tools-middle .dock-item-wrap.clicked .dock-shot{
+.tools .tools-middle .dock-item-wrap.clicked .dock-shot {
visibility: visible;
-}
+}
.tools-icon {
text-align: center;
height: 100%;
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index 55084be..cc44556 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -2,14 +2,19 @@
<div class="tools-entry">
<div class="entry-wrap">
<div class="app-list clearFix">
- <div class="app" v-for="dock in this.$store.state.desktop.docks" :key="dock.id" @click="dockClick(dock)">
- <div class="wrap">
- <div class="app-icon">
- <img :src="dock.src" :alt="dock.alt">
- </div>
- <div class="app-name">{{dock.name}}</div>
- </div>
+ <div
+ class="app"
+ v-for="dock in this.$store.state.desktop.docks"
+ :key="dock.id"
+ @click="dockClick(dock)"
+ >
+ <div class="wrap">
+ <div class="app-icon">
+ <img :src="dock.src" :alt="dock.alt" />
+ </div>
+ <div class="app-name">{{dock.name}}</div>
</div>
+ </div>
</div>
</div>
</div>
@@ -17,34 +22,14 @@
<script>
export default {
- name:'toolsEntry',
- data(){
+ name: 'toolsEntry',
+ data() {
return {
publicPath: process.env.BASE_URL,
- // applist:[
- // {src: `/images/app-mid/camera-access.png`, name:'鎽勫儚鏈烘帴鍏�'},
- // {src: `/images/app-mid/datastack-config.png`, name:'鏁版嵁鏍堥厤缃�'},
- // {src: `/images/app-mid/DVR-access.png`, name:'纭洏褰曞儚鏈烘帴鍏�'},
- // {src: `/images/app-mid/data-push.png`, name:'鏁版嵁鎺ㄩ��'},
- // {src: `/images/app-mid/GB-config.png`, name:'GB28281閰嶇疆'},
- // {src: `/images/app-mid/scene-config.png`, name:'鍦烘櫙閰嶇疆'},
- // {src: `/images/app-mid/library.png`, name:'姣斿搴撶鐞�'},
- // {src: `/images/app-mid/poll.png`, name:'杞绠$悊'},
- // {src: `/images/app-mid/algorithm-manage.png`, name:'绠楁硶绠$悊'},
- // {src: `/images/app-mid/algorithm-store.png`, name:'绠楁硶鍟嗗煄'},
- // {src: `/images/app-mid/hashrate-manage.png`, name:'绠楀姏绠$悊'},
- // {src: `/images/app-mid/monitor.png`, name:'瀹炴椂鐩戞帶-鍦ㄧ嚎鎾斁'},
- // {src: `/images/app-mid/search.png`, name:'妫�绱�-缁熻鏌ヨ'},
- // {src: `/images/app-mid/360.png`, name:'鍏ㄦ櫙瑙嗛'},
- // {src: `/images/app-mid/log-manage.png`, name:'鏃ュ織绠$悊'},
- // {src: `/images/app-mid/device.png`, name:'璁惧绠$悊'},
- // {src: `/images/app-mid/settings.png`, name:'绯荤粺璁剧疆'},
- // {src: `/images/app-mid/vindicate.png`, name:'绯荤粺缁存姢'}
- // ]
}
},
- methods:{
-
+ methods: {
+
dockClick(dock) {
if (dock.type === '1') {
window.open(dock.url);
@@ -77,49 +62,48 @@
</script>
<style lang="scss">
- .tools-entry{
- //margin-top: 130px;
- position: absolute;
- top: 142px;
- left: 50%;
- transform: translateX(-50%);
- .entry-wrap{
- width: 1180px;
- padding: 0 60px;
- margin: 0 auto;
- .app-list{
- .app{
- width: 16.6%;
- margin-bottom: 54px;
- float: left;
- .wrap{
- .app-icon{
- text-align: center;
- line-height: 110px;
- width: 110px;
- height: 110px;
- margin: auto;
- img{
- vertical-align: middle;
- margin-right: -3px;
- }
- }
- .app-name{
- padding-top: 10px;
- text-align: center;
- font: Bold 16px/16px Microsoft JhengHei;
- color: #fff;
+.tools-entry {
+ //margin-top: 130px;
+ position: absolute;
+ top: 142px;
+ left: 50%;
+ transform: translateX(-50%);
+ .entry-wrap {
+ width: 1180px;
+ padding: 0 60px;
+ margin: 0 auto;
+ .app-list {
+ .app {
+ width: 16.6%;
+ margin-bottom: 54px;
+ float: left;
+ .wrap {
+ .app-icon {
+ text-align: center;
+ line-height: 110px;
+ width: 110px;
+ height: 110px;
+ margin: auto;
+ img {
+ vertical-align: middle;
+ margin-right: -3px;
}
}
-
- &:hover{
- .app-icon{
- background: rgba(0,0,0,.4);
- }
+ .app-name {
+ padding-top: 10px;
+ text-align: center;
+ font: Bold 16px/16px Microsoft JhengHei;
+ color: #fff;
}
-
+ }
+
+ &:hover {
+ .app-icon {
+ background: rgba(0, 0, 0, 0.4);
+ }
}
}
}
}
+}
</style>
\ No newline at end of file
diff --git a/src/pages/desktop/index/components/WeatherNotice.vue b/src/pages/desktop/index/components/WeatherNotice.vue
index 404b8f3..692b277 100644
--- a/src/pages/desktop/index/components/WeatherNotice.vue
+++ b/src/pages/desktop/index/components/WeatherNotice.vue
@@ -1,7 +1,7 @@
<template>
<notice v-if="this.$store.state.desktop.weather">
<template slot="notice-header-icon">
- <img class="notice-header-icon-img" src="images/weather.png" />
+ <img class="notice-header-icon-img" src="/images/desktop/weather.png" />
</template>
<template slot="notice-header-title">澶╂皵</template>
<template slot="notice-body">
diff --git a/src/pages/desktop/index/store/modules/desktop.js b/src/pages/desktop/index/store/modules/desktop.js
index 6194ba1..1949bcb 100644
--- a/src/pages/desktop/index/store/modules/desktop.js
+++ b/src/pages/desktop/index/store/modules/desktop.js
@@ -15,7 +15,7 @@
isShow: true,
url: '',
title: 'safari',
- icon: 'images/safari.png',
+ icon: '/images/desktop/safari.png',
order: 0,
leftOffset: 8,
topOffset: 8
--
Gitblit v1.8.0