Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

删除hook重复类型定义 #494

Merged
merged 5 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/core/plugin/QrCodePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class QrCodePlugin implements IPluginTempl {
width: 300,
margin: 10,
errorCorrectionLevel: 'M',
dotsColor: 'black',
dotsColor: '#000000',
dotsType: 'rounded',
cornersSquareColor: 'black',
cornersSquareColor: '#000000',
cornersSquareType: 'square',
cornersDotColor: 'black',
cornersDotColor: '#000000',
cornersDotType: 'square',
background: '#ffffff',
};
Expand Down
19 changes: 9 additions & 10 deletions src/hooks/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
* @LastEditors: 秦少卫
* @LastEditTime: 2024-06-10 20:11:48
*/
import Editor, { EventType } from '@kuaitu/core';
import Editor from '@kuaitu/core';
import { useI18n } from 'vue-i18n';

const { SelectMode } = EventType;

interface Selector {
mSelectMode: (typeof SelectMode)[keyof typeof SelectMode];
mSelectOneType: string | undefined;
mSelectId: string | undefined;
mSelectIds: (string | undefined)[];
mSelectActive: unknown[];
}
import { type Selector } from './useSelectListen';
// interface Selector {
// mSelectMode: (typeof SelectMode)[keyof typeof SelectMode];
// mSelectOneType: string | undefined;
// mSelectId: string | undefined;
// mSelectIds: (string | undefined)[];
// mSelectActive: unknown[];
// }

export default function useSelect() {
const fabric = inject('fabric');
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useSelectListen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { get } from 'lodash-es';

const { SelectEvent, SelectMode } = EventType;

interface Selector {
export interface Selector {
mSelectMode: (typeof SelectMode)[keyof typeof SelectMode];
mSelectOneType: string | undefined;
mSelectId: string | undefined;
Expand All @@ -30,7 +30,7 @@ export default function useSelectListen(canvasEditor: Editor) {

const selectOne = (e: [fabric.Object]) => {
state.mSelectMode = SelectMode.ONE;
state.mSelectActive = e[0];
state.mSelectActive = e;
if (e[0] && get(e[0], 'clip')) {
selectCancel();
// state.mSelectId = get(e[0], 'targetId');
Expand Down
Loading