1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // pages/components/toast/toast.js
- const app = getApp();
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- toastData: {
- type: Object,
- value: {
- titlePicUrl: "",
- titlePicUrlWidth: 0,
- title: [""],
- info: [""],
- isShowOneBut: false,
- isShowTwoBut: false,
- oneButText: "",
- twoButText: "",
- footTop: 0
- }
- },
- oneButCallback: {
- type: ()=> {},
- value: ()=> {}
- },
- twoButCallback: {
- type: ()=> {},
- value: ()=> {}
- },
- visible: {
- type: Boolean,
- value: false
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- navBarHeight: app.globalData.navBarHeight,
- MenuButtonheight: app.globalData.MenuButtonheight,
- MenuButtonTop: app.globalData.MenuButtonTop,
- },
- /**
- * 组件的方法列表
- */
- methods: {
- oneButCallback(){
- if(this.properties.oneButCallback) {
- this.properties.oneButCallback();
- return;
- };
- },
- twoButCallback(){
- if(this.properties.twoButCallback) {
- this.properties.twoButCallback();
- return;
- };
- },
- }
- })
|