Skip to content

Commit

Permalink
Merge pull request lugia-ysstech#7 from SleepyAries/uploadRouter
Browse files Browse the repository at this point in the history
Upload router
  • Loading branch information
zenjava authored Aug 8, 2019
2 parents e1779d7 + 2c8103d commit e26c733
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 211 deletions.
6 changes: 0 additions & 6 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,4 @@
<div id="root"></div>

</body>
<style>
html,body{
font-size: 10px !important;
}
</style>

</html>
2 changes: 1 addition & 1 deletion src/common/PageNavHoC.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (objRouter: Object, Target: any) => {
return class Pages extends React.Component<any, any> {

static getDerivedStateFromProps (defProps: DefProps, stateProps: StateProps) {
const path = window.location.pathname;
const path = window.location.hash.match(/[^#]+/g)[0];
if (!stateProps) {
return {
path,
Expand Down
4 changes: 2 additions & 2 deletions src/design/page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const TemlpateNav = PageNavHoC({}, Temlpate);
export default class Pages extends React.Component<any, any> {

static getDerivedStateFromProps (defProps: DefProps, stateProps: StateProps) {
const path = window.location.pathname;
const pathType = path.match(/[^/]+/g)[ 1 ];
const path = window.location.hash;
const pathType = path.match(/[^/]+/g)[2];
if (!stateProps) {
return {
pathType,
Expand Down
1 change: 0 additions & 1 deletion src/design/template/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ const getContentElement = (data:Object,titleElement,imgPosition:string,level?:Bo
{data.map(item => {
const {text,size,color,margin,weight,url,bash,javascript, inline,link,renderHtml} = item;
const reg = /<a.*?>(.*?)<\/a>/g;
console.log('------------',item,link);
return <React.Fragment>
<Content inline={inline} size={size} color={color} bash={bash} margin={margin} weight={weight} level={level}>
{javascript?<Highlight className="language-jsx" innerHTML={renderHtml}>
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { createBrowserHistory } from 'history';
import { createHashHistory } from 'history';
import { createApp, go, render } from '@lugia/lugiax-router';
import '@lugia/lugia-web/dist/css/global.css';
import Main from './App';
import 'highlight.js/styles/atom-one-light.css';
import PageLoading from './pageloading';
import Highlight from 'react-highlight';
const history = createBrowserHistory();
const history = createHashHistory();
const App = createApp(
{
'/': {
Expand Down
8 changes: 4 additions & 4 deletions src/mega/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ export default class Mega extends React.Component {
<React.Fragment>
<Wrapper>
<Row>
<Col span={5} xl={{ span: 4 }} xxl={{ span: 3 }}>
<Col span={5} xl={{ span: 1 }} xxl={{ span: 3 }}>
<Block> </Block>
</Col>
<Col span={14} xl={{ span: 16 }} xxl={{ span: 18 }}>
<Col span={14} xl={{ span: 22 }} xxl={{ span: 18 }}>
<Headers />
<Main>
<Tittle5>欢迎使用 Lugia Mega</Tittle5>
Expand Down Expand Up @@ -270,7 +270,7 @@ export default class Mega extends React.Component {
<Tittle2>
重塑项目开发流程,不同职位的产出成果可以直接迭代复用,从而满足云原生大前端的快速迭代开发需求。
</Tittle2>
<Img src={jobPipe} alt="" />
<Img src={jobPipe} alt="" width={486} />

<Tittle4>愿景</Tittle4>
<Tittle2>
Expand Down Expand Up @@ -320,7 +320,7 @@ export default class Mega extends React.Component {
</FlexBox>
</MidBlock>
</Col>
<Col span={5} xl={{ span: 4 }} xxl={{ span: 3 }}>
<Col span={5} xl={{ span: 1 }} xxl={{ span: 3 }}>
<Block> </Block>
</Col>
</Row>
Expand Down
190 changes: 0 additions & 190 deletions src/mega/indexOLD.js

This file was deleted.

Binary file modified src/mega/jobPipe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/menu/component/menulist.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ function getScrollTop(): number {
export default class MenuList extends React.Component<any, any> {

static getDerivedStateFromProps(defProps: DefProps, stateProps: StateProps) {
const path = window.location.pathname;
const pathFilter = path.match(/[^/]+/g);
const path = window.location.hash;
const pathFilter = path.match(/[^#]+/g)[0].match(/[^/]+/g);
const pathType = pathFilter[0]==='design'?'designConfig':'menuConfig';
const defaultUrl = Router[pathType][0].children?Router[pathType][0].children[0].value:Router[pathType][0].value;
const defCurrent = pathFilter.length>1 ?path:defaultUrl;
const defCurrent = pathFilter.length>1 ?'/'+pathFilter.join('/'):defaultUrl;
if (!stateProps) {
return {
current:defCurrent,
Expand Down Expand Up @@ -157,7 +157,7 @@ export default class MenuList extends React.Component<any, any> {
{
<Navmenu
autoHeight={false}
theme={config}
theme={config}
inlineType={'ellipse'}
mode={'inline'}
data={getMenuItems(Router[routerType])}
Expand Down
2 changes: 1 addition & 1 deletion src/nav/component/navcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class Navcomponent extends React.Component<any, any> {

static getDerivedStateFromProps(defProps: DefProps, stateProps: StateProps) {

const path = '/'+window.location.pathname.match(/[^/]+/)[0];
const path = '/'+window.location.hash.match(/[^(#|\/)]+/)[0];
if (!stateProps) {
return {
current:path,
Expand Down

0 comments on commit e26c733

Please sign in to comment.