mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-03 04:21:34 +08:00
chore: rename many files
This commit is contained in:
parent
a6d28d4ef0
commit
e435a92aeb
@ -37,9 +37,9 @@ renderer.code = (code, language) => {
|
|||||||
return `<pre><code class="${language}">${highlighted}</code></pre>`
|
return `<pre><code class="${language}">${highlighted}</code></pre>`
|
||||||
}
|
}
|
||||||
|
|
||||||
// marked.setOptions({
|
marked.setOptions({
|
||||||
// renderer
|
renderer
|
||||||
// })
|
})
|
||||||
|
|
||||||
function template (demos, demosLiteral, isSingleColumn = false) {
|
function template (demos, demosLiteral, isSingleColumn = false) {
|
||||||
// return `<component-demos :single-column="${isSingleColumn}">
|
// return `<component-demos :single-column="${isSingleColumn}">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Button from './src/main.vue'
|
import Button from './src/Button.vue'
|
||||||
import ButtonGroup from './src/ButtonGroup'
|
import ButtonGroup from './src/ButtonGroup'
|
||||||
|
|
||||||
Button.install = function (Vue) {
|
Button.install = function (Vue) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Descriptions from './src/main.vue'
|
import Descriptions from './src/Descriptions.vue'
|
||||||
import DescriptionsItem from './src/DescriptionsItem.vue'
|
import DescriptionsItem from './src/DescriptionsItem.vue'
|
||||||
|
|
||||||
Descriptions.install = function (Vue) {
|
Descriptions.install = function (Vue) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Dropdown from './src/main.vue'
|
import Dropdown from './src/Dropdown.vue'
|
||||||
import DropdownSubmenu from './src/DropdownSubmenu'
|
import DropdownSubmenu from './src/DropdownSubmenu'
|
||||||
import DropdownItem from './src/DropdownItem'
|
import DropdownItem from './src/DropdownItem'
|
||||||
import DropdownDivider from './src/DropdownDivider'
|
import DropdownDivider from './src/DropdownDivider'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Empty from './src/main.vue'
|
import Empty from './src/Empty.vue'
|
||||||
|
|
||||||
Empty.install = function (Vue) {
|
Empty.install = function (Vue) {
|
||||||
Vue.component(Empty.name, Empty)
|
Vue.component(Empty.name, Empty)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Form from './src/main.vue'
|
import Form from './src/Form.vue'
|
||||||
import FormItem from './src/FormItem.vue'
|
import FormItem from './src/FormItem.vue'
|
||||||
import FormItemCol from './src/FormItemCol'
|
import FormItemCol from './src/FormItemCol'
|
||||||
import FormItemRow from './src/FormItemRow'
|
import FormItemRow from './src/FormItemRow'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import List from './src/main.vue'
|
import List from './src/List.vue'
|
||||||
import ListItem from './src/ListItem.vue'
|
import ListItem from './src/ListItem.vue'
|
||||||
|
|
||||||
List.install = function (Vue) {
|
List.install = function (Vue) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import LoadingBar from './src/main.js'
|
import LoadingBarPlugin from './src/LoadingBarPlugin.js'
|
||||||
import { install } from '../../utils/installThemeAwarableProperty'
|
import { install } from '../../utils/installThemeAwarableProperty'
|
||||||
|
|
||||||
LoadingBar.install = function (Vue) {
|
LoadingBarPlugin.install = function (Vue) {
|
||||||
install(Vue, LoadingBar, '$NLoadingBar')
|
install(Vue, LoadingBarPlugin, '$NLoadingBar')
|
||||||
LoadingBar.Vue = Vue
|
LoadingBarPlugin.Vue = Vue
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LoadingBar
|
export default LoadingBarPlugin
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import Message from './src/main.js'
|
import MessagePlugin from './src/MessagePlugin'
|
||||||
import { install } from '../../utils/installThemeAwarableProperty'
|
import { install } from '../../utils/installThemeAwarableProperty'
|
||||||
|
|
||||||
Message.install = function (Vue) {
|
MessagePlugin.install = function (Vue) {
|
||||||
Message.Vue = Vue
|
MessagePlugin.Vue = Vue
|
||||||
install(Vue, Message, '$NMessage')
|
install(Vue, MessagePlugin, '$NMessage')
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Message
|
export default MessagePlugin
|
||||||
|
@ -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>
|
|
@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<n-scrollbar ref="scrollbar">
|
<n-scrollbar ref="scrollbar">
|
||||||
<transition
|
<transition
|
||||||
name="n-modal-content-transition"
|
name="n-modal-content-slot-transition"
|
||||||
@enter="handleEnter"
|
@enter="handleEnter"
|
||||||
@after-leave="handleAfterLeave"
|
@after-leave="handleAfterLeave"
|
||||||
@before-leave="handleBeforeLeave"
|
@before-leave="handleBeforeLeave"
|
||||||
|
@ -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>
|
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Radio from './src/main.vue'
|
import Radio from './src/Radio.vue'
|
||||||
import RadioGroup from './src/RadioGroup.vue'
|
import RadioGroup from './src/RadioGroup.vue'
|
||||||
import RadioButton from './src/RadioButton.vue'
|
import RadioButton from './src/RadioButton.vue'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import ScrollBar from './src/Scrollbar.vue'
|
import ScrollBar from './src/main.vue'
|
||||||
|
|
||||||
ScrollBar.install = function (Vue) {
|
ScrollBar.install = function (Vue) {
|
||||||
Vue.component(ScrollBar.name, ScrollBar)
|
Vue.component(ScrollBar.name, ScrollBar)
|
||||||
|
@ -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>
|
|
@ -20,7 +20,7 @@
|
|||||||
class="n-tag__close-mark"
|
class="n-tag__close-mark"
|
||||||
@click="handleCloseClick"
|
@click="handleCloseClick"
|
||||||
>
|
>
|
||||||
<close-icon />
|
<md-close />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -29,12 +29,12 @@
|
|||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../../mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../../mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../../mixins/asthemecontext'
|
||||||
import CloseIcon from './CloseIcon'
|
import mdClose from '../../../icons/md-close'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NTag',
|
name: 'NTag',
|
||||||
components: {
|
components: {
|
||||||
CloseIcon
|
mdClose
|
||||||
},
|
},
|
||||||
mixins: [withapp, themeable, asthemecontext],
|
mixins: [withapp, themeable, asthemecontext],
|
||||||
model: {
|
model: {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Timeline from './src/main.vue'
|
import Timeline from './src/Timeline.vue'
|
||||||
import TimelineItem from './src/TimelineItem.vue'
|
import TimelineItem from './src/TimelineItem.vue'
|
||||||
|
|
||||||
Timeline.install = function (Vue) {
|
Timeline.install = function (Vue) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
import Transfer from './src/main.vue'
|
import Transfer from './src/Transfer.vue'
|
||||||
|
|
||||||
Transfer.install = function (Vue) {
|
Transfer.install = function (Vue) {
|
||||||
Vue.component(Transfer.name, Transfer)
|
Vue.component(Transfer.name, Transfer)
|
||||||
|
@ -5,26 +5,11 @@
|
|||||||
@include b(card) {
|
@include b(card) {
|
||||||
background-color: $--n-dialog-color;
|
background-color: $--n-dialog-color;
|
||||||
}
|
}
|
||||||
@include b(confirm) {
|
@include once {
|
||||||
width: 80vw;
|
@include b(confirm) {
|
||||||
}
|
width: 80vw;
|
||||||
& > {
|
|
||||||
@include b(scrollbar) {
|
|
||||||
& > {
|
|
||||||
@include b(scrollbar-container) {
|
|
||||||
& > {
|
|
||||||
@include b(scrollbar-content) {
|
|
||||||
min-height: 100%;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include not-m(active) {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,6 +49,26 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
overflow: visible;
|
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 {
|
&#{&}-transition-enter-active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(0.0, 0.0, 0.2, 1);
|
transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(0.0, 0.0, 0.2, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user