chore: rename many files

This commit is contained in:
07akioni 2019-12-16 13:47:39 +08:00
parent a6d28d4ef0
commit e435a92aeb
31 changed files with 50 additions and 176 deletions

View File

@ -37,9 +37,9 @@ renderer.code = (code, language) => {
return `<pre><code class="${language}">${highlighted}</code></pre>`
}
// marked.setOptions({
// renderer
// })
marked.setOptions({
renderer
})
function template (demos, demosLiteral, isSingleColumn = false) {
// return `<component-demos :single-column="${isSingleColumn}">

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Button from './src/main.vue'
import Button from './src/Button.vue'
import ButtonGroup from './src/ButtonGroup'
Button.install = function (Vue) {

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Descriptions from './src/main.vue'
import Descriptions from './src/Descriptions.vue'
import DescriptionsItem from './src/DescriptionsItem.vue'
Descriptions.install = function (Vue) {

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Dropdown from './src/main.vue'
import Dropdown from './src/Dropdown.vue'
import DropdownSubmenu from './src/DropdownSubmenu'
import DropdownItem from './src/DropdownItem'
import DropdownDivider from './src/DropdownDivider'

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Empty from './src/main.vue'
import Empty from './src/Empty.vue'
Empty.install = function (Vue) {
Vue.component(Empty.name, Empty)

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Form from './src/main.vue'
import Form from './src/Form.vue'
import FormItem from './src/FormItem.vue'
import FormItemCol from './src/FormItemCol'
import FormItemRow from './src/FormItemRow'

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import List from './src/main.vue'
import List from './src/List.vue'
import ListItem from './src/ListItem.vue'
List.install = function (Vue) {

View File

@ -1,10 +1,10 @@
/* istanbul ignore file */
import LoadingBar from './src/main.js'
import LoadingBarPlugin from './src/LoadingBarPlugin.js'
import { install } from '../../utils/installThemeAwarableProperty'
LoadingBar.install = function (Vue) {
install(Vue, LoadingBar, '$NLoadingBar')
LoadingBar.Vue = Vue
LoadingBarPlugin.install = function (Vue) {
install(Vue, LoadingBarPlugin, '$NLoadingBar')
LoadingBarPlugin.Vue = Vue
}
export default LoadingBar
export default LoadingBarPlugin

View File

@ -1,9 +1,9 @@
import Message from './src/main.js'
import MessagePlugin from './src/MessagePlugin'
import { install } from '../../utils/installThemeAwarableProperty'
Message.install = function (Vue) {
Message.Vue = Vue
install(Vue, Message, '$NMessage')
MessagePlugin.install = function (Vue) {
MessagePlugin.Vue = Vue
install(Vue, MessagePlugin, '$NMessage')
}
export default Message
export default MessagePlugin

View File

@ -1,98 +0,0 @@
<script>
import NModalOverlay from './Overlay'
import NModalContent from './ModalContent'
import detachable from '../../../mixins/detachable'
import zindexable from '../../../mixins/zindexable'
export default {
name: 'NModal',
mixins: [
detachable,
zindexable
],
props: {
activateEvent: {
validator (e) {
return e instanceof MouseEvent
},
default: null
},
value: {
type: Boolean,
default: false
},
maskClosable: {
type: Boolean,
default: true
}
},
data () {
return {
mousedownTarget: null
}
},
computed: {
active () {
return this.value
}
},
methods: {
deactivate () {
this.$emit('input', false)
}
},
render (h) {
return h('div', {
staticClass: 'n-modal-activator',
ref: 'activator'
}, [
this.$scopedSlots.activator ? this.$scopedSlots.activator() : null,
h('div', {
staticClass: 'n-modal-container',
ref: 'contentContainer',
class: {
'n-modal-container--active': this.value,
[this.namespace]: this.namespace
}
},
[
h(NModalOverlay, {
props: { active: this.value }
}),
h(NModalContent,
{
ref: 'content',
props: { active: this.value, activateEvent: this.activateEvent },
on: {
'after-leave': () => {
this.$emit('after-hide')
},
beforeLeave: () => {
this.$emit('before-hide')
},
mousedown: (e) => {
this.mousedownTarget = e.target
},
mouseup: (e) => {
const slotDOM = this.$refs.content.slotDOM()
const scollbars = this.$refs.content.$el.querySelectorAll('.n-scrollbar-rail__scrollbar')
const elsToAvoid = [...slotDOM, ...scollbars]
if (this.maskClosable) {
if (
!elsToAvoid.some(el => el.contains(e.target)) &&
!elsToAvoid.some(el => el.contains(this.mousedownTarget))
) {
this.deactivate()
}
}
}
}
},
this.$scopedSlots.default()
)
])
])
}
}
</script>

View File

@ -9,7 +9,7 @@
>
<n-scrollbar ref="scrollbar">
<transition
name="n-modal-content-transition"
name="n-modal-content-slot-transition"
@enter="handleEnter"
@after-leave="handleAfterLeave"
@before-leave="handleBeforeLeave"

View File

@ -1,25 +0,0 @@
<script>
import DeprecatedModal from './DeprecatedModal'
import Modal from './Modal'
export default {
name: 'NModal',
functional: true,
render (h, context) {
if (context.scopedSlots.activator) {
return h(DeprecatedModal, {
props: context.props,
scopedSlots: context.scopedSlots,
on: context.listeners
})
} else {
return h(Modal, {
props: context.props,
scopedSlots: context.scopedSlots,
slots: context.slots,
on: context.listeners
})
}
}
}
</script>

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Radio from './src/main.vue'
import Radio from './src/Radio.vue'
import RadioGroup from './src/RadioGroup.vue'
import RadioButton from './src/RadioButton.vue'

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import ScrollBar from './src/Scrollbar.vue'
import ScrollBar from './src/main.vue'
ScrollBar.install = function (Vue) {
Vue.component(ScrollBar.name, ScrollBar)

View File

@ -1,8 +0,0 @@
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z" />
</svg>
</template>

View File

@ -20,7 +20,7 @@
class="n-tag__close-mark"
@click="handleCloseClick"
>
<close-icon />
<md-close />
</div>
</div>
</template>
@ -29,12 +29,12 @@
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import CloseIcon from './CloseIcon'
import mdClose from '../../../icons/md-close'
export default {
name: 'NTag',
components: {
CloseIcon
mdClose
},
mixins: [withapp, themeable, asthemecontext],
model: {

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Timeline from './src/main.vue'
import Timeline from './src/Timeline.vue'
import TimelineItem from './src/TimelineItem.vue'
Timeline.install = function (Vue) {

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Transfer from './src/main.vue'
import Transfer from './src/Transfer.vue'
Transfer.install = function (Vue) {
Vue.component(Transfer.name, Transfer)

View File

@ -5,26 +5,11 @@
@include b(card) {
background-color: $--n-dialog-color;
}
@include b(confirm) {
width: 80vw;
}
& > {
@include b(scrollbar) {
& > {
@include b(scrollbar-container) {
& > {
@include b(scrollbar-content) {
min-height: 100%;
display: flex;
}
}
}
}
@include once {
@include b(confirm) {
width: 80vw;
}
}
@include not-m(active) {
visibility: hidden;
}
}
}
@ -64,6 +49,26 @@
top: 0;
bottom: 0;
overflow: visible;
& > {
@include b(scrollbar) {
& > {
@include b(scrollbar-container) {
& > {
@include b(scrollbar-content) {
min-height: 100%;
display: flex;
}
}
}
}
}
}
@include not-m(active) {
visibility: hidden;
}
}
@include b(modal-content-slot) {
&#{&}-transition-enter-active {
opacity: 1;
transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(0.0, 0.0, 0.2, 1);