mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-03 13:38:12 +00:00
Poprawka liczenia rozkazów
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="order-list">
|
||||
<h3>Zapisane rozkazy pisemne ({{ localOrderCount }})</h3>
|
||||
<h3>Zapisane rozkazy pisemne ({{ localOrderList.length }})</h3>
|
||||
|
||||
<transition-group name="list" tag="ul">
|
||||
<li v-for="order in sortedOrderList" :key="order.id">
|
||||
@@ -31,7 +31,6 @@ export default defineComponent({
|
||||
|
||||
data() {
|
||||
return {
|
||||
localOrderCount: 0,
|
||||
localOrderList: [] as LocalStorageOrder[],
|
||||
};
|
||||
},
|
||||
@@ -53,7 +52,6 @@ export default defineComponent({
|
||||
this.removeLocalOrder(order);
|
||||
|
||||
this.localOrderList = this.localOrderList.filter((o) => o.id != order.id);
|
||||
this.localOrderCount = this.localOrderCount - 1;
|
||||
},
|
||||
},
|
||||
|
||||
@@ -67,8 +65,6 @@ export default defineComponent({
|
||||
const localStorage = window.localStorage;
|
||||
const orderList = [];
|
||||
|
||||
this.localOrderCount = Number(localStorage.getItem('orderCount')) || 0;
|
||||
|
||||
for (let key in localStorage) {
|
||||
if (!/^order-/g.test(key)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user