この記事の内容は、WeChat アプレットの下部ナビゲーション バーの実装コードに関するものです。必要な方は参考にしていただければ幸いです。
下部ナビゲーションバーを実装するにはどうすればよいですか?つまり、下部のナビゲーションをクリックすると、対応するさまざまなページが切り替わります。
まず、実装したい下部ナビゲーション バーのレンダリングを見てみましょう: (3 つのナビゲーション アイコンの例、WeChat アプレットは最大 5 つまで追加できます)"tabBar": { "color": "#a9b7b7", "selectedColor": "#11cd6e", "borderStyle": "white", "list": [ { "selectedIconPath": "images/1.png", "iconPath": "images/2.png", "pagePath": "pages/index/index", "text": "首页" }, { "selectedIconPath": "images/1.png", "iconPath": "images/2.png", "pagePath": "pages/logs/logs", "text": "日志" }, { "selectedIconPath": "images/1.png", "iconPath": "images/2.png", "pagePath": "pages/test/test", "text": "测试" } ] }
。参考ドキュメント:
https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html#tabBar
=== ===========
付録: 完全なコード (無視できる程度)
{ "pages":[ "pages/index/index", "pages/category/category", "pages/topic/topic", "pages/user/user", "pages/logs/logs" ], "window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#000", "navigationBarTitleText": "WeiCMS", "navigationBarTextStyle":"white" }, "tabBar": { "color": "#8c8c8c", "selectedColor": "#f4645f", "backgroundColor": "white", "list": [{ "pagePath": "pages/index/index", "text": "首页", "iconPath":"images/48.png", "selectedIconPath":"images/48.png" }, { "pagePath": "pages/category/category", "text": "分类", "iconPath":"images/48.png", "selectedIconPath":"images/48.png" }, { "pagePath": "pages/topic/topic", "text": "话题", "iconPath":"images/48.png", "selectedIconPath":"images/48.png" }, { "pagePath": "pages/user/user", "text": "我的", "iconPath":"images/48.png", "selectedIconPath":"images/48.png" } ], "position": "bottom" } }関連推奨事項:
WeChat アプレット開発における下部ナビゲーション バーのタブバーの使用例
WeChatミニプログラムの下部ナビゲーション列の開発(コード付き)
以上がWeChat アプレットの下部ナビゲーション バーの実装コードの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

SAP NetWeaver Server Adapter for Eclipse
Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

WebStorm Mac版
便利なJavaScript開発ツール
