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,53 +37,50 @@
@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
}"
:type="type"
:value="value"
:multiple="multiple"
:options="menuOptions"
:pattern="pattern"
:filterable="filterable"
:expand-trigger="expandTrigger"
:active-id.sync="activeId"
:lazy="lazy"
:on-load="onLoad"
:patches.sync="patches"
:loading.sync="loading"
:loading-id.sync="loadingId"
:theme="synthesizedTheme"
@input="handleMenuInput"
/>
</n-base-portal>
<n-base-portal ref="portal2">
<cascader-select-menu
ref="menu2"
:type="type"
:value="value"
:active="active && selectMenuActive"
:theme="synthesizedTheme"
:pattern="pattern"
:size="size"
:multiple="multiple"
:options="menuOptions"
@input="handleMenuInput"
/>
</n-base-portal>
</div>
<n-base-portal ref="portal1">
<cascader-menu
ref="menu1"
v-clickoutside="handleMenuClickOutside"
:active="active && !selectMenuActive"
:class="{
[`n-${synthesizedTheme}-theme`]: synthesizedTheme,
[namespace]: namespace
}"
:type="type"
:value="value"
:multiple="multiple"
:options="menuOptions"
:pattern="pattern"
:filterable="filterable"
:expand-trigger="expandTrigger"
:active-id.sync="activeId"
:lazy="lazy"
:on-load="onLoad"
:patches.sync="patches"
:loading.sync="loading"
:loading-id.sync="loadingId"
:theme="synthesizedTheme"
@input="handleMenuInput"
/>
</n-base-portal>
<n-base-portal ref="portal2">
<cascader-select-menu
ref="menu2"
:class="{
[namespace]: namespace
}"
:type="type"
:value="value"
:active="active && selectMenuActive"
:theme="synthesizedTheme"
:pattern="pattern"
:size="size"
:multiple="multiple"
:options="menuOptions"
@input="handleMenuInput"
/>
</n-base-portal>
</div>
</template>

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