Skip to content

Commit 2f99709

Browse files
committed
update:还原search-bar
1 parent 2a8c17d commit 2f99709

File tree

3 files changed

+265
-317
lines changed

3 files changed

+265
-317
lines changed

components/uni-fab/uni-fab.vue

Lines changed: 62 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
bottom: vertical === 'bottom' && direction === 'vertical',
1313
right: horizontal === 'right' && direction === 'horizontal'
1414
}" :style="{ 'background-color': styles.buttonColor }" class="fab-circle" @click="_onClick">
15-
<uni-icons :class="{ active: isShow }" class="uni-icon uni-icon-plusempty" />
15+
<view class="fab-circle-box" :class="{ active: isShow }">
16+
<view class="fab-circle-v"></view>
17+
<view class="fab-circle-h"></view>
18+
</view>
1619
</view>
1720
<view :class="{
1821
left: horizontal === 'left',
@@ -179,12 +182,6 @@
179182
</script>
180183

181184
<style scoped>
182-
@font-face {
183-
font-family: uniicons;
184-
font-weight: normal;
185-
font-style: normal;
186-
src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
187-
}
188185
189186
.uni-icon {
190187
font-family: uniicons;
@@ -210,13 +207,13 @@
210207
}
211208
212209
.fab-box.top {
213-
width: 60upx;
214-
height: 60upx;
215-
right: 30upx;
216-
bottom: 60upx;
210+
width: 60rpx;
211+
height: 60rpx;
212+
right: 30rpx;
213+
bottom: 60rpx;
217214
border: 1px #5989b9 solid;
218215
background: #6699cc;
219-
border-radius: 10upx;
216+
border-radius: 10rpx;
220217
color: #fff;
221218
transition: all 0.3;
222219
opacity: 0;
@@ -231,28 +228,28 @@
231228
}
232229
233230
.fab-box.fab.leftBottom {
234-
left: 30upx;
235-
bottom: 60upx;
231+
left: 30rpx;
232+
bottom: 60rpx;
236233
}
237234
238235
.fab-box.fab.leftTop {
239-
left: 30upx;
240-
top: 80upx;
236+
left: 30rpx;
237+
top: 80rpx;
241238
/* #ifdef H5 */
242-
top: calc(80upx + var(--window-top));
239+
top: calc(80rpx + var(--window-top));
243240
/* #endif */
244241
}
245242
246243
.fab-box.fab.rightBottom {
247-
right: 30upx;
248-
bottom: 60upx;
244+
right: 30rpx;
245+
bottom: 60rpx;
249246
}
250247
251248
.fab-box.fab.rightTop {
252-
right: 30upx;
253-
top: 80upx;
249+
right: 30rpx;
250+
top: 80rpx;
254251
/* #ifdef H5 */
255-
top: calc(80upx + var(--window-top));
252+
top: calc(80rpx + var(--window-top));
256253
/* #endif */
257254
}
258255
@@ -261,15 +258,44 @@
261258
justify-content: center;
262259
align-items: center;
263260
position: absolute;
264-
width: 110upx;
265-
height: 110upx;
261+
width: 110rpx;
262+
height: 110rpx;
266263
background: #3c3e49;
267264
/* background: #5989b9; */
268265
border-radius: 50%;
269266
box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.2);
270267
z-index: 11;
271268
}
272269
270+
.fab-circle-box {
271+
position: absolute;
272+
left: 0;
273+
top: 0;
274+
right: 0;
275+
bottom: 0;
276+
transition: all 0.3s;
277+
}
278+
279+
.fab-circle-v {
280+
position: absolute;
281+
width: 8rpx;
282+
height: 60rpx;
283+
left: 50%;
284+
top: 50%;
285+
margin: -30rpx 0 0 -4rpx;
286+
background-color: white;
287+
}
288+
289+
.fab-circle-h {
290+
position: absolute;
291+
width: 60rpx;
292+
height: 8rpx;
293+
left: 50%;
294+
top: 50%;
295+
margin: -4rpx 0 0 -30rpx;
296+
background-color: white;
297+
}
298+
273299
.fab-circle.left {
274300
left: 0;
275301
}
@@ -288,25 +314,25 @@
288314
289315
.fab-circle .uni-icon-plusempty {
290316
color: #ffffff;
291-
font-size: 80upx;
317+
font-size: 80rpx;
292318
transition: all 0.3s;
293319
font-weight: bold;
294320
}
295321
296-
.fab-circle .uni-icon-plusempty.active {
322+
.fab-circle-box.active {
297323
transform: rotate(135deg);
298-
font-size: 80upx;
324+
font-size: 80rpx;
299325
}
300326
301327
.fab-content {
302328
background: #6699cc;
303329
box-sizing: border-box;
304330
display: flex;
305-
border-radius: 100upx;
331+
border-radius: 100rpx;
306332
overflow: hidden;
307333
box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1);
308334
transition: all 0.2s;
309-
width: 110upx;
335+
width: 110rpx;
310336
}
311337
312338
.fab-content.left {
@@ -337,9 +363,9 @@
337363
flex-direction: column;
338364
justify-content: center;
339365
align-items: center;
340-
width: 110upx;
341-
height: 110upx;
342-
font-size: 24upx;
366+
width: 110rpx;
367+
height: 110rpx;
368+
font-size: 24rpx;
343369
color: #fff;
344370
opacity: 0;
345371
transition: opacity 0.2s;
@@ -350,12 +376,12 @@
350376
}
351377
352378
.fab-content .fab-item .content-image {
353-
width: 50upx;
354-
height: 50upx;
355-
margin-bottom: 5upx;
379+
width: 50rpx;
380+
height: 50rpx;
381+
margin-bottom: 5rpx;
356382
}
357383
358384
.fab-content .fab-item.first {
359-
width: 110upx;
385+
width: 110rpx;
360386
}
361387
</style>

0 commit comments

Comments
 (0)