feat: 优化界面显示,对deck添加编辑功能
This commit is contained in:
1
src/utils/index.ts
Normal file
1
src/utils/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './nanoid';
|
||||
9
src/utils/is-null.ts
Normal file
9
src/utils/is-null.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export const isObjectNull = (value: any) => {
|
||||
if (value === null || value === undefined) {
|
||||
return true;
|
||||
}
|
||||
if (JSON.stringify(value) === '{}') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
5
src/utils/nanoid.ts
Normal file
5
src/utils/nanoid.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { customAlphabet, nanoid } from 'nanoid';
|
||||
const number = '0123456789';
|
||||
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
export const generateId = customAlphabet(number + alphabet, 6);
|
||||
Reference in New Issue
Block a user