mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
chore: rename ConfigProvider & Consumer folder
This commit is contained in:
parent
c58214e89b
commit
35be7abe95
@ -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
|
@ -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
|
8
src/config-consumer/index.js
Normal file
8
src/config-consumer/index.js
Normal 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
|
@ -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)
|
11
src/config-provider/index.js
Normal file
11
src/config-provider/index.js
Normal 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
|
@ -2,8 +2,10 @@
|
||||
import themeable from '../../_mixins/themeable'
|
||||
|
||||
export default {
|
||||
name: 'NConfigProvider',
|
||||
mixins: [themeable],
|
||||
name: 'ConfigProvider',
|
||||
mixins: [
|
||||
themeable
|
||||
],
|
||||
provide () {
|
||||
return {
|
||||
NConfigProvider: this
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user