Skip to content

Commit

Permalink
fix(eslint): 语法提示修改
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Feb 6, 2024
1 parent 9d61741 commit 6fbf83a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/importSvgEl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 秦少卫
* @Date: 2023-08-05 17:47:35
* @LastEditors: 秦少卫
* @LastEditTime: 2023-08-07 22:59:07
* @LastEditTime: 2024-02-06 16:43:23
* @Description: file content
-->

Expand Down Expand Up @@ -50,7 +50,7 @@ import useSelect from '@/hooks/select';
import { cloneDeep } from 'lodash-es';
import { v4 as uuid } from 'uuid';
const { fabric, canvasEditor } = useSelect();
const { fabric, canvasEditor }: { canvasEditor: any; fabric: any } = useSelect();
const defaultPosition = {
left: 100,
Expand Down
8 changes: 4 additions & 4 deletions src/components/importTmpl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 秦少卫
* @Date: 2022-09-03 19:16:55
* @LastEditors: 秦少卫
* @LastEditTime: 2023-08-11 10:12:00
* @LastEditTime: 2024-02-06 16:35:45
* @Description: 导入模板
-->

Expand Down Expand Up @@ -52,7 +52,7 @@ import { useI18n } from 'vue-i18n';
import { cloneDeep } from 'lodash-es';
const { t } = useI18n();
const { canvasEditor } = useSelect();
const { canvasEditor }: { canvasEditor: any } = useSelect();
interface materialTypeI {
value: string;
Expand Down Expand Up @@ -106,7 +106,7 @@ const beforeClearTip = (tmplUrl: string) => {
// 获取模板数据
const getTempData = (tmplUrl: string) => {
Spin.show({
render: (h) => h('div', t('alert.loading_data')),
render: (h: any) => h('div', t('alert.loading_data')),
});
const getTemp = axios.get(tmplUrl);
getTemp.then((res) => {
Expand All @@ -116,7 +116,7 @@ const getTempData = (tmplUrl: string) => {
});
};
// 切换素材类型
const handleChange = (e, item) => {
const handleChange = (e: Event, item: [materialItemI]) => {
// 搜索框文字设置
const { label, value } = item[0];
state.placeholder = label;
Expand Down
3 changes: 2 additions & 1 deletion src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

<script name="Home" setup>
// 导入元素
import importJSON from '@/components/importJSON.vue';
// import importJSON from '@/components/importJSON.vue';
import importFile from '@/components/importFile.vue';
import fontTmpl from '@/components/fontTmpl.vue';
Expand Down Expand Up @@ -206,6 +206,7 @@ onMounted(() => {
fireRightClick: true, // 启用右键,button的数字为3
stopContextMenu: true, // 禁止默认右键菜单
controlsAboveOverlay: true, // 超出clipPath后仍然展示控制条
imageSmoothingEnabled: false, // 解决文字导出后不清晰问题
});
// 初始化编辑器
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"allowJs": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
Expand Down
6 changes: 5 additions & 1 deletion typings/editor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: 秦少卫
* @Date: 2023-05-13 18:53:44
* @LastEditors: 秦少卫
* @LastEditTime: 2023-06-27 22:44:31
* @LastEditTime: 2024-02-06 16:44:37
* @Description: file content
*/

Expand Down Expand Up @@ -39,3 +39,7 @@ declare interface IPluginTempl {
[propName: IEditorHooksType]: () => void;
[propName: string]: any;
}

declare interface CanvasEditorI {
[propName: string]: any;
}

0 comments on commit 6fbf83a

Please sign in to comment.