更新记录

1.0.0(2025-03-30)

初始版


平台兼容性

Vue2 Vue3
×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
× × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序 鸿蒙元服务
× × × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

源码清晰、规范、简单,适合二次开发,优化页面

属性

名称 类型 说明 默认值
show Boolean 是否展示 false
themeColor String 主题色 #9DD300

事件

事件名 说明 回调参数
close 点击蒙版关闭或点击关闭按钮关闭时触发
<template>
    <view class="content">

        <!-- 商品列表按钮 -->
        <view class="product-btn" @click="showProductList = true">
            <text>查看商品列表</text>
        </view>

        <!-- 商品列表组件  -->
        <product-list
            :show="showProductList"
            @close="showProductList = false"
            :themeColor="'#0C87E3'"
        />
    </view>
</template>

<script>
// import TanlyCitySelect from '@/components/tanly-city-select/tanly-city-select.vue'// 无需引入
// import ProductList from '@/components/product-list/product-list.vue' // 无需引入

export default {
    components: {
        // TanlyCitySelect,// 无需引入
        // ProductList // 无需引入
    },
    data() {
        return {
            title: 'Hello',
            showProductList: false // 控制商品列表显示
        }
    },
    computed: {
    },
    onLoad() {

    },
    methods: {
        // 处理商品列表确认
        handleProductConfirm() {
            this.showProductList = false;
            console.log('商品列表确认');
        }
    }
}
</script>

<style>

.flex {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .flexb {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .flexa {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .flexm {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .flexmc {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .content {
        padding: 30rpx;
    }

    .city-input-container {
        margin-bottom: 30rpx;
    }

    .city-input {
        background-color: #fff;
        padding: 20rpx 30rpx;
        border-radius: 10rpx;
        border: 1rpx solid #ddd;
        font-size: 28rpx;
        color: #333;
    }

    .selected-cities-preview {
        margin-top: 10rpx;
        font-size: 24rpx;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo {
        height: 200rpx;
        width: 200rpx;
        margin-top: 200rpx;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 50rpx;
    }

    .text-area {
        display: flex;
        justify-content: center;
    }

    .title {
        font-size: 36rpx;
        color: #8f8f94;
    }

    .product-btn {
        background-color: #ff6700;
        color: #fff;
        padding: 20rpx 30rpx;
        border-radius: 10rpx;
        text-align: center;
        margin-top: 30rpx;
    }
</style>

隐私、权限声明

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

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

插件不采集任何数据

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

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问