refactor(project): remove the use of core internal bem syntax

This commit is contained in:
vben
2024-07-14 16:28:56 +08:00
parent fed422e187
commit ebf73b2df9
37 changed files with 730 additions and 173 deletions

View File

@@ -36,8 +36,8 @@
}
},
"dependencies": {
"sortablejs": "^1.15.2",
"vue": "^3.4.31"
"radix-vue": "^1.9.1",
"sortablejs": "^1.15.2"
},
"devDependencies": {
"@types/sortablejs": "^1.15.8"

View File

@@ -1 +1,8 @@
export * from './use-namespace';
export * from './use-sortable';
export {
useEmitAsProps,
useForwardExpose,
useForwardProps,
useForwardPropsEmits,
} from 'radix-vue';

View File

@@ -6,7 +6,7 @@ import { useSortable } from './use-sortable';
describe('useSortable', () => {
beforeEach(() => {
vi.mock('sortablejs', () => ({
vi.mock('sortablejs/modular/sortable.complete.esm.js', () => ({
default: {
create: vi.fn(),
},
@@ -29,7 +29,10 @@ describe('useSortable', () => {
await initializeSortable();
// Import sortablejs to access the mocked create function
const Sortable = await import('sortablejs');
const Sortable = await import(
// @ts-expect-error - This is a dynamic import
'sortablejs/modular/sortable.complete.esm.js'
);
// Verify that Sortable.create was called with the correct parameters
expect(Sortable.default.create).toHaveBeenCalledTimes(1);

View File

@@ -6,7 +6,6 @@ export * from './dom';
export * from './inference';
export * from './letter';
export * from './merge';
export * from './namespace';
export * from './nprogress';
export * from './tree';
export * from './unique';

View File

@@ -5,7 +5,7 @@ interface BasicOption {
interface SelectOption extends BasicOption {}
interface TabsOption extends BasicOption {}
interface TabOption extends BasicOption {}
interface BasicUserInfo {
/**
@@ -30,4 +30,4 @@ interface BasicUserInfo {
username: string;
}
export type { BasicOption, BasicUserInfo, SelectOption, TabsOption };
export type { BasicOption, BasicUserInfo, SelectOption, TabOption };

View File

@@ -1,3 +1,3 @@
import type { RouteLocationNormalized } from 'vue-router';
export type TabItem = RouteLocationNormalized;
export type TabDefinition = RouteLocationNormalized;