framework7-vue 7.0.0-beta.2 → 7.0.0-beta.3
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/components/app.d.ts +1 -1
- package/components/app.js +1 -1
- package/framework7-vue-bundle.js +2 -2
- package/framework7-vue.js +2 -2
- package/package.json +1 -1
- package/shared/components-router.js +5 -0
- package/shared/mixins.js +3 -3
- package/shared/router-open-in.js +114 -0
package/components/app.d.ts
CHANGED
package/components/app.js
CHANGED
package/framework7-vue-bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 Vue 7.0.0-beta.
|
|
2
|
+
* Framework7 Vue 7.0.0-beta.3
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & Vue
|
|
4
4
|
* https://framework7.io/vue/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: October
|
|
10
|
+
* Released on: October 5, 2021
|
|
11
11
|
*/
|
|
12
12
|
import Framework7Vue from './shared/plugin';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7';
|
package/framework7-vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 Vue 7.0.0-beta.
|
|
2
|
+
* Framework7 Vue 7.0.0-beta.3
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & Vue
|
|
4
4
|
* https://framework7.io/vue/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: October
|
|
10
|
+
* Released on: October 5, 2021
|
|
11
11
|
*/
|
|
12
12
|
import Framework7Vue from './shared/plugin';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7';
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint no-underscore-dangle: "off" */
|
|
2
2
|
import { f7events, f7routers } from './f7';
|
|
3
3
|
import { extend, getComponentId } from './utils';
|
|
4
|
+
import { routerOpenIn } from './router-open-in';
|
|
4
5
|
|
|
5
6
|
const getChildrenArray = el => {
|
|
6
7
|
const arr = [];
|
|
@@ -21,6 +22,10 @@ const hasSameChildren = (childrenBefore, childrenAfter) => {
|
|
|
21
22
|
|
|
22
23
|
export default {
|
|
23
24
|
proto: {
|
|
25
|
+
openIn(router, navigateUrl, options) {
|
|
26
|
+
return routerOpenIn(router, navigateUrl, options);
|
|
27
|
+
},
|
|
28
|
+
|
|
24
29
|
pageComponentLoader({
|
|
25
30
|
routerEl,
|
|
26
31
|
component,
|
package/shared/mixins.js
CHANGED
|
@@ -7,10 +7,10 @@ export function colorClasses(props) {
|
|
|
7
7
|
bgColor,
|
|
8
8
|
borderColor,
|
|
9
9
|
rippleColor,
|
|
10
|
-
|
|
10
|
+
dark
|
|
11
11
|
} = props;
|
|
12
12
|
return {
|
|
13
|
-
|
|
13
|
+
dark,
|
|
14
14
|
[`color-${color}`]: color,
|
|
15
15
|
[`color-theme-${colorTheme}`]: colorTheme,
|
|
16
16
|
[`text-color-${textColor}`]: textColor,
|
|
@@ -26,7 +26,7 @@ export const colorProps = {
|
|
|
26
26
|
bgColor: String,
|
|
27
27
|
borderColor: String,
|
|
28
28
|
rippleColor: String,
|
|
29
|
-
|
|
29
|
+
dark: Boolean
|
|
30
30
|
};
|
|
31
31
|
export const iconProps = {
|
|
32
32
|
icon: String,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
import Popup from '../components/popup';
|
|
3
|
+
import View from '../components/view';
|
|
4
|
+
import LoginScreen from '../components/login-screen';
|
|
5
|
+
import Sheet from '../components/sheet';
|
|
6
|
+
import Popover from '../components/popover';
|
|
7
|
+
import Panel from '../components/panel';
|
|
8
|
+
export const routerOpenIn = (router, url, options) => {
|
|
9
|
+
const navigateOptions = {
|
|
10
|
+
url,
|
|
11
|
+
route: {
|
|
12
|
+
path: url,
|
|
13
|
+
options: { ...options,
|
|
14
|
+
openIn: undefined
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const params = { ...options
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
if (options.openIn === 'popup') {
|
|
22
|
+
params.component = {
|
|
23
|
+
setup() {
|
|
24
|
+
return () => h(Popup, {
|
|
25
|
+
class: 'popup-router-open-in',
|
|
26
|
+
'data-url': url
|
|
27
|
+
}, [h(View, {
|
|
28
|
+
linksView: router.view.selector,
|
|
29
|
+
url,
|
|
30
|
+
ignoreOpenIn: true
|
|
31
|
+
})]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
};
|
|
35
|
+
navigateOptions.route.popup = params;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (options.openIn === 'loginScreen') {
|
|
39
|
+
params.component = {
|
|
40
|
+
setup() {
|
|
41
|
+
return () => h(LoginScreen, {
|
|
42
|
+
class: 'login-screen-router-open-in',
|
|
43
|
+
'data-url': url
|
|
44
|
+
}, [h(View, {
|
|
45
|
+
linksView: router.view.selector,
|
|
46
|
+
url,
|
|
47
|
+
ignoreOpenIn: true
|
|
48
|
+
})]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
};
|
|
52
|
+
navigateOptions.route.loginScreen = params;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (options.openIn === 'sheet') {
|
|
56
|
+
params.component = {
|
|
57
|
+
setup() {
|
|
58
|
+
return () => h(Sheet, {
|
|
59
|
+
class: 'sheet-modal-router-open-in',
|
|
60
|
+
'data-url': url
|
|
61
|
+
}, [h(View, {
|
|
62
|
+
linksView: router.view.selector,
|
|
63
|
+
url,
|
|
64
|
+
ignoreOpenIn: true
|
|
65
|
+
})]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
};
|
|
69
|
+
navigateOptions.route.sheet = params;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (options.openIn === 'popover') {
|
|
73
|
+
params.targetEl = options.clickedEl || options.targetEl;
|
|
74
|
+
params.component = {
|
|
75
|
+
setup() {
|
|
76
|
+
return () => h(Popover, {
|
|
77
|
+
class: 'popover-router-open-in',
|
|
78
|
+
'data-url': url,
|
|
79
|
+
targetEl: options.clickedEl || options.targetEl
|
|
80
|
+
}, [h(View, {
|
|
81
|
+
linksView: router.view.selector,
|
|
82
|
+
url,
|
|
83
|
+
ignoreOpenIn: true
|
|
84
|
+
})]);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
};
|
|
88
|
+
navigateOptions.route.popover = params;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (options.openIn.indexOf('panel') >= 0) {
|
|
92
|
+
const parts = options.openIn.split(':');
|
|
93
|
+
const side = parts[1] || 'left';
|
|
94
|
+
const effect = parts[2] || 'cover';
|
|
95
|
+
params.component = {
|
|
96
|
+
setup() {
|
|
97
|
+
return () => h(Panel, {
|
|
98
|
+
class: 'panel-router-open-in',
|
|
99
|
+
'data-url': url,
|
|
100
|
+
side,
|
|
101
|
+
effect
|
|
102
|
+
}, [h(View, {
|
|
103
|
+
linksView: router.view.selector,
|
|
104
|
+
url,
|
|
105
|
+
ignoreOpenIn: true
|
|
106
|
+
})]);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
};
|
|
110
|
+
navigateOptions.route.panel = params;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return router.navigate(navigateOptions);
|
|
114
|
+
};
|