-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
7 changed files
with
894 additions
and
896 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
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,19 +1,22 @@ | ||
import {activeBlur, hideKeyboardToolbar} from "./keyboardToolbar"; | ||
|
||
export const closePanel = () => { | ||
window.sout.tracker("invoked"); | ||
document.getElementById("menu").style.transform = ""; | ||
document.getElementById("sidebar").style.transform = ""; | ||
document.getElementById("model").style.transform = ""; | ||
const maskElement = document.querySelector(".side-mask") as HTMLElement; | ||
maskElement.classList.add("fn__none"); | ||
maskElement.style.opacity = ""; | ||
window.siyuan.menus.menu.remove(); | ||
}; | ||
|
||
export const closeModel = () => { | ||
window.sout.tracker("invoked"); | ||
document.getElementById("model").style.transform = ""; | ||
activeBlur(); | ||
hideKeyboardToolbar(); | ||
}; | ||
import { unmountReactRootsArray } from "../../sillot/util/react"; | ||
import {activeBlur, hideKeyboardToolbar} from "./keyboardToolbar"; | ||
|
||
export const closePanel = () => { | ||
window.sout.tracker("invoked"); | ||
document.getElementById("menu").style.transform = ""; | ||
document.getElementById("sidebar").style.transform = ""; | ||
document.getElementById("model").style.transform = ""; | ||
const maskElement = document.querySelector(".side-mask") as HTMLElement; | ||
maskElement.classList.add("fn__none"); | ||
maskElement.style.opacity = ""; | ||
window.siyuan.menus.menu.remove(); | ||
unmountReactRootsArray(window.Sillot.android?.AppearanceReactRoots); | ||
}; | ||
|
||
export const closeModel = () => { | ||
window.sout.tracker("invoked"); | ||
document.getElementById("model").style.transform = ""; | ||
activeBlur(); | ||
hideKeyboardToolbar(); | ||
unmountReactRootsArray(window.Sillot.android?.AppearanceReactRoots); | ||
}; |
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,17 +1,28 @@ | ||
import KeyboardArrowDown from "@mui/icons-material/KeyboardArrowDown"; | ||
import { Select, selectClasses } from "@mui/joy"; | ||
|
||
export const Select_KeyboardArrowDown = ({ ...props }) => ( | ||
<Select | ||
{...props} | ||
indicator={<KeyboardArrowDown />} | ||
sx={{ | ||
[`& .${selectClasses.indicator}`]: { | ||
transition: "0.2s", | ||
[`&.${selectClasses.expanded}`]: { | ||
transform: "rotate(-180deg)", | ||
}, | ||
export const Select_KeyboardArrowDown = (props) => { | ||
// 定义默认的sx样式 | ||
const defaultSx = { | ||
[`& .${selectClasses.indicator}`]: { | ||
transition: "0.2s", | ||
[`&.${selectClasses.expanded}`]: { | ||
transform: "rotate(-180deg)", | ||
}, | ||
}} | ||
/> | ||
); | ||
}, | ||
}; | ||
|
||
// 检查是否有传入的sx样式,并进行合并 | ||
const { sx, ...otherProps } = props; | ||
const mergedSx = sx | ||
? Object.assign({}, defaultSx, sx) | ||
: defaultSx; | ||
|
||
return ( | ||
<Select | ||
{...otherProps} // 传递剩余的props,不包括sx | ||
indicator={<KeyboardArrowDown />} | ||
sx={mergedSx} // 使用合并后的sx | ||
/> | ||
); | ||
}; |
Oops, something went wrong.