Skip to content

Commit

Permalink
Resolve typepscript errors in StringList.vue
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Rak <[email protected]>
  • Loading branch information
rak-phillip committed Sep 20, 2024
1 parent 39928dd commit 532c185
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions pkg/rancher-components/src/components/StringList/StringList.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script lang="ts">
import { PropType, defineComponent } from 'vue';
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
import { findStringIndex, hasDuplicatedStrings } from '@shell/utils/array';
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
type Error = 'duplicate';
type ErrorMessages = Record<Error, string>;
Expand Down Expand Up @@ -30,19 +29,15 @@ const CLASS = {
* Manage a list of strings
*/
export default defineComponent({
name: 'StringList',
components: { LabeledInput },
props: {
props: {
/**
* The items source
*/
items: {
type: Array as PropType<string[]>,
default() {
return [];
},
type: Array as PropType<string[]>,
default: () => [],
},
/**
* Determines if items with same text will be treated differently, depending on the letters case
Expand Down Expand Up @@ -77,10 +72,8 @@ export default defineComponent({
* Custom Error messages
*/
errorMessages: {
type: Object as PropType<ErrorMessages>,
default() {
return {} as ErrorMessages;
},
type: Object as PropType<ErrorMessages>,
default: () => ({} as ErrorMessages),
},
/**
* Enables bulk addition and defines the delimiter to split the input string.
Expand Down Expand Up @@ -415,7 +408,6 @@ export default defineComponent({
this.$emit('change', items);
},
},
});
</script>

Expand Down

0 comments on commit 532c185

Please sign in to comment.