Skip to content

Commit 5eec28a

Browse files
author
奇淼(piexlmax
authored
Merge pull request #302 from tingfeng-key/patch-3
添加自动填充功能
2 parents 6a028e1 + 7ddcf97 commit 5eec28a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

web/src/view/systemTools/autoCode/component/fieldDialog.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
</template>
104104
<script>
105105
import { getDict } from "@/utils/dictionary";
106+
import { toSQLLine } from "@/utils/stringFun.js";
106107
import { getSysDictionaryList } from "@/api/sysDictionary";
107108
export default {
108109
name: "FieldDialog",
@@ -201,7 +202,21 @@ export default {
201202
});
202203
203204
this.dictOptions = dictRes.data.list
204-
}
205+
},
206+
watch: {
207+
'dialogMiddle.fieldName': function (val) {
208+
if (val.length > 0) {
209+
val = val.replace(val[0], val[0].toLowerCase());
210+
val = toSQLLine(val)
211+
}
212+
213+
this.dialogMiddle.fieldJson = val;
214+
this.dialogMiddle.columnName = val;
215+
},
216+
'dialogMiddle.fieldDesc': function (val) {
217+
this.dialogMiddle.comment = val;
218+
}
219+
},
205220
};
206221
</script>
207222
<style lang="scss">

0 commit comments

Comments
 (0)