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

Commit 7f75626

Browse files
committed
Fix: Can not use >1 pages.
Release: alpha 0.2.4
1 parent 4c6435f commit 7f75626

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

Diff for: App.js

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ app.page({
2626
data: {
2727
x: 233333
2828
},
29+
mounted() {
30+
console.log("end!!!");
31+
},
2932
mount: document.getElementById("root")
3033
}, "id1");
3134

Diff for: dist/src/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export declare class TNTApp {
1111
#private;
1212
constructor();
1313
page(createFunctions: Record<string, any>, ...page_id: string[]): void;
14+
useExportPlugin(plugin: TNTPlugin): void;
1415
get data(): object;
1516
usePlugin(plugin: TNTPlugin): this;
1617
}

Diff for: dist/src/index.js

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/src/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tntjs",
3-
"version": "0.2.3x",
3+
"version": "0.2.4",
44
"description": "The JavaScript framework for modern web.",
55
"main": "dist/src/index.js",
66
"files": [

Diff for: src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class TNTApp {
8080
createFunctions: Record<string, any>,
8181
...page_id: string[]
8282
) {
83-
if (this.#pageid in page_id) return;
83+
if (!(page_id.includes(this.#pageid))) return ;
8484
(typeof createFunctions.data !== "undefined") ? this.#useData(createFunctions.data) : undefined;
8585
(typeof createFunctions.computed !== "undefined") ? this.#useComputed(createFunctions.computed) : undefined;
8686
(typeof createFunctions.effect !== "undefined") ? this.#useEffect(createFunctions.effect) : undefined;

0 commit comments

Comments
 (0)