mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-15 14:50:29 +08:00
Merge branch 'main' into pages
This commit is contained in:
@@ -450,6 +450,17 @@ function onBeforeSureClick() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onSureBtnLoading() {
|
||||
addDialog({
|
||||
sureBtnLoading: true,
|
||||
title: "点击底部确定按钮可开启按钮动画",
|
||||
contentRenderer: () => <p>弹框内容-点击底部确定按钮可开启按钮动画</p>,
|
||||
beforeSure: done => {
|
||||
setTimeout(() => done(), 800);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -534,6 +545,9 @@ function onBeforeSureClick() {
|
||||
<el-button @click="onBeforeSureClick">
|
||||
点击底部确定按钮的回调(会暂停弹框的关闭,经常用于新增、修改弹框内容后调用接口)
|
||||
</el-button>
|
||||
<el-button @click="onSureBtnLoading">
|
||||
点击底部确定按钮可开启按钮动画
|
||||
</el-button>
|
||||
</el-space>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -99,7 +99,7 @@ watch(size, val =>
|
||||
<el-button
|
||||
v-for="(button, index) in buttonList"
|
||||
:key="index"
|
||||
:type="button.type"
|
||||
:type="button.type as any"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
:plain="baseRadio === 'plain'"
|
||||
|
||||
@@ -97,7 +97,11 @@ const immediateDebounce: any = debounce(
|
||||
);
|
||||
|
||||
useEventListener(document, "keypress", ({ code }) => {
|
||||
if (code === "Enter" && !disabled.value && !loading.value)
|
||||
if (
|
||||
["Enter", "NumpadEnter"].includes(code) &&
|
||||
!disabled.value &&
|
||||
!loading.value
|
||||
)
|
||||
immediateDebounce(ruleFormRef.value);
|
||||
});
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ onMounted(() => {
|
||||
|
||||
<div
|
||||
v-if="isShow"
|
||||
class="!min-w-[calc(100vw-60vw-268px)] mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto"
|
||||
class="!min-w-[calc(100vw-60vw-268px)] w-full mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto"
|
||||
>
|
||||
<div class="flex justify-between w-full px-3 pt-5 pb-4">
|
||||
<div class="flex">
|
||||
|
||||
Reference in New Issue
Block a user