Skip to content

Commit

Permalink
fix(collapse): fix demos type
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Dec 23, 2024
1 parent d826834 commit 4d1e036
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/collapse/demos/accordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { CollapseValue } from 'tdesign-mobile-vue';
const values = ref([1]);
const handleChange = (val: number[]) => {
const values = ref<CollapseValue>([1]);
const handleChange = (val: CollapseValue) => {
values.value = val;
};
</script>
5 changes: 3 additions & 2 deletions src/collapse/demos/action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

<script setup lang="ts">
import { ref } from 'vue';
import { CollapseValue } from 'tdesign-mobile-vue';
const values = ref([0]);
const handleChange = (val: number[]) => {
const values = ref<CollapseValue>([0]);
const handleChange = (val: CollapseValue) => {
values.value = val;
};
</script>
5 changes: 3 additions & 2 deletions src/collapse/demos/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

<script lang="ts" setup>
import { ref } from 'vue';
import { CollapseValue } from 'tdesign-mobile-vue';
const values = ref([1]);
const handleChange = (val: number[]) => {
const values = ref<CollapseValue>([1]);
const handleChange = (val: CollapseValue) => {
values.value = val;
};
</script>

0 comments on commit 4d1e036

Please sign in to comment.