diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..1d7fd6ca
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,16 @@
+dist
+node_modules
+public
+types/auto-imports.d.ts
+types/components.d.ts
+.husky
+.vscode
+.idea
+*.sh
+*.md
+
+src/assets
+
+.eslintrc.cjs
+.prettierrc.cjs
+.stylelintrc.cjs
\ No newline at end of file
diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index 26189435..7e23c3e2 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -4,8 +4,6 @@
"ComponentPublicInstance": true,
"ComputedRef": true,
"EffectScope": true,
- "ElMessage": true,
- "ElMessageBox": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
@@ -285,6 +283,12 @@
"watchThrottled": true,
"watchTriggerable": true,
"watchWithFilter": true,
+<<<<<<< HEAD
"whenever": true
+=======
+ "whenever": true,
+ "ElMessageBox": true,
+ "ElMessage": true
+>>>>>>> master
}
}
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
new file mode 100644
index 00000000..70e3f89b
--- /dev/null
+++ b/.eslintrc.cjs
@@ -0,0 +1,48 @@
+// /* eslint-env node */
+// require('@rushstack/eslint-patch/modern-module-resolution')
+
+// module.exports = {
+// root: true,
+// 'extends': [
+// 'plugin:vue/vue3-essential',
+// 'eslint:recommended',
+// '@vue/eslint-config-typescript',
+// '@vue/eslint-config-prettier/skip-formatting',
+// "./.eslintrc-auto-import.json"
+// ],
+// parserOptions: {
+// ecmaVersion: 'latest'
+// }
+// }
+module.exports = {
+ env: {
+ browser: true,
+ es2021: true,
+ node: true,
+ },
+ parser: "vue-eslint-parser",
+ extends: [
+ // 参考vuejs官方的eslint配置: https://eslint.vuejs.org/user-guide/#usage
+ "plugin:vue/vue3-recommended",
+ "./.eslintrc-auto-import.json",
+ "prettier",
+ ],
+ parserOptions: {
+ ecmaVersion: "latest",
+ sourceType: "module",
+ parser: "@typescript-eslint/parser",
+ },
+ plugins: ["vue", "@typescript-eslint"],
+ rules: {
+ "vue/multi-word-component-names": "off", // 关闭组件名必须多字: https://eslint.vuejs.org/rules/multi-word-component-names.html
+ "@typescript-eslint/no-empty-function": "off", // 关闭空方法检查
+ "@typescript-eslint/no-explicit-any": "off", // 关闭any类型的警告
+ "vue/no-v-model-argument": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ },
+ // https://eslint.org/docs/latest/use/configure/language-options#specifying-globals
+ globals: {
+ DialogOption: "readonly",
+ OptionType: "readonly",
+ },
+ };
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..ad7cb516
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,12 @@
+dist
+node_modules
+public
+types/auto-imports.d.ts
+types/components.d.ts
+.husky
+.vscode
+.idea
+*.sh
+*.md
+
+src/assets
diff --git a/.prettierrc.cjs b/.prettierrc.cjs
new file mode 100644
index 00000000..3eae6fa5
--- /dev/null
+++ b/.prettierrc.cjs
@@ -0,0 +1,37 @@
+module.exports = {
+ // (x)=>{},单个参数箭头函数是否显示小括号。(always:始终显示;avoid:省略括号。默认:always)
+ arrowParens: "always",
+ // 开始标签的右尖括号是否跟随在最后一行属性末尾,默认false
+ bracketSameLine: false,
+ // 对象字面量的括号之间打印空格 (true - Example: { foo: bar } ; false - Example: {foo:bar})
+ bracketSpacing: true,
+ // 是否格式化一些文件中被嵌入的代码片段的风格(auto|off;默认auto)
+ embeddedLanguageFormatting: "auto",
+ // 指定 HTML 文件的空格敏感度 (css|strict|ignore;默认css)
+ htmlWhitespaceSensitivity: "css",
+ // 当文件已经被 Prettier 格式化之后,是否会在文件顶部插入一个特殊的 @format 标记,默认false
+ insertPragma: false,
+ // 在 JSX 中使用单引号替代双引号,默认false
+ jsxSingleQuote: false,
+ // 每行最多字符数量,超出换行(默认80)
+ printWidth: 180000000,
+ // 超出打印宽度 (always | never | preserve )
+ proseWrap: "preserve",
+ // 对象属性是否使用引号(as-needed | consistent | preserve;默认as-needed:对象的属性需要加引号才添加;)
+ quoteProps: "as-needed",
+ // 是否只格式化在文件顶部包含特定注释(@prettier| @format)的文件,默认false
+ requirePragma: false,
+ // 结尾添加分号
+ semi: true,
+ // 使用单引号 (true:单引号;false:双引号)
+ singleQuote: true,
+ // 缩进空格数,默认2个空格
+ tabWidth: 4,
+ // 元素末尾是否加逗号,默认es5: ES5中的 objects, arrays 等会添加逗号,TypeScript 中的 type 后不加逗号
+ trailingComma: "es5",
+ // 指定缩进方式,空格或tab,默认false,即使用空格
+ useTabs: false,
+ // vue 文件中是否缩进
diff --git a/src/components/model-hot-zone/model-hot-zone-content.vue b/src/components/model-hot-zone/model-hot-zone-content.vue
index bc166e46..c463f30a 100644
--- a/src/components/model-hot-zone/model-hot-zone-content.vue
+++ b/src/components/model-hot-zone/model-hot-zone-content.vue
@@ -4,7 +4,7 @@
内容设置
-
+
@@ -23,12 +23,13 @@ const props = defineProps({
});
const form = ref(props.value);
-const update_hot_data = (val: any) => {
+const update_upload_data = (val: any) => {
if (val.length > 0) {
form.value.hot.img = val[0].url;
} else {
form.value.hot.img = '';
}
+ form.value.hot.data = [];
};