更新记录

1.0.0(2026-04-21) 下载此版本

配置简单,支持自定义:1. 文字内容;2. 是否开启动画;3. 动画速度;4. 文字颜色;5. 文字大小;6.容器大小; 7. 环绕半径 (相对于中心点的距离)。中间被环绕部分可以添加任何事件。支持H5、小程序(vue2/vue3)、android、ios。


平台兼容性

uni-app(5.04)

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

文字环绕 layne-text-wrap

配置简单,支持自定义:1. 文字内容;2. 是否开启动画;3. 动画速度;4. 文字颜色;5. 文字大小;6.容器大小; 7. 环绕半径 (相对于中心点的距离)。中间被环绕部分可以添加任何事件。支持H5、小程序(vue2/vue3)、android、ios。

API

Props

参数 说明 类型 默认值
textContent 文字内容。必填。 String LAYNE-TEXT-WRAP
openRotate 是否开启动画。非必填。 Boolean true
rotateSpeed 动画速度。非必填。 Number 10
containerSize 容器大小。非必填。 Number 300
textColor 文字颜色。非必填。 String #333
textSize 文字大小。非必填。 Number 16
radius 环绕半径 (相对于中心点的距离)。非必填。 Number null
  • 必要数据: textContent:文字内容。

使用说明

此为vue2示例,vue3请使用vue3方式

          <!-- 示例 1: 静态环绕 -->
          <layne-text-wrap 
            text-content="Layne-text-wrap Rotating"
            :container-size="280"
            :open-rotate="false"
            :radius="100"
            text-color="#4CAF50"
            :text-size="18"
          >
            <image src="/static/logo.png" style="width: 100px; height: 100px;"></image>
          </layne-text-wrap>

          <!-- 示例 2: 带动画环绕 -->
          <layne-text-wrap 
            text-content="Layne-text-wrap Rotating"
            :rotate-speed="15"
            :container-size="250"
            text-color="#FF5722"
            :text-size="16"
          >
            <view @click="uni.showToast({
                title: 'toast'
              })"
              style="width: 120px; height: 120px; background: #f0f0f0; border-radius: 50%; display: flex; justify-content: center; align-items: center;"
            >
              <text>Center</text>
            </view>
          </layne-text-wrap>

隐私、权限声明

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

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

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

许可协议

MIT协议

暂无用户评论。