fix:修复 nav 多层嵌套的展现问题;只有 publish-sdk 和 gh-pages 下才编译 ie11,避免 dev 修改 sc… (#1292)

* fix:修复 nav 多层嵌套的展现问题;只有 publish-sdk 和 gh-pages 下才编译 ie11,避免 dev 修改 scss 等太久

* publish-sdk 中不需要转换 ie11
This commit is contained in:
吴多益 2020-12-30 20:15:06 +08:00 committed by GitHub
parent 9350067327
commit 5fa0a020a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 6 deletions

View File

@ -36,6 +36,47 @@ order: 58
}
```
## 配置多层级
```schema:height="300" scope="body"
{
"type": "nav",
"stacked": true,
"className": "w-md",
"links": [
{
"label": "Nav 1",
"to": "/docs/index",
"icon": "fa fa-user",
"active": true
},
{
"label": "Nav 2",
"unfolded": true,
"children": [
{
"label": "Nav 2-1",
"children": [
{
"label": "Nav 2-1-1",
"to": "/docs/api-2-1-1"
}
]
},
{
"label": "Nav 2-2",
"to": "/docs/api-2-2"
}
]
},
{
"label": "Nav 3",
"to": "/docs/renderers"
}
]
}
```
## 横向摆放
```schema:height="300" scope="body"
@ -71,5 +112,7 @@ order: 58
| links[x].label | `string` | | 名称 |
| links[x].to | [模板](../concepts/template) | | 链接地址 |
| links[x].icon | `string` | | 图标 |
| links[x].children | `Array<link>` | | 子链接 |
| links[x].unfolded | `boolean` | | 初始是否展开 |
| links[x].active | `boolean` | | 是否高亮 |
| links[x].activeOn | [表达式](../concepts/expression) | | 是否高亮的条件,留空将自动分析链接地址 |

View File

@ -61,10 +61,6 @@ fis.match('*.scss', {
rExt: '.css'
});
fis.match('*-ie11.scss', {
postprocessor: convertSCSSIE11
});
fis.match('/src/icons/**.svg', {
rExt: '.js',
isJsXLike: true,
@ -561,6 +557,9 @@ if (fis.project.currentMedia() === 'publish') {
]
});
} else if (fis.project.currentMedia() === 'gh-pages') {
fis.match('*-ie11.scss', {
postprocessor: convertSCSSIE11
});
const ghPages = fis.media('gh-pages');
ghPages.match('*.scss', {

View File

@ -68,7 +68,7 @@
border-radius: var(--Nav-item-borderRadius);
}
&:hover > a,
> a:hover,
> a:focus {
border-color: var(--Nav-item-onHover-color);
text-decoration: none;
@ -90,13 +90,14 @@
padding-left: px2rem(12px);
}
&.is-unfolded {
&.is-unfolded > {
.#{$ns}Nav-itemToggler {
transform: rotate(180deg) scale(0.8);
}
.#{$ns}Nav-subItems {
display: block;
margin-left: var(--gap-sm);
}
}