mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge branch 'dev' into next
This commit is contained in:
commit
c4e9f2c991
@ -12,6 +12,9 @@
|
|||||||
"types",
|
"types",
|
||||||
"vetur"
|
"vetur"
|
||||||
],
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "https://registry.npmjs.org/"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "yarn || npm i",
|
"bootstrap": "yarn || npm i",
|
||||||
"dev": "vant-cli dev",
|
"dev": "vant-cli dev",
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
### v2.5.5
|
||||||
|
|
||||||
|
`2020-09-26`
|
||||||
|
|
||||||
|
- 新增 Open Sas 字体
|
||||||
|
- 修复搜索时无法跳转到对应锚点的问题
|
||||||
|
- 修复自定义 webpack 配置时某些情况下出现配置错误的问题
|
||||||
|
|
||||||
### v2.5.4
|
### v2.5.4
|
||||||
|
|
||||||
`2020-09-22`
|
`2020-09-22`
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"registry": "https://registry.npmjs.org/"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsc --watch",
|
"dev": "tsc --watch",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@import './var';
|
@import './var';
|
||||||
|
@import './font.less';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-width: 1100px;
|
min-width: 1100px;
|
||||||
@ -6,9 +7,9 @@ body {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
color: @van-doc-black;
|
color: @van-doc-black;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
|
||||||
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB',
|
Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui',
|
||||||
'Microsoft Yahei', sans-serif;
|
'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
|
||||||
background-color: @van-doc-background-color;
|
background-color: @van-doc-background-color;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
163
packages/vant-cli/site/common/style/font.less
Normal file
163
packages/vant-cli/site/common/style/font.less
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/* cyrillic-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWJ0bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
|
||||||
|
U+FE2E-FE2F;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cyrillic */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFUZ0bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* greek-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWZ0bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+1F00-1FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* greek */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFVp0bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0370-03FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vietnamese */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWp0bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
|
||||||
|
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFW50bf8pkAp6a.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
|
||||||
|
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||||
|
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
|
||||||
|
U+FEFF, U+FFFD;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cyrillic-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOX-hpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
|
||||||
|
U+FE2E-FE2F;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cyrillic */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOVuhpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* greek-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXuhpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+1F00-1FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* greek */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOUehpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0370-03FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vietnamese */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXehpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
|
||||||
|
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXOhpKKSTj5PW.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
|
||||||
|
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
|
||||||
|
url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2)
|
||||||
|
format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||||
|
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
|
||||||
|
U+FEFF, U+FFFD;
|
||||||
|
}
|
@ -108,7 +108,6 @@ export default {
|
|||||||
|
|
||||||
.van-doc-intro {
|
.van-doc-intro {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
@ -90,7 +90,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
anotherLang() {
|
anotherLang() {
|
||||||
const items = this.langConfigs.filter(item => item.lang !== this.lang);
|
const items = this.langConfigs.filter((item) => item.lang !== this.lang);
|
||||||
if (items.length) {
|
if (items.length) {
|
||||||
return items[0];
|
return items[0];
|
||||||
}
|
}
|
||||||
@ -178,7 +178,6 @@ export default {
|
|||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||||
|
@ -29,6 +29,17 @@ export default {
|
|||||||
if (this.searchConfig) {
|
if (this.searchConfig) {
|
||||||
this.docsearchInstance = window.docsearch({
|
this.docsearchInstance = window.docsearch({
|
||||||
...this.searchConfig,
|
...this.searchConfig,
|
||||||
|
transformData: (hits) => {
|
||||||
|
hits.forEach((hit) => {
|
||||||
|
if (hit.anchor) {
|
||||||
|
hit.url = hit.url + '#' + hit.anchor;
|
||||||
|
hit.anchor = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (this.searchConfig.transformData) {
|
||||||
|
this.searchConfig.transformData(hits);
|
||||||
|
}
|
||||||
|
},
|
||||||
inputSelector: '.van-doc-search',
|
inputSelector: '.van-doc-search',
|
||||||
algoliaOptions: {
|
algoliaOptions: {
|
||||||
facetFilters: [`lang:${this.lang}`],
|
facetFilters: [`lang:${this.lang}`],
|
||||||
|
@ -112,7 +112,7 @@ app.use(Button);
|
|||||||
| color | Color, support linear-gradient | _string_ | - |
|
| color | Color, support linear-gradient | _string_ | - |
|
||||||
| icon | Left Icon | _string_ | - |
|
| icon | Left Icon | _string_ | - |
|
||||||
| icon-prefix `v2.6.0` | Icon className prefix | _string_ | `van-icon` |
|
| icon-prefix `v2.6.0` | Icon className prefix | _string_ | `van-icon` |
|
||||||
| icon-position `v2.10.7` | Icon position, can be set to `right` | `left` |
|
| icon-position `v2.10.7` | Icon position, can be set to `right` | _string_ | `left` |
|
||||||
| tag | HTML Tag | _string_ | `button` |
|
| tag | HTML Tag | _string_ | `button` |
|
||||||
| native-type | Native Type Attribute | _string_ | `button` |
|
| native-type | Native Type Attribute | _string_ | `button` |
|
||||||
| plain | Whether to be plain button | _boolean_ | `false` |
|
| plain | Whether to be plain button | _boolean_ | `false` |
|
||||||
|
@ -134,7 +134,7 @@ app.use(Button);
|
|||||||
| color | 按钮颜色,支持传入 `linear-gradient` 渐变色 | _string_ | - |
|
| color | 按钮颜色,支持传入 `linear-gradient` 渐变色 | _string_ | - |
|
||||||
| icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
|
| icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
|
||||||
| icon-prefix `v2.6.0` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
|
| icon-prefix `v2.6.0` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
|
||||||
| icon-position `v2.10.7` | 图标展示位置,可选值为 `right` | `left` |
|
| icon-position `v2.10.7` | 图标展示位置,可选值为 `right` | _string_ | `left` |
|
||||||
| tag | 按钮根节点的 HTML 标签 | _string_ | `button` |
|
| tag | 按钮根节点的 HTML 标签 | _string_ | `button` |
|
||||||
| native-type | 原生 button 标签的 type 属性 | _string_ | `button` |
|
| native-type | 原生 button 标签的 type 属性 | _string_ | `button` |
|
||||||
| block | 是否为块级元素 | _boolean_ | `false` |
|
| block | 是否为块级元素 | _boolean_ | `false` |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user