Compare commits

...

4 Commits

Author SHA1 Message Date
chenjiahan
2dcb4e39b1 docs(changelog): @vant/icons@2.0.1 2023-01-14 21:58:38 +08:00
chenjiahan
892e69a8a8 release: @vant/icons 2.0.1 2023-01-14 21:56:33 +08:00
neverland
2ffdbcdef2
fix(Icons): add woff format to compat some special webview (#11485) 2023-01-14 21:55:43 +08:00
wChenonly
13629b2070
fix(doc): sidebar covers nav when scrolling (#11468) 2023-01-14 21:50:07 +08:00
6 changed files with 23 additions and 15 deletions

View File

@ -172,6 +172,8 @@ export default {
width: 100%;
background-color: var(--van-doc-header-background);
user-select: none;
position: relative;
z-index: 2;
&__top {
display: flex;

View File

@ -1,5 +1,5 @@
<template>
<div class="van-doc-nav" :style="style">
<div :class="['van-doc-nav', { 'van-doc-nav-fixed': isFixed }]">
<div
v-for="(group, index) in navConfig"
class="van-doc-nav__group"
@ -38,19 +38,11 @@ export default {
data() {
return {
top: 64,
bottom: 0,
isFixed: false,
};
},
computed: {
style() {
return {
top: this.top + 'px',
bottom: this.bottom + 'px',
};
},
base() {
return this.lang ? `/${this.lang}/` : '/';
},
@ -64,7 +56,7 @@ export default {
methods: {
onScroll() {
const { pageYOffset: offset } = window;
this.top = Math.max(0, 64 - offset);
this.isFixed = offset > 64;
},
},
};
@ -72,8 +64,10 @@ export default {
<style lang="less">
.van-doc-nav {
position: fixed;
position: absolute;
left: 0;
top: var(--van-doc-header-top-height);
bottom: 0;
z-index: 1;
min-width: var(--van-doc-nav-width);
max-width: var(--van-doc-nav-width);
@ -86,6 +80,10 @@ export default {
margin-left: calc((var(--van-doc-row-max-width) / 2 * -1));
}
&.van-doc-nav-fixed {
position: fixed;
top: 0;
}
&::-webkit-scrollbar {
width: 6px;
height: 6px;

View File

@ -1,5 +1,9 @@
## Changelog
## 2.0.1
- add woff format back to be compatible with some special webview
## 2.0.0
- no longer support woff/ttf format

View File

@ -1,6 +1,6 @@
{
"name": "@vant/icons",
"version": "2.0.0",
"version": "2.0.1",
"description": "vant icons",
"main": "./src/config.js",
"types": "./src/config.d.ts",

File diff suppressed because one or more lines are too long

View File

@ -6,5 +6,7 @@
font-display: auto;
font-family: 'vant-icon';
src: url('//at.alicdn.com/t/c/font_2553510_ovbl29ce9ud.woff2?t=1672541115585')
format('woff2');
format('woff2'),
url('//at.alicdn.com/t/c/font_2553510_ovbl29ce9ud.woff?t=1672541115585')
format('woff');
}