chore: rename ConfigProvider & Consumer folder

This commit is contained in:
07akioni 2020-07-22 13:29:27 +08:00
parent c58214e89b
commit 35be7abe95
8 changed files with 30 additions and 25 deletions

View File

@ -1,8 +0,0 @@
/* istanbul ignore file */
import ThemeConsumer from './src/main.vue'
ThemeConsumer.install = function (Vue) {
Vue.component(ThemeConsumer.name, ThemeConsumer)
}
export default ThemeConsumer

View File

@ -1,11 +0,0 @@
/* istanbul ignore file */
import ConfigProvider from './src/main.vue'
import installOsProperty from './src/installOsProperty'
ConfigProvider.install = function (Vue) {
Vue.component(ConfigProvider.name, ConfigProvider)
Vue.component('NApp', ConfigProvider)
installOsProperty(Vue)
}
export default ConfigProvider

View File

@ -0,0 +1,8 @@
/* istanbul ignore file */
import ConfigConsumer from './src/ConfigConsumer.vue'
ConfigConsumer.install = function (Vue, naive) {
Vue.component(naive.componentPrefix + ConfigConsumer.name, ConfigConsumer)
}
export default ConfigConsumer

View File

@ -4,8 +4,11 @@ import themeable from '../../_mixins/themeable'
import styleScheme from '../../_utils/naive/styleScheme'
export default {
name: 'NConfigConsumer',
mixins: [ withapp, themeable ],
name: 'ConfigConsumer',
mixins: [
withapp,
themeable
],
watch: {
syntheticTheme: function (value, oldValue) {
this.$emit('theme-change', value, oldValue)

View File

@ -0,0 +1,11 @@
/* istanbul ignore file */
import ConfigProvider from './src/ConfigProvider.vue'
import installOsProperty from './src/installOsProperty'
ConfigProvider.install = function (Vue, naive) {
Vue.component(naive.componentPrefix + ConfigProvider.name, ConfigProvider)
Vue.component(naive.componentPrefix + 'App', ConfigProvider) // deprecated
installOsProperty(Vue)
}
export default ConfigProvider

View File

@ -2,8 +2,10 @@
import themeable from '../../_mixins/themeable'
export default {
name: 'NConfigProvider',
mixins: [themeable],
name: 'ConfigProvider',
mixins: [
themeable
],
provide () {
return {
NConfigProvider: this

View File

@ -39,7 +39,7 @@ import Popconfirm from './Popconfirm'
import Anchor from './Anchor'
import Dropdown from './Dropdown'
import Popselect from './Popselect'
import ConfigProvider from './ConfigProvider'
import ConfigProvider from './config-provider'
import Transfer from './Transfer'
import Spin from './Spin'
import Drawer from './Drawer'
@ -51,7 +51,7 @@ import Grid from './Grid'
import Affix from './Affix'
import Statistic from './Statistic'
import Breadcrumb from './Breadcrumb'
import ConfigConsumer from './ConfigConsumer'
import ConfigConsumer from './config-consumer'
import Descriptions from './Descriptions'
import List from './List'
import Menu from './Menu'