-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatumList.vue
More file actions
45 lines (40 loc) · 1.14 KB
/
datumList.vue
File metadata and controls
45 lines (40 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<s-scroll-view>
<VueDraggable
v-model="profile.data"
:animation="200"
handle=".datablock-drag"
>
<AnimatedList>
<AnimatedListItem
v-for="(dataItem, i) in profile.data"
:key="dataItem.key"
class="datumFolder"
>
<Datum v-model="profile.data[i]" :index="i" />
</AnimatedListItem>
</AnimatedList>
</VueDraggable>
<div class="plot-data add-data" @click="profile.data.push(getNewDatum())">
<s-icon name="add" />
{{ t("buttons.add") }}
<s-ripple attached></s-ripple>
</div>
</s-scroll-view>
</template>
<script setup lang="ts">
import { useI18n } from "vue-i18n";
const { t } = useI18n();
import { VueDraggable } from "vue-draggable-plus";
import AnimatedList from "@/ui/animatedList/animatedList.vue";
import AnimatedListItem from "@/ui/animatedList/animatedListItem.vue";
import Datum from "./datum.vue";
import { getNewDatum } from "@/consts";
import { useProfile } from "@/consts";
const profile = useProfile();
</script>
<style>
.datumFolder {
border-bottom: var(--s-color-outline-variant) 1px solid;
}
</style>