更新记录
1.0.4(2023-04-04)
修复已知问题。
1.0.3(2023-04-04)
修复nvue显示问题。
1.0.2(2023-04-03)
修复问题。
查看更多
平台兼容性
uni-app
app-vue |
app-nvue |
app-android |
app-ios |
? |
? |
? |
? |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
? |
? |
? |
? |
? |
? |
? |
? |
? |
uni-app x
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
方便您的同时,请五星、收藏,让好的东西照亮更多深渊中负重前行的代码人。
创作不易,在您方便之际,赞赏作者,我们会更有动力继续下去。
简介
ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。
使用 uni_modules 安装(推荐)
使用 uni_modules 方式安装组件库,可以直接通过插件市场导入,通过右键菜单快速更新组件,不需要引用、注册,直接在页面中使用 ljs-toast组件。
主参数
参数 |
类型 |
必填项 |
默认值 |
说明 |
show |
Boolean |
√ |
|
是否显示,支持sync修饰符 |
time |
Number |
× |
2000 |
关闭时间,毫秒 |
方法
快速应用
场景 - vue页面
<template>
<view>
<button @click="open">弹出消息</button>
ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。
<ljs-toast
:show.sync="ljs_toast">ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。</ljs-toast>
</view>
</template>
<script>
export default {
data() {
return {
ljs_toast: true
}
},
onLoad() {
},
methods: {
open() {
this.ljs_toast = true;
}
}
}
</script>
场景 - nvue页面
<template>
<view class="page">
<button @click="open">nvue弹出消息</button>
ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。
<ljs-toast
:show.sync="ljs_toast">
<view class="content">
<text class="text">ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。</text>
<text class="text">ljs-toast,uni.showToast仿制组件,解决微信真机端,内容超过两行,被...处理问题。</text>
</view>
</ljs-toast>
</view>
</template>
<script>
export default {
data() {
return {
ljs_toast: true
}
},
onLoad() {
},
methods: {
open() {
this.ljs_toast = true;
}
}
}
</script>
<style lang="scss" scoped>
.page{
width: 750upx;
position: relative;
.content{
height: 750upx; // 需要设置高度
.text{
line-height: 40upx;
text-align: center;
font-size: 28upx;
color: #FFF;
}
}
}
</style>
贡献代码
龙九山。有任何问题,请在平台留言,在手头宽裕得情况下,我会尽快修复问题。