Skip to content

Commit 28161fc

Browse files
committed
fixing duplicate functions
1 parent a289c92 commit 28161fc

File tree

1 file changed

+1
-57
lines changed

1 file changed

+1
-57
lines changed

frameworks/non-keyed/slim-js/main-app.js

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -201,100 +201,44 @@ Slim.element(
201201
static useShadow = false;
202202

203203
deleteOne(item) {
204-
store.delete(item.id);
204+
this.store.delete(item.id);
205205
this.items = store.data;
206206
}
207207

208208
selectOne(item) {
209-
console.time('select1');
210209
this.selected = item;
211-
console.timeEnd('select1');
212-
}
213-
214-
create1k() {
215-
store.clear();
216-
store.run(1000);
217-
this.items = [...store.data];
218-
}
219-
220-
append1k() {
221-
console.time('append1k');
222-
store.add(1000);
223-
this.items = [...store.data];
224-
console.timeEnd('append1k');
225-
}
226-
227-
update10() {
228-
console.time('update10');
229-
store.update();
230-
this.items = [...store.data];
231-
console.timeEnd('update10');
232-
}
233-
234-
testClear() {
235-
console.time('clear');
236-
store.clear();
237-
this.items = [...store.data];
238-
console.timeEnd('clear');
239-
}
240-
241-
create10k() {
242-
performance.mark('create10kstart');
243-
store.runLots();
244-
this.items = [...store.data];
245-
performance.mark('create10kend');
246-
console.log(
247-
performance.measure('create10k', 'create10kstart', 'create10kend')
248-
);
249-
}
250-
251-
swap() {
252-
store.swapRows();
253-
this.items = [...store.data];
254210
}
255211

256212
update10() {
257-
console.time('update10');
258213
this.store.update();
259214
this.items = this.store.data;
260-
console.timeEnd('update10');
261215
}
262216

263217
testClear() {
264-
console.time('clear');
265218
this.store.clear();
266219
this.items = this.store.data;
267-
console.timeEnd('clear');
268220
}
269221

270222
append1k() {
271-
console.time('append1k');
272223
this.store.add(1000);
273224
this.items = this.store.data;
274-
console.timeEnd('append1k');
275225
}
276226

277227
swap() {
278-
console.time('swap');
279228
this.store.swapRows();
280229
this.items = this.store.data;
281-
console.timeEnd('swap');
282230
}
283231

284232
create10k() {
285-
console.time('create10k');
286233
this.store.clear();
287234
this.store.runLots();
288235
this.items = this.store.data;
289-
console.timeEnd('create10k');
290236
}
291237

292238
create1k() {
293-
console.time('create1k');
294239
this.store.clear();
295240
this.store.run(1000);
296241
this.items = this.store.data;
297-
console.timeEnd('create1k');
298242
}
299243
}
300244
);

0 commit comments

Comments
 (0)