@shijiu/jsview-vue 0.9.295-alpha.0 → 0.9.298-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/samples/Basic/App.vue +1 -1
- package/tsconfig.json +44 -0
- package/utils/JsViewVueTools/JsvHashHistory.js +16 -14
package/package.json
CHANGED
package/samples/Basic/App.vue
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<script>
|
|
49
49
|
import { Options, Vue } from "vue-class-component";
|
|
50
50
|
import TitleBar from './components/TitleBar';
|
|
51
|
-
import DivGroup1 from './components/div/DivGroup1
|
|
51
|
+
import DivGroup1 from './components/div/DivGroup1';
|
|
52
52
|
import DivGroup2 from './components/div/DivGroup2';
|
|
53
53
|
import TextGroup from './components/text/TextGroup';
|
|
54
54
|
import AnimGroup from './components/anim/AnimGroup';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"baseUrl": ".",
|
|
16
|
+
"types": [
|
|
17
|
+
"webpack-env"
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": [
|
|
21
|
+
"src/*"
|
|
22
|
+
],
|
|
23
|
+
"jsview/*": [
|
|
24
|
+
"./*"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"lib": [
|
|
28
|
+
"esnext",
|
|
29
|
+
"dom",
|
|
30
|
+
"dom.iterable",
|
|
31
|
+
"scripthost"
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
"alwaysStrict": true,
|
|
35
|
+
"noImplicitReturns": true
|
|
36
|
+
},
|
|
37
|
+
"include": [
|
|
38
|
+
"./**/*.vue"
|
|
39
|
+
],
|
|
40
|
+
"files": [
|
|
41
|
+
"./utils/JsViewEngineTools/index.d.ts",
|
|
42
|
+
"./utils/JsViewVueTools/index.d.ts"
|
|
43
|
+
],
|
|
44
|
+
}
|
|
@@ -3,49 +3,49 @@ import { createMemoryHistory, createWebHashHistory } from "vue-router";
|
|
|
3
3
|
class JsvHashHistory {
|
|
4
4
|
constructor(base) {
|
|
5
5
|
if(window.jsvIsBrowserDebug) {
|
|
6
|
-
this
|
|
6
|
+
this.#history = createWebHashHistory(base)
|
|
7
7
|
} else {
|
|
8
|
-
this
|
|
8
|
+
this.#history = this.#createMockHashHistory(base);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
get location() {
|
|
13
|
-
return this
|
|
13
|
+
return this.#history.location;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
get state() {
|
|
17
|
-
return this
|
|
17
|
+
return this.#history.state;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
get base() {
|
|
21
|
-
return this
|
|
21
|
+
return this.#history.base;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
createHref(location) {
|
|
25
|
-
return this
|
|
25
|
+
return this.#history.createHref(location);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
listen(callback) {
|
|
29
|
-
return this
|
|
29
|
+
return this.#history.listen(callback);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
replace(to, data) {
|
|
33
|
-
this
|
|
34
|
-
this.#updateLocation(this
|
|
33
|
+
this.#history.replace(to, data);
|
|
34
|
+
this.#updateLocation(this.#history.location);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
push(to, data) {
|
|
38
|
-
this
|
|
39
|
-
this.#updateLocation(this
|
|
38
|
+
this.#history.push(to, data);
|
|
39
|
+
this.#updateLocation(this.#history.location);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
go(delta, triggerListeners) {
|
|
43
|
-
this
|
|
44
|
-
this.#updateLocation(this
|
|
43
|
+
this.#history.go(delta, triggerListeners);
|
|
44
|
+
this.#updateLocation(this.#history.location);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
destroy() {
|
|
48
|
-
this
|
|
48
|
+
this.#history.destroy();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
#createMockHashHistory(base) {
|
|
@@ -103,6 +103,8 @@ class JsvHashHistory {
|
|
|
103
103
|
window.location.applyUrlInfo(url);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
#history;
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
function createJsvHashHistory(base) {
|