feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -17,8 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showError, showSuccess } from '../../helpers';
|
||||
import './styles.css';
|
||||
|
||||
const Docs = () => {
|
||||
@@ -41,9 +43,9 @@ const Docs = () => {
|
||||
|
||||
// 复制代码功能
|
||||
const copyCode = (code) => {
|
||||
navigator.clipboard.writeText(code).then(() => {
|
||||
// 显示复制成功提示
|
||||
});
|
||||
writeClipboardText(code)
|
||||
.then(() => showSuccess(t('复制成功')))
|
||||
.catch(() => showError(t('复制失败,请手动复制')));
|
||||
};
|
||||
|
||||
// 滚动到顶部
|
||||
|
||||
Reference in New Issue
Block a user