@titaui/pc 1.9.74 → 1.9.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -69,8 +69,9 @@
|
|
|
69
69
|
|
|
70
70
|
.danamic-like-ranking__content-table-items {
|
|
71
71
|
display: grid;
|
|
72
|
-
grid-template-columns: auto
|
|
72
|
+
grid-template-columns: auto 28px auto auto;
|
|
73
73
|
grid-row-gap: 16px;
|
|
74
|
+
margin-left: -8px;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.danamic-like-ranking__item:last-of-type {
|
|
@@ -92,10 +93,6 @@
|
|
|
92
93
|
font-size: 14px;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
.danamic-like-ranking__item-avatar {
|
|
96
|
-
margin-left: 9px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
96
|
.danamic-like-ranking__item-avatar .titaui-pc-avator-container {
|
|
100
97
|
display: inline-flex !important;
|
|
101
98
|
}
|
|
@@ -185,9 +185,14 @@ var Dynamic = function Dynamic() {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
188
|
-
|
|
188
|
+
var newDatas = dynamicData.filter(function (item) {
|
|
189
189
|
return item.feedId !== feedId;
|
|
190
|
-
})
|
|
190
|
+
});
|
|
191
|
+
setDynamicData([]); // 动画效果如果直接设置新的数据,diff时间会比较长,所以直接清空再赋值,这样不会出现删除时等待长时间空白
|
|
192
|
+
|
|
193
|
+
setTimeout(function () {
|
|
194
|
+
setDynamicData(_toConsumableArray(newDatas));
|
|
195
|
+
}, 0);
|
|
191
196
|
};
|
|
192
197
|
|
|
193
198
|
var getDynamicData = function getDynamicData(needResetValue) {
|
package/package.json
CHANGED
|
@@ -66,8 +66,9 @@
|
|
|
66
66
|
}
|
|
67
67
|
&-items {
|
|
68
68
|
display: grid;
|
|
69
|
-
grid-template-columns: auto
|
|
69
|
+
grid-template-columns: auto 28px auto auto;
|
|
70
70
|
grid-row-gap: 16px;
|
|
71
|
+
margin-left: -8px;
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -93,8 +94,6 @@
|
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
&-avatar {
|
|
96
|
-
margin-left: 9px;
|
|
97
|
-
|
|
98
97
|
.titaui-pc-avator-container {
|
|
99
98
|
display: inline-flex !important;
|
|
100
99
|
}
|
|
@@ -80,9 +80,14 @@ const Dynamic: FC = () => {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
const handleDeleteFeed = (feedId) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
const newDatas = dynamicData.filter((item: any) => item.feedId !== feedId);
|
|
84
|
+
setDynamicData([]);
|
|
85
|
+
// 动画效果如果直接设置新的数据,diff时间会比较长,所以直接清空再赋值,这样不会出现删除时等待长时间空白
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
setDynamicData([
|
|
88
|
+
...newDatas,
|
|
89
|
+
]);
|
|
90
|
+
}, 0);
|
|
86
91
|
};
|
|
87
92
|
|
|
88
93
|
const getDynamicData = (needResetValue) => {
|