didi / mpx

Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架

Home Page:https://mpxjs.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report] 转钉钉小程序,自定义组件data 改变不会触发组件渲染

lubyxu opened this issue · comments

问题描述
请用简洁的语言描述你遇到的bug,至少包括以下部分,如提供截图请尽量完整:

  1. 问题触发的条件
    自定义组件 在 页面上被引用时

  2. 期望的表现
    组件内 data 改变,组件内会自动触发渲染

  3. 实际的表现
    第一次改变会触发组件渲染,后续改变均不会

环境信息描述
至少包含以下部分:

  1. 系统类型(Mac或者Windows)
    Mac

  2. Mpx依赖版本(@mpxjs/core、@mpxjs/webpack-plugin和@mpxjs/api-proxy的具体版本,可以通过package-lock.json或者实际去node_modules当中查看)
    "@mpxjs/api-proxy": "2.8.49",
    "@mpxjs/core": "2.8.48",
    "@mpxjs/webpack-plugin": "2.8.49",

  3. 小程序开发者工具信息(小程序平台、开发者工具版本、基础库版本)

image image

最简复现demo
demo:

// page 代码
<template>
  <orders />
</template>

<script>
  import mpx, { createPage } from '@mpxjs/core'
  createPage({
  })
</script>

<style lang="less">
</style>

<script type="application/json">
  {
    "usingComponents": {
      "orders": "./order"
    },
    "navigationBarBackgroundColor": "#ffffff",
    "navigationBarTextStyle": "black"
  }
</script>
// order 自定义组件代码
<template>
  <view bindtap="handleShowPopup">默认按钮1111 {{show}}</view>
</template>

<script>
  import { createComponent } from '@mpxjs/core'
  createComponent({
    data: {
      show: 0,
    },
    methods: {
      handleShowPopup() {
        this.show = this.show + 1;
      },
    },
  })
</script>
<script type="application/json">
  {
    "component": true,
    "usingComponents": {
    }
  }
</script>

看这边关闭issue了,是没问题了?

嗯。 vant-aliapp 这个不能用。。