mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 07:29:48 +08:00
【调整】小程序前端移除【uni-icons】【uni-transition】组件,使用uview框架自带替换。
This commit is contained in:
@@ -8,4 +8,4 @@
|
||||
|
||||
.fy_dropdown-item_scroll{@include vue-flex(column);border-top: 1px solid #f2f2f2;}
|
||||
.fy_dropdown-item_scroll_cell{@include vue-flex(row);padding: 0 30rpx;justify-content: space-between;align-items: center;border-bottom: 1px solid #f6f6f6;background-color: #FFFFFF;}
|
||||
.fy_cell_title{font-size: 30rpx;text-align: left;color: #909399;}
|
||||
.fy_cell_title{font-size: 26rpx;text-align: left;color: #909399;}
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
<template v-else>
|
||||
<scroll-view :scroll-y="true" class="fy_dropdown-item_scroll" :style="getScrollStyle">
|
||||
<view v-for="(item, index) in options" :key="index" @click.stop.prevent="cellClick(item.value)" class="fy_dropdown-item_scroll_cell"
|
||||
:style="{'height': `${itemHeight}rpx`, 'line-height': `${itemHeight}rpx`}"
|
||||
>
|
||||
:style="{'height': `${itemHeight}rpx`, 'line-height': `${itemHeight}rpx`}">
|
||||
<text class="fy_cell_title" :style="{ color: value == item.value ? activeColor : inactiveColor }">{{ item.label }}</text>
|
||||
<uni-icons v-if="value == item.value" type="checkmarkempty" size="22" :color="activeColor" />
|
||||
<u-icon name="arrow-down" :color="activeColor" v-if="value == item.value" size="16"></u-icon>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
<view class="fy_dropdown__menu__item" :style="{ height: `${height}rpx` }" v-for="(item, index) in menuList" :key="index" @click="handlerMenuClick(index, item.dropdownKey)">
|
||||
<view class="fy_flex">
|
||||
<text class="fy_dropdown__menu__item__text" v-if="item.title"
|
||||
:style="{ color: item.disabled ? '#c0c4cc' : (index === current || highlightIndex == index) ? activeColor : inactiveColor, fontSize: `${titleSize}rpx` }"
|
||||
>{{item.title}}</text>
|
||||
:style="{ color: item.disabled ? '#c0c4cc' : (index === current || highlightIndex == index) ? activeColor : inactiveColor, fontSize: `${titleSize}rpx` }">{{item.title}}</text>
|
||||
<view class="fy_dropdown__menu__item__arrow" :style="{'transform': index === current ? 'scale(0.8) rotate(180deg)' : 'scale(1) rotate(0deg)'}">
|
||||
<uni-icons :type="menuIcon" :size="menuIconSize" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'" />
|
||||
<u-icon :name="menuIcon" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'" :size="menuIconSize"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,18 +21,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="active" @click="handlerMaskClick" />
|
||||
<uni-transition :mode-class="['fade']" :styles="transClass" :duration="duration" :show="active">
|
||||
<u-transition :mode="['fade']" :show="active" :duration="duration" :customStyle="maskClass" @click="handlerMaskClick"></u-transition>
|
||||
<u-transition :mode="['fade']" :show="active" :duration="duration" :customStyle="transClass">
|
||||
<view class="fy_dropdown__content__popup">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</uni-transition>
|
||||
</u-transition>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
/**
|
||||
* dropdown 下拉菜单
|
||||
* @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
|
||||
* @property {String} active-color 标题和选项卡选中的颜色(默认#00bcd4)
|
||||
@@ -49,7 +47,7 @@
|
||||
* @event {Function} close 下拉菜单被关闭时触发
|
||||
* @example <fy-dropdown></fy-dropdown>
|
||||
*/
|
||||
export default {
|
||||
export default {
|
||||
name: 'fy-dropdown',
|
||||
props: {
|
||||
// 菜单标题和选项的激活态颜色
|
||||
@@ -86,7 +84,7 @@ export default {
|
||||
},
|
||||
// 菜单右侧的icon图标
|
||||
menuIcon: {
|
||||
type: String, default: 'arrowdown'
|
||||
type: String, default: 'arrow-down'
|
||||
},
|
||||
// 菜单右侧图标的大小
|
||||
menuIconSize: {
|
||||
@@ -138,7 +136,7 @@ export default {
|
||||
// #endif
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.titleHeight = uni.upx2px(this.height);
|
||||
})
|
||||
},
|
||||
@@ -170,7 +168,7 @@ export default {
|
||||
|
||||
this.getContentHeight();
|
||||
|
||||
this.childList.forEach(item=>item.init())
|
||||
this.childList.forEach(item => item.init())
|
||||
|
||||
this.$emit('open', this.current);
|
||||
},
|
||||
@@ -225,9 +223,9 @@ export default {
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './fy-dropdown.scss';
|
||||
@import './fy-dropdown.scss';
|
||||
</style>
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
export default {
|
||||
"pulldown": "\ue588",
|
||||
"refreshempty": "\ue461",
|
||||
"back": "\ue471",
|
||||
"forward": "\ue470",
|
||||
"more": "\ue507",
|
||||
"more-filled": "\ue537",
|
||||
"scan": "\ue612",
|
||||
"qq": "\ue264",
|
||||
"weibo": "\ue260",
|
||||
"weixin": "\ue261",
|
||||
"pengyouquan": "\ue262",
|
||||
"loop": "\ue565",
|
||||
"refresh": "\ue407",
|
||||
"refresh-filled": "\ue437",
|
||||
"arrowthindown": "\ue585",
|
||||
"arrowthinleft": "\ue586",
|
||||
"arrowthinright": "\ue587",
|
||||
"arrowthinup": "\ue584",
|
||||
"undo-filled": "\ue7d6",
|
||||
"undo": "\ue406",
|
||||
"redo": "\ue405",
|
||||
"redo-filled": "\ue7d9",
|
||||
"bars": "\ue563",
|
||||
"chatboxes": "\ue203",
|
||||
"camera": "\ue301",
|
||||
"chatboxes-filled": "\ue233",
|
||||
"camera-filled": "\ue7ef",
|
||||
"cart-filled": "\ue7f4",
|
||||
"cart": "\ue7f5",
|
||||
"checkbox-filled": "\ue442",
|
||||
"checkbox": "\ue7fa",
|
||||
"arrowleft": "\ue582",
|
||||
"arrowdown": "\ue581",
|
||||
"arrowright": "\ue583",
|
||||
"smallcircle-filled": "\ue801",
|
||||
"arrowup": "\ue580",
|
||||
"circle": "\ue411",
|
||||
"eye-filled": "\ue568",
|
||||
"eye-slash-filled": "\ue822",
|
||||
"eye-slash": "\ue823",
|
||||
"eye": "\ue824",
|
||||
"flag-filled": "\ue825",
|
||||
"flag": "\ue508",
|
||||
"gear-filled": "\ue532",
|
||||
"reload": "\ue462",
|
||||
"gear": "\ue502",
|
||||
"hand-thumbsdown-filled": "\ue83b",
|
||||
"hand-thumbsdown": "\ue83c",
|
||||
"hand-thumbsup-filled": "\ue83d",
|
||||
"heart-filled": "\ue83e",
|
||||
"hand-thumbsup": "\ue83f",
|
||||
"heart": "\ue840",
|
||||
"home": "\ue500",
|
||||
"info": "\ue504",
|
||||
"home-filled": "\ue530",
|
||||
"info-filled": "\ue534",
|
||||
"circle-filled": "\ue441",
|
||||
"chat-filled": "\ue847",
|
||||
"chat": "\ue263",
|
||||
"mail-open-filled": "\ue84d",
|
||||
"email-filled": "\ue231",
|
||||
"mail-open": "\ue84e",
|
||||
"email": "\ue201",
|
||||
"checkmarkempty": "\ue472",
|
||||
"list": "\ue562",
|
||||
"locked-filled": "\ue856",
|
||||
"locked": "\ue506",
|
||||
"map-filled": "\ue85c",
|
||||
"map-pin": "\ue85e",
|
||||
"map-pin-ellipse": "\ue864",
|
||||
"map": "\ue364",
|
||||
"minus-filled": "\ue440",
|
||||
"mic-filled": "\ue332",
|
||||
"minus": "\ue410",
|
||||
"micoff": "\ue360",
|
||||
"mic": "\ue302",
|
||||
"clear": "\ue434",
|
||||
"smallcircle": "\ue868",
|
||||
"close": "\ue404",
|
||||
"closeempty": "\ue460",
|
||||
"paperclip": "\ue567",
|
||||
"paperplane": "\ue503",
|
||||
"paperplane-filled": "\ue86e",
|
||||
"person-filled": "\ue131",
|
||||
"contact-filled": "\ue130",
|
||||
"person": "\ue101",
|
||||
"contact": "\ue100",
|
||||
"images-filled": "\ue87a",
|
||||
"phone": "\ue200",
|
||||
"images": "\ue87b",
|
||||
"image": "\ue363",
|
||||
"image-filled": "\ue877",
|
||||
"location-filled": "\ue333",
|
||||
"location": "\ue303",
|
||||
"plus-filled": "\ue439",
|
||||
"plus": "\ue409",
|
||||
"plusempty": "\ue468",
|
||||
"help-filled": "\ue535",
|
||||
"help": "\ue505",
|
||||
"navigate-filled": "\ue884",
|
||||
"navigate": "\ue501",
|
||||
"mic-slash-filled": "\ue892",
|
||||
"search": "\ue466",
|
||||
"settings": "\ue560",
|
||||
"sound": "\ue590",
|
||||
"sound-filled": "\ue8a1",
|
||||
"spinner-cycle": "\ue465",
|
||||
"download-filled": "\ue8a4",
|
||||
"personadd-filled": "\ue132",
|
||||
"videocam-filled": "\ue8af",
|
||||
"personadd": "\ue102",
|
||||
"upload": "\ue402",
|
||||
"upload-filled": "\ue8b1",
|
||||
"starhalf": "\ue463",
|
||||
"star-filled": "\ue438",
|
||||
"star": "\ue408",
|
||||
"trash": "\ue401",
|
||||
"phone-filled": "\ue230",
|
||||
"compose": "\ue400",
|
||||
"videocam": "\ue300",
|
||||
"trash-filled": "\ue8dc",
|
||||
"download": "\ue403",
|
||||
"chatbubble-filled": "\ue232",
|
||||
"chatbubble": "\ue202",
|
||||
"cloud-download": "\ue8e4",
|
||||
"cloud-upload-filled": "\ue8e5",
|
||||
"cloud-upload": "\ue8e6",
|
||||
"cloud-download-filled": "\ue8e9",
|
||||
"headphones":"\ue8bf",
|
||||
"shop":"\ue609"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Reference in New Issue
Block a user