当前位置:首页 > 移动开发 > 正文

uniapp-使用心得

2024-03-31 移动开发

 

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.

 

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/yidong/11224.html