Skip to content

Commit 369b6fd

Browse files
committed
HTMLQueue errors TS are now resolved
1 parent 331e30d commit 369b6fd

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

src/components/right-sidebar/HTMLQueue.vue

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ Description:
5959
</section>
6060
</template>
6161

62+
<script>
63+
export default {
64+
name: "HTMLQueue",
65+
};
66+
</script>
67+
6268
<script setup lang="ts">
6369
import { ref, computed, watch } from "vue";
6470
import { useStore } from "../../store/main.js";
@@ -136,8 +142,8 @@ const moreExceptions = () => {
136142
return childComponent;
137143
};
138144
139-
const parentSelected: typeof store.parentSelected = (payload: any) =>
140-
store.parentSelected(payload);
145+
// const parentSelected: typeof store.parentSelected = (payload: any) =>
146+
// store.parentSelected(payload);
141147
142148
const setActiveHTML: typeof store.setActiveHTML = (payload) =>
143149
store.setActiveHTML(payload);
@@ -187,12 +193,12 @@ const setActiveElement = (element: string[]) => {
187193
188194
const setLayer = (element: { text: string; id: string }) => {
189195
setActiveLayer(element);
190-
element.id = activeHTML.value;
196+
element.id = activeHTML.value as string;
191197
};
192198
193199
const setParentLayer = () => {
194200
if (activeLayer.value.id !== "") {
195-
upOneLayer(activeLayer.value.id);
201+
upOneLayer(activeLayer.value.id as string);
196202
}
197203
};
198204
@@ -228,7 +234,7 @@ const endDrag = (event: MouseEvent) => {
228234
else dragDropSortHtmlElements();
229235
};
230236
231-
const submitClass = (element: string, idNum: string) => {
237+
const submitClass = (element: string, idNum: number) => {
232238
if (element === "") {
233239
return;
234240
}
@@ -237,6 +243,7 @@ const submitClass = (element: string, idNum: string) => {
237243
class: element,
238244
id: idNum,
239245
};
246+
240247
addActiveComponentClass(payload);
241248
classText.value = "";
242249
};
@@ -245,7 +252,7 @@ const addBinding = (input: string, idNum: number) => {
245252
if (input === "") {
246253
return;
247254
}
248-
const payload: { binding: string; id: number } = {
255+
const payload : {binding: string, id: number} = {
249256
binding: input,
250257
id: idNum,
251258
};
@@ -257,13 +264,13 @@ watch(attributeModalOpen, () => {
257264
attributeModal.value = attributeModalOpen.value;
258265
});
259266
260-
// watch(activeComponent, () => {
261-
// if (activeComponent.value !== "") {
262-
// (store.componentMap[activeComponent.value] as Component).isActive = true;
263-
// } else {
264-
// (store.componentMap[activeComponent.value] as Component).isActive = false;
265-
// }
266-
// });
267+
watch(activeComponent, () => {
268+
if (activeComponent.value !== "") {
269+
(store.componentMap[activeComponent.value] as Component).isActive = true;
270+
} else {
271+
(store.componentMap[activeComponent.value] as Component).isActive = false;
272+
}
273+
});
267274
</script>
268275

269276
<!-- <script>

0 commit comments

Comments
 (0)