手册版本 V3.0
组件名称
graceFixedMsg : /graceUI/组件目录/graceFixedMsg
组件属性
msg : {type : String, default : ""} // 消息内容
color : {type : String, default : "#008CFF"}// 文本颜色
width : {type : Number,default : 300}// 消息框 单位 rpx
bottom : {type : Number,default : 80} // 底部位置 单位 rpx
show : {type : Boolean,default : true} // 是否展示组件
zIndex: {type : Number,default : 9} // 组件层级 [ nvue 底层不支持,不需要设置]组件事件
tapme 当组件被点击是激活;
演示代码
UNI 普通版本
NVUE 版本
微信小程序独立版本
<template>
<gracePage :customHeader="false">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<graceFixedMsg msg="消息内容文本" :width="280" @tapme="demo" :bottom="80"></graceFixedMsg>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/components/gracePage.vue";
import graceFixedMsg from "../../graceUI/components/graceFixedMsg.vue";
export default {
data(){
return {
num : null
}
},
components:{
gracePage, graceFixedMsg
},
methods:{
demo : function () {
console.log('demo...');
}
}
}
</script>
<style>
</style>
<template>
<gracePage :customHeader="false">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<graceFixedMsg msg="消息内容文本" :width="280" @tapme="demo" :bottom="80"></graceFixedMsg>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/weexComponents/gracePage.nvue";
import graceFixedMsg from "../../graceUI/weexComponents/graceFixedMsg.nvue";
export default {
data(){
return {
num : null
}
},
components:{
gracePage, graceFixedMsg
},
methods:{
demo : function () {
console.log('demo...');
}
}
}
</script>
<style>
</style>
.wxml
<gracePage customHeader="{{false}}">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<graceFixedMsg msg="消息内容文本" width="{{280}}" bind:tapme="demo" bottom="{{80}}"></graceFixedMsg>
</view>
</gracePage>.json
{
"usingComponents": {
"gracePage": "../../graceUI/components/gracePage",
"graceFixedMsg": "../../graceUI/components/graceFixedMsg"
}
}.js
Page({
demo : function(){
console.log('demo...');
}
})