From 6471c17ac7b8065fc48608cadcf9c4b04be46abb Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Thu, 6 May 2021 20:10:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 56 ++++---- preview/App.vue | 19 +-- preview/views/preview.vue | 31 ++++- src/App.vue | 37 ++---- src/visual-editor/components/header/index.vue | 14 +- .../components/header/preview.vue | 35 +---- .../left-aside/components/page-tree/index.vue | 120 ++++++++++++++++-- .../components/page-tree/treeData.ts | 56 +------- .../components/left-aside/index.vue | 2 +- .../table-prop-editor/table-prop-editor.tsx | 2 +- .../right-attribute-panel/index.tsx | 17 +-- .../simulator-editor/simulator-editor.vue | 33 +++-- .../{utils => hooks}/useDotProp.ts | 0 .../{utils => hooks}/useModel.tsx | 0 src/visual-editor/hooks/useVisualData.ts | 115 +++++++++++++++++ src/visual-editor/index.vue | 34 +---- src/visual-editor/visual-editor.utils.ts | 15 ++- 17 files changed, 352 insertions(+), 234 deletions(-) rename src/visual-editor/{utils => hooks}/useDotProp.ts (100%) rename src/visual-editor/{utils => hooks}/useModel.tsx (100%) create mode 100644 src/visual-editor/hooks/useVisualData.ts diff --git a/.eslintrc.js b/.eslintrc.js index fa5c4b8..999fffb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,40 +23,38 @@ module.exports = { ], rules: { 'vue/require-default-prop': 'off', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off' - // '@typescript-eslint/no-unused-vars': [ - // 'error', - // { - // argsIgnorePattern: '^_', - // varsIgnorePattern: '^_' - // } - // ], - // 'no-unused-vars': [ - // 'error', - // { - // argsIgnorePattern: '^_', - // varsIgnorePattern: '^_' - // } - // ], - // 'vue/html-self-closing': [ - // 'error', - // { - // html: { - // void: 'always', - // normal: 'never', - // component: 'always' - // }, - // svg: 'always', - // math: 'always' - // } - // ] + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ], + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ], + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always' + }, + svg: 'always', + math: 'always' + } + ] }, settings: {} } diff --git a/preview/App.vue b/preview/App.vue index 341525c..472a0a2 100644 --- a/preview/App.vue +++ b/preview/App.vue @@ -1,15 +1,18 @@