Browse Source

Merge pull request #302 from tingfeng-key/patch-3

添加自动填充功能
main
奇淼(piexlmax 4 years ago
committed by GitHub
parent
commit
a0cc936d12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      web/src/view/systemTools/autoCode/component/fieldDialog.vue

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

@ -103,6 +103,7 @@
</template> </template>
<script> <script>
import { getDict } from "@/utils/dictionary"; import { getDict } from "@/utils/dictionary";
import { toSQLLine } from "@/utils/stringFun.js";
import { getSysDictionaryList } from "@/api/sysDictionary"; import { getSysDictionaryList } from "@/api/sysDictionary";
export default { export default {
name: "FieldDialog", name: "FieldDialog",
@ -201,7 +202,21 @@ export default {
}); });
this.dictOptions = dictRes.data.list this.dictOptions = dictRes.data.list
},
watch: {
'dialogMiddle.fieldName': function (val) {
if (val.length > 0) {
val = val.replace(val[0], val[0].toLowerCase());
val = toSQLLine(val)
} }
this.dialogMiddle.fieldJson = val;
this.dialogMiddle.columnName = val;
},
'dialogMiddle.fieldDesc': function (val) {
this.dialogMiddle.comment = val;
}
},
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

Loading…
Cancel
Save