fix: 优化PID生成规则

This commit is contained in:
Hamm 2021-08-17 23:40:28 +08:00
parent 6975665853
commit 683c726cfa
2 changed files with 4 additions and 13 deletions

View File

@ -2,7 +2,7 @@
* @FilePath: /mac-ui/src/components/DeskTop.vue
* @Author: admin@hamm.cn
* @Date: 2021-08-02 21:45:20
* @LastEditTime: 2021-08-17 23:25:38
* @LastEditTime: 2021-08-17 23:39:41
* @LastEditors: admin@hamm.cn
* Written by https://hamm.cn
* @Description:
@ -245,7 +245,7 @@
this.openAppList[i].isTop = false
}
app.isTop = true
app.pid = this.openAppList.length + 1
app.pid = new Date().valueOf() + "." + parseInt(Math.random() * 99999999)
this.openAppList.push(Object.assign({}, app))
} else {
let isExist = false
@ -259,7 +259,7 @@
}
if (!isExist) {
app.isTop = true
app.pid = this.openAppList.length + 1
app.pid = new Date().valueOf() + "." + parseInt(Math.random() * 99999999)
this.openAppList.push(Object.assign({}, app))
}
}

View File

@ -2,7 +2,7 @@
* @FilePath: /mac-ui/src/view/system/task.vue
* @Author: admin@hamm.cn
* @Date: 2021-08-02 21:56:04
* @LastEditTime: 2021-08-17 23:27:57
* @LastEditTime: 2021-08-17 23:40:03
* @LastEditors: admin@hamm.cn
* Written by https://hamm.cn
* @Description: Index
@ -15,7 +15,6 @@
<i class="iconfont" :class="item.icon"
:style="{backgroundColor:item.iconBgColor,color:item.iconColor}"></i>
<span class="task-name">{{item.title}}</span>
<span class="task-pid">PID: {{item.pid}}</span>
</div>
</template>
</div>
@ -69,10 +68,6 @@
color: white;
}
.active .task-pid {
color: white;
}
.task {
margin: 10px 20px;
}
@ -84,10 +79,6 @@
overflow: hidden;
}
.task-item .task-pid {
font-size: 12px;
}
.task-item .iconfont {
background: red;
color: white;