14 KiB
Migrate from V1
General Breaking Changes
-
css
- css index
naive-ui/lib|es/styles/index.css
has been removed, do not import it any more!
- css index
-
fonts
naive-ui/lib|es/styles/fonts/*
has been removed, use vfonts
-
icons
naive-ui/lib|es/icons/*
is deprecated (vue-loader is required).naive-ui/lib|es/icons/*
is removed since v2.10.0- use xicons instead.
-
n-nimbus-icon
is moved tonaive-ui/compat/nimbus-icon
(vue-loader is required)n-nimbus-icon
is removed since v2.10.0 -
n-nimbus-form-card
is removed -
locale & theme on
n-config-provider
doesn't accept string any more (not it accepts object).
Components
-
form
- form-item
- new
show-feedback
prop
- new
- form-item
-
affix
- deprecate
target
=>listen-to
- deprecate
-
alert
-
anchor
- new
show-rail
propsshow-background
props
- deprecate
target
=>listen-to
- new
-
auto-complete
- break
v-model
=>v-model:value
- deprecate
on-input
=>on-update:value
- new
on-blur
on-focus
- break
-
avatar
-
back-top
- new
show
controlled showon-update:show
to
teleport target
- deprecate
on-show
=>on-update:show
on-hide
=>on-update:show
target
=>listen-to
- new
-
badge
-
breadcrumb
-
button
-
button-group
-
card
-
cascader
- break
v-model
=>v-model:value
on-load
has different usageleaf-only
has different meaning
- new
cascade
propshow-path
propdefault-value
prop
- deprecated
on-change
=>on-update:value
- break
-
checkbox
- checkbox
- break
value
only supportsstring
- deprecate
on-change
=>on-update:checked
- new
default-checked
prop
- break
- checkbox-group
- break
value
only supportsstring
ornull
- deprecate
on-change
=>on-update:value
- break
- checkbox
-
code
-
collapse
- deprecate
on-expanded-names-change
=>on-update:expanded-names
- removed
v-model
=>v-model:expanded-names
- deprecate
-
config-consumer (deprecated)
-
config-provider
- break
theme
use new theme from naive export$NOs.theme
=>useOsTheme
theme
=>legacy-theme
- deprecate
as
=>tag
styleScheme
won't working in next version
- new
date-locale
proplocale
prop- provide
useOsTheme
hook
- break
-
confirm =>
dialog
- break
- rename
confirm
todialog
- rename
- remove
$NConfirm
,$NModal
=>useDialog
- break
-
data-table
- deprecate
on-filters-change
=>on-update:filters
on-sorter-change
=>on-update:sorter
on-checked-row-keys-change
=>on-update:checked-row-keys
on-page-change
=>on-update:page
on-page-size-change
=>on-update:page-size
- deprecate
-
date-picker
- break
v-model
=>v-model:value
- deprecate
on-change
=>on-update:value
- new
default-value
prop
- break
-
descriptions
-
divider
-
drawer
- break
v-model
- deprecate
on-show
=>on-update:show
on-hide
=>on-update:show
target
=>to
drawer-class
=>class
drawer-style
=>style
- new
display-directive
prop
- break
-
dropdown
- break
option.value
=>option.key
- item must have unique key
- submenu must have unique key
- remove
submenu-width
submenu-min-width
submenu-max-width
- new
option.icon
- break
-
dynamic-input
- break
v-model
=>v-model:value
on-clear
is removed
- deprecate
on-input
=>on-update:value
- new
item-style
propmin
propdefault-value
prop
- break
-
dynamic-tags
- break
v-model
=>v-model:value
- break
-
element
-
empty
-
gradient-text
-
grid
-
icon
-
input
- break
v-model
=>v-model:value
- new
on-update:value
propdefault-value
prop
- break
-
input-group
-
input-group-label
-
input-number
- deprecate
on-change
=>on-update:value
- new
default-value
prop
- deprecate
-
layout
- layout-content, layout
- breaking
use-native-scrollbar
=>native-scrollbar
- breaking
- layout-sider
- breaking
use-native-scrollbar
=>native-scrollbar
- deprecate
on-expand
=>on-update:collapsed
on-collapse
=>on-update:collapsed
- breaking
- layout-content, layout
-
list
-
loading-bar
- remove
$NLoadingBar
- new
useLoadingBar
n-loading-bar-provider
- remove
-
log
- deprecate
scrollToTop
=>scrollTo
scrollToBottom
=>scrollTo
- deprecate
-
menu
- deprecate
on-expanded-names-change
=>on-update:expanded-keys
on-select
=>on-update:value
expanded-names
=>expanded-keys
default-expanded-names
=>default-expanded-keys
item.name
=>item.key
- remove
item.titleExtra
overlay-width
overlay-min-width
- deprecate
-
message
- rewrite message using
n-message-provider
- new
useMessage
- deprecate
onHide
=>onLeave
onAfterHide
=>onAfterLeave
- remove
message.hide
=>message.destroy
- rewrite message using
-
modal
- rewrite with teleport
- new
display-directive
- deprecate
v-model
on-show
=>on-update:show
on-hide
=>on-update:show
overlay-style
=>style
- remove
- default hide behavior for preset
-
notification
- new
useNotification
- deprecate
open
=>create
onHide
=>onLeave
onAfterShow
=>onAfterEnter
onAfterHide
=>onAfterHide
- new
-
pagination
- deprecate
on-change
=>on-update:page
on-page-size-change
=>on-update:page-size
- deprecate
-
popconfirm
-
popover
- new
default-show
overlap
- deprecate
#activator
=>#trigger
overlay-xxx
=>body-xxx
- remove
controller
max-width
width
min-width
manual
trigger is removed, useshow
to controll the popoverbody-class
, useclass
insteadbody-style
, usestyle
instead
- new
-
popselect
- break
v-model
=>v-model:value
- deprecate
on-change
=>on-update:value
- break
-
progress
-
radio
- radio-group
- break
- default
size
'small'
=>'medium'
- value only supports
string
ornull
- default
- deprecate
on-change
=>on-update:value
- break
- radio & radio-button
- break
- value only supports
string
checked-value
=>checked
- It is change to conform html standard usage
on-change
=>on-update:checked
on-change
is now a native event
- value only supports
- break
- radio-group
-
result
-
scrollbar
-
select
- break
v-model
=>v-model:value
on-scroll(event, container, content)
=>on-scroll(event)
option.render(h, data)
=>option.render(data)
- deprecated
on-change
=>on-update:value
- break
-
slider
- deprecated
on-change
=>on-update:value
- new
default-value
prop
- bug
- vue refs https://github.com/vuejs/vue-next/issues/2283
- drag logic
- deprecated
-
space
-
spin
- breaking
'in-small'
,'in-medium'
and'in-large'
size are removed
- deprecate
spinning
=>show
- breaking
-
statistic
-
steps
-
switch
- remove
value
=>value
change
=>on-update:value
- remove
-
table
-
tabs
- deprecate
active-name
=>value
on-active-name-change
=>on-update:value
- deprecate
-
tag
- break
v-model
=>v-model:value
- deprecate
on-checked-change
=>on-update:checked
- break
-
thing
-
time
- break
type
default from'relative'
to'date-time'
- break
-
time-picker
- break
v-model
=>v-model:value
- break
-
timeline
-
tooltip
- deprecate
#activator
=>#trigger
- deprecate
-
transfer
- break
v-model
=>v-model:value
- deprecate
on-change
=>on-update:value
- new
default-value
prop
- break
-
tree
- break
v-model
=>v-model:selected-keys
- deprecate
on-selected-keys-change
=>on-update:selected-keys
on-checked-keys-change
=>on-update:checked-keys
on-expanded-keys-change
=>on-update:expanded-keys
- break
-
typography
- breaking
- text, p
depth
fromprimary
...tertiary
=>1
,2
,3
- text, p
- deprecate
- text
as
=>tag
- text
- breaking
-
upload
-
nimbus-service-layout
- breaking
v-model
=>v-model:value
- breaking
-
TODO
- vooks
- icons from
vicons
- fonts from
vfonts
- vite-build
- rollup-build
- wait for new version of rollup-plugin-vue, https://github.com/vuejs/rollup-plugin-vue/issues/408
- tusimple theme
- clean delegate
- site production tag (bug)
- demo scrollbar 的问题
- table x scroll 右侧阴影不消失
- log scrollTo 有点问题
- remove hollowoutable
- styleScheme, css variables 组件
- 文档之后再说
- use-global-style ? 感觉效果不会特别好而且还是很无谓的性能开销这个问题可以之后再思考,现阶段 vue 的写法还是全局 install
- dynamic-input, no value
- button, input 的 css 变量名需要修改一下
- test rollup treeshaking
- test webpack treeshaking
- menu utils render
- dialog bug
- data-table css vars
- typography css vars
- spin css vars
- radio css vars
- checkbox css vars
- avatar css vars
- landing page icon
- switch styles
- slider styles
- drawer api
- chrome date-picker overflow (focus({ preventScroll }))
- slider 键盘好像会激活不该激活的 tooltip...
- transfer 打包之后有问题
- side effects = false 好像会影响 rollup 的打包(这让我很不安,要是生效 css 怎么办?要是不生效 JS 怎么办?)(事实上确实会影响网站对于 fonts 的打包,只能先靠脚本凑活一下) https://github.com/rollup/plugins/issues/692
- vue 在 $attrs 的处理上 dev 和 prod 还是有差别 https://github.com/vuejs/vue-next/issues/2741
- date-picker input 的 clear 有时候不会清除,看起来是 vue 的 bug
- radio-group 影响主题切换,看起来是 vue 的 bug
- cascader demo async 切换未重置数据,demo 写的有问题
- gradient-text transition 又没了
- md-loader code
- input + form-item style
- loadingbar theme
- dropdown group + menu use dropdown
- 多行 message
- progress height
- close 重构
- data-table, radio style 重构
- message icon style
- transfer search icon style
- base selection icon style
- date picker not working
- avatar font size bug
- handle global style
- 暂时放在 useTheme + useStyle 中... 似乎没啥太好的办法,最终还是要想办法让样式不要溢出
- select menu padding top & bottom
- time-picker invalid
- date-picker invalid
- vooks
useNow
- treemate activePath includeGroup: false
- 拆分 dateFns locale => dateLocale
- 试图把组件的 demo 放到 src 里面
- 去掉仅存的 mixin
- form item default type explain
- selection focus style
- refactor site use store!!! singleton
- 文档网站主题切换
- 文档网站 demo 样式
- anchor bug!
- getKey select & autocomplete type safe & input event interface? onInput value | null or value
- vshow (maybe create a vue pr)
- jsx focusin out (waiting for vue update)
- inject key & value in type (I should use InjectionKey...)
- form item no label css
- unify treemate ignored
- fix menu extra
- build icon
- compat
- fix upload dragger
- fix table sorter
- tree 多选节点第二个 demo
- table treemate!!!
- createTheme
- build site
- table fixed col
- prefixCls,暂时不需要
- 更新一波文档 props
- 更新样式的文档
- on update value api
- anchor in modal page, maybe a bug of vue...
- menu + dropdown collapsed 时候 menu item 不更新(selected 从使用 useMemo 切换成 computed(性能下降), Vue 在这种时候一定存在 bug,但是暂时没空找了...)
- select menu multiple, when show=true, checkmark transiton not working(推测是 vue 的 bug)
- demo hmr (或许是 vite-plugin-vue 或 vite 的 bug,修改内容不更新)
- 不再提前编译 demo 的 highlight code,应该可以缩小很多打包体积
- fix input textarea clear...
- input auto size
- data table custom render sorter
- upload retry
- table bottom-bordered
- data table filter menu
- popover default trigger
- select option type
popover after enter 之后关闭再生效把 duration 和 delay 弄小点,而且里面事件处理器其实写的有问题- popover width
- selection popover 滚动
- card 设定高度
- dropdown 手动定位有 bug,mousemoveoutside
- select menu loading
- refactor layout to make position work on first shot
mention mention pending option not correct, sometimes it is not the first optionIn fact it's caused by mouse hover on item...- code Deprecated as of 10.7.0. highlight(lang, code, ...args) has been deprecated.
- vdirs zindexable https://github.com/vuejs/vue-next/issues/3497
- collapse-item overflow
- anchor ignore gap 有 bug
- popover click 移动端不生效
- menu path 对应的问题
- debug anchor 删除无用 link
- popover inst methods
- ios 浏览器 demo code font size 不对
table overflow bordered- table ellipisis vertical align
- form item grid item
- select filter composite...
- 清理导出的 select 类型
- make eslint work with markdown ts
Build
package: tsx => es|lib => terse cssr => replace global vars => release
site: build package => move to node_modules => setup side effects => vite build => release
Info
https://github.com/vuejs/vue-next/issues/2549 last cherry-picked commit: 6560ae34d71b81d584af79f810cb9dfa87119d1a