mirror of https://github.com/sunface/rust-course
parent
594f806d59
commit
891462a346
@ -1,4 +1,5 @@
|
||||
const enUS = {
|
||||
import {localeData} from './index'
|
||||
const enUS:localeData = {
|
||||
home: 'Home',
|
||||
dashboard: 'Dashboard',
|
||||
chart: 'Chart',
|
@ -1,8 +0,0 @@
|
||||
|
||||
import zhCN from '@library/locale/zh_CN' // 中文
|
||||
import enUS from '@library/locale/en_US' // 英文
|
||||
|
||||
export default {
|
||||
'en': enUS,
|
||||
'zh': zhCN
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
|
||||
import zhCN from './zh_CN' // 中文
|
||||
import enUS from './en_US' // 英文
|
||||
|
||||
export type localeData = {
|
||||
[key:string]:string
|
||||
}
|
||||
|
||||
type localeAll = {
|
||||
[key:string]:localeData
|
||||
}
|
||||
|
||||
const localeAllData:localeAll = {
|
||||
'en': enUS,
|
||||
'zh': zhCN
|
||||
}
|
||||
export default localeAllData
|
@ -1,4 +1,5 @@
|
||||
const zhCN = {
|
||||
import {localeData} from './index'
|
||||
const zhCN:localeData = {
|
||||
home: '主页',
|
||||
dashboard: '仪表盘',
|
||||
chart: '图表',
|
@ -1,10 +1,17 @@
|
||||
import React from 'react'
|
||||
import Element from '@library/routes/modules/Element'
|
||||
import Element from '../routes/modules/Element'
|
||||
|
||||
const Dashboard = React.lazy(() => import('@pages/Index/Dashboard'))
|
||||
const Charts = React.lazy(() => import('@pages/Index/Charts'))
|
||||
const Dashboard = React.lazy(() => import('../../pages/Index/Dashboard'))
|
||||
const Charts = React.lazy(() => import('../../pages/Index/Charts'))
|
||||
|
||||
const Routers = [
|
||||
export type Router = {
|
||||
path: string,
|
||||
title: string,
|
||||
icon: string,
|
||||
component?: any,
|
||||
children?:any
|
||||
}
|
||||
const Routers:Router[] = [
|
||||
{
|
||||
path: '/home/dashboard',
|
||||
title: 'dashboard',
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
const A = React.lazy(() => import('@pages/Index/Demo/A'))
|
||||
const B = React.lazy(() => import('@pages/Index/Demo/B'))
|
||||
const A = React.lazy(() => import('../../../pages/Index/Demo/A'))
|
||||
const B = React.lazy(() => import('../../../pages/Index/Demo/B'))
|
||||
|
||||
const Demo = [
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
const Accordion = React.lazy(() => import('@pages/Index/Elements/Accordion'))
|
||||
const Paginations = React.lazy(() => import('@pages/Index/Elements/Paginations'))
|
||||
const DatePickers = React.lazy(() => import('@pages/Index/Elements/DatePickers'))
|
||||
const Icons = React.lazy(() => import('@pages/Index/Elements/Icons'))
|
||||
const Accordion = React.lazy(() => import('../../../pages/Index/Elements/Accordion'))
|
||||
const Paginations = React.lazy(() => import('../../../pages/Index/Elements/Paginations'))
|
||||
const DatePickers = React.lazy(() => import('../../../pages/Index/Elements/DatePickers'))
|
||||
const Icons = React.lazy(() => import('../../../pages/Index/Elements/Icons'))
|
||||
|
||||
const Demo = [
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
let adminKey = 'admin-'
|
||||
const storage = {
|
||||
set(key, value){
|
||||
set(key:string, value:any){
|
||||
localStorage.setItem(adminKey+key, JSON.stringify(value))
|
||||
},
|
||||
get(key){
|
||||
return JSON.parse(localStorage.getItem(adminKey+key))
|
||||
get(key:string){
|
||||
return JSON.parse(localStorage.getItem(adminKey+key)!)
|
||||
},
|
||||
remove(key){
|
||||
remove(key:string){
|
||||
localStorage.removeItem(adminKey+key)
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import {Light, Dark} from '@styles/theme'
|
||||
import {Light, Dark} from '../../styles/theme'
|
||||
|
||||
export function modifyVars(model, primary){
|
||||
export function modifyVars(model:boolean, primary:string){
|
||||
//window.less.modifyVars(vars)
|
||||
if(model){
|
||||
window.less.modifyVars(Dark(primary))
|
@ -1 +1,6 @@
|
||||
declare module '*.less'
|
||||
|
||||
|
||||
declare interface Window {
|
||||
less: any;
|
||||
}
|
||||
|
Loading…
Reference in new issue