Browse Source

fix: misc utility and css fixes

hechang27-sprt 6 months ago
parent
commit
cf34d47602
  1. 3
      .claude/settings.local.json
  2. 16
      packages/manage/common/login2.vue
  3. 2
      packages/manage/router/index.vue
  4. 2
      packages/manage/router/zhuBeiDong.vue
  5. 7
      plugs/composables/useListTable.ts
  6. 4
      plugs/composables/useModifyForm.ts

3
.claude/settings.local.json

@ -10,7 +10,8 @@
"mcp__chrome-devtools__list_network_requests", "mcp__chrome-devtools__list_network_requests",
"mcp__chrome-devtools__evaluate_script", "mcp__chrome-devtools__evaluate_script",
"mcp__chrome-devtools__get_network_request", "mcp__chrome-devtools__get_network_request",
"Bash(cat:*)" "Bash(cat:*)",
"mcp__chrome-devtools__wait_for"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []

16
packages/manage/common/login2.vue

@ -135,28 +135,24 @@ onBeforeUnmount(() => {
.el-form-item { .el-form-item {
:deep(.el-form-item__content) { :deep(.el-form-item__content) {
display: flex; display: block;
align-items: center;
flex-wrap: wrap;
} }
:deep(.el-form-item__error) { :deep(.el-form-item__error) {
left: 92px; // 80px (label min-width) + 12px (label margin-right) left: 0;
width: calc(100% - 92px); width: 100%;
} }
} }
.login-label { .login-label {
display: inline-block; display: block;
min-width: 80px; margin-bottom: 8px;
margin-right: 12px;
text-align: right;
font-size: 1rem; font-size: 1rem;
color: v-bind('state.style.color'); color: v-bind('state.style.color');
} }
.login-input { .login-input {
flex: 1; width: 100%;
:deep(.el-input__inner) { :deep(.el-input__inner) {
font-size: 2rem; font-size: 2rem;

2
packages/manage/router/index.vue

@ -185,7 +185,7 @@ body {
height: v-bind("state.size.headHeight"); height: v-bind("state.size.headHeight");
} }
.head-icon { :deep(.head-icon) {
float: right; float: right;
cursor: pointer; cursor: pointer;
height: v-bind("state.size.headHeight"); height: v-bind("state.size.headHeight");

2
packages/manage/router/zhuBeiDong.vue

@ -178,7 +178,7 @@ body {
height: v-bind("state.size.headHeight"); height: v-bind("state.size.headHeight");
} }
.head-icon { :deep(.head-icon) {
float: right; float: right;
cursor: pointer; cursor: pointer;
height: v-bind("state.size.headHeight") !important; height: v-bind("state.size.headHeight") !important;

7
plugs/composables/useListTable.ts

@ -1,5 +1,5 @@
import { toReactive } from "@vueuse/core"; import { toReactive } from "@vueuse/core";
import { reactive, ref, shallowRef, watchEffect } from "vue"; import { reactive, ref, shallowRef, toRaw, watchEffect } from "vue";
import * as Element from "../element"; import * as Element from "../element";
import { useI18n } from "vue3-i18n"; import { useI18n } from "vue3-i18n";
import { PageResponse } from "../http"; import { PageResponse } from "../http";
@ -73,14 +73,15 @@ export function useListTable(options: Options) {
const example = reactive<any>(defaultExample()); const example = reactive<any>(defaultExample());
const setExample = (params: Record<string, any>) => { const setExample = (params: Record<string, any>) => {
clearAndAssign(params, { ...defaultExample(), ...params }); clearAndAssign(example, { ...defaultExample(), ...params });
}; };
const query = async () => { const query = async () => {
try { try {
const resp = await options.query(deepCopy(example)); const resp = await options.query(deepCopy(toRaw(example)));
setRows(resp); setRows(resp);
} catch (error) { } catch (error) {
console.error(error);
showMessage("error", t("common.errors.listTableQueryError")); showMessage("error", t("common.errors.listTableQueryError"));
} }
}; };

4
plugs/composables/useModifyForm.ts

@ -1,4 +1,4 @@
import { reactive, Ref } from "vue"; import { reactive, Ref, toRaw } from "vue";
import {} from "noob-mengyxu"; import {} from "noob-mengyxu";
import * as Element from "../element"; import * as Element from "../element";
import { clearAndAssign, deepCopy } from "../util/objectUtil"; import { clearAndAssign, deepCopy } from "../util/objectUtil";
@ -110,7 +110,7 @@ export function useModifyForm(options: Options) {
}, },
async onConfirm() { async onConfirm() {
const value = deepCopy(this.data.model); const value = deepCopy(toRaw(this.data.model));
try { try {
if (this.data.dialog === this.flagOnAdd) { if (this.data.dialog === this.flagOnAdd) {
await handleAdd?.(value); await handleAdd?.(value);

Loading…
Cancel
Save