更新记录

1.0.8(2022-11-30)

删除多余注释,优化使用文档

1.0.7(2022-11-30)

组件分离,样式优化

1.0.6(2022-09-21)

修补组件使用时的对接bug

查看更多

平台兼容性

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

m-utils

自我公司常用插件和项目合集

下载后,创建common目录

/api              api文件夹
    index.js
    base.js
config.js         配置项 
_variable.scss    配置样式基础

/api index

import * as Base from './base.js'
const $ajax = {
    ...Base
}

uni.$ajax = $ajax

const install = (Vue, vm) => {
    Vue.prototype.$ajax = $ajax
}

export default {
    install
}

/api base.js

import ajax from '@/uni_modules/m-utils/request'

export const index = (data)=>{
    return ajax.post('/index', data)
}

_variable

$black: #000;
$white: #fff;
$primary: #007bff ;
$success: #28a745;
$info: #17a2b8;
$warning: #ffc107;
$error: #dc3545;
$gray: #898B98;

config.js

export let baseURL = 'https://test.com'
export const AESKEY = 'AESKEY'
export const AESIV = 'AESIV'

main.js

// ajax
import Ajax from '@/common/api'
Vue.use(Ajax, app)
// utils
import utils from '@/uni_modules/m-utils'
Vue.use(utils, app)

style

<template>
    <view class="text-20 text-white">
        {{title}}
        <u-parse />
    </view>
</template>

<script>
    export default {
        data() {
            return {
                title: 'hello'
            };
        },
        mounted() {
            console.log(this.$m)
            console.log(this.$ajax)
            this.$ajax.index().then(res=>{
                console.log(res)
            })
        }
    }
</script>

<style lang="scss">
@import '@/common/_variable';
@import '@/uni_modules/m-utils/scss';
</style>

uni-ui

uni-ui

u-parse

u-parse

uni-ajax

uni-ajax

validate

validate

u-qrcode

u-qrcode

qiun-data-charts

qiun-data-charts

隐私、权限声明

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

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

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

许可协议

MIT协议

暂无用户评论。

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