refactor: 界面优化和使用sse替换websocket
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
</wd-form>
|
||||
<view class="popup-actions">
|
||||
<wd-button type="info" plain @click="closeRoleDialog">取消</wd-button>
|
||||
<wd-button type="primary" :loading="submitting" @click="submitRoleForm">保存</wd-button>
|
||||
<wd-button type="primary" :loading="isSubmitting" @click="submitRoleForm">保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
@@ -120,7 +120,7 @@ const toast = useToast();
|
||||
const { messageBox } = useMessage();
|
||||
const loadMoreState = ref<LoadMoreState>("loading");
|
||||
const formRef = ref();
|
||||
const submitting = ref(false);
|
||||
const isSubmitting = ref(false);
|
||||
|
||||
const queryParams = reactive<RolePageQuery>({ pageNum: 1, pageSize: 10, keywords: "" });
|
||||
const total = ref(0);
|
||||
@@ -198,7 +198,7 @@ async function openRoleDialog(id?: number) {
|
||||
function submitRoleForm() {
|
||||
formRef.value.validate().then(({ valid }: { valid: boolean }) => {
|
||||
if (!valid) return;
|
||||
submitting.value = true;
|
||||
isSubmitting.value = true;
|
||||
const action = formData.id ? RoleAPI.update(formData.id, formData) : RoleAPI.add(formData);
|
||||
action
|
||||
.then(() => {
|
||||
@@ -207,7 +207,7 @@ function submitRoleForm() {
|
||||
loadRoleList();
|
||||
})
|
||||
.finally(() => {
|
||||
submitting.value = false;
|
||||
isSubmitting.value = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user