修改 ui 包结构.

This commit is contained in:
lijiahang
2023-07-29 13:11:19 +08:00
parent 900cd1c1d7
commit 5bee3b98a7
28 changed files with 149 additions and 365 deletions

View File

@@ -57,37 +57,6 @@ export function isEmptyStr(val: any) {
return typeof (val) === 'undefined' || val == null || val === '';
}
/**
* 复制到剪切板
*/
// export function copyToClipboard(content: any) {
// const clipboardData = window.clipboardData;
// if (clipboardData) {
// clipboardData.clearData();
// clipboardData.setData('Text', content);
// return true;
// } else if (document.execCommand) {
// const el = document.createElement('textarea');
// el.value = content;
// el.setAttribute('readonly', '');
// el.style.position = 'absolute';
// el.style.left = '-9999px';
// document.body.appendChild(el);
// el.select();
// document.execCommand('copy');
// document.body.removeChild(el);
// return true;
// }
// return false;
// }
/**
* 获取剪切板内容 返回 promise
*/
export function getClipboardText() {
return navigator.clipboard.readText();
}
/**
* 格式化时间
*/

View File

@@ -7,7 +7,6 @@ export default ({ mock, setup }: { mock?: boolean; setup: () => void }) => {
export const successResponseWrap = (data: unknown) => {
return {
data,
status: 'ok',
msg: '请求成功',
code: 200,
};
@@ -16,7 +15,6 @@ export const successResponseWrap = (data: unknown) => {
export const failResponseWrap = (data: unknown, msg: string, code = 5000) => {
return {
data,
status: 'fail',
msg,
code,
};