更新记录

1.0.0(2025-12-30) 下载此版本

master


平台兼容性

uni-app(4.13)

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
-
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 快应用-华为 快应用-联盟
- - - - - - - - - -

其他

多语言 暗黑模式 宽屏模式
× ×

安装

在市场导入xf-pk-single-select uni_modules版本的即可,无需import

组件关联说明

代码演示

基本用法

  • 使用组件代码如下:
<template>
    <scroll-view class="xf-col-center" scroll-y>
        <view style="width: 100%;">
            <xf-fm-select title="F1无按钮1" @click="showF1Fun" v-model:value="selectedF1"> </xf-fm-select>
            <xf-pk-single-select :hasFooterBtn="showFooterBtn" :list="singleLists" v-model="selectedF1"
                v-model:show="showF1"></xf-pk-single-select>
        </view>
    </scroll-view>
</template>
  • 开发表单时组件xf-pk-single-select一般与xf-fm-select联合使用

  • ts 基础用法:dataList的数据结构

    <script setup lang="ts">
    import { onReady, onShow, onBackPress } from '@dcloudio/uni-app'
    import { onMounted, ref, watch } from 'vue';
    
    const showF1 = ref(false)
    const selectedF1 = ref<any>()
    const showFooterBtn = ref(false)
    
    const singleLists = ref([
        {
            label: '选项1',
            value: 1,
        },
        {
            label: '选项2',
            value: 2
        },
        {
            label: '选项3',
            value: 3
        },
        {
            label: '选项4',
            value: 4
        },
        {
            label: '选项5',
            value: 5
        },
        {
            label: '选项6',
            value: 6
        },
        {
            label: '选项1',
            value: 7
        },
    ]);
    
    const showF1Fun = (isShow : boolean) => {
        showF1.value = true
        console.log(selectedF1)
    }
    </script>

API

Props

属性名 说明 类型 默认值
v-model:modelValue 当前选中项对应的值 string|any|number -
v-model:show 是否显示弹框 boolean false
title 标题 string 标题
tip 副标题 string -
list 列表数据 array -
labelKey 列表对象的key字段名 string label
valueKey 列表对象的value字段名 string value
hasFooterBtny 是否显示底部按钮 boolean false

事件 Emits

事件名 说明 返回值
confirm 获取当前选中的item对象
close 关闭弹窗

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。