帖子
帖子
用户
博客
课程
12
返回列表 发新帖
46
帖子
1
勋章
293
Y币
avm的稳定性和兼容性以及bug确实还有点多,用html+vue更快更方便
380
帖子
4
勋章
6
Y币
  1. <template>
  2.         <scroll-view class="main" scroll-y>
  3.                 <text v-show="!isshow" class="title">水平布局</text>
  4.                 <view class="horizontal">
  5.                         <view class="item red"></view>
  6.                         <view class="item green"></view>
  7.                         <view class="item blue"></view>
  8.                 </view>
  9.                 <text v-show="isshow" class="title">垂直布局</text>
  10.                 <view class="vertical">
  11.                         <view class="item red"></view>
  12.                         <view class="item green"></view>
  13.                         <view class="item blue"></view>
  14.                 </view>
  15.         </scroll-view>
  16. </template>
  17. <style>
  18. .main {
  19.         width: 100%;
  20.         height: 100%;
  21. }
  22. .title {
  23.         padding: 10px 0;
  24.         font-size: 20px;
  25. }
  26. .horizontal {
  27.         flex-direction: row;
  28.         width: 300px;
  29.         height: 200px;
  30. }
  31. .vertical {
  32.         flex-direction: column;
  33.         width: 200px;
  34.         height: 300px;
  35. }
  36. .item {
  37.         flex: 1;
  38. }
  39. .red {
  40.         background-color: #f00;
  41. }
  42. .green {
  43.         background-color: #0f0;
  44. }
  45. .blue {
  46.         background-color: #00f;
  47. }
  48. </style>
  49. <script>
  50. export default {
  51.         name: 'test',
  52.         data() {
  53.                 return {
  54.                         isshow : true
  55.                 }
  56.         },
  57.         apiready(){
  58.                 console.log(123);
  59.                 this.data.isshow = false
  60.         },
  61.         methods: {

  62.         }
  63. }
  64. </script>
复制代码
69
帖子
2
勋章
480
Y币
参考您的代码后问题解决了,太感谢了。
69
帖子
2
勋章
480
Y币
谢谢提醒
微链阿铁【APP开发】 · 2022-1-17 14:30当你这么回复我说明并没有认真看文档,仔细看看变量是如何赋值的!再对比自己的看看
各有各的好处
DreamsGoGO · 2022-1-17 14:51avm的稳定性和兼容性以及bug确实还有点多,用html+vue更快更方便
46
帖子
1
勋章
293
Y币
希望avm可以更好一点,毕竟一键生成H5,小程序和APP挺方便的,但是确实问题有点多。我暂时只能弃用
在慢慢完善
DreamsGoGO · 2022-1-24 18:08希望avm可以更好一点,毕竟一键生成H5,小程序和APP挺方便的,但是确实问题有点多。我暂时只能弃用
12
您需要登录后才可以回帖 登录

本版积分规则