diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0b81fc6b..a8151273 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -29,6 +29,5 @@ module.exports = { "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-this-alias": "off", "vue/multi-word-component-names": "off", - "@typescript-eslint/consistent-type-imports": "error", }, }; diff --git a/package-lock.json b/package-lock.json index 75f03596..6736d59e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "skywalking-booster-ui", - "version": "9.3.0", + "version": "9.4.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 709d6a13..162e404e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skywalking-booster-ui", - "version": "9.3.0", + "version": "9.4.0", "private": true, "scripts": { "prepare": "husky install", diff --git a/src/components/Radio.vue b/src/components/Radio.vue index b140f754..3f96381b 100644 --- a/src/components/Radio.vue +++ b/src/components/Radio.vue @@ -23,16 +23,16 @@ limitations under the License. --> import { ref } from "vue"; import type { PropType } from "vue"; - interface Option { - label: string | number; - value: string | number; - } - /*global defineProps, defineEmits */ const emit = defineEmits(["change"]); const props = defineProps({ options: { - type: Array as PropType, + type: Array as PropType< + { + label: string | number; + value: string | number; + }[] + >, default: () => [], }, value: { diff --git a/src/components/Selector.vue b/src/components/Selector.vue index 72cb1616..e325f8c2 100644 --- a/src/components/Selector.vue +++ b/src/components/Selector.vue @@ -40,16 +40,21 @@ limitations under the License. --> import { ref, watch } from "vue"; import type { PropType } from "vue"; - interface Option { - label: string | number; - value: string | number; - } + // interface Option { + // label: string | number; + // value: string | number; + // } /*global defineProps, defineEmits*/ const emit = defineEmits(["change", "query"]); const props = defineProps({ options: { - type: Array as PropType<(Option & { disabled?: boolean })[]>, + type: Array as PropType< + ({ + label: string | number; + value: string | number; + } & { disabled?: boolean })[] + >, default: () => [], }, value: { diff --git a/src/types/components.d.ts b/src/types/components.d.ts index fa07aadd..05ec63bd 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -22,6 +22,7 @@ declare module '@vue/runtime-core' { ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] diff --git a/vite.config.ts b/vite.config.ts index 31e68e3f..ecf8ec77 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,15 +22,12 @@ import AutoImport from "unplugin-auto-import/vite"; import Components from "unplugin-vue-components/vite"; import { ElementPlusResolver } from "unplugin-vue-components/resolvers"; import monacoEditorPlugin from "vite-plugin-monaco-editor"; -import { fileURLToPath, URL } from "node:url"; import vueJsx from "@vitejs/plugin-vue-jsx"; import path from "path"; const OUTPUT_DIR = "dist"; // https://vitejs.dev/config/ export default ({ command, mode }: ConfigEnv): UserConfig => { - const root = process.cwd(); - return { plugins: [ vue(), @@ -50,7 +47,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"], alias: { "@": path.resolve(__dirname, "./src"), - // "@": fileURLToPath(new URL("./src", loadEnv(mode, process.cwd()).url)), "vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js", }, preserveSymlinks: true,