帖子
帖子
用户
博客
课程
显示全部楼层
41
帖子
1
勋章
227
Y币

[云开发] 用了个组件,在android可用,小程序里没出结果

[复制链接]
发表于 2022-7-14 15:16:15
<template>
    <view class="nav-container">
        <status-bar-view></status-bar-view>
        <view class="nav-header">
            <view class="nav-header-button nav-left-button" onclick={this.props.onLeftButton ? this.props.onLeftButton : this.onLeftButton}>
                <image width={this.props.leftButtonWidth ? this.props.leftButtonWidth : 11} src={this.props.leftButtonIcon ? this.props.leftButtonIcon : '../../image/act/back.png'} mode="widthFix"></image>
                <text class="nav-header-text">{this.props.leftButtonText}</text>
            </view>
            <text class="nav-header-title">{this.props.title}</text>
            <view class="nav-header-button nav-right-button" onclick={this.props.onRightButton}>
                <image width={this.props.rightButtonWidth ? this.props.rightButtonWidth : 0} src={this.props.rightButtonIcon ? this.props.rightButtonIcon : ''} mode="widthFix"></image>
                <text class="nav-header-text">{this.props.rightButtonText}</text>
            </view>
        </view>
    </view>
</template>
<script>
import './status-bar-view.stml';
export default {
    name: 'navigationBar',
    methods: {
        onLeftButton(e){
            api.closeWin();
        }
    }
}
</script>






-----------------------------下面调用---------------------------


<view class="main-cart-main-cart">
<navigationBar title="测试" leftButtonWidth="0px"></navigationBar>


        <view class="main-cart-empty" >

                <text class="main-cart-btn-text">暂无记录</text>

        </view>

    </view>


安卓第一行会显示 测试 ,但小程序没结果




这边反馈给开发看下
组件命名和接收参数都不要大写
您需要登录后才可以回帖 登录

本版积分规则