mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
chore: add some comment for detaching & zindexable
This commit is contained in:
parent
58124a671d
commit
11b9f76c8f
@ -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>
|
||||
|
||||
|
@ -41,6 +41,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/** to make zindexable work */
|
||||
detached: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
|
@ -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],
|
||||
|
@ -325,7 +325,7 @@ export default {
|
||||
},
|
||||
handlePickerBlur () {
|
||||
this.$emit('blur', this.value)
|
||||
// this.closeMenu()
|
||||
this.closeMenu()
|
||||
},
|
||||
handleClickOutsideMenu (e) {
|
||||
if (this.active) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
>
|
||||
<div
|
||||
ref="content"
|
||||
class="n-detached-content"
|
||||
class="n-positioning-content"
|
||||
>
|
||||
<transition name="n-time-picker--transition">
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user