更新记录
1.0.7(2025-05-20) 下载此版本
增加空间dropdown
1.0.6(2025-05-08) 下载此版本
增加 $delay $wait
1.0.5(2025-05-07) 下载此版本
增加全局配置baseurl功能
查看更多平台兼容性
- 在app.uvue中增加以下代码
<style lang="scss">
@import "@/uni_modules/yx-uix/yx.scss";
</style>
- 在main.uts中
import App from './App.uvue'
import { createSSRApp } from 'vue'
import { $yx } from '@/uni_modules/yx-uix'
export function createApp() {
const app = createSSRApp(App)
$yx.conf.set({
baseurl: 'https://api.yixinshuke.com',
})
return {
app
}
}
样式说明
.row .row-wrap .col .center
.fullScreen .fixed-top .relative-top .absolute-top
.grid .grid-item
.box
.uni-input
api说明
自定义错误类型 $error
$alert
try {
//执行操作
} catch (error) {
$alert(error)
}
$post
try {
let res = await $post('/api/boss', {
cmd: '登录',
C_手机号: phone.value,
C_密码: psw.value
});
console.log(res);
} catch (error) {
$alert(error)
}
$delay
await $delay(1000*10);
$wait
await $wait(() => { return state.B_准备就绪 }, 1000 * 10, () => { uni.redirectTo({ url: '/pages/login/login' }); })
组件说明
yx-dialog
import { T_ShowOption } from '@/uni_modules/yx-uix/types.uts'
<yx-dialog ref="对话框" width="700rpx">
<view>
<text>对话框内容</text>
</view>
</yx-dialog>
let res = await (this.$refs['对话框'] as YxDialogComponentPublicInstance).show({
title: '选择门店',
showConfirm: false,
} as T_ShowOption);