diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-09-13 19:59:06 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-09-13 20:00:17 +1000 |
| commit | 23b5cc80ba02936659564dd03b173d3214ce5978 (patch) | |
| tree | cdf6a183d1a0bfcb45a924585b764c723dd67b55 /src/components/LoadingModal.vue | |
| parent | e382d4173c990a49a9ef3db1b3681763a3e2e908 (diff) | |
Use Vue Composition API and ESLint
Diffstat (limited to 'src/components/LoadingModal.vue')
| -rw-r--r-- | src/components/LoadingModal.vue | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/components/LoadingModal.vue b/src/components/LoadingModal.vue index ee8d699..abd405c 100644 --- a/src/components/LoadingModal.vue +++ b/src/components/LoadingModal.vue @@ -8,26 +8,20 @@ </div> </template> -<script lang="ts"> -import {defineComponent, PropType} from 'vue'; +<script setup lang="ts"> +import {computed, PropType} from 'vue'; import LoaderIcon from './icon/LoaderIcon.vue'; import {UiOptions} from '../lib'; -export default defineComponent({ - props: { - msg: {type: String, required: true}, - uiOpts: {type: Object as PropType<UiOptions>, required: true}, - }, - computed: { - styles(): Record<string,string> { - return { - color: this.uiOpts.textColor, - backgroundColor: this.uiOpts.bgColorDark2, - borderRadius: this.uiOpts.borderRadius + 'px', - boxShadow: this.uiOpts.shadowNormal, - }; - }, - }, - components: {LoaderIcon, }, +const props = defineProps({ + msg: {type: String, required: true}, + uiOpts: {type: Object as PropType<UiOptions>, required: true}, }); + +const styles = computed(() => ({ + color: props.uiOpts.textColor, + backgroundColor: props.uiOpts.bgColorDark2, + borderRadius: props.uiOpts.borderRadius + 'px', + boxShadow: props.uiOpts.shadowNormal, +})); </script> |
