refactor: 主题名称修改优化

This commit is contained in:
wangjiahao 2021-10-12 18:38:33 +08:00
parent f4e07fc869
commit b23dd3d8f0
3 changed files with 4 additions and 3 deletions

View File

@ -296,7 +296,7 @@ function fillPositionBox(maxY) {
function removeItemFromPositionBox(item) { function removeItemFromPositionBox(item) {
const pb = positionBox const pb = positionBox
// console.log('removeItem=>x:' + item.x + ';y:' + item.y + ';sizex:' + item.sizex + ';sizey:' + item.sizey) // console.log('removeItem=>x:' + item.x + ';y:' + item.y + ';sizex:' + item.sizex + ';sizey:' + item.sizey)
if (item.x <= 0 || item.y <= 0) return if (!item || item.x <= 0 || item.y <= 0) return
for (let i = item.x - 1; i < item.x - 1 + item.sizex; i++) { for (let i = item.x - 1; i < item.x - 1 + item.sizex; i++) {
for (let j = item.y - 1; j < item.y - 1 + item.sizey; j++) { for (let j = item.y - 1; j < item.y - 1 + item.sizey; j++) {
if (pb[j][i]) { if (pb[j][i]) {

View File

@ -55,7 +55,7 @@ export default {
created() { created() {
this.restore() this.restore()
// //
listenGlobalKeyDown() // listenGlobalKeyDown()
}, },
methods: { methods: {
restore() { restore() {

View File

@ -12,7 +12,7 @@
<el-col :span="20"> <el-col :span="20">
<el-row id="slider"> <el-row id="slider">
<div class="window"> <div class="window">
<ul class="container" :style="containerStyle"> <ul v-if="!slidersLoading" class="container" :style="containerStyle">
<li> <li>
<div style="width:240px; height: 208px;overflow: hidden"> <div style="width:240px; height: 208px;overflow: hidden">
<subject-template-item <subject-template-item
@ -156,6 +156,7 @@ export default {
querySubjectWithGroup() { querySubjectWithGroup() {
this.slidersLoading = true this.slidersLoading = true
querySubjectWithGroup({}).then(response => { querySubjectWithGroup({}).then(response => {
this.sliders = []
this.sliders = response.data this.sliders = response.data
this.slidersLoading = false this.slidersLoading = false
}).catch(() => { }).catch(() => {