Skip to content

Commit

Permalink
Merge branch 'main' into feat-tree-select-strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni authored Sep 2, 2021
2 parents b2deea8 + 29577a2 commit 2644384
Show file tree
Hide file tree
Showing 363 changed files with 6,668 additions and 1,460 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
23 changes: 23 additions & 0 deletions .github/workflows/sync-gitee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🔀 Sync mirror to Gitee

on:
push:
branches:
- main
- docs
create:

jobs:
mirror:
runs-on: ubuntu-latest
if: github.repository == 'TuSimple/naive-ui'
steps:
- name: mirror
continue-on-error: true
if: github.event_name == 'push' || (github.event_name == 'create' && github.event.ref_type == 'tag')
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
with:
source-repo: 'git@github.com:TuSimple/naive-ui.git'
destination-repo: 'git@gitee.com:naive-ui/naive-ui.git'
89 changes: 87 additions & 2 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,92 @@

### Fixes

- Fix `n-cascader` click tag to delete the sub option in multi selection mode, and the tree option is not updated.
- Fix `n-input` chinese input method not correct while mouse leave the input in `clearable` is true, closes [#905](https://github.com/TuSimple/naive-ui/issues/905).

### Feats

- `n-cascader` add `onUpdateValue` prop.
- `n-auto-complete` add `onUpdateValue` prop.
- `n-data-table`'s column's `renderFilterMenu` add `hide` params.
- `n-tree` & `n-tree-select` add `key-field` prop.
- `n-tree` & `n-tree-select` add `label-field` prop.
- `n-tree` & `n-tree-select` add `children-field` prop.
- `n-dropdown` option add `props` prop, closes [#813](https://github.com/TuSimple/naive-ui/issues/813).
- `n-data-table` supports multi-selection by holding down `shift`, closes [#554](https://github.com/TuSimple/naive-ui/issues/554).

### Fixes

- Fix `n-layout`'s `sider-placement` doesn't work after build, closes [#978](https://github.com/TuSimple/naive-ui/issues/978).
- Fix `n-input-number`'s `step` calculate error when the value is decimal, closes [#1007](https://github.com/TuSimple/naive-ui/issues/1007).

## 2.16.7 (2021-08-27)

### Feats

- `n-mention` add `focus` and `blur` methods.

### Fixes

- Fix `n-mention`'s menu is too far from text in input mode.
- Fix `n-tree` node can not expanded.

## 2.16.6 (2021-08-26)

### Feats

- `n-timeline` add `horizontal` prop, closes [#887](https://github.com/TuSimple/naive-ui/issues/887).
- `n-image` add `preview-src` prop, closes [#922](https://github.com/TuSimple/naive-ui/issues/922)
- `n-dynamic-tags` add `input` and `add` slot, closes [#499](https://github.com/TuSimple/naive-ui/issues/499).
- `n-timeline-item` add `color` prop.

### Fixes

- Fix `n-image` not initializing `rotate` after switching images, closes [#921](https://github.com/TuSimple/naive-ui/issues/921).
- Fix `n-data-table`'s loading is not centered, closes [#929](https://github.com/TuSimple/naive-ui/issues/929).
- Fix `n-tree` throws an exception when onLoad callback does not add children, closes [#772](https://github.com/TuSimple/naive-ui/issues/772).
- Fix `n-input` will show placeholder and 0 simultaneously while passing `value=ref(0)` in n-input, closes [#914](https://github.com/TuSimple/naive-ui/issues/914).
- Fix `n-data-table` `flex-height` not working without `scroll-x`, closes [#952](https://github.com/TuSimple/naive-ui/issues/952).

## 2.16.5 (2021-08-20)

### Feats

- `n-input-number` add `clearable` prop.
- `n-form` add `show-label` prop, closes [#858](https://github.com/TuSimple/naive-ui/issues/858).

### Fixes

- Fix `n-notification`'s exported `NotificationReactive` type is not writable, closes [#876](https://github.com/TuSimple/naive-ui/issues/876).
- Fix `n-tabs` style glitches when different types tabs are nested, closes [#850](https://github.com/TuSimple/naive-ui/issues/850).
- Fix `n-dropdown`'s inner link click trigger area is not the entire option, closes [#823](https://github.com/TuSimple/naive-ui/issues/823).
- Fix `n-popover` arrow's misplacement when placed in nested popovers with different placement, closes [#916](https://github.com/TuSimple/naive-ui/issues/916).
- Fix `n-ellpisis` doesn't work after content is updated, closes [#776](https://github.com/TuSimple/naive-ui/issues/776).

## 2.16.4 (2021-08-16)

### Fixes

- Fix ruRU locale exports.

## 2.16.3 (2021-08-16)

### i18n

- Add ruRU locale [#852](https://github.com/TuSimple/naive-ui/pull/852).

### Feats

- `n-message-provider` add `container-style` prop.
- `n-message-provider` add `placement` prop.
- `n-message` add class to distinguish type.
- `n-date-picker` add `shortcuts` props, closes [#280](https://github.com/TuSimple/naive-ui/issues/280).

### Fixes

- Fix `n-rate` half star overlays star background in dark mode.
- Fix `n-menu` use `render-icon` render error when return true.
- Fix `n-menu` renders unexpectly when `render-icon` returns `true`.
- Fix `n-space` render empty placeholder while use `v-if`, closes [#824](https://github.com/TuSimple/naive-ui/issues/824).

## 2.16.2 (2021-08-09)

Expand All @@ -23,7 +107,7 @@
- Fix `n-data-table` When selectAll is selected, the state display of selectAll should not contain disabled rows, closes [#778](https://github.com/TuSimple/naive-ui/issues/778).
- Fix `n-color-picker`'s `on-complete` callback's argument `value` is incorrect, closes [#748](https://github.com/TuSimple/naive-ui/issues/748).

## 2.16.1 (2020-08-06)
## 2.16.1 (2021-08-06)

### Feats

Expand All @@ -32,6 +116,7 @@
- `n-button` add `text-color` prop.
- `n-form` export `FormValidationError` type.
- `n-popconfirm` support not show action components, closes [#770](https://github.com/TuSimple/naive-ui/issues/770).
- `n-upload` add `list-type``show-preview-button``on-preview` and `create-thumbnail-url` prop.

### Fixes

Expand Down
90 changes: 87 additions & 3 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,95 @@
# CHANGELOG


## Pending

### Fixes

- 修复 `n-cascader` 多选模式下点击 tag 删除子选项未更新选中项
- 修复 `n-input``clearable``true` 时鼠标离开输入框时中文输入法不正确,关闭 [#905](https://github.com/TuSimple/naive-ui/issues/905)

### Feats

- `n-cascader` 新增 `onUpdateValue` 方法
- `n-auto-complete` 新增 `onUpdateValue` 方法
- `n-data-table` 的列的 `renderFilterMenu` 新增 hide 参数
- `n-tree``n-tree-select` 新增 `key-field` 属性
- `n-tree``n-tree-select` 新增 `label-field` 属性
- `n-tree``n-tree-select` 新增 `children-field` 属性
- `n-dropdown` 选项新增 `props` 属性,关闭 [#813](https://github.com/TuSimple/naive-ui/issues/813)
- `n-data-table` 支持按住 `shift` 进行多选操作,关闭 [#554](https://github.com/TuSimple/naive-ui/issues/554)

### Fixes

- 修复 `n-layout``sider-placement` 属性在打包之后不生效,关闭 [#978](https://github.com/TuSimple/naive-ui/issues/978)
- 修复 `n-input-number``step` 值为小数时计算错误,关闭 [#1007](https://github.com/TuSimple/naive-ui/issues/1007)

## 2.16.7 (2021-08-27)

### Feats

- `n-mention` 新增 `focus``blur` 方法

### Fixes

- 修复 `n-mention` 在 input 模式下菜单距离文字太远
- 修复 `n-tree` 节点无法展开的问题

## 2.16.6 (2021-08-26)

### Feats

- `n-timeline` 新增 `horizontal` 属性,关闭 [#887](https://github.com/TuSimple/naive-ui/issues/887)
- `n-image` 新增 `preview-src` 属性,关闭 [#922](https://github.com/TuSimple/naive-ui/issues/922)
- `n-dynamic-tags` 新增 `input``add` 插槽,关闭 [#499](https://github.com/TuSimple/naive-ui/issues/499)
- `n-timeline-item` 新增 `color` 属性

### Fixes

- 修复 `n-image` 切换图像后没有初始化 `rotate`,关闭 [#921](https://github.com/TuSimple/naive-ui/issues/921)
- 修复 `n-data-table` 的 loading 不在中间,关闭 [#929](https://github.com/TuSimple/naive-ui/issues/929)
- 修复 `n-tree` 当 onLoad 回调没有添加 children 时抛出错误,关闭 [#772](https://github.com/TuSimple/naive-ui/issues/772)
- 修复 `n-input` 当传递 `value=ref(0)` 时,同时显示 0 和占位符问题,关闭 [#914](https://github.com/TuSimple/naive-ui/issues/914)
- 修复 `n-data-table` `flex-height` 在不设定 `scroll-x` 的时候不生效,关闭 [#952](https://github.com/TuSimple/naive-ui/issues/952)

## 2.16.5 (2021-08-20)

### Feats

- `n-input-number` 新增 `clearable` 属性
- `n-form` 新增 `show-label` 属性,关闭 [#858](https://github.com/TuSimple/naive-ui/issues/858)

### Fixes

- 修复 `n-notification` 导出的 `NotificationReactive` 类型不可变,关闭 [#876](https://github.com/TuSimple/naive-ui/issues/876)
- 修复 `n-tabs` 不同类型嵌套样式错乱,关闭 [#850](https://github.com/TuSimple/naive-ui/issues/850)
- 修复 `n-dropdown` 内部的链接点击触发区域不是整个选项,关闭 [#823](https://github.com/TuSimple/naive-ui/issues/823)
- 修复 `n-popover` 嵌套于不同 placement 的 popover 中箭头位置错乱,关闭 [#916](https://github.com/TuSimple/naive-ui/issues/916)
- 修复 `n-ellpisis` 在更新内容后失效,关闭 [#776](https://github.com/TuSimple/naive-ui/issues/776)

## 2.16.4 (2021-08-16)

### Fixes

- 修复 ruRU locale 导出

## 2.16.3 (2021-08-16)

### i18n

- 新增 ruRU locale [#852](https://github.com/TuSimple/naive-ui/pull/852)

### Feats

- `n-message-provider` 新增 `container-style` 属性
- `n-message-provider` 新增 `placement` 属性
- `n-message` 增加类用于区分类型
- `n-date-picker` 新增 `shortcuts` 属性,关闭 [#280](https://github.com/TuSimple/naive-ui/issues/280)

### Fixes

- 修复 `n-rate` 在深色模式下半个星星重叠
- 修复 `n-menu` 使用 `render-icon` 渲染错误当返回值为 true 时
- 修复 `n-menu` 使用 `render-icon` 在返回值为 `true` 时渲染有误
- 修复 `n-space` 在使用 `v-if` 时渲染空的占位,关闭 [#824](https://github.com/TuSimple/naive-ui/issues/824)

## 2.16.2 (2021-08-09)

Expand All @@ -33,6 +116,7 @@
- `n-button` 新增 `text-color` 属性
- `n-form` 导出 `FormValidationError` 类型
- `n-popconfirm` 支持不显示操作组件,关闭 [#770](https://github.com/TuSimple/naive-ui/issues/770)
- `n-upload` 增加 `list-type``show-preview-button``on-preview``create-thumbnail-url` 属性

### Fixes

Expand Down Expand Up @@ -155,7 +239,7 @@

- 修复 `n-space``display: grid` 的元素显示不正确,关闭 `https://github.com/TuSimple/naive-ui/issues/546`
- 修复 `n-dropdown``render-label` 属性对 group 类型 option 失效
- 修复 `n-datatable``scroll-x` 属性设置后 table 内容宽度未沾满容器宽度,关闭 [#518](https://github.com/TuSimple/naive-ui/issues/518)
- 修复 `n-datatable``scroll-x` 属性设置后 table 内容宽度未占满容器宽度,关闭 [#518](https://github.com/TuSimple/naive-ui/issues/518)
- 修复 `n-descriptions` 无法使用 `v-for` 的子元素
- 修复 `n-dialog` `positive-text` 为空仍然显示按钮,关闭 [#549](https://github.com/TuSimple/naive-ui/issues/549)
- 修复 `n-pagination` `PaginationInfo``endIndex` 数据错误,关闭 [#584](https://github.com/TuSimple/naive-ui/issues/584)
Expand Down
8 changes: 8 additions & 0 deletions demo/pages/home/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
<n-button text tag="a" target="_blank" href="https://www.xicons.org">{{
t('icons')
}}</n-button>
<n-button
text
tag="a"
target="_blank"
href="https://github.com/jekip/naive-ui-admin"
>
Naive UI Admin
</n-button>
</div>
<div class="footer-links-col">
<n-text depth="1" class="col-header">{{ t('help') }}</n-text>
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "2.16.2",
"version": "2.16.7",
"description": "A Vue 3 Component Library. Fairly Complete, Customizable Themes, Uses TypeScript, Not Too Slow",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -89,7 +89,7 @@
"cssnano": "^5.0.5",
"eslint": "^7.20.0",
"eslint-config-standard": "^16.0.2",
"eslint-config-standard-with-typescript": "^20.0.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-markdown": "^2.0.0",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -106,7 +106,7 @@
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"superagent": "^6.1.0",
"typescript": "^4.3.2",
"typescript": "~4.3.0",
"vite": "^2.1.3",
"vue": "^3.2.1",
"vue-router": "^4.0.5"
Expand All @@ -119,15 +119,15 @@
"@css-render/vue3-ssr": "^0.15.4",
"@types/lodash": "^4.14.170",
"@types/lodash-es": "^4.17.4",
"async-validator": "^3.5.1",
"async-validator": "^4.0.1",
"css-render": "^0.15.4",
"date-fns": "^2.19.0",
"evtd": "^0.2.2",
"highlight.js": "^11.0.1",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"seemly": "^0.3.1",
"treemate": "^0.3.0",
"treemate": "^0.3.3",
"vdirs": "^0.1.4",
"vfonts": "^0.1.0",
"vooks": "^0.2.6",
Expand Down
21 changes: 21 additions & 0 deletions src/_internal/icons/File.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { h, defineComponent } from 'vue'

export default defineComponent({
name: 'File',
render () {
return (
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M14 3v4a1 1 0 0 0 1 1h4"></path>
<path d="M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z"></path>
</g>
</svg>
)
}
})
23 changes: 23 additions & 0 deletions src/_internal/icons/Photo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { h, defineComponent } from 'vue'

export default defineComponent({
name: 'Photo',
render () {
return (
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M15 8h.01"></path>
<rect x="4" y="4" width="16" height="16" rx="3"></rect>
<path d="M4 15l4-4a3 5 0 0 1 3 0l5 5"></path>
<path d="M14 14l1-1a3 5 0 0 1 3 0l2 2"></path>
</g>
</svg>
)
}
})
2 changes: 2 additions & 0 deletions src/_internal/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ export { default as RotateClockwiseIcon } from './RotateClockwise'
export { default as RotateCounterclockwiseIcon } from './RotateCounterclockwise'
export { default as ZoomInIcon } from './ZoomIn'
export { default as ZoomOutIcon } from './ZoomOut'
export { default as FileIcon } from './File'
export { default as PhotoIcon } from './Photo'
6 changes: 6 additions & 0 deletions src/_utils/cssr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ function asModal (style: CProperties): CNode {
return c(({ props: { bPrefix } }) => `&${bPrefix || prefix}modal`, style)
}

// child block
const cCB: typeof cB = ((...args: any[]) => {
return c('>', [(cB as any)(...args)])
}) as any

export {
c,
cB,
cE,
cM,
cNotM,
cCB,
insideFormItem,
insideModal,
insidePopover,
Expand Down
Loading

0 comments on commit 2644384

Please sign in to comment.