mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
Merge branch 'develop' of ***REMOVED*** into develop
This commit is contained in:
commit
d5e6bdd24c
@ -1,8 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
import AutoComplete from './src/main.vue'
|
|
||||||
|
|
||||||
AutoComplete.install = function (Vue) {
|
|
||||||
Vue.component(AutoComplete.name, AutoComplete)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AutoComplete
|
|
@ -1,5 +1,5 @@
|
|||||||
@import './mixins/mixins.scss';
|
// @import './mixins/mixins.scss';
|
||||||
|
|
||||||
@include b(auto-complete-menu) {
|
// @include b(auto-complete-menu) {
|
||||||
@include fade-in-scale-up-transition(auto-complete-menu, $original-transition: (background-color .3s $--n-ease-in-out-cubic-bezier));
|
// @include fade-in-scale-up-transition(auto-complete-menu, $original-transition: (background-color .3s $--n-ease-in-out-cubic-bezier));
|
||||||
}
|
// }
|
@ -36,7 +36,7 @@
|
|||||||
ref="content"
|
ref="content"
|
||||||
class="n-positioning-content"
|
class="n-positioning-content"
|
||||||
>
|
>
|
||||||
<transition name="n-auto-complete-menu-transition">
|
<transition name="n-fade-in-scale-up-transition">
|
||||||
<n-base-select-menu
|
<n-base-select-menu
|
||||||
v-if="active"
|
v-if="active"
|
||||||
ref="contentInner"
|
ref="contentInner"
|
||||||
@ -71,9 +71,11 @@ import themeable from '../../_mixins/themeable'
|
|||||||
import asformitem from '../../_mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
import NBaseSelectMenu from '../../_base/select-menu'
|
import NBaseSelectMenu from '../../_base/select-menu'
|
||||||
import { mapAutoCompleteOptionsToSelectOptions } from './utils'
|
import { mapAutoCompleteOptionsToSelectOptions } from './utils'
|
||||||
|
import usecssr from '../../_mixins/usecssr'
|
||||||
|
import styles from './styles'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAutoComplete',
|
name: 'AutoComplete',
|
||||||
components: {
|
components: {
|
||||||
NInput,
|
NInput,
|
||||||
NBaseSelectMenu
|
NBaseSelectMenu
|
||||||
@ -87,7 +89,8 @@ export default {
|
|||||||
detachable,
|
detachable,
|
||||||
zindexable,
|
zindexable,
|
||||||
placeable,
|
placeable,
|
||||||
asformitem()
|
asformitem(),
|
||||||
|
usecssr(styles)
|
||||||
],
|
],
|
||||||
props: {
|
props: {
|
||||||
placeholder: {
|
placeholder: {
|
11
src/autoComplete/src/styles/index.js
Normal file
11
src/autoComplete/src/styles/index.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import themedBaseStyle from './themed-base.cssr.js'
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
key: 'syntheticTheme',
|
||||||
|
watch: [
|
||||||
|
'syntheticTheme'
|
||||||
|
],
|
||||||
|
CNode: themedBaseStyle
|
||||||
|
}
|
||||||
|
]
|
13
src/autoComplete/src/styles/themed-base.cssr.js
Normal file
13
src/autoComplete/src/styles/themed-base.cssr.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { c, cTB } from '../../../_utils/cssr'
|
||||||
|
import fadeInScaleUpTransition from '../../../styles/_transitions/fade-in-scale-up.js'
|
||||||
|
|
||||||
|
export default c([
|
||||||
|
({ props }) => {
|
||||||
|
const { easeInOutCubicBezier } = props.$base
|
||||||
|
return cTB('auto-complete-menu', [
|
||||||
|
fadeInScaleUpTransition({
|
||||||
|
originalTransition: `background-color .3s ${easeInOutCubicBezier}`
|
||||||
|
})
|
||||||
|
])
|
||||||
|
}
|
||||||
|
])
|
9
src/autoComplete/styles/dark.js
Normal file
9
src/autoComplete/styles/dark.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import create from '../../styles/_utils/create-component-base'
|
||||||
|
|
||||||
|
export default create({
|
||||||
|
theme: 'dark',
|
||||||
|
name: 'AutoComplete',
|
||||||
|
getDerivedVariables ({ base, derived }) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
})
|
9
src/autoComplete/styles/light.js
Normal file
9
src/autoComplete/styles/light.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import create from '../../styles/_utils/create-component-base'
|
||||||
|
|
||||||
|
export default create({
|
||||||
|
theme: 'light',
|
||||||
|
name: 'AutoComplete',
|
||||||
|
getDerivedVariables ({ base, derived }) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
})
|
@ -58,7 +58,7 @@ import Menu from './Menu'
|
|||||||
import Avatar from './avatar'
|
import Avatar from './avatar'
|
||||||
import Result from './Result'
|
import Result from './Result'
|
||||||
import Thing from './Thing'
|
import Thing from './Thing'
|
||||||
import AutoComplete from './AutoComplete'
|
import AutoComplete from './autoComplete'
|
||||||
import Empty from './Empty'
|
import Empty from './Empty'
|
||||||
import Element from './element'
|
import Element from './element'
|
||||||
import Log from './Log'
|
import Log from './Log'
|
||||||
@ -109,6 +109,8 @@ import typographyDarkStyle from './typography/styles/light'
|
|||||||
import typographyLightStyle from './typography/styles/dark'
|
import typographyLightStyle from './typography/styles/dark'
|
||||||
import backTopLightStyle from './back-top/styles/light'
|
import backTopLightStyle from './back-top/styles/light'
|
||||||
import backTopDarkStyle from './back-top/styles/dark'
|
import backTopDarkStyle from './back-top/styles/dark'
|
||||||
|
import autoComplateLightStyle from './autoComplete/styles/light'
|
||||||
|
import autoComplateDarkStyle from './autoComplete/styles/dark'
|
||||||
|
|
||||||
// Can be remove after refactoring
|
// Can be remove after refactoring
|
||||||
import baseSelectionLightStyle from './_base/selection/styles/light'
|
import baseSelectionLightStyle from './_base/selection/styles/light'
|
||||||
@ -238,6 +240,8 @@ export default create({
|
|||||||
transferDarkStyle,
|
transferDarkStyle,
|
||||||
typographyLightStyle,
|
typographyLightStyle,
|
||||||
typographyDarkStyle,
|
typographyDarkStyle,
|
||||||
|
autoComplateLightStyle,
|
||||||
|
autoComplateDarkStyle,
|
||||||
backTopLightStyle,
|
backTopLightStyle,
|
||||||
backTopDarkStyle,
|
backTopDarkStyle,
|
||||||
// Can be remove after refactoring
|
// Can be remove after refactoring
|
||||||
|
Loading…
Reference in New Issue
Block a user