更新记录

1.0.0.2(2025-12-25) 下载此版本

master

1.0.0.1(2025-12-25) 下载此版本

master

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

查看更多

平台兼容性

uni-app(4.13)

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

安装

在市场导入xf-iconuni_modules版本的即可,无需import

组件关联说明

无xf-ui-package关联组件。

代码演示

插件使用

  • 位于 uni_modules/xf-icon/components/xf-icon 导入插件后直接使用
    <xf-icon />
  • 位于 uni_modules/xf-icon/static/xf-font 是图标字体库,更新只需替换ttf, scss两个文件库即可;

基本用法

  • 使用组件代码如下:
    <template>
    <view>
        <xf-icon class="b-mt16" name="stop" :size="34"></xf-icon>
    </view>
    </template>
  • vue 基础用法:icon的name值必须是代码中iconList的某个,每个值对应一个图标
    <script lang="ts" setup>
    import { computed } from 'vue';
    const iconList = computed(() => {
        return [
            'stop',
            'delete',
            'rotate',
            'download',
            'search',
            'question',
            'downfile',
            'upfile',
            'leftfile',
            'rightfile',
            'more',
            'edit',
            'zhankai',
            'shouqi',
            'juxing',
            'shouyebeifen',
            'information',
            'arrow',
            'warning',
            'close',
            'success',
            'left',
            'select',
            'down',
            'add',
            'refresh',
            'clear',
            'right',
            'up',
            'error',
            'info',
        ]
    })
    </script>

API

Props

属性名 说明 类型 默认值
prefix 图标ttf字体库的名字,开发中勿动 string xfIconfont
color 图标颜色 string -
name 字体库中对应的名字 string success
size 图标大小 number|string 16
weight 子重用法跟字体相同 string normal
touchRange 点击图标触摸范围 boolean true

事件 Emits

事件名 说明 返回值
click 点击事件使用方法跟button的一样

隐私、权限声明

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

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

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

许可协议

MIT协议

暂无用户评论。