├── src ├── pages │ ├── api │ │ ├── alert │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── clipboard │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── device │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── navigate │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── request │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── toast │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── asyncstorage │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── chooseimage │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── setNativeProps │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── animation │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── transition │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── getElementById │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── env │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── confirm │ │ │ ├── index.css │ │ │ └── index.js │ │ └── appstate │ │ │ ├── index.css │ │ │ └── index.js │ ├── component │ │ ├── icon │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── embed │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── countdown │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── video │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── image │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── picture │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── view │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── text │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── link │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── waterfall │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── textinput │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── modal │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── slider │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── scrollview │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── refreshcontrol │ │ │ ├── index.css │ │ │ └── index.js │ │ ├── recyclerview │ │ │ ├── index.css │ │ │ └── index.js │ │ └── canvas │ │ │ └── index.js │ ├── index-api │ │ └── index.js │ └── index │ │ └── index.js ├── components │ ├── SectionOper │ │ ├── index.css │ │ └── index.js │ ├── SectionContainer │ │ └── index.js │ ├── Container │ │ ├── index.css │ │ └── index.js │ ├── SectionOperText │ │ └── index.js │ ├── SectionTextItem │ │ └── index.js │ ├── SectionTitle │ │ └── index.js │ ├── SectionItem │ │ └── index.js │ ├── Section │ │ └── index.js │ ├── DescHeader │ │ ├── index.css │ │ └── index.js │ ├── Navigator │ │ ├── index.css │ │ └── index.js │ ├── TabBar │ │ ├── index.css │ │ └── index.js │ └── Home │ │ ├── index.js │ │ ├── components │ │ └── MenuList.js │ │ └── index.css ├── constants.js ├── assets │ ├── img │ │ ├── api.png │ │ ├── net.png │ │ ├── back.png │ │ ├── basics.png │ │ ├── home.png │ │ ├── media.png │ │ ├── system.png │ │ ├── user.png │ │ ├── feedback.png │ │ ├── function.png │ │ ├── navigate.png │ │ ├── storage.png │ │ ├── animation.png │ │ ├── api_active.png │ │ ├── api_tabbar.png │ │ ├── back_home.png │ │ ├── component.png │ │ ├── container.png │ │ ├── extension.png │ │ ├── monitoring.png │ │ ├── component_active.png │ │ ├── component_tabbar.png │ │ ├── api_active_tabbar.png │ │ └── component_active_tabbar.png │ └── css │ │ └── common.css ├── app.js ├── config │ ├── platform.js │ ├── component.js │ └── api.js ├── utils │ └── inMiniApp.js ├── document │ └── index.jsx └── app.json ├── .gitignore ├── README.md ├── LICENSE └── package.json /src/pages/api/alert/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/clipboard/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/device/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/navigate/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/request/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/toast/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/asyncstorage/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/chooseimage/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/api/setNativeProps/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/SectionOper/index.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: contents; 3 | } -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- 1 | export const API = 'api'; 2 | export const COMPONENT = 'component'; 3 | -------------------------------------------------------------------------------- /src/assets/img/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/api.png -------------------------------------------------------------------------------- /src/assets/img/net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/net.png -------------------------------------------------------------------------------- /src/assets/img/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/back.png -------------------------------------------------------------------------------- /src/assets/img/basics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/basics.png -------------------------------------------------------------------------------- /src/assets/img/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/home.png -------------------------------------------------------------------------------- /src/assets/img/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/media.png -------------------------------------------------------------------------------- /src/assets/img/system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/system.png -------------------------------------------------------------------------------- /src/assets/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/user.png -------------------------------------------------------------------------------- /src/assets/img/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/feedback.png -------------------------------------------------------------------------------- /src/assets/img/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/function.png -------------------------------------------------------------------------------- /src/assets/img/navigate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/navigate.png -------------------------------------------------------------------------------- /src/assets/img/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/storage.png -------------------------------------------------------------------------------- /src/pages/component/icon/index.css: -------------------------------------------------------------------------------- 1 | .box { 2 | padding: 20rpx; 3 | justify-content: center; 4 | } -------------------------------------------------------------------------------- /src/assets/img/animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/animation.png -------------------------------------------------------------------------------- /src/assets/img/api_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/api_active.png -------------------------------------------------------------------------------- /src/assets/img/api_tabbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/api_tabbar.png -------------------------------------------------------------------------------- /src/assets/img/back_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/back_home.png -------------------------------------------------------------------------------- /src/assets/img/component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/component.png -------------------------------------------------------------------------------- /src/assets/img/container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/container.png -------------------------------------------------------------------------------- /src/assets/img/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/extension.png -------------------------------------------------------------------------------- /src/assets/img/monitoring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/monitoring.png -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import { runApp } from 'rax-app'; 2 | import appConfig from './app.json'; 3 | 4 | runApp(appConfig); 5 | -------------------------------------------------------------------------------- /src/assets/img/component_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/component_active.png -------------------------------------------------------------------------------- /src/assets/img/component_tabbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/component_tabbar.png -------------------------------------------------------------------------------- /src/assets/img/api_active_tabbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/api_active_tabbar.png -------------------------------------------------------------------------------- /src/assets/img/component_active_tabbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raxjs/go-rax/HEAD/src/assets/img/component_active_tabbar.png -------------------------------------------------------------------------------- /src/pages/component/embed/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | flex-direction: row; 3 | cursor: pointer; 4 | padding: 20rpx; 5 | } 6 | -------------------------------------------------------------------------------- /src/config/platform.js: -------------------------------------------------------------------------------- 1 | export const WEB = 'Web'; 2 | export const WEEX = 'Weex'; 3 | export const ALI_MINI_APP = 'miniapp'; 4 | export const WECHAT = 'WECHAT'; 5 | -------------------------------------------------------------------------------- /src/pages/component/countdown/index.css: -------------------------------------------------------------------------------- 1 | .root { 2 | width: 680rpx; 3 | } 4 | 5 | .container { 6 | border: 2rpx solid #dddddd; 7 | padding: 20rpx; 8 | margin: 20rpx; 9 | } -------------------------------------------------------------------------------- /src/utils/inMiniApp.js: -------------------------------------------------------------------------------- 1 | import { isMiniApp, isWeChatMiniProgram } from 'universal-env'; 2 | 3 | const inMiniApp = isMiniApp || isWeChatMiniProgram; 4 | export default inMiniApp; 5 | -------------------------------------------------------------------------------- /src/pages/api/animation/index.css: -------------------------------------------------------------------------------- 1 | .animationWrap { 2 | padding: 20rpx; 3 | } 4 | 5 | .animationDemo { 6 | background-color: #49a9ee; 7 | width: 200rpx; 8 | height: 200rpx; 9 | } -------------------------------------------------------------------------------- /src/pages/api/transition/index.css: -------------------------------------------------------------------------------- 1 | .animationWrap { 2 | padding: 20rpx; 3 | } 4 | 5 | .animationDemo { 6 | background-color: #49a9ee; 7 | width: 200rpx; 8 | height: 200rpx; 9 | } -------------------------------------------------------------------------------- /src/pages/component/video/index.css: -------------------------------------------------------------------------------- 1 | 2 | .section { 3 | background-color: #ffffff; 4 | margin: 32rpx; 5 | font-size: 32rpx; 6 | } 7 | 8 | .button { 9 | color: #1890ff; 10 | cursor: pointer; 11 | } -------------------------------------------------------------------------------- /src/pages/component/image/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | } 4 | .base { 5 | width: 100rpx; 6 | height: 100rpx; 7 | } 8 | 9 | .gif { 10 | height: 200rpx; 11 | width: 350rpx; 12 | } 13 | -------------------------------------------------------------------------------- /src/pages/component/picture/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | } 4 | .base { 5 | width: 100rpx; 6 | height: 100rpx; 7 | } 8 | 9 | .gif { 10 | height: 200rpx; 11 | width: 350rpx; 12 | } 13 | -------------------------------------------------------------------------------- /src/components/SectionContainer/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | 3 | import View from 'rax-view'; 4 | 5 | export default function SectionContainer({ children }) { 6 | return {children}; 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/component/view/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | flex-direction: row; 3 | cursor: pointer; 4 | padding: 20rpx; 5 | } 6 | 7 | .box { 8 | width: 200rpx; 9 | height: 300rpx; 10 | } 11 | 12 | .columnLayout { 13 | flex-direction: column; 14 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | *~ 4 | *.swp 5 | *.log 6 | 7 | .DS_Store 8 | .idea/ 9 | .temp/ 10 | 11 | build/ 12 | dist/ 13 | lib/ 14 | coverage/ 15 | node_modules/ 16 | 17 | template.yml 18 | -------------------------------------------------------------------------------- /src/pages/api/getElementById/index.css: -------------------------------------------------------------------------------- 1 | .defaultInput { 2 | height: 60rpx; 3 | color: #000000a6; 4 | background-color: #fff; 5 | background-image: none; 6 | border: 2rpx solid #d9d9d9; 7 | border-radius: 4; 8 | transition: all .3s; 9 | margin: 20rpx; 10 | } -------------------------------------------------------------------------------- /src/pages/component/text/index.css: -------------------------------------------------------------------------------- 1 | 2 | .container { 3 | padding: 20rpx; 4 | } 5 | 6 | .textBlock { 7 | font-weight: '500'; 8 | color: 'blue'; 9 | } 10 | 11 | .logBox { 12 | padding: 20rpx; 13 | margin: 10rpx; 14 | border-width: 2rpx; 15 | border-color: '#f0f0f0'; 16 | background-color: '#f9f9f9'; 17 | } 18 | -------------------------------------------------------------------------------- /src/pages/component/link/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | justify-content: center; 3 | align-items: center; 4 | padding: 20rpx 0; 5 | } 6 | 7 | .link { 8 | color: #1890ff; 9 | text-decoration: none; 10 | } 11 | 12 | .box { 13 | margin: 20rpx; 14 | padding: 20rpx; 15 | border: 2rpx solid #dddddd; 16 | border-radius: 6rpx; 17 | } 18 | -------------------------------------------------------------------------------- /src/components/Container/index.css: -------------------------------------------------------------------------------- 1 | .app { 2 | flex: 1; 3 | background-color: #ffffff; 4 | overflow: auto; 5 | } 6 | 7 | .descBox { 8 | padding: 36rpx; 9 | background-color: #ffb006; 10 | } 11 | 12 | .moduleTitle { 13 | font-size: 36rpx; 14 | color: #ffffff; 15 | } 16 | 17 | .desc { 18 | font-size: 24rpx; 19 | color: #ffffff; 20 | } 21 | -------------------------------------------------------------------------------- /src/pages/component/waterfall/index.css: -------------------------------------------------------------------------------- 1 | .app { 2 | flex: 1; 3 | background-color: #ffffff; 4 | overflow: auto; 5 | } 6 | 7 | .descBox { 8 | padding: 36rpx; 9 | background-color: #3399FF; 10 | } 11 | 12 | .moduleTitle { 13 | font-size: 36rpx; 14 | color: #ffffff; 15 | } 16 | 17 | .desc { 18 | font-size: 24rpx; 19 | color: #ffffff; 20 | } 21 | -------------------------------------------------------------------------------- /src/components/SectionOperText/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | import Text from 'rax-text'; 3 | 4 | export default function SectionOperText({ children }) { 5 | const operTestStyle = { 6 | fontSize: '30rpx', 7 | color: '#ffb006', 8 | }; 9 | return ( 10 | {children} 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /src/components/SectionTextItem/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | 3 | import Text from 'rax-text'; 4 | 5 | export default function SectionTextItem({ children }) { 6 | const testItemStyle = { 7 | padding: '20rpx', 8 | }; 9 | return ( 10 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/components/SectionTitle/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | 3 | import Text from 'rax-text'; 4 | 5 | export default function SectionTitle({ children }) { 6 | const titleStyle = { 7 | color: '#1D2C41', 8 | backgroundColor: '#F2F3F4', 9 | padding: '20rpx', 10 | width: '750rpx', 11 | display: 'flex' 12 | }; 13 | return ( 14 | 17 | {children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/SectionItem/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | 3 | import View from 'rax-view'; 4 | 5 | export default function SectionItem({ children }) { 6 | return ( 7 | 17 | {children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/pages/component/textinput/index.css: -------------------------------------------------------------------------------- 1 | 2 | .container { 3 | margin: 20rpx; 4 | } 5 | .default { 6 | height: 60rpx; 7 | color: #000000a6; 8 | background-color: #fff; 9 | background-image: none; 10 | border: 2rpx solid #d9d9d9; 11 | border-radius: 4rpx; 12 | transition: all .3s; 13 | } 14 | 15 | .multiline { 16 | height: 150rpx; 17 | } 18 | 19 | .eventLabel { 20 | margin: 3rpx; 21 | font-size: 24rpx; 22 | } 23 | .hashtag { 24 | color: "#1890ff"; 25 | margin: 10rpx; 26 | font-weight: "bold"; 27 | } -------------------------------------------------------------------------------- /src/pages/component/modal/index.css: -------------------------------------------------------------------------------- 1 | .operItem { 2 | margin: 20rpx 0; 3 | padding: 20rpx; 4 | background-color: #ffffff; 5 | color: #49a9ee; 6 | cursor: pointer; 7 | } 8 | 9 | .modal { 10 | background-color: #ffffff; 11 | position: absolute; 12 | top: 300rpx; 13 | width: 400rpx; 14 | height: 480rpx; 15 | left: 175rpx; 16 | } 17 | 18 | .img { 19 | width: 400rpx; 20 | height: 400rpx; 21 | flex-shrink: 0; 22 | } 23 | 24 | .close { 25 | border: 2rpx solid #dddddd; 26 | height: 80rpx; 27 | justify-content: center; 28 | align-items: center; 29 | cursor: pointer; 30 | } -------------------------------------------------------------------------------- /src/components/Section/index.js: -------------------------------------------------------------------------------- 1 | import { createElement, useState } from 'rax'; 2 | import View from 'rax-view'; 3 | import SectionTitle from '../SectionTitle'; 4 | 5 | export default function Section({ children, title }) { 6 | const [titleBoxStyle, setTitleBoxStyle] = useState({ 7 | backgroundColor: '#ffffff', 8 | fontSize: '32rpx', 9 | position: 'relative', 10 | borderBottom: '2rpx solid #dddddd', 11 | }); 12 | return ( 13 | 16 | {title} 17 | {children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/document/index.jsx: -------------------------------------------------------------------------------- 1 | import { createElement } from 'rax'; 2 | import { Root, Style, Script } from 'rax-document'; 3 | 4 | function Document() { 5 | return ( 6 | 7 | 8 | 9 | 10 | universal-app 11 |