This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
70 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: public 目录 | ||
order: 30 | ||
--- | ||
|
||
在项目根目录下创建 public 目录,public 目录下的所有文件会被自动复制到 dist 目录下。 | ||
|
||
你可以将 `原生页面`, `tabBar 中配置的图片` 等等全局资源放在这个目录下。 | ||
|
||
例如,当你配置了 tabBar,并指定了 icon 路径: | ||
|
||
```js | ||
// app.config.js | ||
module.exports = { | ||
tabBar: { | ||
list: [ | ||
{ | ||
pagePath: 'pages/index/index', | ||
iconPath: '/images/icon.png', | ||
text: '首页', | ||
}, | ||
{ | ||
pagePath: 'pages/logs/logs', | ||
text: '日志', | ||
}, | ||
], | ||
}, | ||
}; | ||
``` | ||
|
||
则你需要将 icon.png 放入 `public/images` 目录下即可。 | ||
|
||
同样的你也可以在代码中直接指定全局静态资源: | ||
|
||
```js | ||
import { Image } from 'remax/wechat'; | ||
|
||
export default () => { | ||
return <Image src="/images/icon.png" />; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions
7
packages/remax-cli/src/__tests__/integration/fixtures/ali/remax.config.js
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+15.3 KB
packages/remax-cli/src/__tests__/integration/fixtures/one/expected/ali/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
packages/remax-cli/src/__tests__/integration/fixtures/one/expected/toutiao/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
packages/remax-cli/src/__tests__/integration/fixtures/one/expected/web/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
packages/remax-cli/src/__tests__/integration/fixtures/one/expected/wechat/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.5 KB
packages/remax-cli/src/__tests__/integration/fixtures/one/public/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0ed6caf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: