refactor: remove hollowoutable

This commit is contained in:
07akioni 2020-11-05 14:54:47 +08:00
parent 21fdc2e84e
commit e56770277a
4 changed files with 311 additions and 341 deletions

View File

@ -108,8 +108,7 @@ export default c([
backgroundColor: buttonColorDisabled
}),
cB('icon', {
fill: buttonTextColorDisabled,
stroke: buttonTextColorDisabled
color: buttonTextColorDisabled
})
]),
cE('input', {
@ -182,8 +181,7 @@ export default c([
backgroundColor: buttonColor
}),
cB('icon', {
fill: buttonTextColor,
stroke: buttonTextColor
color: buttonTextColor
}),
c('&:hover ~', [
cE('border-mask', {
@ -198,8 +196,7 @@ export default c([
backgroundColor: buttonColorHover
}),
cB('icon', {
stroke: buttonTextColorHover,
fill: buttonTextColorHover
color: buttonTextColorHover
})
]),
c('&:active', [
@ -210,8 +207,7 @@ export default c([
backgroundColor: buttonColorActive
}),
cB('icon', {
stroke: buttonTextColorActive,
fill: buttonTextColorActive
color: buttonTextColorActive
})
]),
cM('disabled', {
@ -224,8 +220,7 @@ export default c([
backgroundColor: buttonColorDisabled
}),
cB('icon', {
stroke: buttonTextColorDisabled,
fill: buttonTextColorDisabled
color: buttonTextColorDisabled
})
])
]),
@ -306,14 +301,12 @@ export default c([
cE('button', [
c('&:hover', [
cB('icon', {
fill: buttonTextColorHover,
stroke: buttonTextColorHover
color: buttonTextColorHover
})
]),
c('&:active', [
cB('icon', {
fill: buttonTextColorActive,
stroke: buttonTextColorActive
color: buttonTextColorActive
})
])
])

View File

@ -28,7 +28,6 @@
:key="mark.label"
class="n-slider-dot"
:style="{
backgroundColor: ascendantBackgroundColor,
...mark.style
}"
/>
@ -109,7 +108,6 @@ import {
themeable,
placeable,
asformitem,
hollowoutable,
usecssr
} from '../../_mixins'
import {
@ -152,7 +150,6 @@ export default {
mixins: [
configurable,
themeable,
hollowoutable,
placeable,
usecssr(styles),
asformitem()
@ -290,14 +287,12 @@ export default {
},
firstHandleStyle () {
return {
backgroundColor: this.ascendantBackgroundColor,
left: ((this.firstHandleValue - this.min) / (this.max - this.min) * 100) + '%',
zIndex: this.firstHandleActive ? 1 : 0
}
},
secondHandleStyle () {
return {
backgroundColor: this.ascendantBackgroundColor,
left: ((this.secondHandleValue - this.min) / (this.max - this.min) * 100) + '%',
zIndex: this.secondHandleActive ? 1 : 0
}

View File

@ -159,6 +159,7 @@ export default c([
border-radius: 50%;
overflow: hidden;
`,
color: handleColor,
boxShadow: dotBoxShadow
})
])

625
vue3.md
View File

@ -1,336 +1,317 @@
last cherry-picked commit: 6560ae34d71b81d584af79f810cb9dfa87119d1a
zindexable 最好写成 directive
placeable 进行了大调整
General Breaking Changes
- css
- css index `naive-ui/lib|es/styles/index.css` has been removed, do not import it any more!
- fonts
- `naive-ui/lib|es/styles/fonts/*` has been removed, use [`vfonts`](https://www.npmjs.com/package/vfonts)
- icons
- `naive-ui/lib|es/icons/*` is deprecated, use [`vicons`](https://www.npmjs.com/package/vicons) instead.
- `n-nimbus-form-card` is removed
- `n-nimbus-icon` is removed
在很特殊的情况下popover 的在 teleport 打开的时候 beforeUnmount 会被调用两次,具体没有研究出为什么。
- [x] form
- form-item
Components
- [x] form
- form-item
- new
- `show-feedback` prop
- [x] affix
- deprecate
- `target` => `listen-to`
- [x] alert
- [x] anchor
- deprecate
- `target` => `listen-to`
- [x] auto-complete
- break
- `v-model` => `v-model:value`
- deprecate
- `on-input` => `on-update:value`
- new
- `show-feedback` prop
- [x] affix
- deprecate
- `target` => `listen-to`
- [x] alert
- [x] anchor
- deprecate
- `target` => `listen-to`
- [x] auto-complete
- break
- `v-model` => `v-model:value`
- deprecate
- `on-input` => `on-update:value`
- new
- `on-blur`
- `on-focus`
- [x] avatar
- [x] back-top
- new
- `show` controlled show
- `on-update:show`
- `to` teleport target
- deprecate
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `target` => `listen-to`
- [x] badge
- [x] breadcrumb
- [x] button
- [x] button-group
- [x] card
- [x] cascader
- break
- `v-model` => `v-model:value`
- `on-load` has different usage
- `leaf-only` has different meaning
- new
- `cascade` prop
- `show-path` prop
- deprecated
- `on-change` => `on-update:value`
- [x] checkbox
- checkbox
- break
- `value` only supports `string`
- deprecate
- `on-change` => `on-update:checked`
- `on-blur`
- `on-focus`
- [x] avatar
- [x] back-top
- new
- `default-checked` prop
- checkbox-group
- break
- `value` only supports `string` or `null`
- `show` controlled show
- `on-update:show`
- `to` teleport target
- deprecate
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `target` => `listen-to`
- [x] badge
- [x] breadcrumb
- [x] button
- [x] button-group
- [x] card
- [x] cascader
- break
- `v-model` => `v-model:value`
- `on-load` has different usage
- `leaf-only` has different meaning
- new
- `cascade` prop
- `show-path` prop
- deprecated
- `on-change` => `on-update:value`
- [x] code
- [x] collapse
- deprecate
- `on-expanded-names-change` => `on-update:expanded-names`
- removed
- `v-model` => `v-model:expanded-names`
- [x] config-consumer
- [x] config-provider
- break
- `$NOs.theme` => `useOsTheme`
- deprecate
- `as` => `tag`
- new
- provide `useOsTheme` hook
- [x] confirm => `dialog`
- break
- rename `confirm` to `dialog`
- remove
- `$NConfirm`, `$NModal` => `inject.dialog`
- [x] 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`
- [x] date-picker
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] descriptions
- [x] divider
- [x] drawer
- break
- `v-model`
- deprecate
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `target` => `to`
- `drawer-class` => `body-class` & `body-wrapper-class`
- `drawer-style` => `body-style` & `body-wrapper-style`
- new
- `display-directive` prop
- [x] 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`
- [x] dynamic-input
- break
- `v-model` => `v-model:value`
- deprecate
- `on-input` => `on-update:value`
- [x] dynamic-tags
- break
- `v-model` => `v-model:value`
- [x] element
- [x] empty
- [x] gradient-text
- [x] grid
- [x] icon
- [x] input
- break
- `v-model` => `v-model:value`
- new
- `on-update:value`
- [x] input-group
- [x] input-group-label
- [x] input-number
- deprecate
- `on-change` => `on-update:value`
- [x] layout
- layout-sider
- [x] checkbox
- checkbox
- break
- `value` only supports `string`
- deprecate
- `on-change` => `on-update:checked`
- new
- `default-checked` prop
- checkbox-group
- break
- `value` only supports `string` or `null`
- deprecate
- `on-change` => `on-update:value`
- [x] code
- [x] collapse
- deprecate
- `on-expand` => `on-update:collapsed`
- `on-collapse` => `on-update:collapsed`
- [x] list
- [x] loading-bar
- remove
- `$NLoadingBar`
- new
- `n-loading-bar-provider`
- [x] log
- deprecate
- `scrollToTop` => `scrollTo`
- `scrollToBottom` => `scrollTo`
- [x] menu
- new
- `popover-body-style`
- 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`
- `item.titleExtra` => `item.extra`
- remove
- `overlay-width`
- `overlay-min-width`
- [x] message
- rewrite message using `n-message-provider`
- deprecate
- `onHide` => `onLeave`
- `onAfterHide` => `onAfterLeave`
- remove
- `message.hide` => `message.destroy`
- [x] modal
- rewrite with teleport
- new
- `display-directive`
- deprecate
- `v-model`
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `overlay-style` => `body-style`
- remove
- default hide behavior for preset
- BUG:
- dialog preset slot (below vue 3.0.2)
- [x] notification
- deprecate
- `open` => `create`
- `onHide` => `onLeave`
- `onAfterShow` => `onAfterEnter`
- `onAfterHide` => `onAfterHide`
- [x] pagination
- deprecate
- `on-change` => `on-update:page`
- `on-page-size-change` => `on-update:page-size`
- [x] popconfirm
- [x] popover
- new
- `default-show`
- deprecate
- `v-slot:activator` => `v-slot:trigger`
- `overlay-xxx` => `body-xxx`
- remove
- `controller`
- `max-width`
- `width`
- `min-width`
- `manual` trigger is removed, use `null` instead
- other
- set default trigger to `null`
- [x] popselect
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] progress
- [x] radio
- radio-group
- `on-expanded-names-change` => `on-update:expanded-names`
- removed
- `v-model` => `v-model:expanded-names`
- [x] config-consumer
- [x] config-provider
- break
- default `size` `'small'` => `'medium'`
- value only supports `string` or `null`
- `$NOs.theme` => `useOsTheme`
- deprecate
- `on-change` => `on-update:value`
- 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
- [x] result
- [x] scrollbar
- [x] 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`
- [x] slider
- deprecated
- `on-change` => `on-update:value`
- bug
- vue refs https://github.com/vuejs/vue-next/issues/2283
- drag logic
- [x] space
- [x] spin
- [x] statistic
- [x] steps
- [x] switch
- remove
- `value` => `value`
- `change` => `on-update:value`
- [x] table
- [x] tabs
- deprecate
- `active-name` => `value`
- `on-active-name-change` => `on-update:value`
- [x] tag
- break
- `v-model` => `v-model:value`
- deprecate
- `on-checked-change` => `on-update:checked`
- [x] thing
- [x] time
- [x] time-picker
- break
- `v-model` => `v-model:value`
- [x] timeline
- [x] tooltip
- ref
- [x] transfer
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] 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`
- [x] typography
- deprecate
- text
- `as` => `tag`
- [x] upload
- new
- provide `useOsTheme` hook
- [x] confirm => `dialog`
- break
- rename `confirm` to `dialog`
- remove
- `$NConfirm`, `$NModal` => `inject.dialog`
- [x] 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`
- [x] date-picker
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] descriptions
- [x] divider
- [x] drawer
- break
- `v-model`
- deprecate
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `target` => `to`
- `drawer-class` => `body-class` & `body-wrapper-class`
- `drawer-style` => `body-style` & `body-wrapper-style`
- new
- `display-directive` prop
- [x] 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`
- [x] dynamic-input
- break
- `v-model` => `v-model:value`
- deprecate
- `on-input` => `on-update:value`
- [x] dynamic-tags
- break
- `v-model` => `v-model:value`
- [x] element
- [x] empty
- [x] gradient-text
- [x] grid
- [x] icon
- [x] input
- break
- `v-model` => `v-model:value`
- new
- `on-update:value`
- [x] input-group
- [x] input-group-label
- [x] input-number
- deprecate
- `on-change` => `on-update:value`
- [x] layout
- layout-sider
- deprecate
- `on-expand` => `on-update:collapsed`
- `on-collapse` => `on-update:collapsed`
- [x] list
- [x] loading-bar
- remove
- `$NLoadingBar`
- new
- `n-loading-bar-provider`
- [x] log
- deprecate
- `scrollToTop` => `scrollTo`
- `scrollToBottom` => `scrollTo`
- [x] menu
- new
- `popover-body-style`
- 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`
- `item.titleExtra` => `item.extra`
- remove
- `overlay-width`
- `overlay-min-width`
- [x] message
- rewrite message using `n-message-provider`
- deprecate
- `onHide` => `onLeave`
- `onAfterHide` => `onAfterLeave`
- remove
- `message.hide` => `message.destroy`
- [x] modal
- rewrite with teleport
- new
- `display-directive`
- deprecate
- `v-model`
- `on-show` => `on-update:show`
- `on-hide` => `on-update:show`
- `overlay-style` => `body-style`
- remove
- default hide behavior for preset
- BUG:
- dialog preset slot (below vue 3.0.2)
- [x] notification
- deprecate
- `open` => `create`
- `onHide` => `onLeave`
- `onAfterShow` => `onAfterEnter`
- `onAfterHide` => `onAfterHide`
- [x] pagination
- deprecate
- `on-change` => `on-update:page`
- `on-page-size-change` => `on-update:page-size`
- [x] popconfirm
- [x] popover
- new
- `default-show`
- deprecate
- `v-slot:activator` => `v-slot:trigger`
- `overlay-xxx` => `body-xxx`
- remove
- `controller`
- `max-width`
- `width`
- `min-width`
- `manual` trigger is removed, use `null` instead
- other
- set default trigger to `null`
- [x] popselect
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] progress
- [x] radio
- radio-group
- break
- default `size` `'small'` => `'medium'`
- value only supports `string` or `null`
- deprecate
- `on-change` => `on-update:value`
- 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
- [x] result
- [x] scrollbar
- [x] 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`
- [x] slider
- deprecated
- `on-change` => `on-update:value`
- bug
- vue refs https://github.com/vuejs/vue-next/issues/2283
- drag logic
- [x] space
- [x] spin
- [x] statistic
- [x] steps
- [x] switch
- remove
- `value` => `value`
- `change` => `on-update:value`
- [x] table
- [x] tabs
- deprecate
- `active-name` => `value`
- `on-active-name-change` => `on-update:value`
- [x] tag
- break
- `v-model` => `v-model:value`
- deprecate
- `on-checked-change` => `on-update:checked`
- [x] thing
- [x] time
- [x] time-picker
- break
- `v-model` => `v-model:value`
- [x] timeline
- [x] tooltip
- ref
- [x] transfer
- break
- `v-model` => `v-model:value`
- deprecate
- `on-change` => `on-update:value`
- [x] 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`
- [x] typography
- deprecate
- text
- `as` => `tag`
- [x] upload
- TODO
- vooks
- delegate with capture
- unify composition
- remove hollowoutable
- [ ] icons from `vicons`
- [ ] fonts from `vfonts`
- [x] vite-build
- [x] rollup-build
- [ ] wait for new version of rollup-plugin-vue,
https://github.com/vuejs/rollup-plugin-vue/issues/408
- tusimple theme
- clean delegate
- [x] site production tag (bug)
- [x] demo scrollbar 的问题
- [x] table x scroll 右侧阴影不消失
- [x] log scrollTo 有点问题
- TODO
- [x] vooks
- [x] icons from `vicons`
- [x] fonts from `vfonts`
- [x] vite-build
- [x] rollup-build
- [ ] wait for new version of rollup-plugin-vue,
https://github.com/vuejs/rollup-plugin-vue/issues/408
- tusimple theme
- clean delegate
- [x] site production tag (bug)
- [x] demo scrollbar 的问题
- [x] table x scroll 右侧阴影不消失
- [x] log scrollTo 有点问题
- [ ] remove hollowoutable
- remove
- nimbus form card
- nimbus icon
`naive-ui/lib/styles/fonts/X.css` => `naive-ui/fonts/X.css`
deprecate
`naive-ui/lib/icons` => `vicons`
`naive-ui/es/icons` => `vicons`
- `vueuc`
- `vooks`
- `vicons`
- `vfonts`
- `css-render`
class =>
<abstract>
<comp>
</abstract>
not working in production mode
https://github.com/vuejs/vue-next/issues/2549
fonts are moved to `vfonts`
lib/styles/index.css is removed