@varlet/cli 1.24.5-alpha.1640960457260 → 1.24.5-alpha.1640960824176
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "1.24.5-alpha.
|
|
3
|
+
"version": "1.24.5-alpha.1640960824176",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"gitHead": "ee9c3866bedad96c86365b0f9888a3a6bb781b1f",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@varlet/icons": "1.24.5-alpha.
|
|
33
|
-
"@varlet/markdown-vite-plugin": "1.24.5-alpha.
|
|
34
|
-
"@varlet/touch-emulator": "1.24.5-alpha.
|
|
32
|
+
"@varlet/icons": "1.24.5-alpha.1640960824176",
|
|
33
|
+
"@varlet/markdown-vite-plugin": "1.24.5-alpha.1640960824176",
|
|
34
|
+
"@varlet/touch-emulator": "1.24.5-alpha.1640960824176",
|
|
35
35
|
"@babel/core": "^7.14.8",
|
|
36
36
|
"@babel/preset-env": "^7.14.8",
|
|
37
37
|
"@babel/preset-typescript": "^7.14.5",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/lodash-es": "^4.17.5"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@varlet/touch-emulator": "1.24.5-alpha.
|
|
76
|
+
"@varlet/touch-emulator": "1.24.5-alpha.1640960824176",
|
|
77
77
|
"@vue/test-utils": "^2.0.0-rc.6",
|
|
78
78
|
"vue": "3.2.16",
|
|
79
79
|
"vue-router": "4.0.12",
|
|
@@ -7,12 +7,6 @@ export function getLeft(element: HTMLElement): number {
|
|
|
7
7
|
return left + (document.body.scrollLeft || document.documentElement.scrollLeft)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export function getTop(element: HTMLElement): number {
|
|
11
|
-
const { top } = element.getBoundingClientRect()
|
|
12
|
-
|
|
13
|
-
return top + (document.body.scrollTop || document.documentElement.scrollTop)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
10
|
export const isRem = (value: unknown) => isString(value) && value.endsWith('rem')
|
|
17
11
|
|
|
18
12
|
// example 1 || 1px
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</var-site-cell>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<script>
|
|
24
|
+
<script lang='ts'>
|
|
25
25
|
import config from '@config'
|
|
26
26
|
import { useRouter } from 'vue-router'
|
|
27
27
|
import { reactive, ref } from 'vue'
|
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
const logo = ref(config?.logo ?? '')
|
|
35
35
|
const description = ref(config?.mobile?.title ?? {})
|
|
36
36
|
const menu = ref(config?.pc?.menu ?? [])
|
|
37
|
-
const configComponents = menu.value.filter((item) => item.type === 2)
|
|
37
|
+
const configComponents = menu.value.filter((item: any) => item.type === 2)
|
|
38
38
|
const components = reactive(configComponents)
|
|
39
39
|
const lang = ref('zh-CN')
|
|
40
40
|
const platform = ref('mobile')
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
platform.value = newValue
|
|
49
49
|
})
|
|
50
50
|
|
|
51
|
-
const toComponent = (component) => {
|
|
51
|
+
const toComponent = (component: any) => {
|
|
52
52
|
router.push({
|
|
53
53
|
path: `/${component.doc}`,
|
|
54
54
|
query: {
|
|
@@ -59,6 +59,7 @@ export default {
|
|
|
59
59
|
})
|
|
60
60
|
|
|
61
61
|
if (!isPhone() && inIframe()) {
|
|
62
|
+
// @ts-ignore
|
|
62
63
|
window.top.scrollToMenu(component.doc)
|
|
63
64
|
}
|
|
64
65
|
}
|
package/site/mobile/main.ts
CHANGED
|
@@ -29,17 +29,16 @@ redirect &&
|
|
|
29
29
|
|
|
30
30
|
routes.push({
|
|
31
31
|
path: '/home',
|
|
32
|
-
// @ts-ignore
|
|
33
32
|
component: () => import('./components/AppHome.vue')
|
|
34
33
|
})
|
|
35
34
|
|
|
36
35
|
const router = createRouter({
|
|
37
36
|
history: createWebHashHistory(),
|
|
38
|
-
scrollBehavior: (to, from, savedPosition) => savedPosition || { left: 0, top: 0 },
|
|
37
|
+
scrollBehavior: (to: any, from: any, savedPosition: any) => savedPosition || { left: 0, top: 0 },
|
|
39
38
|
routes,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
|
-
router.beforeEach((to) => {
|
|
41
|
+
router.beforeEach((to: any) => {
|
|
43
42
|
const language = to.query.language ?? defaultLanguage
|
|
44
43
|
const path = to.path
|
|
45
44
|
const replace = to.query.replace
|
package/site/module.d.ts
CHANGED
package/site/pc/main.ts
CHANGED
package/site/utils.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { get } from 'lodash-es'
|
|
3
3
|
import { formatStyleVars } from './components/utils/elements'
|
|
4
|
-
import config from '@config'
|
|
5
4
|
|
|
6
5
|
export * from './components/utils/components'
|
|
7
6
|
export * from './components/utils/elements'
|