diff --git a/frontend/.eslintignore b/frontend/.eslintignore
deleted file mode 100644
index 87337b4c..00000000
--- a/frontend/.eslintignore
+++ /dev/null
@@ -1,10 +0,0 @@
-/node_modules/
-/dist/
-/public/
-*.md
-*.woff
-*.ttf
-.vscode/
-.DS_Store
-eslint.config.cjs
-.eslintrc.js
diff --git a/frontend/.eslintrc-auto-import.json b/frontend/.eslintrc-auto-import.json
new file mode 100644
index 00000000..05a87d9e
--- /dev/null
+++ b/frontend/.eslintrc-auto-import.json
@@ -0,0 +1,6 @@
+{
+ "globals": {
+ "ElMessage": true,
+ "ElMessageBox": true
+ }
+}
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
deleted file mode 100644
index c7c7db27..00000000
--- a/frontend/.eslintrc.js
+++ /dev/null
@@ -1,33 +0,0 @@
-module.exports = {
- root: true,
- env: {
- node: true,
- },
- extends: [
- 'plugin:vue/vue3-recommended',
- 'eslint:recommended',
- '@vue/typescript/recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:prettier/recommended',
- ],
- parserOptions: {
- ecmaVersion: 2020,
- },
- rules: {
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'vue/multi-word-component-names': 'off',
- '@typescript-eslint/no-explicit-any': 'off',
- 'prettier/prettier': [
- 'warn',
- {
- singleQuote: true,
- semi: false,
- trailingComma: 'es5',
- printWidth: 100,
- tabWidth: 2,
- endOfLine: 'auto',
- },
- ],
- },
-}
diff --git a/frontend/eslint.config.cjs b/frontend/eslint.config.cjs
index b98d8374..109373cb 100644
--- a/frontend/eslint.config.cjs
+++ b/frontend/eslint.config.cjs
@@ -5,11 +5,13 @@ const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommen
const eslintPluginVue = require('eslint-plugin-vue')
const globals = require('globals')
const typescriptEslint = require('typescript-eslint')
+const eslintrcImport = require('./.eslintrc-auto-import.json')
+
module.exports = typescriptEslint.config(
{
languageOptions: {
- globals: globals.browser,
+ globals: { ...globals.browser, ...globals.node, ...eslintrcImport.globals },
ecmaVersion: 'latest',
parserOptions: {
parser: typescriptEslint.parser,
@@ -47,7 +49,6 @@ module.exports = typescriptEslint.config(
'dist/',
'public/',
'eslint.config.cjs',
- '.eslintrc.js',
'**/*.md',
'**/*.woff',
'**/*.ttf',
@@ -55,5 +56,5 @@ module.exports = typescriptEslint.config(
'**/.DS_Store',
]),
eslintConfigPrettier,
- eslintPluginPrettierRecommended
+ eslintPluginPrettierRecommended,
)
diff --git a/frontend/package.json b/frontend/package.json
index fbe51e57..7a59f24c 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -29,6 +29,7 @@
"snowflake-id": "^1.1.0",
"tinymce": "^5.8.2",
"vue": "^3.5.13",
+ "vue-dompurify-html": "^5.3.0",
"vue-i18n": "^9.14.4",
"vue-router": "^4.5.0",
"web-storage-cache": "^1.1.1"
diff --git a/frontend/src/components/icon-custom/src/Icon.vue b/frontend/src/components/icon-custom/src/Icon.vue
index 43b33352..2f50c2b6 100644
--- a/frontend/src/components/icon-custom/src/Icon.vue
+++ b/frontend/src/components/icon-custom/src/Icon.vue
@@ -29,10 +29,10 @@ const svgClass = computed(() => {
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 530607b4..f81e9fcb 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -4,6 +4,8 @@ import './style.less'
import App from './App.vue'
import router from './router'
import { i18n } from './i18n'
+import VueDOMPurifyHTML from 'vue-dompurify-html'
+
// import 'element-plus/dist/index.css'
const app = createApp(App)
const pinia = createPinia()
@@ -11,4 +13,5 @@ const pinia = createPinia()
app.use(pinia)
app.use(router)
app.use(i18n)
+app.use(VueDOMPurifyHTML)
app.mount('#app')
diff --git a/frontend/src/views/chat/ChatAnswer.vue b/frontend/src/views/chat/ChatAnswer.vue
index 54e4aa7b..eeaa9990 100644
--- a/frontend/src/views/chat/ChatAnswer.vue
+++ b/frontend/src/views/chat/ChatAnswer.vue
@@ -215,12 +215,12 @@ function onTypeChange() {
SQL Generation:
-
+
Chart Generation:
-
+
diff --git a/frontend/src/views/chat/ChatBlock.vue b/frontend/src/views/chat/ChatBlock.vue
index 376de9c7..e339fb9d 100644
--- a/frontend/src/views/chat/ChatBlock.vue
+++ b/frontend/src/views/chat/ChatBlock.vue
@@ -11,7 +11,7 @@ defineProps<{
diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue
index 62b95a02..e443e88e 100644
--- a/frontend/src/views/chat/index.vue
+++ b/frontend/src/views/chat/index.vue
@@ -341,17 +341,6 @@ const sendMessage = async () => {
}
}
-//@ts-ignore
-const formatMessage = (content: string) => {
- if (!content) return ''
- return content
- .replace(/&/g, '&')
- .replace(//g, '>')
- .replace(/\n/g, '
')
- .replace(/ {2}/g, ' ')
-}
-
const handleCtrlEnter = (e: KeyboardEvent) => {
const textarea = e.target as HTMLTextAreaElement
const start = textarea.selectionStart
diff --git a/frontend/src/views/dashboard/common/ResourceTree.vue b/frontend/src/views/dashboard/common/ResourceTree.vue
index 6b4a1aaa..d36825e8 100644
--- a/frontend/src/views/dashboard/common/ResourceTree.vue
+++ b/frontend/src/views/dashboard/common/ResourceTree.vue
@@ -1,6 +1,6 @@
@@ -270,16 +263,16 @@ defineExpose({
-
+
-
-
+
+
-
-
+
+
{{ node.label }}
-
+
-
+
operation(opt,data)"
:menu-list="state.folderMenuList"
:icon-name="icon_more_outlined"
placement="bottom-start"
+ @handle-command="(opt: string) => operation(opt, data)"
>
diff --git a/frontend/src/views/dashboard/components/sq-tab/index.vue b/frontend/src/views/dashboard/components/sq-tab/index.vue
index a312c165..a0eabf4d 100644
--- a/frontend/src/views/dashboard/components/sq-tab/index.vue
+++ b/frontend/src/views/dashboard/components/sq-tab/index.vue
@@ -10,9 +10,9 @@ import {
onMounted,
} from 'vue'
import CustomTab from '@/views/dashboard/components/sq-tab/CustomTab.vue'
-import {guid, type CanvasItem} from '@/utils/canvas.ts'
+import { guid, type CanvasItem } from '@/utils/canvas.ts'
import DragHandle from '@/views/dashboard/canvas/DragHandle.vue'
-import {ArrowDown} from '@element-plus/icons-vue'
+import { ArrowDown } from '@element-plus/icons-vue'
import DashboardEditor from '@/views/dashboard/editor/DashboardEditor.vue'
const editableTabsValue = ref(null)
@@ -48,7 +48,7 @@ const props = defineProps({
},
})
-const {configItem} = toRefs(props)
+const { configItem } = toRefs(props)
const state = reactive({
activeTabName: '',
@@ -132,7 +132,7 @@ const isEditMode = computed(() => true)
const addTabItem = (item: CanvasItem) => {
// do addTabItem
const index = configItem.value.propValue.findIndex(
- // @ts-ignore
+ // @ts-ignore
(tabItem) => configItem.value.activeTabName === tabItem.name
)
// @ts-ignore
@@ -178,7 +178,7 @@ defineExpose({
{{ tabItem.title }}
+ >{{ tabItem.title }}
-
+
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 2a203f2d..4749a7e2 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -15,6 +15,9 @@ export default defineConfig(({ mode }) => {
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
+ eslintrc: {
+ enabled: false,
+ },
}),
Components({
resolvers: [ElementPlusResolver()],