Skip to content

Commit

Permalink
Merge branch 'main' into back-top
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni authored Dec 19, 2021
2 parents 31f7ac8 + fe3b5bf commit 8d42986
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CHANGELOG

## Pending
# Pending

### Fixes

- Fix `n-transfer` list doesn't follow container height when style.height is set, closes [#1879](https://github.com/TuSimple/naive-ui/issues/1879).

### Feats

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Pending

### Fixes

- 修复 `n-transfer` 在自定义高度后内部列表和容器高度不一致,关闭 [#1879](https://github.com/TuSimple/naive-ui/issues/1879)

### Feats

- `n-back-top` 的 CSS 变量使用 `n` 作为前缀
Expand Down
1 change: 1 addition & 0 deletions src/drawer/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slot
| Name | Parameters | Default | Description |
| --- | --- | --- | --- |
| content-style | `string \| Object` | `undefined` | Style of drawer's scrollable content node. |
| display-directive | `'if' \| 'show'` | `'if'` | The display directive to use when `n-drawer` is rendered. `'if'` corresponds to `v-if` and `'show'` corresponds to `v-show`. |
| height | `number \| string` | `251` | Works when placement is `top` and `bottom`. |
| native-scrollbar | `boolean` | `true` | Whether to use native scrollbar on drawer. |
| mask-closable | `boolean` | `true` | Whether to emit `hide` event when click mask. |
Expand Down
2 changes: 1 addition & 1 deletion src/drawer/demos/enUS/multiple.demo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Multiple Drawers
# Multiple drawers

```html
<n-button @click="doShowOuter">Come on!</n-button>
Expand Down
2 changes: 1 addition & 1 deletion src/drawer/demos/enUS/slot.demo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Custom Header and Bottom Content
# Custom header and bottom content

```html
<n-button-group>
Expand Down
1 change: 1 addition & 0 deletions src/drawer/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dark-4-debug
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| content-style | `string \| Object` | `undefined` | 抽屉可滚动内容节点的样式 |
| display-directive | `'if' \| 'show'` | `'if'` | `n-drawer` 在控制内容是否渲染时使用的指令,`'if'` 对应 `v-if``'show'` 对应 `v-show` |
| height | `number \| string` | `251` | 抽屉的高度,在位置是 `top``bottom` 时生效 |
| mask-closable | `boolean` | `true` | 点击遮罩时是否发出 `update:show` 事件 |
| native-scrollbar | `boolean` | `true` | 是否使用原生滚动 |
Expand Down
16 changes: 8 additions & 8 deletions src/transfer/src/styles/index.cssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ export default c([
display: flex;
width: var(--width);
font-size: var(--font-size);
height: 240px;
display: flex;
flex-wrap: nowrap;
`, [
cM('filterable', [
cB('transfer-list', [
cB('transfer-list-body', {
height: 'calc(var(--item-height) * 5.6 + 45px)'
})
])
]),
cB('transfer-icon', `
color: var(--icon-color);
transition: color .3s var(--bezier);
Expand All @@ -75,6 +71,9 @@ export default c([
})
]),
cB('transfer-list', `
height: inherit;
display: flex;
flex-direction: column;
background-clip: padding-box;
width: calc(50% - 36px);
position: relative;
Expand Down Expand Up @@ -134,7 +133,8 @@ export default c([
`)
]),
cB('transfer-list-body', `
height: calc(var(--item-height) * 5.6);
flex-basis: 0;
flex-grow: 1;
box-sizing: border-box;
overflow: hidden;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/upload/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ download
| with-credentials | `boolean` | `false` | Any credentials to be sent with the request (e.g. cookie). | |
| on-change | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo>, event?: Event }) => void` | `() => {}` | Uploaded file(s) status change callback. | |
| on-update:file-list | `(fileList: UploadFileInfo[]) => void` | `undefined` | Callback function triggered on file-list changes. | |
| on-finish | `(options: { file: UploadFileInfo, event: Event }) => UploadFileInfo \| void` | `({ file }) => file` | Upload finished callback. You can intercept and even modify the uploaded `UploadFileInfo`. Note: file will be null in next event-loop | |
| on-finish | `(options: { file: UploadFileInfo, event?: Event }) => UploadFileInfo \| void` | `({ file }) => file` | Upload finished callback. You can intercept and even modify the uploaded `UploadFileInfo`. Note: file will be null in next event-loop | |
| on-remove | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo> }) => boolean \| Promise<boolean> \| any` | `() => true` | File removed callback. Returning `false`, a promise resolved with `false`, or a rejected promise will cancel this removal. | |
| on-before-upload | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo> }) => (Promise<boolean \| void> \| boolean \| void)` | `true` | Upload ready to start callback. Returning `false`, a promise resolved with `false`, or a rejected promise will cancel the upload. | |
| on-download | `(file: FileInfo) => void` | `undefined` | Callback for clicking download buttons. | |
Expand Down
2 changes: 1 addition & 1 deletion src/upload/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ retry-debug
| show-trigger | `boolean` | `true` | 是否显示触发元素 | 2.21.5 |
| with-credentials | `boolean` | `false` | 是否携带 Cookie | |
| on-change | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo>, event?: Event }) => void` | `() => {}` | 组件状态变化的回调,组件的任何文件状态变化都会触发回调 | |
| on-finish | `(options: { file: UploadFileInfo, event: Event }) => UploadFileInfo \| void` | `({ file }) => file` | 文件上传结束的回调,可以修改传入的 UploadFileInfo 或者返回一个新的 UploadFileInfo。注意:file 将会下一次事件循环中被置为 null | |
| on-finish | `(options: { file: UploadFileInfo, event?: Event }) => UploadFileInfo \| void` | `({ file }) => file` | 文件上传结束的回调,可以修改传入的 UploadFileInfo 或者返回一个新的 UploadFileInfo。注意:file 将会下一次事件循环中被置为 null | |
| on-update:file-list | `(fileList: UploadFileInfo[]) => void` | `undefined` | 当 file-list 改变时触发的回调函数 | |
| on-before-upload | `(options: { file: UploadFileInfo, fileList: UploadFileInfo[] }) => (Promise<boolean \| void> \| boolean \| void)` | `undefined` | 文件上传之前的回调,返回 `false``Promise resolve false``Promise rejected` 时会取消本次上传 | |
| on-download | `(file: FileInfo) => void` | `undefined` | 点击文件下载按钮的回调函数 | |
Expand Down

0 comments on commit 8d42986

Please sign in to comment.