|
@@ -1,4 +1,5 @@
|
|
import React, { Component } from "react";
|
|
import React, { Component } from "react";
|
|
|
|
+import eventBus from '../../bus';
|
|
import "./index.css";
|
|
import "./index.css";
|
|
import {
|
|
import {
|
|
makeStyles,
|
|
makeStyles,
|
|
@@ -80,69 +81,69 @@ const ThemeData = [
|
|
{
|
|
{
|
|
"name": "青色",
|
|
"name": "青色",
|
|
"icon": 青色图标,
|
|
"icon": 青色图标,
|
|
- "config":青色
|
|
|
|
|
|
+ "config": 青色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "蓝色",
|
|
"name": "蓝色",
|
|
"icon": 蓝色图标,
|
|
"icon": 蓝色图标,
|
|
- "config":蓝色
|
|
|
|
|
|
+ "config": 蓝色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "橙色",
|
|
"name": "橙色",
|
|
"icon": 橙色图标,
|
|
"icon": 橙色图标,
|
|
- "config":橙色
|
|
|
|
|
|
+ "config": 橙色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "红色",
|
|
"name": "红色",
|
|
"icon": 红色图标,
|
|
"icon": 红色图标,
|
|
- "config":红色
|
|
|
|
|
|
+ "config": 红色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "紫色",
|
|
"name": "紫色",
|
|
"icon": 紫色图标,
|
|
"icon": 紫色图标,
|
|
- "config":紫色
|
|
|
|
|
|
+ "config": 紫色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "绿色",
|
|
"name": "绿色",
|
|
"icon": 绿色图标,
|
|
"icon": 绿色图标,
|
|
- "config":绿色
|
|
|
|
|
|
+ "config": 绿色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "灰色",
|
|
"name": "灰色",
|
|
"icon": 灰色图标,
|
|
"icon": 灰色图标,
|
|
- "config":灰色
|
|
|
|
|
|
+ "config": 灰色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "长春花色",
|
|
"name": "长春花色",
|
|
"icon": 长春花色图标,
|
|
"icon": 长春花色图标,
|
|
- "config":长春花色
|
|
|
|
|
|
+ "config": 长春花色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "黑色",
|
|
"name": "黑色",
|
|
"icon": 黑色图标,
|
|
"icon": 黑色图标,
|
|
- "config":黑色
|
|
|
|
|
|
+ "config": 黑色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "天蓝色",
|
|
"name": "天蓝色",
|
|
"icon": 天蓝色图标,
|
|
"icon": 天蓝色图标,
|
|
- "config":天蓝色
|
|
|
|
|
|
+ "config": 天蓝色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "钴蓝色",
|
|
"name": "钴蓝色",
|
|
"icon": 钴蓝色图标,
|
|
"icon": 钴蓝色图标,
|
|
- "config":钴蓝色
|
|
|
|
|
|
+ "config": 钴蓝色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "深黄色",
|
|
"name": "深黄色",
|
|
"icon": 深黄色图标,
|
|
"icon": 深黄色图标,
|
|
- "config":深黄色
|
|
|
|
|
|
+ "config": 深黄色
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"name": "深蓝色",
|
|
"name": "深蓝色",
|
|
"icon": 深蓝色图标,
|
|
"icon": 深蓝色图标,
|
|
- "config":深蓝色
|
|
|
|
|
|
+ "config": 深蓝色
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
]
|
|
]
|
|
const useExampleStyles = makeStyles({
|
|
const useExampleStyles = makeStyles({
|
|
popoverSurface: {
|
|
popoverSurface: {
|
|
@@ -187,12 +188,12 @@ const appDatas = [
|
|
{ title: "更多", img: gd },
|
|
{ title: "更多", img: gd },
|
|
]
|
|
]
|
|
|
|
|
|
-const App = (data)=>{
|
|
|
|
|
|
+const App = (data) => {
|
|
return (
|
|
return (
|
|
<div className="zl-365-article">
|
|
<div className="zl-365-article">
|
|
<button
|
|
<button
|
|
title={data.title}
|
|
title={data.title}
|
|
- aria-label={data.title+" 将在新选项卡中打开"}
|
|
|
|
|
|
+ aria-label={data.title + " 将在新选项卡中打开"}
|
|
>
|
|
>
|
|
<div style={{ width: "100%" }}>
|
|
<div style={{ width: "100%" }}>
|
|
<img
|
|
<img
|
|
@@ -215,19 +216,19 @@ const App = (data)=>{
|
|
|
|
|
|
|
|
|
|
const docList = [
|
|
const docList = [
|
|
- { title: "文档", img1: wd1,img2:wd2,width: "32px", height: "48px" },
|
|
|
|
- { title:"工作簿",img1:gzp1,img2:gzp2,width: "55.8px", height: "44px"},
|
|
|
|
- { title:"演示文稿",img1:yswd1,img2:yswd2,width: "66.6px", height: "44px"},
|
|
|
|
- { title:"调查",img1:dc1,img2:dc2,width: "39px", height: "44px"},
|
|
|
|
- { title:"创建更多",img1:cjgd,img2:null,width: "32px", height: "32px"}
|
|
|
|
|
|
+ { title: "文档", img1: wd1, img2: wd2, width: "32px", height: "48px" },
|
|
|
|
+ { title: "工作簿", img1: gzp1, img2: gzp2, width: "55.8px", height: "44px" },
|
|
|
|
+ { title: "演示文稿", img1: yswd1, img2: yswd2, width: "66.6px", height: "44px" },
|
|
|
|
+ { title: "调查", img1: dc1, img2: dc2, width: "39px", height: "44px" },
|
|
|
|
+ { title: "创建更多", img1: cjgd, img2: null, width: "32px", height: "32px" }
|
|
]
|
|
]
|
|
|
|
|
|
const Doc = (data) => {
|
|
const Doc = (data) => {
|
|
return (
|
|
return (
|
|
- <div className="intentTileWrapper">
|
|
|
|
|
|
+ <div className="intentTileWrapper">
|
|
<button
|
|
<button
|
|
className="intentTile-button"
|
|
className="intentTile-button"
|
|
- aria-label={data.title+" 将在新选项卡中打开"}
|
|
|
|
|
|
+ aria-label={data.title + " 将在新选项卡中打开"}
|
|
>
|
|
>
|
|
<div className="intentTile-icon-content">
|
|
<div className="intentTile-icon-content">
|
|
<div className="intentTile-icon1">
|
|
<div className="intentTile-icon1">
|
|
@@ -257,7 +258,7 @@ const Doc = (data) => {
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div className="intentTile-text">
|
|
<div className="intentTile-text">
|
|
<span>{data.title}</span>
|
|
<span>{data.title}</span>
|
|
@@ -320,13 +321,13 @@ const PositionedComponent = (props) => {
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style={{ width: "480px", height: "409px" }}>
|
|
<div style={{ width: "480px", height: "409px" }}>
|
|
- <div style={{flex: "0 0 100%",height: "264px",display: "flex",flexWrap: "wrap",marginTop: "8px"}}>
|
|
|
|
|
|
+ <div style={{ flex: "0 0 100%", height: "264px", display: "flex", flexWrap: "wrap", marginTop: "8px" }}>
|
|
{appDatas.map((data) => <App key={data.title} {...data} />)}
|
|
{appDatas.map((data) => <App key={data.title} {...data} />)}
|
|
</div>
|
|
</div>
|
|
<div className="custom-div">
|
|
<div className="custom-div">
|
|
<hr className="custom-hr" />
|
|
<hr className="custom-hr" />
|
|
</div>
|
|
</div>
|
|
- <div style={{width: "480px", height: "145px",flex: "0 0 100%",display: "flex",flexWrap: "wrap"}}>
|
|
|
|
|
|
+ <div style={{ width: "480px", height: "145px", flex: "0 0 100%", display: "flex", flexWrap: "wrap" }}>
|
|
{docList.map((data) => <Doc key={data.title} {...data} />)}
|
|
{docList.map((data) => <Doc key={data.title} {...data} />)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -347,6 +348,7 @@ const IconHtml = () => {
|
|
|
|
|
|
|
|
|
|
const ChangeTheme = (name) => {
|
|
const ChangeTheme = (name) => {
|
|
|
|
+ eventBus.emit('themechange', ThemeData.find(m => m.name === name).config);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -379,29 +381,36 @@ const Header = () => {
|
|
</MenuList>
|
|
</MenuList>
|
|
</MenuPopover>
|
|
</MenuPopover>
|
|
</Menu>
|
|
</Menu>
|
|
- <Menu >
|
|
|
|
- <MenuTrigger disableButtonEnhancement>
|
|
|
|
|
|
+ <Popover >
|
|
|
|
+ <PopoverTrigger disableButtonEnhancement>
|
|
<Settings20Regular style={{ cursor: "pointer", margin: "0 8px" }} />
|
|
<Settings20Regular style={{ cursor: "pointer", margin: "0 8px" }} />
|
|
- </MenuTrigger>
|
|
|
|
- <MenuPopover>
|
|
|
|
- <MenuList>
|
|
|
|
- {
|
|
|
|
- Array.from(ThemeData, (item) => {
|
|
|
|
- return (<MenuItem onClick={() => {
|
|
|
|
- ChangeTheme(item.name)
|
|
|
|
- }}>
|
|
|
|
- <div class="theme-modal-item">
|
|
|
|
- <div class="theme-modal-item-sp">
|
|
|
|
- <img src={item.icon} alt="" srcset="" />
|
|
|
|
- </div>
|
|
|
|
- <div class="theme-modal-item-text">{item.name}</div>
|
|
|
|
|
|
+ </PopoverTrigger>
|
|
|
|
+ <PopoverSurface>
|
|
|
|
+ <div style={{ width: "480px", height: "409px" }}>
|
|
|
|
+ <div style={{ flex: "0 0 100%", height: "264px", display: "flex", flexWrap: "wrap", marginTop: "8px" }}>
|
|
|
|
+ {
|
|
|
|
+ Array.from(ThemeData, (item) => {
|
|
|
|
+ return (<div class="zl-365-article" onClick={() => {
|
|
|
|
+ ChangeTheme(item.name)
|
|
|
|
+ }}>
|
|
|
|
+ <button title={item.name}>
|
|
|
|
+ <div style={{ width: "100%" }}>
|
|
|
|
+ <img src={item.icon} alt={item.name} style={{ width: "80px", height: "80px", "display": "inline-block" }} />
|
|
|
|
+ </div>
|
|
|
|
+ <div style={{ width: "100%" }}>
|
|
|
|
+ <span>
|
|
|
|
+ {item.name}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </button>
|
|
</div>
|
|
</div>
|
|
- </MenuItem>)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- </MenuList>
|
|
|
|
- </MenuPopover>
|
|
|
|
- </Menu>
|
|
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </PopoverSurface>
|
|
|
|
+ </Popover>
|
|
<Menu >
|
|
<Menu >
|
|
<MenuTrigger disableButtonEnhancement>
|
|
<MenuTrigger disableButtonEnhancement>
|
|
<WindowAdPerson20Filled style={{ cursor: "pointer", margin: "0 30px 0 8px" }} />
|
|
<WindowAdPerson20Filled style={{ cursor: "pointer", margin: "0 30px 0 8px" }} />
|