帖子
帖子
用户
博客
课程
显示全部楼层
12
帖子
1
勋章
3万+
Y币

[多端开发] 很迷惑avm的数据绑定

[复制链接]
发表于 2022-1-24 11:41:31
  1. <template>
  2.         <view class="main">
  3.                 <view class="scroll-view">
  4.                         <text class="view-title">{{title}}</text>
  5.                         <text class="view-title">{{item.PKID}}</text>
  6.                         <a-cell-group>
  7.                         <a-field :label="this.data.label" readonly />
  8.                         <textarea onblur="onTextareaBlur" class="textarea" placeholder="输入限制为50" maxlength="50" style="width:95%;margin:auto;height:100px;">
  9.                                
  10.                         </textarea>
  11.                 </a-cell-group>
  12.                 <view class="buttonsBox">
  13.                         <a-button class="buttonsBox-cell" type="primary" @click="submit()" >提交</a-button>
  14.                         <a-button class="buttonsBox-cell" type="warning" @click="closeDialog()">返回</a-button>
  15.                 </view>
  16.                 </view>
  17.         </view>
  18. </template>
  19. <script>

  20. import ACellGroup from "../../components/act/a-cell-group";
  21. import AButton from "../../components/act/a-button";
  22. import ACell from "../../components/act/a-cell";
  23. import AIcon from "../../components/act/a-icon";
  24. import AField from "../../components/act/a-field";
  25. import $util from "../../utils/util.js";
  26. import {wash} from '../../api/wash.js';
  27. export default {
  28.         name: 'wash_deliver',
  29.         data() {
  30.                 var session_member=$util.getPrefs('member');
  31.                 return {
  32.                         item:{},
  33.                         remark:'',
  34.                         title:'确认',
  35.                         label:'说明',
  36.                         member:session_member
  37.                 }
  38.         },
  39.        
  40.         methods: {
  41.                 apiready() {
  42.                         this.item=api.pageParam;
  43.                         console.log(JSON.stringify(this.item));
  44.                         if(this.item.state=='0')
  45.                         {
  46.                                 this.title='确认订单';
  47.                         }
  48.                         if(this.item.state=='1')
  49.                         {
  50.                                 this.title='完成订单';
  51.                         }
  52.                 },
复制代码
为什么我的title值,在代码中修改了,界面中还是不变呢?我绑定有问题吗?
12
帖子
1
勋章
3万+
Y币
汗,已解决
正准备回复你,哪里出问题了
12
帖子
1
勋章
3万+
Y币
小问题,对象的属性名搞错了。低级错误
特特法爷 · 2022-1-24 12:00正准备回复你,哪里出问题了
解决了就好了
您需要登录后才可以回帖 登录

本版积分规则