style: compress index.less
This commit is contained in:
parent
db2ffefd4a
commit
803673a48f
@ -31,7 +31,7 @@ onClickOutside(dropdownRef, (event) => {
|
|||||||
|
|
||||||
const open = function (event?: Event) {
|
const open = function (event?: Event) {
|
||||||
if (props.disabled === false) {
|
if (props.disabled === false) {
|
||||||
if(event){
|
if (event) {
|
||||||
const el = event.currentTarget;
|
const el = event.currentTarget;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const rect = el.getBoundingClientRect();
|
const rect = el.getBoundingClientRect();
|
||||||
@ -40,7 +40,7 @@ const open = function (event?: Event) {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dropdownY.value = event.clientY - rect.top + "px";
|
dropdownY.value = event.clientY - rect.top + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
openState.value = true;
|
openState.value = true;
|
||||||
emit("open");
|
emit("open");
|
||||||
}
|
}
|
||||||
@ -61,9 +61,9 @@ const toggle = function (event?: Event) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const dropdownStyle = computed(() => ({
|
const dropdownStyle = computed(() => ({
|
||||||
'--layui-dropdown-left': dropdownX.value,
|
"--layui-dropdown-left": dropdownX.value,
|
||||||
'--layui-dropdown-top': dropdownY.value,
|
"--layui-dropdown-top": dropdownY.value,
|
||||||
}))
|
}));
|
||||||
|
|
||||||
provide("openState", openState);
|
provide("openState", openState);
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ defineExpose({ open, hide, toggle });
|
|||||||
:class="{ 'layui-dropdown-up': openState }"
|
:class="{ 'layui-dropdown-up': openState }"
|
||||||
:style="dropdownStyle"
|
:style="dropdownStyle"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@click="trigger === 'click' && toggle()"
|
@click="trigger === 'click' && toggle()"
|
||||||
@contextmenu.prevent="trigger === 'contextMenu' && toggle($event)"
|
@contextmenu.prevent="trigger === 'contextMenu' && toggle($event)"
|
||||||
>
|
>
|
||||||
|
@ -168,10 +168,7 @@ const searchList = function (str: string, container: any) {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="page" class="layui-iconpicker-page">
|
<div v-if="page" class="layui-iconpicker-page">
|
||||||
<div
|
<div id="layui-laypage-1" class="layui-laypage layui-laypage-default">
|
||||||
id="layui-laypage-1"
|
|
||||||
class="layui-laypage layui-laypage-default"
|
|
||||||
>
|
|
||||||
<span class="layui-laypage-count">共 {{ total }} 个</span
|
<span class="layui-laypage-count">共 {{ total }} 个</span
|
||||||
><a
|
><a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user