chore: add some comment for detaching & zindexable

This commit is contained in:
07akioni 2020-01-30 22:01:21 +08:00
parent 58124a671d
commit 11b9f76c8f
5 changed files with 52 additions and 53 deletions

View File

@ -37,20 +37,15 @@
@delete-last-option="handleDeleteLastOption"
@pattern-input="handlePatternInput"
/>
<div
ref="contentContainer"
class="n-detached-content-container n-cascader-detached-content-container"
:class="{
[namespace]: namespace
}"
>
<n-base-portal ref="portal1">
<cascader-menu
ref="menu1"
v-clickoutside="handleMenuClickOutside"
:active="active && !selectMenuActive"
:class="{
[`n-${synthesizedTheme}-theme`]: synthesizedTheme
[`n-${synthesizedTheme}-theme`]: synthesizedTheme,
[namespace]: namespace
}"
:type="type"
:value="value"
@ -72,6 +67,9 @@
<n-base-portal ref="portal2">
<cascader-select-menu
ref="menu2"
:class="{
[namespace]: namespace
}"
:type="type"
:value="value"
:active="active && selectMenuActive"
@ -84,7 +82,6 @@
/>
</n-base-portal>
</div>
</div>
</template>
<script>

View File

@ -41,6 +41,7 @@ export default {
type: Boolean,
default: true
},
/** to make zindexable work */
detached: {
type: Boolean,
default: true

View File

@ -66,10 +66,6 @@ export default {
type: String,
default: undefined
},
detached: {
type: Boolean,
default: true
},
overlayClass: {
type: String,
default: null
@ -77,6 +73,11 @@ export default {
overlayStyle: {
type: Object,
default: undefined
},
/** to make zindexable work */
detached: {
type: Boolean,
default: true
}
},
mixins: [withapp, themeable, asthemecontext, placeable, zindexable],

View File

@ -325,7 +325,7 @@ export default {
},
handlePickerBlur () {
this.$emit('blur', this.value)
// this.closeMenu()
this.closeMenu()
},
handleClickOutsideMenu (e) {
if (this.active) {

View File

@ -29,7 +29,7 @@
>
<div
ref="content"
class="n-detached-content"
class="n-positioning-content"
>
<transition name="n-time-picker--transition">
<div