feat: 🚀 去掉空格

This commit is contained in:
2025-04-09 17:42:06 +08:00
parent 2698e2c2cf
commit 473aa04ea4
11 changed files with 44 additions and 28 deletions

View File

@@ -32,7 +32,7 @@
:max="9999"
:controls="true"
style="width: 125px"
v-model.trim="scope.row[item.prop]"
v-model="scope.row[item.prop]"
:disabled="tableData[scope.$index].disabled"
:placeholder="item.placeholder"
:maxlength="item.maxLength"
@@ -46,7 +46,7 @@
<template #default="scope" v-if="item.formType === 'input'">
<el-input
:style="item.width ? item.width : 'width:200px'"
v-model.trim="scope.row[item.prop]"
v-model="scope.row[item.prop]"
:disabled="tableData[scope.$index].disabled"
:placeholder="item.placeholder"
:maxlength="item.maxLength"
@@ -58,7 +58,7 @@
<template #default="scope" v-if="item.formType === 'selectRemote'">
<el-select
:style="item.width ? item.width : 'width:200px'"
v-model.trim="scope.row[item.prop]"
v-model="scope.row[item.prop]"
:placeholder="item.placeholder"
clearable
remote

View File

@@ -5,7 +5,7 @@
<el-input
:placeholder="item.placeholder"
:maxlength="item.maxlength || 255"
v-model.trim="_searchParam[`${item.prop}`]"
v-model="_searchParam[`${item.prop}`]"
style="width: 224px"
@input="handleInput(item)"
@keyup.enter="search"
@@ -81,7 +81,7 @@
<!-- 双 -->
<template v-if="item.type === 'inputs'">
<el-input
v-model.trim="_searchParam[`${item.startProp}`]"
v-model="_searchParam[`${item.startProp}`]"
:placeholder="item.startPlaceholder"
:disabled="item.disabled"
maxlength="255"
@@ -91,7 +91,7 @@
</el-input>
<span style="margin: 0 3px">-</span>
<el-input
v-model.trim="_searchParam[`${item.endProp}`]"
v-model="_searchParam[`${item.endProp}`]"
:placeholder="item.endPlaceholder"
:disabled="item.disabled"
maxlength="255"
@@ -130,7 +130,7 @@
</el-select>
<el-input
v-model.trim="_searchParam[`${item.startProp}`]"
v-model="_searchParam[`${item.startProp}`]"
:placeholder="item.startPlaceholder"
:disabled="item.disabled"
maxlength="255"
@@ -140,7 +140,7 @@
</el-input>
<span style="margin: 0 3px">-</span>
<el-input
v-model.trim="_searchParam[`${item.endProp}`]"
v-model="_searchParam[`${item.endProp}`]"
:placeholder="item.endPlaceholder"
:disabled="item.disabled"
maxlength="255"

View File

