chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -29,7 +29,7 @@ export const useCreateBotAction = ({
|
||||
urlSearch?: string;
|
||||
currentSpaceId?: string;
|
||||
}) => {
|
||||
// 创建 bot 功能
|
||||
// Create bot function
|
||||
const newWindowRef = useRef<Window | null>(null);
|
||||
const openWindow = () => {
|
||||
newWindowRef.current = window.open();
|
||||
|
||||
@@ -16,20 +16,20 @@
|
||||
|
||||
export function removeGlobalLoading() {
|
||||
const spin = document.querySelector('#global-spin-wrapper');
|
||||
// 对于不支持MutationObserver的浏览器直接隐藏 loading,避免影响正常页面的展示
|
||||
// Hide loading directly for browsers that do not support MutationObserver to avoid affecting the display of normal pages
|
||||
if (!window.MutationObserver && spin) {
|
||||
(spin as HTMLElement).style.display = 'none';
|
||||
return;
|
||||
}
|
||||
const targetNode = document.querySelector('#root');
|
||||
const observerOptions = {
|
||||
childList: true, // 观察目标子节点的变化,是否有添加或者删除
|
||||
attributes: true, // 观察属性变动
|
||||
subtree: true, // 观察后代节点,默认为 false
|
||||
childList: true, // Observe the changes of the target sub-node and see if any are added or deleted
|
||||
attributes: true, // Observe attribute changes
|
||||
subtree: true, // Observe the descendant nodes, the default is false
|
||||
};
|
||||
|
||||
const observer = new MutationObserver(function callback(mutationList) {
|
||||
// root 节点有任何变化就取消 loading,并取消观测
|
||||
// Cancel loading if there is any change in the root node and cancel the observation
|
||||
mutationList.forEach(mutation => {
|
||||
if (spin) {
|
||||
(spin as HTMLElement).style.display = 'none';
|
||||
|
||||
Reference in New Issue
Block a user