更新记录

2.0.0(2025-06-02) 下载此版本

  • 适配tui-plus-v3 完善增加各端支持

1.0.3(2024-11-25) 下载此版本

  • 更新文档

1.0.2(2024-11-23) 下载此版本

  • 更新文档
查看更多

平台兼容性

云端兼容性

阿里云 腾讯云 支付宝云

uni-app(4.66)

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

uni-app x(4.66)

Chrome Safari Android iOS 鸿蒙 微信小程序
- - - - - -

Svg 组件

渲染 Svg 图标,支持配置图标来源等

支持平台

安卓 ios web 微信小程序 支付宝小程序 QQ小程序
x x

示例

<template>
    <t-page title='svg' main-class='p-30'>
        <t-card title="Svg" sub-title="支持安卓,IOS,web-支持网络路径和字符串格式" main-class="mb-30"></t-card>
        <t-section title="字符串" main-class="mb-30"></t-section>
        <t-col main-class="tdr tdb mb-30 p-30">
            <t-svg :src="src" main-class="twh-50" />
        </t-col>
        <t-section title="网络" main-class="mb-30"></t-section>
        <t-col main-class="tdr tdb mb-30 p-30">
            <t-svg src="https://life.yundie.xyz/tuiplus/static/svg/adafruit.svg" main-class="twh-50" />
        </t-col>
        <t-section title="路径" main-class="mb-30"></t-section>
        <t-col main-class="tdr tdb mb-30 p-30">
            <t-svg src="/pagesA/static/svg/adafruit.svg" main-class="twh-50" />
        </t-col>
    </t-page>
</template>

<script>
    export default {
        data() {
            return {
                // XML资源
                src: '<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="24" r="3" fill="#333"/><circle cx="24" cy="24" r="3" fill="#333"/><circle cx="36" cy="24" r="3" fill="#333"/></svg>'
            }
        },
        onLoad() {

        }
    }
</script>

Props

名称 描述 类型 默认值 可选值
src Svg 图标的来源 String '' -

Events

事件名 描述 回调参数 版本
- - - -

Slots

名称 描述
- -

隐私、权限声明

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

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

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

许可协议

MIT协议

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