framework7-vue 7.0.8 → 8.0.0-beta.1
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/accordion-content.js +2 -5
- package/components/accordion-item.js +0 -13
- package/components/accordion-toggle.js +2 -5
- package/components/accordion.js +0 -4
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +2 -9
- package/components/actions-group.js +2 -5
- package/components/actions-label.d.ts +1 -1
- package/components/actions-label.js +2 -8
- package/components/actions.js +2 -14
- package/components/app.d.ts +7 -12
- package/components/app.js +11 -24
- package/components/appbar.js +2 -5
- package/components/area-chart.js +4 -41
- package/components/badge.js +0 -4
- package/components/block-footer.js +2 -5
- package/components/block-header.js +2 -5
- package/components/block-title.js +0 -4
- package/components/block.d.ts +61 -9
- package/components/block.js +52 -17
- package/components/breadcrumbs-collapsed.js +0 -5
- package/components/breadcrumbs-item.js +0 -4
- package/components/breadcrumbs-separator.js +0 -4
- package/components/breadcrumbs.js +0 -4
- package/components/button.d.ts +9 -25
- package/components/button.js +9 -25
- package/components/card-content.js +0 -4
- package/components/card-footer.js +2 -5
- package/components/card-header.js +2 -5
- package/components/card.d.ts +17 -5
- package/components/card.js +10 -20
- package/components/checkbox.js +0 -7
- package/components/chip.d.ts +0 -4
- package/components/chip.js +0 -7
- package/components/col.js +3 -9
- package/components/fab-backdrop.js +2 -5
- package/components/fab-button.js +0 -6
- package/components/fab-buttons.js +0 -4
- package/components/fab.js +0 -9
- package/components/gauge.js +0 -4
- package/components/icon.d.ts +0 -4
- package/components/icon.js +1 -18
- package/components/input.js +0 -56
- package/components/link.d.ts +0 -4
- package/components/link.js +4 -13
- package/components/list-button.js +0 -6
- package/components/list-group.js +0 -4
- package/components/list-index.d.ts +0 -5
- package/components/list-index.js +0 -14
- package/components/list-input.d.ts +0 -4
- package/components/list-input.js +0 -53
- package/components/list-item-cell.js +3 -5
- package/components/list-item-row.js +3 -5
- package/components/list-item.d.ts +0 -4
- package/components/list-item.js +9 -52
- package/components/list.d.ts +71 -23
- package/components/list.js +42 -33
- package/components/login-screen-title.js +2 -5
- package/components/login-screen.js +2 -17
- package/components/menu-dropdown-item.js +1 -6
- package/components/menu-dropdown.js +1 -4
- package/components/menu-item.js +4 -18
- package/components/menu.js +3 -5
- package/components/message.js +0 -16
- package/components/messagebar-attachment.js +0 -7
- package/components/messagebar-attachments.js +2 -5
- package/components/messagebar-sheet-image.js +7 -15
- package/components/messagebar-sheet-item.js +2 -5
- package/components/messagebar-sheet.js +2 -5
- package/components/messagebar.js +0 -16
- package/components/messages-title.js +2 -5
- package/components/messages.js +0 -13
- package/components/nav-left.js +0 -9
- package/components/nav-right.js +0 -4
- package/components/nav-title-large.js +2 -5
- package/components/nav-title.js +0 -4
- package/components/navbar.d.ts +5 -8
- package/components/navbar.js +6 -29
- package/components/page-content.js +0 -16
- package/components/page.d.ts +0 -4
- package/components/page.js +2 -67
- package/components/panel.d.ts +4 -0
- package/components/panel.js +2 -23
- package/components/photo-browser.js +2 -18
- package/components/pie-chart.js +4 -20
- package/components/popover.d.ts +5 -0
- package/components/popover.js +8 -16
- package/components/popup.js +3 -19
- package/components/preloader.js +4 -23
- package/components/progressbar.js +0 -6
- package/components/radio.js +0 -7
- package/components/range.js +0 -7
- package/components/routable-modals.js +0 -7
- package/components/row.js +3 -9
- package/components/searchbar.d.ts +5 -8
- package/components/searchbar.js +7 -28
- package/components/segmented.d.ts +0 -12
- package/components/segmented.js +2 -12
- package/components/sheet.js +2 -18
- package/components/stepper.d.ts +0 -20
- package/components/stepper.js +1 -27
- package/components/subnavbar.js +0 -4
- package/components/swipeout-actions.js +0 -6
- package/components/swipeout-button.js +0 -6
- package/components/tab.js +2 -15
- package/components/tabs.js +0 -4
- package/components/text-editor.js +0 -17
- package/components/toggle.js +0 -9
- package/components/toolbar.d.ts +4 -21
- package/components/toolbar.js +12 -34
- package/components/treeview-item.d.ts +0 -4
- package/components/treeview-item.js +0 -13
- package/components/treeview.js +2 -5
- package/components/use-icon.js +0 -4
- package/components/view.d.ts +0 -28
- package/components/view.js +4 -50
- package/components/views.js +0 -4
- package/framework7-vue-bundle.js +3 -21
- package/framework7-vue-web-types.json +1 -94
- package/framework7-vue.d.ts +3 -15
- package/framework7-vue.js +3 -12
- package/package.json +8 -1
- package/shared/components-router.js +0 -32
- package/shared/f7.js +5 -19
- package/shared/get-router-initial-component.js +0 -4
- package/shared/mixins.js +3 -15
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -13
- package/shared/use-icon.js +1 -6
- package/shared/use-smart-select.js +0 -1
- package/shared/use-store.js +2 -6
- package/shared/use-tab.js +0 -2
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -2
- package/shared/utils.js +0 -14
- package/components/appbar.d.ts +0 -67
- package/components/col.d.ts +0 -94
- package/components/list-item-cell.d.ts +0 -46
- package/components/list-item-row.d.ts +0 -46
- package/components/menu-dropdown-item.d.ts +0 -223
- package/components/menu-dropdown.d.ts +0 -66
- package/components/menu-item.d.ts +0 -267
- package/components/menu.d.ts +0 -46
- package/components/row.d.ts +0 -73
package/components/toggle.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
2
|
const _hoisted_1 = ["name", "disabled", "readonly", "checked", "value"];
|
|
3
|
-
|
|
4
3
|
const _hoisted_2 = /*#__PURE__*/_createElementVNode("span", {
|
|
5
4
|
class: "toggle-icon"
|
|
6
5
|
}, null, -1);
|
|
7
|
-
|
|
8
6
|
function render(_ctx, _cache) {
|
|
9
7
|
return _openBlock(), _createElementBlock("label", {
|
|
10
8
|
ref: "elRef",
|
|
@@ -21,7 +19,6 @@ function render(_ctx, _cache) {
|
|
|
21
19
|
})
|
|
22
20
|
}, null, 40, _hoisted_1), _hoisted_2], 2);
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
import { computed, ref, watch, onMounted, onBeforeUnmount } from 'vue';
|
|
26
23
|
import { classNames } from '../shared/utils.js';
|
|
27
24
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -45,7 +42,6 @@ export default {
|
|
|
45
42
|
...colorProps
|
|
46
43
|
},
|
|
47
44
|
emits: ['change', 'toggle:change', 'update:checked'],
|
|
48
|
-
|
|
49
45
|
setup(props, _ref) {
|
|
50
46
|
let {
|
|
51
47
|
emit
|
|
@@ -53,11 +49,9 @@ export default {
|
|
|
53
49
|
let f7Toggle = null;
|
|
54
50
|
const elRef = ref(null);
|
|
55
51
|
useTooltip(elRef, props);
|
|
56
|
-
|
|
57
52
|
const onChange = event => {
|
|
58
53
|
emit('change', event);
|
|
59
54
|
};
|
|
60
|
-
|
|
61
55
|
watch(() => props.checked, newValue => {
|
|
62
56
|
if (!f7Toggle) return;
|
|
63
57
|
f7Toggle.checked = newValue;
|
|
@@ -72,7 +66,6 @@ export default {
|
|
|
72
66
|
emit('toggle:change', toggleInstance.checked);
|
|
73
67
|
emit('update:checked', toggleInstance.checked);
|
|
74
68
|
}
|
|
75
|
-
|
|
76
69
|
}
|
|
77
70
|
});
|
|
78
71
|
});
|
|
@@ -81,7 +74,6 @@ export default {
|
|
|
81
74
|
if (f7Toggle && f7Toggle.destroy && f7Toggle.$el) {
|
|
82
75
|
f7Toggle.destroy();
|
|
83
76
|
}
|
|
84
|
-
|
|
85
77
|
f7Toggle = null;
|
|
86
78
|
});
|
|
87
79
|
const classes = computed(() => classNames('toggle', {
|
|
@@ -94,5 +86,4 @@ export default {
|
|
|
94
86
|
onChange
|
|
95
87
|
};
|
|
96
88
|
}
|
|
97
|
-
|
|
98
89
|
};
|
package/components/toolbar.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare const Toolbar: DefineComponent<
|
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
},
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
icons: {
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
},
|
|
15
15
|
|
|
@@ -21,16 +21,9 @@ declare const Toolbar: DefineComponent<
|
|
|
21
21
|
type: BooleanConstructor;
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
type:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
noHairline: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
noBorder: {
|
|
33
|
-
type: BooleanConstructor;
|
|
24
|
+
outline: {
|
|
25
|
+
type: any;
|
|
26
|
+
default: boolean;
|
|
34
27
|
},
|
|
35
28
|
|
|
36
29
|
position: {
|
|
@@ -48,11 +41,6 @@ declare const Toolbar: DefineComponent<
|
|
|
48
41
|
default: undefined;
|
|
49
42
|
},
|
|
50
43
|
|
|
51
|
-
topAurora: {
|
|
52
|
-
type: BooleanConstructor;
|
|
53
|
-
default: undefined;
|
|
54
|
-
},
|
|
55
|
-
|
|
56
44
|
top: {
|
|
57
45
|
type: BooleanConstructor;
|
|
58
46
|
default: undefined;
|
|
@@ -68,11 +56,6 @@ declare const Toolbar: DefineComponent<
|
|
|
68
56
|
default: undefined;
|
|
69
57
|
},
|
|
70
58
|
|
|
71
|
-
bottomAurora: {
|
|
72
|
-
type: BooleanConstructor;
|
|
73
|
-
default: undefined;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
59
|
bottom: {
|
|
77
60
|
type: BooleanConstructor;
|
|
78
61
|
default: undefined;
|
package/components/toolbar.js
CHANGED
|
@@ -3,7 +3,6 @@ const _hoisted_1 = {
|
|
|
3
3
|
key: 0,
|
|
4
4
|
className: "toolbar-inner"
|
|
5
5
|
};
|
|
6
|
-
|
|
7
6
|
function render(_ctx, _cache) {
|
|
8
7
|
return _openBlock(), _createElementBlock("div", {
|
|
9
8
|
ref: "elRef",
|
|
@@ -12,7 +11,6 @@ function render(_ctx, _cache) {
|
|
|
12
11
|
key: 1
|
|
13
12
|
}), _renderSlot(_ctx.$slots, "after-inner")], 2);
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
import { computed, ref, provide, onMounted, onBeforeUnmount } from 'vue';
|
|
17
15
|
import { classNames } from '../shared/utils.js';
|
|
18
16
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -23,12 +21,13 @@ export default {
|
|
|
23
21
|
render,
|
|
24
22
|
props: {
|
|
25
23
|
tabbar: Boolean,
|
|
26
|
-
|
|
24
|
+
icons: Boolean,
|
|
27
25
|
scrollable: Boolean,
|
|
28
26
|
hidden: Boolean,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
outline: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
32
31
|
position: {
|
|
33
32
|
type: String,
|
|
34
33
|
default: undefined
|
|
@@ -41,10 +40,6 @@ export default {
|
|
|
41
40
|
type: Boolean,
|
|
42
41
|
default: undefined
|
|
43
42
|
},
|
|
44
|
-
topAurora: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: undefined
|
|
47
|
-
},
|
|
48
43
|
top: {
|
|
49
44
|
type: Boolean,
|
|
50
45
|
default: undefined
|
|
@@ -57,10 +52,6 @@ export default {
|
|
|
57
52
|
type: Boolean,
|
|
58
53
|
default: undefined
|
|
59
54
|
},
|
|
60
|
-
bottomAurora: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: undefined
|
|
63
|
-
},
|
|
64
55
|
bottom: {
|
|
65
56
|
type: Boolean,
|
|
66
57
|
default: undefined
|
|
@@ -72,39 +63,32 @@ export default {
|
|
|
72
63
|
...colorProps
|
|
73
64
|
},
|
|
74
65
|
emits: ['toolbar:hide', 'toolbar:show'],
|
|
75
|
-
|
|
76
66
|
setup(props, _ref) {
|
|
77
67
|
let {
|
|
78
68
|
emit
|
|
79
69
|
} = _ref;
|
|
80
70
|
const elRef = ref(null);
|
|
81
71
|
const theme = useTheme();
|
|
82
|
-
|
|
83
72
|
const onHide = toolbarEl => {
|
|
84
73
|
if (elRef.value !== toolbarEl) return;
|
|
85
74
|
emit('toolbar:hide');
|
|
86
75
|
};
|
|
87
|
-
|
|
88
76
|
const onShow = toolbarEl => {
|
|
89
77
|
if (elRef.value !== toolbarEl) return;
|
|
90
78
|
emit('toolbar:show');
|
|
91
79
|
};
|
|
92
|
-
|
|
93
80
|
const hide = animate => {
|
|
94
81
|
if (!f7) return;
|
|
95
82
|
f7.toolbar.hide(elRef.value, animate);
|
|
96
83
|
};
|
|
97
|
-
|
|
98
84
|
const show = animate => {
|
|
99
85
|
if (!f7) return;
|
|
100
86
|
f7.toolbar.show(elRef.value, animate);
|
|
101
87
|
};
|
|
102
|
-
|
|
103
88
|
onMounted(() => {
|
|
104
89
|
if (props.tabbar && f7 && elRef.value) {
|
|
105
90
|
f7.toolbar.setHighlight(elRef.value);
|
|
106
91
|
}
|
|
107
|
-
|
|
108
92
|
f7.on('toolbarShow', onShow);
|
|
109
93
|
f7.on('toolbarHide', onHide);
|
|
110
94
|
});
|
|
@@ -113,7 +97,7 @@ export default {
|
|
|
113
97
|
f7.off('toolbarHide', onHide);
|
|
114
98
|
});
|
|
115
99
|
const TabbarContext = computed(() => ({
|
|
116
|
-
|
|
100
|
+
tabbarHasIcons: props.icons
|
|
117
101
|
}));
|
|
118
102
|
provide('TabbarContext', TabbarContext);
|
|
119
103
|
const classes = computed(() => {
|
|
@@ -121,29 +105,24 @@ export default {
|
|
|
121
105
|
tabbar,
|
|
122
106
|
bottomMd,
|
|
123
107
|
bottomIos,
|
|
124
|
-
bottomAurora,
|
|
125
108
|
bottom,
|
|
126
109
|
position,
|
|
127
110
|
topMd,
|
|
128
111
|
topIos,
|
|
129
|
-
topAurora,
|
|
130
112
|
top,
|
|
131
|
-
|
|
113
|
+
icons,
|
|
132
114
|
scrollable,
|
|
133
115
|
hidden,
|
|
134
|
-
|
|
135
|
-
noHairline,
|
|
136
|
-
noBorder
|
|
116
|
+
outline
|
|
137
117
|
} = props;
|
|
138
118
|
return classNames('toolbar', {
|
|
139
119
|
tabbar,
|
|
140
|
-
'toolbar-bottom': theme.value && theme.value.md && bottomMd || theme.value && theme.value.ios && bottomIos ||
|
|
141
|
-
'toolbar-top': theme.value && theme.value.md && topMd || theme.value && theme.value.ios && topIos ||
|
|
142
|
-
'tabbar-
|
|
120
|
+
'toolbar-bottom': theme.value && theme.value.md && bottomMd || theme.value && theme.value.ios && bottomIos || bottom || position === 'bottom',
|
|
121
|
+
'toolbar-top': theme.value && theme.value.md && topMd || theme.value && theme.value.ios && topIos || top || position === 'top',
|
|
122
|
+
'tabbar-icons': icons,
|
|
143
123
|
'tabbar-scrollable': scrollable,
|
|
144
124
|
'toolbar-hidden': hidden,
|
|
145
|
-
'no-
|
|
146
|
-
'no-hairline': noHairline || noBorder
|
|
125
|
+
'no-outline': !outline
|
|
147
126
|
}, colorClasses(props));
|
|
148
127
|
});
|
|
149
128
|
return {
|
|
@@ -153,5 +132,4 @@ export default {
|
|
|
153
132
|
show
|
|
154
133
|
};
|
|
155
134
|
}
|
|
156
|
-
|
|
157
135
|
};
|
|
@@ -13,10 +13,8 @@ const _hoisted_4 = {
|
|
|
13
13
|
key: 0,
|
|
14
14
|
className: "treeview-item-children"
|
|
15
15
|
};
|
|
16
|
-
|
|
17
16
|
function render(_ctx, _cache) {
|
|
18
17
|
const _component_f7_use_icon = _resolveComponent("f7-use-icon");
|
|
19
|
-
|
|
20
18
|
return _openBlock(), _createElementBlock("div", {
|
|
21
19
|
ref: "elRef",
|
|
22
20
|
class: _normalizeClass(_ctx.classes)
|
|
@@ -32,7 +30,6 @@ function render(_ctx, _cache) {
|
|
|
32
30
|
_: 3
|
|
33
31
|
}, 16, ["class", "onClick"])), _ctx.hasChildren ? (_openBlock(), _createElementBlock("div", _hoisted_4, [_renderSlot(_ctx.$slots, "children-start"), _renderSlot(_ctx.$slots, "default"), _renderSlot(_ctx.$slots, "children")])) : _createCommentVNode("", true)], 2);
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
import { computed, ref, onMounted, onBeforeUnmount } from 'vue';
|
|
37
34
|
import { classNames } from '../shared/utils.js';
|
|
38
35
|
import { colorClasses, colorProps, actionsAttrs, actionsProps, actionsClasses, routerAttrs, routerProps, routerClasses, iconProps } from '../shared/mixins.js';
|
|
@@ -66,7 +63,6 @@ export default {
|
|
|
66
63
|
...routerProps
|
|
67
64
|
},
|
|
68
65
|
emits: ['click', 'treeview:open', 'treeview:close', 'treeview:loadchildren'],
|
|
69
|
-
|
|
70
66
|
setup(props, _ref) {
|
|
71
67
|
let {
|
|
72
68
|
slots,
|
|
@@ -78,26 +74,21 @@ export default {
|
|
|
78
74
|
});
|
|
79
75
|
const needToggle = computed(() => typeof props.toggle === 'undefined' ? hasChildren.value : props.toggle);
|
|
80
76
|
const icon = computed(() => useIcon(props));
|
|
81
|
-
|
|
82
77
|
const onClick = event => {
|
|
83
78
|
emit('click', event);
|
|
84
79
|
};
|
|
85
|
-
|
|
86
80
|
const onOpen = el => {
|
|
87
81
|
if (elRef.value !== el) return;
|
|
88
82
|
emit('treeview:open', el);
|
|
89
83
|
};
|
|
90
|
-
|
|
91
84
|
const onClose = el => {
|
|
92
85
|
if (elRef.value !== el) return;
|
|
93
86
|
emit('treeview:close', el);
|
|
94
87
|
};
|
|
95
|
-
|
|
96
88
|
const onLoadChildren = (el, done) => {
|
|
97
89
|
if (elRef.value !== el) return;
|
|
98
90
|
emit('treeview:loadchildren', el, done);
|
|
99
91
|
};
|
|
100
|
-
|
|
101
92
|
const attachEvents = () => {
|
|
102
93
|
if (!elRef.value) return;
|
|
103
94
|
f7ready(() => {
|
|
@@ -106,14 +97,12 @@ export default {
|
|
|
106
97
|
f7.on('treeviewLoadChildren', onLoadChildren);
|
|
107
98
|
});
|
|
108
99
|
};
|
|
109
|
-
|
|
110
100
|
const detachEvents = () => {
|
|
111
101
|
if (!f7) return;
|
|
112
102
|
f7.off('treeviewOpen', onOpen);
|
|
113
103
|
f7.off('treeviewClose', onClose);
|
|
114
104
|
f7.off('treeviewLoadChildren', onLoadChildren);
|
|
115
105
|
};
|
|
116
|
-
|
|
117
106
|
onMounted(() => attachEvents());
|
|
118
107
|
onBeforeUnmount(() => detachEvents());
|
|
119
108
|
const classes = computed(() => classNames('treeview-item', {
|
|
@@ -130,7 +119,6 @@ export default {
|
|
|
130
119
|
let href = props.link;
|
|
131
120
|
if (props.link === true) href = '#';
|
|
132
121
|
if (props.link === false) href = undefined; // no href attribute
|
|
133
|
-
|
|
134
122
|
return {
|
|
135
123
|
href,
|
|
136
124
|
...routerAttrs(props),
|
|
@@ -149,5 +137,4 @@ export default {
|
|
|
149
137
|
elRef
|
|
150
138
|
};
|
|
151
139
|
}
|
|
152
|
-
|
|
153
140
|
};
|
package/components/treeview.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-treeview',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('treeview', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|
package/components/use-icon.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
const _component_f7_badge = _resolveComponent("f7-badge");
|
|
5
|
-
|
|
6
4
|
const _component_f7_icon = _resolveComponent("f7-icon");
|
|
7
|
-
|
|
8
5
|
return _openBlock(), _createBlock(_component_f7_icon, _normalizeProps(_guardReactiveProps(_ctx.icon.props)), {
|
|
9
6
|
default: _withCtx(() => [_ctx.icon.badge ? (_openBlock(), _createBlock(_component_f7_badge, _normalizeProps(_mergeProps({
|
|
10
7
|
key: 0
|
|
@@ -15,7 +12,6 @@ function render(_ctx, _cache) {
|
|
|
15
12
|
_: 1
|
|
16
13
|
}, 16);
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
import f7Icon from './icon.js';
|
|
20
16
|
import f7Badge from './badge.js';
|
|
21
17
|
export default {
|
package/components/view.d.ts
CHANGED
|
@@ -57,14 +57,6 @@ declare const View: DefineComponent<
|
|
|
57
57
|
type: NumberConstructor;
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
auroraSwipeBackActiveArea: {
|
|
61
|
-
type: NumberConstructor;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
auroraSwipeBackThreshold: {
|
|
65
|
-
type: NumberConstructor;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
60
|
browserHistoryRoot: {
|
|
69
61
|
type: StringConstructor;
|
|
70
62
|
},
|
|
@@ -112,11 +104,6 @@ declare const View: DefineComponent<
|
|
|
112
104
|
default: undefined;
|
|
113
105
|
},
|
|
114
106
|
|
|
115
|
-
stackPages: {
|
|
116
|
-
type: BooleanConstructor;
|
|
117
|
-
default: undefined;
|
|
118
|
-
},
|
|
119
|
-
|
|
120
107
|
xhrCache: {
|
|
121
108
|
type: BooleanConstructor;
|
|
122
109
|
default: undefined;
|
|
@@ -202,21 +189,6 @@ declare const View: DefineComponent<
|
|
|
202
189
|
default: undefined;
|
|
203
190
|
},
|
|
204
191
|
|
|
205
|
-
auroraSwipeBack: {
|
|
206
|
-
type: BooleanConstructor;
|
|
207
|
-
default: undefined;
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
auroraSwipeBackAnimateShadow: {
|
|
211
|
-
type: BooleanConstructor;
|
|
212
|
-
default: undefined;
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
auroraSwipeBackAnimateOpacity: {
|
|
216
|
-
type: BooleanConstructor;
|
|
217
|
-
default: undefined;
|
|
218
|
-
},
|
|
219
|
-
|
|
220
192
|
browserHistory: {
|
|
221
193
|
type: BooleanConstructor;
|
|
222
194
|
default: undefined;
|
package/components/view.js
CHANGED
|
@@ -24,10 +24,6 @@ export default {
|
|
|
24
24
|
type: Boolean,
|
|
25
25
|
default: undefined
|
|
26
26
|
},
|
|
27
|
-
stackPages: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: undefined
|
|
30
|
-
},
|
|
31
27
|
xhrCache: {
|
|
32
28
|
type: Boolean,
|
|
33
29
|
default: undefined
|
|
@@ -105,20 +101,6 @@ export default {
|
|
|
105
101
|
},
|
|
106
102
|
mdSwipeBackActiveArea: Number,
|
|
107
103
|
mdSwipeBackThreshold: Number,
|
|
108
|
-
auroraSwipeBack: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: undefined
|
|
111
|
-
},
|
|
112
|
-
auroraSwipeBackAnimateShadow: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
default: undefined
|
|
115
|
-
},
|
|
116
|
-
auroraSwipeBackAnimateOpacity: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: undefined
|
|
119
|
-
},
|
|
120
|
-
auroraSwipeBackActiveArea: Number,
|
|
121
|
-
auroraSwipeBackThreshold: Number,
|
|
122
104
|
// Push State
|
|
123
105
|
browserHistory: {
|
|
124
106
|
type: Boolean,
|
|
@@ -184,7 +166,6 @@ export default {
|
|
|
184
166
|
...colorProps
|
|
185
167
|
},
|
|
186
168
|
emits: ['view:init', 'view:resize', 'swipeback:move', 'swipeback:beforechange', 'swipeback:afterchange', 'swipeback:beforereset', 'swipeback:afterreset', 'tab:hide', 'tab:show'],
|
|
187
|
-
|
|
188
169
|
setup(props, _ref) {
|
|
189
170
|
let {
|
|
190
171
|
emit,
|
|
@@ -200,28 +181,26 @@ export default {
|
|
|
200
181
|
let routerData = null;
|
|
201
182
|
let initialPage;
|
|
202
183
|
let initialRoute;
|
|
203
|
-
|
|
204
184
|
const onViewInit = view => {
|
|
205
185
|
emit('view:init', view);
|
|
206
|
-
|
|
207
186
|
if (!props.init) {
|
|
208
187
|
routerData.instance = view;
|
|
209
188
|
f7View = routerData.instance;
|
|
210
189
|
}
|
|
211
190
|
};
|
|
212
|
-
|
|
213
191
|
const getViewParams = () => {
|
|
214
192
|
const routes = toRaw(props.routes || []);
|
|
215
193
|
const routesAdd = toRaw(props.routesAdd || []);
|
|
216
|
-
return noUndefinedProps({
|
|
194
|
+
return noUndefinedProps({
|
|
195
|
+
...props,
|
|
217
196
|
routes,
|
|
218
197
|
routesAdd
|
|
219
198
|
});
|
|
220
199
|
};
|
|
221
|
-
|
|
222
200
|
if (f7 && !f7View && props.init) {
|
|
223
201
|
const routerId = getRouterId();
|
|
224
|
-
f7View = f7.views.create(elRef.value, {
|
|
202
|
+
f7View = f7.views.create(elRef.value, {
|
|
203
|
+
...getViewParams(),
|
|
225
204
|
routerId,
|
|
226
205
|
init: false,
|
|
227
206
|
on: {
|
|
@@ -233,21 +212,17 @@ export default {
|
|
|
233
212
|
instance: f7View
|
|
234
213
|
};
|
|
235
214
|
f7routers.views.push(routerData);
|
|
236
|
-
|
|
237
215
|
if (shouldInitRouter && f7View && f7View.router && (props.url || props.main)) {
|
|
238
216
|
const initialData = getRouterInitialComponent(f7View.router, initialPageComponent);
|
|
239
217
|
initialPage = initialData.initialPage;
|
|
240
218
|
initialRoute = initialData.initialRoute;
|
|
241
|
-
|
|
242
219
|
if (initialRoute && initialRoute.route && initialRoute.route.masterRoute) {
|
|
243
220
|
initialPage = undefined;
|
|
244
221
|
initialRoute = undefined;
|
|
245
222
|
}
|
|
246
223
|
}
|
|
247
224
|
}
|
|
248
|
-
|
|
249
225
|
const pages = ref(initialPage ? [initialPage] : []);
|
|
250
|
-
|
|
251
226
|
const setPages = newPages => {
|
|
252
227
|
newPages.forEach(page => {
|
|
253
228
|
// eslint-disable-next-line
|
|
@@ -255,54 +230,43 @@ export default {
|
|
|
255
230
|
});
|
|
256
231
|
pages.value = newPages;
|
|
257
232
|
};
|
|
258
|
-
|
|
259
233
|
const onResize = (view, width) => {
|
|
260
234
|
emit('view:resize', width);
|
|
261
235
|
};
|
|
262
|
-
|
|
263
236
|
const onSwipeBackMove = data => {
|
|
264
237
|
const swipeBackData = data;
|
|
265
238
|
emit('swipeback:move', swipeBackData);
|
|
266
239
|
};
|
|
267
|
-
|
|
268
240
|
const onSwipeBackBeforeChange = data => {
|
|
269
241
|
const swipeBackData = data;
|
|
270
242
|
emit('swipeback:beforechange', swipeBackData);
|
|
271
243
|
};
|
|
272
|
-
|
|
273
244
|
const onSwipeBackAfterChange = data => {
|
|
274
245
|
const swipeBackData = data;
|
|
275
246
|
emit('swipeback:afterchange', swipeBackData);
|
|
276
247
|
};
|
|
277
|
-
|
|
278
248
|
const onSwipeBackBeforeReset = data => {
|
|
279
249
|
const swipeBackData = data;
|
|
280
250
|
emit('swipeback:beforereset', swipeBackData);
|
|
281
251
|
};
|
|
282
|
-
|
|
283
252
|
const onSwipeBackAfterReset = data => {
|
|
284
253
|
const swipeBackData = data;
|
|
285
254
|
emit('swipeback:afterreset', swipeBackData);
|
|
286
255
|
};
|
|
287
|
-
|
|
288
256
|
onMounted(() => {
|
|
289
257
|
f7ready(() => {
|
|
290
258
|
if (f7View) {
|
|
291
259
|
routerData.el = elRef.value;
|
|
292
260
|
routerData.pages = pages.value;
|
|
293
|
-
|
|
294
261
|
routerData.setPages = newPages => {
|
|
295
262
|
setPages([...newPages]);
|
|
296
263
|
};
|
|
297
|
-
|
|
298
264
|
if (initialPage && initialPage.isAsync && !initialPage.initialComponent) {
|
|
299
265
|
initialPage.component().then(() => {
|
|
300
266
|
setTimeout(() => {
|
|
301
267
|
f7View.init(elRef.value);
|
|
302
|
-
|
|
303
268
|
if (initialPage) {
|
|
304
269
|
initialPage.el = f7View.router.currentPageEl;
|
|
305
|
-
|
|
306
270
|
if (initialRoute && initialRoute.route && initialRoute.route.keepAlive) {
|
|
307
271
|
initialRoute.route.keepAliveData = {
|
|
308
272
|
pageEl: initialPage.el
|
|
@@ -313,10 +277,8 @@ export default {
|
|
|
313
277
|
});
|
|
314
278
|
} else {
|
|
315
279
|
f7View.init(elRef.value);
|
|
316
|
-
|
|
317
280
|
if (initialPage) {
|
|
318
281
|
initialPage.el = f7View.router.currentPageEl;
|
|
319
|
-
|
|
320
282
|
if (initialRoute && initialRoute.route && initialRoute.route.keepAlive) {
|
|
321
283
|
initialRoute.route.keepAliveData = {
|
|
322
284
|
pageEl: initialPage.el
|
|
@@ -331,11 +293,9 @@ export default {
|
|
|
331
293
|
routerId,
|
|
332
294
|
pages: pages.value,
|
|
333
295
|
instance: f7View,
|
|
334
|
-
|
|
335
296
|
setPages(newPages) {
|
|
336
297
|
setPages([...newPages]);
|
|
337
298
|
}
|
|
338
|
-
|
|
339
299
|
};
|
|
340
300
|
f7routers.views.push(routerData);
|
|
341
301
|
routerData.instance = f7.views.create(elRef.value, {
|
|
@@ -347,7 +307,6 @@ export default {
|
|
|
347
307
|
});
|
|
348
308
|
f7View = routerData.instance;
|
|
349
309
|
}
|
|
350
|
-
|
|
351
310
|
if (!props.init) return;
|
|
352
311
|
f7View.on('resize', onResize);
|
|
353
312
|
f7View.on('swipebackMove', onSwipeBackMove);
|
|
@@ -368,7 +327,6 @@ export default {
|
|
|
368
327
|
if (f7View.destroy) f7View.destroy();
|
|
369
328
|
f7View = null;
|
|
370
329
|
}
|
|
371
|
-
|
|
372
330
|
f7routers.views.splice(f7routers.views.indexOf(routerData), 1);
|
|
373
331
|
routerData = null;
|
|
374
332
|
});
|
|
@@ -382,9 +340,7 @@ export default {
|
|
|
382
340
|
'tab-active': props.tabActive,
|
|
383
341
|
tab: props.tab
|
|
384
342
|
}, colorClasses(props)));
|
|
385
|
-
|
|
386
343
|
const getComponent = page => toRaw(page.component);
|
|
387
|
-
|
|
388
344
|
const getProps = page => {
|
|
389
345
|
const {
|
|
390
346
|
component: pageComponent,
|
|
@@ -398,7 +354,6 @@ export default {
|
|
|
398
354
|
});
|
|
399
355
|
return passProps;
|
|
400
356
|
};
|
|
401
|
-
|
|
402
357
|
return () => {
|
|
403
358
|
return h('div', {
|
|
404
359
|
ref: elRef,
|
|
@@ -409,5 +364,4 @@ export default {
|
|
|
409
364
|
}))]);
|
|
410
365
|
};
|
|
411
366
|
}
|
|
412
|
-
|
|
413
367
|
};
|
package/components/views.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -16,7 +14,6 @@ export default {
|
|
|
16
14
|
tabs: Boolean,
|
|
17
15
|
...colorProps
|
|
18
16
|
},
|
|
19
|
-
|
|
20
17
|
setup(props) {
|
|
21
18
|
const classes = computed(() => classNames('views', {
|
|
22
19
|
tabs: props.tabs
|
|
@@ -25,5 +22,4 @@ export default {
|
|
|
25
22
|
classes
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
};
|