@varlet/cli 1.19.0 → 1.20.1-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "1.19.0",
3
+ "version": "1.20.1-alpha.1+3769f8b0",
4
4
  "description": "cli of varlet",
5
5
  "bin": {
6
6
  "varlet-cli": "./lib/index.js"
@@ -31,7 +31,7 @@
31
31
  "dev": "tsc --watch",
32
32
  "build": "tsc"
33
33
  },
34
- "gitHead": "8f36f46b709b745fcd6226d14f5c10e978c80b68",
34
+ "gitHead": "3769f8b0837bc16f9bc4d7ce3405cac61c1f79e1",
35
35
  "dependencies": {
36
36
  "@babel/core": "^7.14.8",
37
37
  "@babel/preset-env": "^7.14.8",
@@ -41,10 +41,10 @@
41
41
  "@release-it/conventional-changelog": "^3.3.0",
42
42
  "@varlet/eslint-config": "^1.13.0",
43
43
  "@varlet/icons": "^1.0.0",
44
- "@varlet/markdown-loader": "^1.19.0",
44
+ "@varlet/markdown-loader": "^1.20.0",
45
45
  "@varlet/stylelint-config": "^1.9.0",
46
46
  "@varlet/touch-emulator": "^1.0.1",
47
- "@varlet/ui": "^1.19.0",
47
+ "@varlet/ui": "^1.20.1-alpha.1+3769f8b0",
48
48
  "@vue/babel-plugin-jsx": "^1.0.6",
49
49
  "@vue/compiler-sfc": "3.1.4",
50
50
  "@vue/test-utils": "^2.0.0-rc.6",
package/site/pc/App.vue CHANGED
@@ -193,6 +193,10 @@ iframe {
193
193
  }
194
194
  }
195
195
 
196
+ &-component-preview {
197
+ margin-top: 20px;
198
+ }
199
+
196
200
  &-site {
197
201
  &-content {
198
202
  height: calc(100vh - 60px);
package/site/utils.ts CHANGED
@@ -53,9 +53,12 @@ export function getHashSearch() {
53
53
  return new URLSearchParams(hashSearch)
54
54
  }
55
55
 
56
- export function watchLang(cb: (lang: string) => void) {
56
+ export function watchLang(cb: (lang: string) => void, platform: 'pc' | 'mobile' = 'mobile') {
57
57
  const handleHashchange = () => {
58
- const language = getHashSearch().get('language') ?? 'zh-CN'
58
+ const language = platform === 'mobile'
59
+ ? (getHashSearch().get('language') ?? 'zh-CN')
60
+ : getPCLocationInfo().language
61
+
59
62
  cb(language)
60
63
  }
61
64