diff --git a/src/components/color/index.vue b/src/components/color/index.vue index f62207a..3633e80 100644 --- a/src/components/color/index.vue +++ b/src/components/color/index.vue @@ -9,14 +9,13 @@ import { DEFAULT_COLOR_OPTIONS } from '@/config/color'; const panelColor = 'conic-gradient(from 90deg at 50% 50%, #FF0000 -19.41deg, #FF0000 18.76deg, #FF8A00 59.32deg, #FFE600 99.87deg, #14FF00 141.65deg, #00A3FF 177.72deg, #0500FF 220.23deg, #AD00FF 260.13deg, #FF00C7 300.69deg, #FF0000 340.59deg, #FF0000 378.76deg)'; -const props = defineProps({ +const { value } = defineProps({ value: { type: String, }, }); const style = computed(() => { - const { value } = props; return { background: DEFAULT_COLOR_OPTIONS.indexOf(value) > -1 ? value : panelColor, }; diff --git a/src/components/result/index.vue b/src/components/result/index.vue index 74045b8..f0848aa 100644 --- a/src/components/result/index.vue +++ b/src/components/result/index.vue @@ -18,7 +18,7 @@ import ResultIeIcon from '@/assets/assets-result-ie.svg?component'; import ResultMaintenanceIcon from '@/assets/assets-result-maintenance.svg?component'; import ResultWifiIcon from '@/assets/assets-result-wifi.svg?component'; -const props = defineProps({ +const { type } = defineProps({ bgUrl: String, title: String, tip: String, @@ -26,7 +26,7 @@ const props = defineProps({ }); const dynamicComponent = computed(() => { - switch (props.type) { + switch (type) { case '403': return Result403Icon; case '404': diff --git a/src/components/thumbnail/index.vue b/src/components/thumbnail/index.vue index 370774d..fcb8c98 100644 --- a/src/components/thumbnail/index.vue +++ b/src/components/thumbnail/index.vue @@ -4,7 +4,7 @@