更新记录
1.0.2(2025-09-13) 下载此版本
优化对中文和特殊符号的支持。
1.0.1(2025-09-11) 下载此版本
更新插件说明
1.0.0(2025-09-11) 下载此版本
首次发布
查看更多平台兼容性
uni-app(4.76)
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | √ | √ | √ | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
- | - | - | - | - | - | - | - | - | - | - |
uni-app x(4.76)
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | - | - | - | - |
jx-best-parameters 好传参
Vue2
// main.js
import Vue from 'vue'
import App from './App'
import {
getBestParam,
setBestParam,
clearBestParam
} from '@/uni_modules/jx-best-parameters/index'
// 挂载到 Vue 原型,所有组件实例都能通过 this 访问
Vue.prototype.getBestParam = getBestParam
Vue.prototype.setBestParam = setBestParam
Vue.prototype.clearBestParam = clearBestParam
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
页面使用
this.getBestParam('aaaaa')
this.setBestParam('aaaaa',param)
this.clearBestParam('aaaa')
vue3 组合式
main.js全局引用
// main.js
import { createApp } from 'vue'
import App from './App.vue'
// 引入你的方法
import { getBestParam, setBestParam,clearBestParam } from './utils/globalMethods.js'
const app = createApp(App)
//全局挂在,支持this.getBestParam('aaaaa')
app.config.globalProperties.getBestParam = getBestParam
app.config.globalProperties.setBestParam = setBestParam
app.config.globalProperties.clearBestParam = clearBestParam
// 挂载到 globalThis(浏览器/小程序环境的全局对象),支持getBestParam('aaaaa')
globalThis.getBestParam = getBestParam
globalThis.setBestParam = setBestParam
globalThis.clearBestParam = clearBestParam
app.mount(App)
页面使用
getBestParam('aaaa')
setBestParam('aaaa', param)
clearBestParam('aaaa')
this.getBestParam('aaaaa')
this.setBestParam('aaaaa',param)
this.clearBestParam('aaaa')