Skip to content

Commit

Permalink
fix: remove html field for TabBar (#978)
Browse files Browse the repository at this point in the history
* fix: remove `html` field for TabBar & TabHeader

* fix: preserve TabHeader html

* chore: add changelog

* chore: fix typo
  • Loading branch information
wjq990112 authored Feb 24, 2022
1 parent a60a201 commit 4622c33
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## Changelog

## 3.8.12

- Fix: remove `html` field for TabBar to avoid error in old PHA

## 3.8.11

- Fix: SPA title couldn't specified by route info
- Fix: store rerender types
- Fix: url error when build type is Weex
- Fix: ReDos of postcss

## 3.8.10

- Fix: manifest.json need includes the scripts which injected by API
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin-rax-pha/CHANELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.0.3

- Fix: remove `html` field for TabBar

## v2.0.2

- Fix: URL error when build type is Weex
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-rax-pha/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-plugin-rax-pha",
"version": "2.0.2",
"version": "2.0.3",
"description": "Rax PHA plugins",
"license": "BSD-3-Clause",
"main": "lib/index.js",
Expand All @@ -20,4 +20,4 @@
"devDependencies": {
"webpack": ">=4.0.0"
}
}
}
1 change: 0 additions & 1 deletion packages/plugin-rax-pha/src/__tests__/manifestHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ describe('setRealUrlToManifest', () => {
expect(manifest.pages[0].tab_header.html).toBeUndefined();

expect(manifest.tab_bar.url).toBe('https://abc.com/customtabbar');
expect(manifest.tab_bar.html).toBe('<html>123</html>');
});

it('should not add script and stylesheet to page', () => {
Expand Down
4 changes: 0 additions & 4 deletions packages/plugin-rax-pha/src/manifestHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,7 @@ function setRealUrlToManifest(options, manifest) {
}

if (tab_bar && tab_bar.source) {
const { document, custom } = applyMethod('rax.getDocument', { name: tab_bar.name, source: tab_bar.source }) || {};
if (!tab_bar.url) {
if (custom) {
tab_bar.html = document;
}
// TODO: iOS issue
// TODO: should remove it in PHA 2.x
// PHA 1.x should inject `url` to be a base url to load assets
Expand Down
4 changes: 2 additions & 2 deletions packages/rax-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rax-app",
"version": "3.8.11",
"version": "3.8.12",
"description": "command line interface and builtin plugin for rax app",
"author": "Rax Team",
"homepage": "https://github.com/alibaba/ice#readme",
Expand All @@ -21,7 +21,7 @@
"build-plugin-rax-app": "7.0.7",
"build-plugin-rax-kraken": "2.1.0",
"build-plugin-rax-miniapp": "2.0.0",
"build-plugin-rax-pha": "2.0.2",
"build-plugin-rax-pha": "2.0.3",
"build-plugin-rax-store": "2.0.1",
"build-plugin-rax-web": "2.0.7",
"build-plugin-rax-weex": "2.0.0",
Expand Down

0 comments on commit 4622c33

Please sign in to comment.