From b5b8c1a225ef4f5eaded8dd70c9f7d3da86c8258 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Tue, 14 Jul 2020 00:51:08 +0800 Subject: [PATCH] chore: rename alert & refactor tag install --- src/Alert/index.js | 8 -------- src/alert/index.js | 8 ++++++++ src/{Alert/src/main.vue => alert/src/Alert.vue} | 2 +- src/index.js | 2 +- src/tag/index.js | 6 +++--- src/tag/src/DynamicTags.vue | 2 +- src/tag/src/Tag.vue | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 src/Alert/index.js create mode 100644 src/alert/index.js rename src/{Alert/src/main.vue => alert/src/Alert.vue} (99%) diff --git a/src/Alert/index.js b/src/Alert/index.js deleted file mode 100644 index f8bce3fe3..000000000 --- a/src/Alert/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -import Alert from './src/main.vue' - -Alert.install = function (Vue) { - Vue.component(Alert.name, Alert) -} - -export default Alert diff --git a/src/alert/index.js b/src/alert/index.js new file mode 100644 index 000000000..3edf8987d --- /dev/null +++ b/src/alert/index.js @@ -0,0 +1,8 @@ +/* istanbul ignore file */ +import Alert from './src/main.vue' + +Alert.install = function (Vue, naive) { + Vue.component(naive.componentPrefix + Alert.name, Alert) +} + +export default Alert diff --git a/src/Alert/src/main.vue b/src/alert/src/Alert.vue similarity index 99% rename from src/Alert/src/main.vue rename to src/alert/src/Alert.vue index 2d3cb710d..3860391fb 100644 --- a/src/Alert/src/main.vue +++ b/src/alert/src/Alert.vue @@ -79,7 +79,7 @@ import mdClose from '../../_icons/md-close' import FadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition' export default { - name: 'NAlert', + name: 'Alert', components: { NIcon, mdCheckmarkCircle, diff --git a/src/index.js b/src/index.js index dd77128e2..2a1c94558 100644 --- a/src/index.js +++ b/src/index.js @@ -18,7 +18,7 @@ import Pagination from './Pagination' import Progress from './progress' import Tooltip from './Tooltip' import Popup from './Popover' -import Alert from './Alert' +import Alert from './alert' import DatePicker from './DatePicker' import InputNumberStyle from './input-number' import Radio from './Radio' diff --git a/src/tag/index.js b/src/tag/index.js index bcc16a481..f2bc3e53e 100644 --- a/src/tag/index.js +++ b/src/tag/index.js @@ -2,9 +2,9 @@ import Tag from './src/Tag.vue' import DynamicTags from './src/DynamicTags.vue' -Tag.install = function (Vue) { - Vue.component(Tag.name, Tag) - Vue.component(DynamicTags.name, DynamicTags) +Tag.install = function (Vue, naive) { + Vue.component(naive.componentPrefix + Tag.name, Tag) + Vue.component(naive.componentPrefix + DynamicTags.name, DynamicTags) } export default Tag diff --git a/src/tag/src/DynamicTags.vue b/src/tag/src/DynamicTags.vue index 7411c76f2..961022b85 100644 --- a/src/tag/src/DynamicTags.vue +++ b/src/tag/src/DynamicTags.vue @@ -51,7 +51,7 @@ import NIcon from '../../Icon' import addOutline from '../../_icons/add-outline' export default { - name: 'NDynamicTags', + name: 'DynamicTags', components: { NTag, NIcon, diff --git a/src/tag/src/Tag.vue b/src/tag/src/Tag.vue index 5c0eafd80..fceea5d1b 100644 --- a/src/tag/src/Tag.vue +++ b/src/tag/src/Tag.vue @@ -34,7 +34,7 @@ import commonProps from './common-props' import styles from './styles' export default { - name: 'NTag', + name: 'Tag', components: { CloseIcon },