Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit c0fca4d

Browse files
committed
fix(project-links): links order
1 parent 18215e3 commit c0fca4d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

components/project-links/project-links.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ps-btn.rounded-full(v-if='editable', text)
66
add-icon.text-ps-white(@click='openModal')/
77
.flex.flex-col
8-
draggable
8+
draggable(v-model='editableValue')
99
.flex.items-center.text-ps-white(v-for='(link, index) in editableValue', :key='index')
1010
drag-icon.handle(v-if='editable')
1111
.flex.w-full.justify-between.items-center
@@ -21,7 +21,7 @@
2121
</template>
2222

2323
<script lang="ts">
24-
import { defineComponent, ref, unref, watch } from '@nuxtjs/composition-api';
24+
import { defineComponent, ref, unref, watch, watchEffect } from '@nuxtjs/composition-api';
2525
2626
import addIcon from 'vue-material-design-icons/Plus.vue';
2727
import binIcon from 'vue-material-design-icons/Delete.vue';
@@ -54,6 +54,10 @@ export default defineComponent({
5454
setup(props, { emit }) {
5555
const editableValue = ref(unref(props.value));
5656
57+
watch(editableValue, (newLinks) => {
58+
emit('input', newLinks);
59+
});
60+
5761
watch(props, (newProps) => {
5862
// @ts-ignore
5963
editableValue.value = newProps.value;

0 commit comments

Comments
 (0)