Skip to content

Commit

Permalink
releases: 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jun 4, 2018
1 parent 9d23224 commit 11da202
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 85 deletions.
18 changes: 18 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ title:
type: Other
---

### 1.0.6

`2018-6-4`

- @delon/abc
- simple-table
- 优化列描述 `click` 若返回字符串值表示自动导航该路由
- 修复 `reload``load` 组件方法若不指定 `extraParams` 时应保持上一次结果
- @delon/form
- 增加 SFComponent 的 `validator` 方法用于手动触发一次校验
- 增加 Select 小部件 `change` 事件,[#482](https://github.com/cipchk/ng-alain/issues/482)
- 修复非必填项时空值也会被校验,[#91](https://github.com/cipchk/delon/issues/91)
- 修复 `ueditor` 无效参数 `ngContentChange``ngModelChange`[@vellengs](https://github.com/vellengs)
- @delon/util
- 修复 `deepGet` 路径中间空值时返回错误,此 bug 受影响 `simple-table` 若值为空时也会相同错误
- Schematics
- 新增 `yarn` 插件

### 1.0.5

`2018-5-28`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delon",
"version": "1.0.5",
"version": "1.0.6",
"typings": "index.d.ts",
"description": "Delon is a set of essential modules for ng-alain.",
"repository": {
Expand Down
46 changes: 43 additions & 3 deletions packages/abc/sidebar-nav/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,29 @@ module: AdSidebarNavModule

ng-alain 左边主菜单,依赖于 `@delon/theme`

组件的数据来自 `MenuService`因此变更它也会同步变更组件
组件的数据来自 `MenuService`其结构为 [Menu](https://github.com/cipchk/delon/blob/master/packages/theme/services/menu/interface.ts),同时对 `MenuService` 的操作会直接同步主菜单组件

## 关于隐藏
## 常见问题

若希望永远不显示菜单,可以在菜单设置 `hide: true`
### 为什么会有两个快捷菜单

快捷菜单生成规则是【统一在下标0的节点下(即【主导航】节点下方)】为寻找点,且按以下顺序来获取:

1. 【推荐】 children 存在 `shortcut_root: true` 则最优先
2. 否则查找带有【dashboard】字样链接,若存在则在此菜单的下方创建快捷入口
3. 否则放在0节点位置

因此,建议在菜单数据的第 `0` 个下标里保持一个有效的 `shortcut_root: true` 数据。

### 关于隐藏

**隐藏主菜单项**

表示永远不显示菜单,可以在菜单设置 `hide: true`

**隐藏自动生成导航隐藏面包屑**

表示不显示该节点,可以在菜单设置 `hideInBreadcrumb: true`

## API

Expand All @@ -21,3 +39,25 @@ ng-alain 左边主菜单,依赖于 `@delon/theme`。
----|------|-----|------
autoCloseUnderPad | 小于Pad宽度时路由切换后自动关闭侧边栏 | `boolean` | `true`
select | 切换时回调 | `EventEmitter<Menu>` | -

### 菜单数据结构

参数 | 类型 | 说明
----|------|-----
text | `string` | 文本,必填项
i18n | `string` | i18n主键
group | `string` | 是否菜单组,指[示例](https://cipchk.github.io/ng-alain/)中的【主导航】字样
link | `string` | angular 路由,`link``externalLink` 二选其一
externalLink | `string` | 外部链接,`link``externalLink` 二选其一
target | `_blank,_self,_parent,_top` | 链接 target
icon | `string` | 图标,指[示例](https://cipchk.github.io/ng-alain/)中的【仪表盘】前图标,只对一级菜单有效
badge | `number` | 徽标数,展示的数字,指[示例](https://cipchk.github.io/ng-alain/)中的【小部件】后的红色块。(注:`group:true` 时无效)
badge_dot | `boolean` | 徽标数,显示小红点
badge_status | `string` | 徽标 Badge 颜色 (默认:error, 所有颜色值见:https://github.com/cipchk/ng-alain/blob/master/_documents/utils.md#色彩)
hide | `boolean` | 是否隐藏菜单
hideInBreadcrumb | `boolean` | 隐藏面包屑,指 `page-header` 组件的自动生成面包屑时有效
acl | `any` | ACL配置,若导入 `@delon/acl` 时自动有效,等同于 `ACLService.can(roleOrAbility: ACLCanType)` 参数值
shortcut | `boolean` | 是否快捷菜单项
shortcut_root | `boolean` | 快捷菜单根节点
reuse | `boolean` | 是否允许复用,需配合 `reuse-tab` 组件
children | `Menu[]` | 子菜单
2 changes: 1 addition & 1 deletion packages/form/widgets-third/ueditor/ueditor.widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ControlWidget } from '@delon/form';
[config]="config"
[loadingTip]="loading"
[delay]="delay"
(onContentChange)="change($event)">
(ngModelChange)="change($event)">
</ueditor>
</sf-item-wrap>
`,
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/docs/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ ng-alain 默认提供了一部分的代码风格配置方案,你可以在项

在国内使用 npm 始终是一个“痛”,因此你可以增加一个使用淘宝镜像配置文件 `.npmrc`,来解决网络问题。

### yarn (待发布)
### yarn

修复由于降级 Less 导致无法使用 `yarn` 安装依赖包问题。
2 changes: 1 addition & 1 deletion scaffold
6 changes: 5 additions & 1 deletion site/app/routes/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ <h1>Ng Alain</h1>
<github-button type="stargazers" size="large" namespace="cipchk" repo="ng-alain"></github-button>
</div>
</div>
<div class="banner-image-wrapper"></div>
<div class="banner-image-wrapper">
<a href="//e.ng-alain.com/theme/antd-pro" target="_blank">
<img src="//i.ng-alain.com/18/0603/02ae06d9-1679-4960-b48b-149f39e0b8ee.png_/format/webp/lossless/true" alt="thank you">
</a>
</div>
</div>
156 changes: 79 additions & 77 deletions site/app/routes/home/home.component.less
Original file line number Diff line number Diff line change
@@ -1,83 +1,85 @@
::ng-deep {
.index-page {
app-header {
box-shadow: none;
}
.index-page {
app-header {
box-shadow: none;
}
}
}

:host {
width: 100%;
color: #697b8c;
display: block;

::ng-deep {
.ant-btn {
min-width: 110px;
height: 40px;
border-radius: 20px;
font-size: 16px;
margin-right: 16px;
&:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}
}
.banner-wrapper {
height: 526px;
width: 100%;
max-width: 1500px;
margin: auto;
position: relative;
.banner-title-wrapper {
width: 40%;
max-width: 480px;
height: 245px;
position: absolute;
top: 0;
bottom: 0;
left: 8%;
margin: auto;
z-index: 1;
> * {
will-change: transform;
}
h1 {
font-family: "Futura", "Helvetica Neue For Number",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
"Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 54px;
margin: 12px 0;
}
p {
font-size: 20px;
}
.button-wrapper {
margin-top: 64px;
line-height: 40px;
align-items: center;
display: flex;
.github {
display: flex;
}
}
.title-line {
transform: translateX(-64px);
animation: bannerTitleLine 3s ease-in-out 0s infinite;
}
}
.banner-image-wrapper {
width: 45%;
max-width: 598px;
height: 324px;
position: absolute;
right: 8%;
margin: auto;
top: 0;
bottom: 0;
opacity: 0;
}
}
}
width: 100%;
color: #697b8c;
display: block;
::ng-deep {
.ant-btn {
min-width: 110px;
height: 40px;
border-radius: 20px;
font-size: 16px;
margin-right: 16px;
&:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}
}
.banner-wrapper {
height: 526px;
width: 100%;
max-width: 1500px;
margin: auto;
position: relative;
.banner-title-wrapper {
width: 40%;
max-width: 480px;
height: 245px;
position: absolute;
top: 0;
bottom: 0;
left: 8%;
margin: auto;
z-index: 1;
> * {
will-change: transform;
}
h1 {
font-family: 'Futura', 'Helvetica Neue For Number', -apple-system,
BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC',
'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica,
Arial, sans-serif;
font-size: 54px;
margin: 12px 0;
}
p {
font-size: 20px;
}
.button-wrapper {
margin-top: 64px;
line-height: 40px;
align-items: center;
display: flex;
.github {
display: flex;
}
}
.title-line {
transform: translateX(-64px);
animation: bannerTitleLine 3s ease-in-out 0s infinite;
}
}
.banner-image-wrapper {
width: 45%;
max-width: 360px;
height: 324px;
position: absolute;
margin: auto;
top: 0;
bottom: 0;
right: 15%;
img {
max-width: 100%;
border-radius: 8px;
}
}
}
}
}

0 comments on commit 11da202

Please sign in to comment.