@@ -13,7 +13,7 @@
<el-input
style="width: 440px"
:placeholder="item.placeholder"
v-model.trim="_ruleForm[`${item.prop}`]"
v-model="_ruleForm[`${item.prop}`]"
clearable
:disabled="item.disabled"
@blur="handleInputBlur"
@@ -22,7 +22,7 @@
<template v-if="item.type === 'inputSelect'">
<el-input
:placeholder="item.placeholder"
v-model.trim="_ruleForm[`${item.prop}`]"
v-model="_ruleForm[`${item.prop}`]"
clearable
:disabled="item.disabled"
@blur="handleInputBlur"
@@ -42,7 +42,7 @@
<template v-if="item.type === 'inputButton'">
<el-input
:placeholder="item.placeholder"
v-model.trim="_ruleForm[`${item.prop}`]"
v-model="_ruleForm[`${item.prop}`]"
clearable
:disabled="item.disabled"
>
@@ -56,7 +56,7 @@
:min="1"
:max="9999"
:controls="true"
v-model.trim="_ruleForm[`${item.prop}`]"
v-model="_ruleForm[`${item.prop}`]"
:disabled="item.disabled"
:placeholder="item.placeholder"
:maxlength="item.maxLength"
@@ -139,7 +139,7 @@
v-model="_ruleForm[`${item.prop}`]"
:placeholder="item.placeholder"
clearable
@change="handleSelectChange(_ruleForm[`${item.prop}`])"
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
>
<el-option
:label="option.label"
@@ -158,7 +158,7 @@
:render-after-expand="false"
show-checkbox
check-strictly
@change="handleSelectChange(_ruleForm[`${item.prop}`])"
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
/>
</template>
<template v-if="item.type === 'treeSelects'">
@@ -218,8 +218,8 @@ const handleInputButtonClick = () => {
const handleInputBlur = () => {
emits("handleInputBlurEmits");
};
const handleSelectChange = (params: any) => {
emits("handleSelectChangeEmits", { id: params });
const handleSelectChange = (params: any, prop: any) => {
emits("handleSelectChangeEmits", { id: params, prop });
};
// const handleTreesSelectChange = (params: any) => {
// emits("handleTreesSelectChangeEmits", params);

View File

@@ -91,8 +91,10 @@ const getArticleListDetails = async () => {
}
};
const handleSelectChangeEmits = (value: any) => {
console.log(value, "========value=========");
dataStore.editRuleForm.category_id = value.id;
console.log(value, "=======value========");
if (value?.prop === "category_id1") {
dataStore.editRuleForm.category_id = value.id;
}
};
const convertDateFormat = (dateString: any) => {
const date = new Date(dateString);

View File

@@ -47,7 +47,7 @@
ref="formRef"
@handleRadioGroupEmits="handleRadioGroupEmits"
>
<el-input v-model.trim="dataStore.editRuleForm.link" clearable style="width: 440px">
<el-input v-model="dataStore.editRuleForm.link" clearable style="width: 440px">
<template #append>
<el-tree-select
lazy

View File

@@ -241,7 +241,9 @@ const getAttachmentRead = async () => {
getAttachmentRead();
const handleSelectChangeEmits = (value: any) => {
console.log(value, "========value=========");
dataStore.editRuleForm.category_id = value.id;
if (value.prop === "category_id1") {
dataStore.editRuleForm.category_id = value.id;
}
};
//分类
const getCategorys = async () => {

View File

@@ -154,7 +154,10 @@ const getArticleCategorySave = async (params: any) => {
};
const handleSelectChangeEmits = (value: any) => {
dataStore.ruleForm.pid = value.id;
console.log(value, "===============value1111111============");
if (value.prop === "pid") {
dataStore.ruleForm.pid = value.id;
}
};
const handleTreesSelectChangeEmits = (value: any) => {
console.log(value, "=========value=========");

View File

@@ -36,7 +36,7 @@
:min="1"
:max="9999"
:controls="true"
v-model.trim="_ruleFormParam.sort"
v-model="_ruleFormParam.sort"
step-strictly
:step="1"
controls-position="right"

View File

@@ -187,8 +187,10 @@ const getVideoRead = async (id: any) => {
};
const handleSelectChangeEmits = (value: any) => {
console.log(value, "========value=========");
dataStore.editRuleForm.category_id = value.id;
console.log(value, "========value=33========");
if (value.prop === "category_id1") {
dataStore.editRuleForm.category_id = value.id;
}
};
//保存

View File

@@ -321,8 +321,11 @@ const reset = () => {
getMenusList();
};
const handleSelectChangeEmits = (value: any) => {
dataStore.editRuleForm.pid = value.id;
console.log(value, "==========value=========");
if (value.prop === "pid") {
dataStore.editRuleForm.pid = value.id;
}
console.log(value, "==========value===323232======");
};
</script>

View File

@@ -61,7 +61,7 @@
ref="formRef"
@handleSelectChangeEmits="handleSelectChangeEmits"
>
<el-input v-model.trim="dataStore.editRuleForm.link" clearable style="width: 440px">
<el-input v-model="dataStore.editRuleForm.link" clearable style="width: 440px">
<template #append>
<el-tree-select
lazy
@@ -300,6 +300,10 @@ const getItemsSave = async () => {
}
};
const handleSelectChangeEmits = (params: any) => {
console.log("123232", params);
if (params.prop === "nav_id") {
return;
}
dataStore.editRuleForm.pid = params?.id;
};
//更新
@@ -336,7 +340,6 @@ const handleResetClick = () => {
if (dataStore.title === "编辑导航") {
getItemsRead(dataStore.editRuleForm.id);
} else {
console.log("走到了这里");
resetFields();
}
};
@@ -362,6 +365,7 @@ const reset = () => {
dataStore.searchParam.name = "";
dataStore.searchParam.nav_id = "";
dataStore.searchParam.Time = "";
dataStore.searchParam.pid = "";
getItemsList();
};
</script>