Comments (2)
Hi @Ziyu-Chen
I almost understand your questions. I think there are 2 separate issues.
-
When and how does GojiJS support custom-tab-bar ?
-
How to implement the same feature in current GojiJS framework.
At first, GojiJS doesn't custom-tab-bar
for now. There are several problems to be decided before we move it into next steps.
-
This feature is not a common solution that only WeChat and QQ support. Supporting this feature might reduced the cross-platform capabilities.
-
How to support
getTabBar
API.
And then, I think you can try these ways to implement the same feature which support not only WeChat/QQ but also other platforms.
- Use
position: fixed
to render custom tab bar on each pages and usewx.redirectTo
to switch between them.
// pages/a.tsx
render(
<>
<PageA />
<CustomTabBar />
</>
);
- Treat all tab bar pages rather than the whole Mini Program as a single page application. Switching between tabs actually is internal state changes.
// pages/index.tsx
render(
<>
{selected === 'a' && <PageA />}
{selected === 'b' && <PageB />}
...
<CustomTabBar />
</>
);
from goji-js.
@malash Thank you for your answer! I'll give it a shot.
from goji-js.
Related Issues (20)
- 'create-goji-app' cannot create an app HOT 1
- The default tsconfig.json file is missing from the template project HOT 1
- Adding gitignore file HOT 1
- Cannot use <include> in <template> on Alipay HOT 4
- Some `calc` CSS usages fails on Toutiao HOT 1
- Toutiao has a bug of support `rpx` with `!important` HOT 1
- Temporary bugfix for getStorage issue on WeChat SDK 2.24.0 HOT 1
- Goji cli not building for alipay HOT 1
- [Analysis] Mini Program XML platform differences
- Cannot use React Package react-use-cart HOT 7
- Value changes to`undefined` doesn't work on Baidu template HOT 1
- Recursive `<include>` and `<template>` fails to render if an outside `<include>` existed on Baidu HOT 1
- Missing `e.target.dataset` in event handler when crossing custom component
- `<movable-view>` inside `<movable-area>` doesn't work on Baidu
- Case-sensitivity problem on `event.timeStamp` on WeChat and QQ HOT 1
- [Proposal] Support click outside event
- Add document of component event and `e.stopPropagation`
- Research rspack for better bundling performance
- `<template>` renders to a real DOM element that cause some CSS layout fails on Baidu
- Upgrade Linaria to version 5 and investigate `@linaria/atomic`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goji-js.