flufff
flufff
  • 发布:2019-10-17 16:29
  • 更新:2020-01-04 17:48
  • 阅读:5165

【报Bug】uniapp 使用 ts 开发,多端表现不一直

分类:uni-app

父组件代码

<template>  
    <view class="content">  
        <image class="logo" src="/static/logo.png"></image>  
        <view class="text-area">  
            <text class="title">{{ title }}</text>  
        </view>  
        <hello></hello>  
    </view>  
</template>  

<script lang="ts">  
import { Vue, Component } from 'vue-property-decorator';  

import Hello from './Hello';  

@Component({  
    name: 'Index',  
    components:{  
        Hello  
    }  
})  
export default class Index extends Vue {  
    title: string = '我是父组件';  
}  
</script>

子组件代码


    <view class="content">  
            <text class="title">--{{ title }}--</text>  
    </view>  
</template>  

<script lang="ts">  
import { Vue, Component } from 'vue-property-decorator';  

@Component({  
    name: 'Hello'  
})  
export default class Hello extends Vue {  
    title: string = '我是子组件';  
}  
</script>```  

app 模拟器结果  

微信小程序结果
真机结果
期望渲染结果一致 已装插件集合
目录
代码压缩包
2019-10-17 16:29 负责人:无 分享
已邀请:
jjy

jjy

我也是这个问题,这么个大BUG,居然没人管,我也是醉了。

长安漫飞雪

长安漫飞雪

你用js不就行了…

  • jjy

    项目大部分已经用ts开发了,h5版本也调好了,打包app出这问题,重构 成本谁来承担。

    2019-10-30 15:55

w***@163.com

w***@163.com

这个不是bug吧,组件需要在pages.json里面和page一样注册

该问题目前已经被锁定, 无法添加新回复