|
<template>
<safe-area class="page">
<view class="header">
<text class="title">首页</text>
</view>
</safe-area>
</template>
<script>
export default {
name: 'main',
apiready() {
var that = this;
api.toast({
msg:'11111'
})
var demo = api.require('slidingList');
api.toast({
msg:demo
})
api.toast({
msg:'2222222'
})
demo.showList({
rightbtn: '确定',
leftbtn: '取消',
item_height: '130',
item_num: '3',
data: [{
content: '标题1'
}, {
content: '标题2'
}, {
content: '标题3'
}]
}, function(ret, err) {
if (ret) {
alert(JSON.stringify(ret));
} else {
alert(JSON.stringify(err));
}
});
},
data() {
return {
msg: "Hello APICloud"
};
},
methods: {
}
};
</script>
<style>
.page {
height: 100%;
background: #fff;
}
.header {
height: 44px;
justify-content: center;
align-items: center;
}
.title {
font-size: 16px;
font-weight: bold;
color: #333;
}
.body {
background: #f5f6f7;
flex: 1;
}
.h1 {
font-size: 22px;
font-weight: bold;
color: #333;
text-align: center;
margin: 50px;
}
.img {
max-width: 100%;
}
.p {
color: #aaa;
text-align: center;
font-size: 16px;
margin: 15px;
}
</style>
|
|