更新记录

1.1.4(2024-08-26)

修复打包报错问题

1.1.3(2024-08-26)

清除console

1.1.2(2024-08-23)

示例gif

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.7.0,Android:7.0,iOS:不支持 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

xn-scale-view

开发文档

UTS 语法 UTS API插件 UTS 组件插件 Hello UTS

使用方法

<template>
    <view class="box" @click="click" @touchstart="" @touchmove="" @touchend="">
        <xn-scale-view :scale="scale" @change="change" style="flex: 1;">
            <view style="flex: 1;background-color: red; position: relative; justify-content: center; align-items: center;">
                <view style="position: absolute; top: 0; left: 0; width: 20px; height: 20px; background: #000;"></view>
                <view style="position: absolute; top: 0; right: 0; width: 20px; height: 20px; background: #000;"></view>
                <view style="position: absolute; bottom: 0; left: 0; width: 20px; height: 20px; background: #000;"></view>
                <view style="position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; background: #000;"></view>
                <view>
                    <text style="color: #ffffff;">xn-scale-view</text>
                </view>
            </view>
        </xn-scale-view>
    </view>
    <view class="content">
        <button class="button" type="primary"  @tap="changeScale(1)">scale++</button>
        <button class="button" type="primary"  @tap="changeScale(0)">scale--</button>
    </view>
</template>

<script setup>
    const click = (e) => {
        console.log(e);
    };
    const  = (e) => {
        console.log("", e);
    };
    const  = (e) => {
        console.log("", e);
    };
    const  = (e) => {
        console.log("", e);
    };
    const scale = ref(1);
    const changeScale = (type) => {
        type === 1 ? scale.value += 0.2 : scale.value -= 0.2;
        console.log("changeScale", scale.value);
    }
    const change = (value) => {
        console.log(value.detail.type, value.detail);
        if (value.detail.type === "zoom") {
            scale.value = value.detail.scale;
        }
    }
</script>

<style lang="scss">
    .content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20rpx;
        .button{
            margin-bottom: 20rpx;
            width: 710rpx;
        }
    }
    .box{
        width: 750rpx;
        height: 422rpx;
        background: #000;
    }
</style>

隐私、权限声明

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

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

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

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