forked from vueComponent/pro-components
-
Notifications
You must be signed in to change notification settings - Fork 0
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
15 changed files
with
251 additions
and
72 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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { defineComponent } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
|
||
export default defineComponent({ | ||
setup() { | ||
return () => <div>Form1</div>; | ||
const route = useRoute(); | ||
return () => ( | ||
<div> | ||
<h1>Form: {route.meta.title}</h1> | ||
<pre>{JSON.stringify(route.meta, null, 4)}</pre> | ||
</div> | ||
); | ||
}, | ||
}); |
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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { defineComponent } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
|
||
export default defineComponent({ | ||
setup() { | ||
return () => <div>Page1</div>; | ||
const route = useRoute(); | ||
return () => ( | ||
<div> | ||
<h1>Page: {route.meta.title}</h1> | ||
<pre>{JSON.stringify(route.meta, null, 4)}</pre> | ||
</div> | ||
); | ||
}, | ||
}); |
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 |
---|---|---|
@@ -1,7 +1,97 @@ | ||
import { defineComponent } from 'vue'; | ||
import { Button, Space, Select, Switch } from 'ant-design-vue'; | ||
import { globalState as state } from '../state'; | ||
|
||
export default defineComponent({ | ||
setup() { | ||
return () => <div>Welcome</div>; | ||
return () => ( | ||
<div> | ||
<div>Welcome</div> | ||
<Space> | ||
<Button | ||
onClick={() => { | ||
state.navTheme = state.navTheme === 'dark' ? 'light' : 'dark'; | ||
}} | ||
> | ||
Theme Switch | ||
</Button> | ||
<Select | ||
value={state.layout} | ||
onChange={val => { | ||
state.layout = val; | ||
}} | ||
style={{ width: '150px' }} | ||
> | ||
<Select.Option value="side">Side</Select.Option> | ||
<Select.Option value="top">Top</Select.Option> | ||
<Select.Option value="mix">Mix</Select.Option> | ||
</Select> | ||
<Switch | ||
checkedChildren="Fixed Header" | ||
unCheckedChildren="UnFixed Header" | ||
checked={state.fixedHeader} | ||
onChange={() => { | ||
state.fixedHeader = !state.fixedHeader; | ||
}} | ||
/> | ||
<Switch | ||
checkedChildren="Fixed SideBar" | ||
unCheckedChildren="UnFixed SideBar" | ||
checked={state.fixSiderbar} | ||
onChange={() => { | ||
state.fixSiderbar = !state.fixSiderbar; | ||
}} | ||
/> | ||
</Space> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
<p> | ||
<p>block</p> | ||
... | ||
<br /> | ||
long text.. | ||
</p> | ||
</div> | ||
); | ||
}, | ||
}); |
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,22 @@ | ||
import { reactive } from 'vue'; | ||
import { menus } from './menus'; | ||
import { RouteContextProps } from '../src/RouteContext'; | ||
|
||
export const globalState = reactive<RouteContextProps>({ | ||
collapsed: false, | ||
openKeys: ['/dashboard'], | ||
selectedKeys: ['/welcome'], | ||
|
||
layout: 'mix', | ||
navTheme: 'dark', | ||
isMobile: false, | ||
fixSiderbar: false, | ||
fixedHeader: false, | ||
menuData: menus, | ||
sideWidth: 208, | ||
splitMenus: true, | ||
hasSideMenu: true, | ||
hasHeader: true, | ||
hasFooterToolbar: false, | ||
setHasFooterToolbar: (has: boolean) => (globalState.hasFooterToolbar = has), | ||
}); |
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
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
Oops, something went wrong.