修改 ui 包结构.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化时间
|
||||
*/
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user