Commit ffee0133 authored by 胡小根's avatar 胡小根

Merge branch 'master' of 115.28.80.125:softwarefactory/vueelementtemplate

parents 1176b888 ad85baa4
......@@ -200,6 +200,7 @@
}"></hm-complex-form>
```
### 指定显示的表单类型
```vue
<template>
<div>
......@@ -210,17 +211,8 @@
</template>
<script>
import HmComplexForm from './HmComplexForm.vue'
import schema from '../../schemas/hm_org_schema'
export default {
name: 'HmComplexForm',
// 继承其他组件
extends: {},
// 使用其它组件
components: {
'hm-complex-form': HmComplexForm
},
data() {
return {
schema: {
......@@ -424,16 +416,9 @@
showFields: ['username', 'loginid', 'password', 'mobile', 'email']
}
},
computed: {
},
filters: {
},
created() {
this.schema = schema
},
methods: {}
}
}
</script>
<style scoped>
</style>
```
\ No newline at end of file
<template>
<el-row type="flex" class="hm-form">
<el-row type="flex" class="hm-form" style="margin-top: 50px">
<el-col :span="6">
<div></div>
</el-col>
<el-col :span="12" style="border:1px solid orange">
<el-col :span="12">
<div>
<h2 class="title">表单页面</h2>
<!--表单部分-->
<el-form ref="form" :model="formModel" :rules="rules" label-width="110px"
style="width:80%;margin:0 auto">
......@@ -136,6 +135,7 @@
_.each(self.showFields, function(column, index) {
if (typeof column === 'string') {
// 生成一个新对象
console.log(column)
const tmp = _.keyBy(self.schema['columns'], 'code')[column.toUpperCase()]
// console.log(tmp)
// self.$set(tmp, 'code', tmp.code.toLowerCase())
......@@ -209,12 +209,5 @@
}
</script>
<style scoped>
.title {
line-height: 40px;
background: orange;
color: #fff;
text-align: center;
margin-top: 0;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment