uz-tools
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

说明

uztool 是uniapp的工具类,减少您对uniapp的操作大大减少了您的代码量

安装

# npm 方式安装
npm i uz-tool

快速上手

uni.showToast提示

import {toast} from 'uz-tools'

// 成功图标
function success() {
    toast('通知成功', 1, 2000)
}

// 失败图标
function error() {
    toast('通知失败', 2, 2000)
}

// 无图标
function none() {
    toast('无图标通知', 3, 2000)
    toast('无图标通知')
}

本地存储操作类

import { getStorage, setStorage, cleatStorage } from 'uz-tool'

// 设置本地存储
setStorage('userID', 'id-123456789')

// 获取本地存储
getStorage('userID')

// 清除本地指定存储
cleatStorage('userID')

// 清除全部存储
cleatStorage()

/uz-tools/

    Package Sidebar

    Install

    npm i uz-tools

    Weekly Downloads

    2

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    7.17 kB

    Total Files

    7

    Last publish

    Collaborators

    • zhangshuwei