first
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
## 1.0.5(2024-01-02)
|
||||
1. 修复parentData不变的BUG
|
||||
## 1.0.4(2023-09-28)
|
||||
1. 增加uv-sticky依赖
|
||||
## 1.0.3(2023-08-29)
|
||||
1. 修复自定义内容,点击自定义内容时会自动关闭弹窗的问题
|
||||
## 1.0.2(2023-08-22)
|
||||
1. 优化
|
||||
## 1.0.1(2023-08-22)
|
||||
1. 增加@change回调,返回弹窗关闭状态
|
||||
2. 增加init方法,方便位置改变进行调整
|
||||
## 1.0.0(2023-07-30)
|
||||
新增uv-drop-down 下拉筛选组件
|
||||
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<view class="uv-drop-down-item" @click="clickHandler">
|
||||
<uv-text :text="label" :size="getTextStyle.size" :color="getTextStyle.color" lines="1" :custom-style="{marginRight: '10rpx',maxWidth:'200rpx'}"></uv-text>
|
||||
<uv-icon :name="getDownIcon.name" :size="getDownIcon.size" :color="getDownIcon.color" v-if="[1,'1'].indexOf(type)==-1"></uv-icon>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js';
|
||||
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js';
|
||||
/**
|
||||
* DropDown 下拉框
|
||||
* @description 下拉筛选
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?name=uv-drop-down
|
||||
* @property {String | Number} name 字段标识
|
||||
* @property {String | Number} type 类型 1 没有筛选项,直接进行选中和不选中 2 有多个选项
|
||||
* @property {String | Number} label 筛选项的文本
|
||||
* @property {Boolean} isDrop 该项是否打开
|
||||
*/
|
||||
export default {
|
||||
name: 'uv-drop-down-item',
|
||||
mixins: [mpMixin, mixin],
|
||||
emits: ['click'],
|
||||
props: {
|
||||
name: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
// 类型 1 没有筛选项,直接进行选中和不选中 2 有多个选项
|
||||
type: {
|
||||
type: [String, Number],
|
||||
default: '2'
|
||||
},
|
||||
// 筛选的文本
|
||||
label: {
|
||||
type: [String],
|
||||
default: ''
|
||||
},
|
||||
// 筛选值
|
||||
value: {
|
||||
type: [String, Number, null],
|
||||
default: ''
|
||||
},
|
||||
// 是否下拉菜单打开
|
||||
isDrop: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
parentData: {
|
||||
defaultValue: [0, '0', 'all'],
|
||||
textSize: '30rpx',
|
||||
textColor: '#333',
|
||||
textActiveSize: '30rpx',
|
||||
textActiveColor: '#3c9cff',
|
||||
extraIcon: {},
|
||||
extraActiveIcon: {},
|
||||
sign: '',
|
||||
clickHandler: Function
|
||||
},
|
||||
active: false,
|
||||
isDroped: false,
|
||||
elId: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isDrop: {
|
||||
handler(newVal) {
|
||||
this.isDroped = newVal;
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
value: {
|
||||
handler(newVal) {
|
||||
this.$nextTick(()=>{
|
||||
this.active = this.parentData.defaultValue.indexOf(newVal) == -1;
|
||||
})
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getDownIcon() {
|
||||
const style = {
|
||||
size: '30rpx',
|
||||
color: '#333',
|
||||
...this.parentData.extraIcon
|
||||
}
|
||||
if (this.active || this.isDroped) {
|
||||
style.color = this.parentData.extraActiveIcon?.color ? this.parentData.extraActiveIcon?.color : '#3c9cff';
|
||||
style.size = this.parentData.extraActiveIcon?.size ? this.parentData.extraActiveIcon?.size : '30rpx';
|
||||
}
|
||||
if (this.isDroped) {
|
||||
style.name = this.parentData.extraActiveIcon?.name;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
getTextStyle() {
|
||||
const style = {
|
||||
size: this.parentData.textSize,
|
||||
color: this.parentData.textColor
|
||||
};
|
||||
if (this.active || this.isDroped) {
|
||||
style.size = this.parentData.textActiveSize;
|
||||
style.color = this.parentData.textActiveColor;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.elId = this.$uv.guid();
|
||||
this.getParentData('uv-drop-down');
|
||||
if (!this.parent) {
|
||||
this.$uv.error('uv-drop-down必须搭配uv-drop-down-item组件使用');
|
||||
}
|
||||
uni.$on('HANDLE_DROPDOWN_ONE', id => {
|
||||
if (this.isDroped && this.elId != id) {
|
||||
this.isDroped = false;
|
||||
}
|
||||
})
|
||||
uni.$on(`${this.parentData.sign}_CLOSEPOPUP`, async () => {
|
||||
if (this.isDroped) {
|
||||
this.isDroped = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
async clickHandler() {
|
||||
let data = {};
|
||||
uni.$emit('HANDLE_DROPDOWN_ONE', this.elId);
|
||||
switch (+this.type) {
|
||||
case 1:
|
||||
this.active = !this.active;
|
||||
data = {
|
||||
name: this.name,
|
||||
active: this.active,
|
||||
type: this.type
|
||||
};
|
||||
break;
|
||||
case 2:
|
||||
this.isDroped = !this.isDroped;
|
||||
data = {
|
||||
name: this.name,
|
||||
active: this.isDroped,
|
||||
type: this.type
|
||||
};
|
||||
break;
|
||||
}
|
||||
this.parentData.clickHandler(data);
|
||||
this.$emit('click', data);
|
||||
uni.$emit(`${this.parentData.sign}_CLICKMENU`, {
|
||||
show: +this.type > 1 && this.isDroped
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
|
||||
.uv-drop-down-item {
|
||||
@include flex;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<view class="uv-drop-down-popup">
|
||||
<uv-transition :show="show" mode="fade" :duration="300" :custom-style="overlayStyle" @click="clickOverlay">
|
||||
<view class="uv-dp__container" ref="uvDPContainer" :style="{height: `${height}px`}" @click.stop="blockClick">
|
||||
<view class="uv-dp__container__list" ref="uvDPList">
|
||||
<slot>
|
||||
<view class="uv-dp__container__list--item" v-for="(item,index) in list" :key="index" @click="clickHandler(item,index)" :style="[itemCustomStyle(index)]">
|
||||
<uv-text :text="item[keyName]" :size="getTextSize(index)" :color="getTextColor(index)"></uv-text>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</uv-transition>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js';
|
||||
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js';
|
||||
// #ifdef APP-NVUE
|
||||
const animation = uni.requireNativePlugin('animation');
|
||||
const dom = uni.requireNativePlugin('dom');
|
||||
// #endif
|
||||
/**
|
||||
* DropDownPopup 下拉框
|
||||
* @description 下拉筛选框
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?name=uv-drop-down
|
||||
* @property {String | Number} name 字段标识
|
||||
* @property {String | Number} zIndex 弹出层的层级
|
||||
* @property {String | Number} opacity 遮罩层的透明度
|
||||
* @property {Boolean} clickOverlayOnClose 是否允许点击遮罩层关闭弹窗
|
||||
* @property {Object} currentDropItem 当前下拉筛选菜单对象
|
||||
* @property {String} keyName 指定从当前下拉筛选菜单对象元素中读取哪个属性作为文本展示
|
||||
*/
|
||||
export default {
|
||||
name: 'uv-drop-down-popup',
|
||||
mixins: [mpMixin, mixin],
|
||||
props: {
|
||||
sign: {
|
||||
type: [String, Number],
|
||||
default: 'UVDROPDOWN'
|
||||
},
|
||||
zIndex: {
|
||||
type: [Number, String],
|
||||
default: 999
|
||||
},
|
||||
opacity: {
|
||||
type: [Number, String],
|
||||
default: 0.5
|
||||
},
|
||||
clickOverlayOnClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 当前下拉选项对象
|
||||
currentDropItem: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
child: []
|
||||
}
|
||||
}
|
||||
},
|
||||
keyName: {
|
||||
type: String,
|
||||
default: 'label'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
rect: {},
|
||||
height: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
overlayStyle() {
|
||||
let { height = 0, top = 0 } = this.rect;
|
||||
// #ifdef H5
|
||||
top += this.$uv.sys().windowTop;
|
||||
// #endif
|
||||
const style = {
|
||||
position: 'fixed',
|
||||
top: `${top+height}px`,
|
||||
left: 0,
|
||||
right: 0,
|
||||
zIndex: this.zIndex,
|
||||
bottom: 0,
|
||||
'background-color': `rgba(0, 0, 0, ${this.opacity})`
|
||||
}
|
||||
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle))
|
||||
},
|
||||
list() {
|
||||
try {
|
||||
return Array.isArray(this.currentDropItem.child) ? this.currentDropItem.child : [];
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
getTextColor(index) {
|
||||
return index => {
|
||||
const active = this.currentDropItem.activeIndex == index;
|
||||
const color = this.currentDropItem.color;
|
||||
const activeColor = this.currentDropItem.activeColor;
|
||||
if (active) {
|
||||
return activeColor ? activeColor : '#3c9cff';
|
||||
}
|
||||
return color ? color : '#333';
|
||||
}
|
||||
},
|
||||
getTextSize(index) {
|
||||
return index => {
|
||||
const active = this.currentDropItem.activeIndex == index;
|
||||
const size = this.currentDropItem.size;
|
||||
const activeSize = this.currentDropItem.activeSize;
|
||||
if (active) {
|
||||
return activeSize ? activeSize : '30rpx';
|
||||
}
|
||||
return size ? size : '30rpx';
|
||||
}
|
||||
},
|
||||
itemCustomStyle() {
|
||||
return index => {
|
||||
const active = this.currentDropItem.activeIndex == index;
|
||||
const style = {};
|
||||
if (active && this.currentDropItem.itemActiveCustomStyle) {
|
||||
return this.$uv.deepMerge(style, this.$uv.addStyle(this.currentDropItem.itemActiveCustomStyle));
|
||||
}
|
||||
if (this.currentDropItem.itemCustomStyle) {
|
||||
return this.$uv.deepMerge(style, this.$uv.addStyle(this.currentDropItem.itemCustomStyle))
|
||||
}
|
||||
return style;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
blockClick() {},
|
||||
clickHandler(item, index) {
|
||||
this.currentDropItem.activeIndex = index;
|
||||
this.$emit('clickItem', item);
|
||||
this.close();
|
||||
},
|
||||
init() {
|
||||
uni.$off(`${this.sign}_GETRECT`);
|
||||
uni.$on(`${this.sign}_GETRECT`, rect => {
|
||||
this.rect = rect;
|
||||
})
|
||||
uni.$off(`${this.sign}_CLICKMENU`);
|
||||
uni.$on(`${this.sign}_CLICKMENU`, async res => {
|
||||
if (res.show) {
|
||||
this.open();
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.show = true;
|
||||
this.$nextTick(async () => {
|
||||
// #ifndef H5 || MP-WEIXIN
|
||||
await this.$uv.sleep(60);
|
||||
// #endif
|
||||
const res = await this.queryRect();
|
||||
// #ifndef APP-NVUE
|
||||
this.height = res.height;
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
this.animation(res.height);
|
||||
// #endif
|
||||
this.$emit('popupChange', { show: true });
|
||||
})
|
||||
},
|
||||
close() {
|
||||
if(!this.show) return;
|
||||
this.height = 0;
|
||||
// #ifndef APP-NVUE
|
||||
this.height = 0;
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
this.animation(0);
|
||||
// #endif
|
||||
this.show = false;
|
||||
uni.$emit(`${this.sign}_CLOSEPOPUP`);
|
||||
this.$emit('popupChange', { show: false });
|
||||
},
|
||||
clickOverlay() {
|
||||
if (this.clickOverlayOnClose) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
// 查询内容高度
|
||||
queryRect() {
|
||||
// #ifndef APP-NVUE
|
||||
// 组件内部一般用this.$uvGetRect,对外的为getRect,二者功能一致,名称不同
|
||||
return new Promise(resolve => {
|
||||
this.$uvGetRect(`.uv-dp__container__list`).then(size => {
|
||||
resolve(size)
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
// nvue下,使用dom模块查询元素高度
|
||||
// 返回一个promise,让调用此方法的主体能使用then回调
|
||||
return new Promise(resolve => {
|
||||
dom.getComponentRect(this.$refs.uvDPList, res => {
|
||||
resolve(res.size)
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
// nvue下设置高度
|
||||
animation(height, duration = 200) {
|
||||
// #ifdef APP-NVUE
|
||||
const ref = this.$refs['uvDPContainer'];
|
||||
animation.transition(ref, {
|
||||
styles: {
|
||||
height: `${height}px`
|
||||
},
|
||||
duration
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.uv-dp__container {
|
||||
/* #ifndef APP-NVUE */
|
||||
overflow: hidden;
|
||||
transition: all .15s;
|
||||
/* #endif */
|
||||
background-color: #fff;
|
||||
}
|
||||
.uv-dp__container__list {
|
||||
&--item {
|
||||
padding: 20rpx 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<uv-sticky :disabled="!isSticky">
|
||||
<view ref="dropDownRef" class="uv-drop-down" :style="[$uv.addStyle(customStyle)]">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</uv-sticky>
|
||||
</template>
|
||||
<script>
|
||||
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js';
|
||||
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js';
|
||||
// #ifdef APP-NVUE
|
||||
const dom = uni.requireNativePlugin('dom');
|
||||
// #endif
|
||||
/**
|
||||
* DropDown 下拉框
|
||||
* @description 下拉筛选
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?name=uv-drop-down
|
||||
* @property {String | Number} sign 组件唯一标识,需要手动传
|
||||
* @property {Boolean} is-sticky = [true|false] 是否吸顶
|
||||
* @property {Array} default-value 默认值,表示参数value属于这里面的值,就说明是未选中即是默认展示的值。eg:上面示例中的{label: '全部',value: 'all'} 即是默认值。后续处理逻辑也可以根据是否是其中值进行过滤。
|
||||
* @property {String} textSize 每项字体大小
|
||||
* @property {String} textColor 每项文本颜色
|
||||
* @property {String} textActiveSize 每项选中状态字体大小
|
||||
* @property {String} textActiveColor 每项选中状态文本颜色
|
||||
* @property {Object} extraIcon 每项右侧图标
|
||||
* @property {Object} extraActiveIcon 每项选中后右侧图标
|
||||
*/
|
||||
export default {
|
||||
name: 'uv-drop-down',
|
||||
mixins: [mpMixin, mixin],
|
||||
emits: ['click'],
|
||||
props: {
|
||||
isSticky: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
sign: {
|
||||
type: [String, Number],
|
||||
default: 'UVDROPDOWN'
|
||||
},
|
||||
defaultValue: {
|
||||
type: Array,
|
||||
default: () => [0, '0', 'all']
|
||||
},
|
||||
textSize: {
|
||||
type: String,
|
||||
default: '30rpx'
|
||||
},
|
||||
textColor: {
|
||||
type: String,
|
||||
default: '#333'
|
||||
},
|
||||
textActiveSize: {
|
||||
type: String,
|
||||
default: '30rpx'
|
||||
},
|
||||
textActiveColor: {
|
||||
type: String,
|
||||
default: '#3c9cff'
|
||||
},
|
||||
extraIcon: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
name: 'arrow-down',
|
||||
size: '30rpx',
|
||||
color: '#333'
|
||||
}
|
||||
}
|
||||
},
|
||||
extraActiveIcon: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
name: 'arrow-up',
|
||||
size: '30rpx',
|
||||
color: '#3c9cff'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
parentData() {
|
||||
return [this.defaultValue, this.textSize, this.textColor, this.textActiveColor, this.textActiveSize, this.extraIcon, this.extraActiveIcon, this.sign, this.clickHandler];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
uni.$emit(`${this.sign}_CLICKMENU`, {
|
||||
show: false
|
||||
});
|
||||
this.$nextTick(async () => {
|
||||
const rect = await this.queryRect();
|
||||
uni.$emit(`${this.sign}_GETRECT`, rect);
|
||||
})
|
||||
},
|
||||
// 查询内容高度
|
||||
queryRect() {
|
||||
// #ifndef APP-NVUE
|
||||
// 组件内部一般用this.$uvGetRect,对外的为getRect,二者功能一致,名称不同
|
||||
return new Promise(resolve => {
|
||||
this.$uvGetRect(`.uv-drop-down`).then(size => {
|
||||
resolve(size)
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
// nvue下,使用dom模块查询元素高度
|
||||
// 返回一个promise,让调用此方法的主体能使用then回调
|
||||
return new Promise(resolve => {
|
||||
dom.getComponentRect(this.$refs.dropDownRef, res => {
|
||||
res.size.top = res.size.top <= 0 ? 0 : res.size.top;
|
||||
resolve(res.size)
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
clickHandler(data) {
|
||||
this.$emit('click', data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
|
||||
.uv-drop-down {
|
||||
@include flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #dadbde;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"id": "uv-drop-down",
|
||||
"displayName": "uv-drop-down 下拉筛选 全面兼容vue3+2、app、h5、小程序等多端",
|
||||
"version": "1.0.5",
|
||||
"description": "该组件主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项",
|
||||
"keywords": [
|
||||
"uv-drop-down",
|
||||
"uvui",
|
||||
"uv-ui",
|
||||
"下拉筛选",
|
||||
"筛选"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "component-vue",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "插件不采集任何数据",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [
|
||||
"uv-ui-tools",
|
||||
"uv-icon",
|
||||
"uv-text",
|
||||
"uv-transition",
|
||||
"uv-sticky"
|
||||
],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y",
|
||||
"钉钉": "u",
|
||||
"快手": "u",
|
||||
"飞书": "u",
|
||||
"京东": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
## DropDown 下拉筛选
|
||||
|
||||
> **组件名:uv-drop-down**
|
||||
|
||||
该组件主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项。
|
||||
|
||||
为了兼容app-nvue,需要内置三个组件进行配合使用,uv-drop-down属于菜单项(其实还包括子组件uv-drop-down-item),uv-drop-down-popup属于筛选框。
|
||||
|
||||
只需要做简单的约定式配置,即可使用该功能,兼容性良好,已经在多端进行了多次测试。
|
||||
|
||||
# <a href="https://www.uvui.cn/components/dropDown.html" target="_blank">查看文档</a>
|
||||
|
||||
## [下载完整示例项目](https://ext.dcloud.net.cn/plugin?name=uv-ui) <small>(请不要 下载插件ZIP)</small>
|
||||
|
||||
### [更多插件,请关注uv-ui组件库](https://ext.dcloud.net.cn/plugin?name=uv-ui)
|
||||
|
||||
<a href="https://ext.dcloud.net.cn/plugin?name=uv-ui" target="_blank">
|
||||
|
||||

|
||||
|
||||
</a>
|
||||
|
||||
#### 如使用过程中有任何问题反馈,或者您对uv-ui有一些好的建议,欢迎加入uv-ui官方交流群:<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>
|
||||
Reference in New Issue
Block a user