From fb594300393794b93ec92deb5d6303342fa86ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sat, 26 Jan 2019 21:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dstore=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=A4=B1=E8=B4=A5=E7=9A=84bug;=E7=A7=BB?= =?UTF-8?q?=E9=99=A4layer=E7=9A=841=E7=A7=8D=E5=8A=A0=E8=BD=BD=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/layer-normal.scss | 19 +++++-------------- src/layer/index.js | 13 ++++--------- src/store/index.js | 5 ++--- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/css/layer-normal.scss b/src/css/layer-normal.scss index 884e660..2969658 100644 --- a/src/css/layer-normal.scss +++ b/src/css/layer-normal.scss @@ -119,7 +119,7 @@ .dot-box {position:absolute;display:block;} /* 常规的转动 */ - &.style-1,&.style-2 { + &.style-1 { .dot-box {width:70%;height:70%;margin:15%;line-height:70px;font-size:70px;text-align:center; @@ -130,12 +130,10 @@ &.style-1 { .dot-box {animation: circle .8s infinite linear;} } - &.style-2 { - .dot-box {animation: round .6s infinite linear;} - } + /* 频谱波动 */ - &.style-3 {height:50px; + &.style-2 {height:50px; .dot-box{width:100%;height:100%; @@ -150,7 +148,7 @@ } /* 缓动圆圈 */ - &.style-4 { + &.style-3 { .dot-box{width:60%;height:60%;margin:20%; @@ -167,7 +165,7 @@ } /* 矩阵 */ - &.style-5 { + &.style-4 { .dot-box{width:90%;height:90%;margin:5%; @@ -222,13 +220,6 @@ 70%,to {transform: rotate(405deg);} } -@keyframes round { - from,24.99%, to {transform:rotate(0deg)} - 25%,49.99% {transform:rotate(90deg)} - 50%,74.99% {transform:rotate(180deg)} - 75%,99.99% {transform:rotate(270deg)} -} - @keyframes bounce { 25% {transform: scaleY(1.3);} diff --git a/src/layer/index.js b/src/layer/index.js index b7f929b..68c7ca2 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -125,10 +125,9 @@ class __layer__ { //loading的子元素数量 return { 1: 1, - 2: 1, + 2: 5, 3: 5, - 4: 5, - 5: 9 + 4: 9 } } @@ -334,11 +333,7 @@ class __layer__ {
${repeat( - style === 1 - ? '' - : style === 2 - ? '' - : '', + style === 1 ? '' : '', this.dot[style] )} @@ -626,7 +621,7 @@ const _layer = { }, load(style, container, cb) { style = style >>> 0 - style = style < 1 ? 1 : style > 5 ? 5 : style + style = style < 1 ? 1 : style > 4 ? 4 : style if (typeof container === 'function') { cb = container diff --git a/src/store/index.js b/src/store/index.js index 491c508..c6220d8 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -256,9 +256,8 @@ class AnotStore { let tmp = collectionDict[_id] let idx = collection.indexOf(tmp) - Object.assign(tmp, data) - collection.splice(idx, 1, tmp) - collectionDict[_id] = tmp + collection.splice(idx, 1, data) + collectionDict[_id] = data } // 删除集合中单条数据