uniapp-使用心得

时间:2021-09-02 18:01:27

 

https://ext.dcloud.net.cn/publisher?id=78736

------------------------------------------------------------

项目配置

main.js

import sign from ./pages/home/sign.vue Vue.component(sign,sign)

pages.json

 {
    "path": "pages/home/sign",
    "style": {}
  },

 

【index】

<sign v-if="PageCur==‘sign‘"></sign>

 

<view class="action" @click="NavChange" data-cur="sign">
<view class=‘cuIcon-cu-image‘>
<image :src="‘/static/tabbar/basics‘ [PageCur==‘sign‘?‘_cur‘:‘‘] ‘.png‘"></image>
</view>
<view :class="PageCur==‘sign‘?‘text-green‘:‘text-gray‘">元素</view>
</view>

 

<template name="sign">
<view>
<cu-custom bgColor="bg-gradual-red" :isBack="true">
<!-- <block slot="backText">返回</block> -->
<block slot="content">图标</block>
</cu-custom>
sign
</view>
</template>

 

 

------------------------------------------------------------

1.