Commit e895f1e7 authored by JingChao's avatar JingChao

layout

parent 2eecde67
This diff is collapsed.
...@@ -32,19 +32,14 @@ export default { ...@@ -32,19 +32,14 @@ export default {
} }
}, },
computed: { computed: {
/* value() {
return value ? value : false
} */
}, },
watch: { watch: {
value (val) {
this.$emit('input', val)
this.value = val
},
}, },
methods: { methods: {
checked () { checked () {
if (!this.disable) { if (!this.disable) {
this.$emit('input', !this.value)
this.$emit('switchClick', !this.value) this.$emit('switchClick', !this.value)
} }
}, },
......
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
</h-header> </h-header>
<h-form <h-form
:layout-data="layoutData" :show-form-title="showFormTitle" :show-btn-divider="true" :layout-data="layoutData" :show-form-title="showFormTitle" :show-btn-divider="true"
:show-tab-divider="true" :formData.sync="data" v-model="data" @tabClick="tabClick" :show-tab-divider="true" :formData="data" v-model="data" @tabClick="tabClick"
@showSelect="showSelect" @showTime="showTime"/> @showSelect="showSelect" @showTime="showTime" @switchClick="switchClick" @filedClick="filedClick"
@btnClick="btnClick"/>
</h-view> </h-view>
</template> </template>
...@@ -34,6 +35,7 @@ export default { ...@@ -34,6 +35,7 @@ export default {
contract: { contract: {
postion: '01', postion: '01',
postion_n: '技术顾问', postion_n: '技术顾问',
enable_flag: false,
}, },
}, },
postionList: [ postionList: [
...@@ -47,6 +49,10 @@ export default { ...@@ -47,6 +49,10 @@ export default {
}, },
methods: { methods: {
/**
* tab的点击事件
* @param index
*/
tabClick (index) { tabClick (index) {
this.tabIndex = index this.tabIndex = index
}, },
...@@ -62,6 +68,11 @@ export default { ...@@ -62,6 +68,11 @@ export default {
}, },
}) })
}, },
/**
* 下拉框点击事件
* @param configCode
* @param filedCode
*/
showSelect (configCode, filedCode) { showSelect (configCode, filedCode) {
let vm = this let vm = this
switch (filedCode) { switch (filedCode) {
...@@ -79,6 +90,11 @@ export default { ...@@ -79,6 +90,11 @@ export default {
}, },
}) })
}, },
/**
* 事件选择事件
* @param configCode
* @param filedCode
*/
showTime (configCode, filedCode) { showTime (configCode, filedCode) {
let vm = this let vm = this
switch (filedCode) { switch (filedCode) {
...@@ -88,6 +104,30 @@ export default { ...@@ -88,6 +104,30 @@ export default {
default: default:
} }
}, },
/**
* switch的点开事件
* @param configCode
* @param filedCode
* @param value
*/
switchClick (configCode, filedCode, value) {
debugger
},
/**
* 其他字端的点击事件
* @param configCode
* @param filedCode
*/
filedClick (configCode, filedCode) {
debugger
},
/**
* 按钮点击事件
* @param btn
*/
btnClick (btn) {
debugger
},
}, },
} }
</script> </script>
......
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
"inputType": "text", "inputType": "text",
"placeholder": "请选择岗位", "placeholder": "请选择岗位",
"filedOrder": "3", "filedOrder": "3",
"inputMode": "other", "inputMode": "readOnly",
"leftIcon": null, "leftIcon": null,
"rightIcon": null, "rightIcon": null,
"format": "N", "format": "N",
...@@ -616,6 +616,83 @@ ...@@ -616,6 +616,83 @@
"cssClass": null "cssClass": null
} }
] ]
},
{
"_token": "db3ad35d036691c5b0caa2e273d31f25",
"objectVersionNumber": null,
"configId": "5c95cde581a64f42a86900712c53502a",
"layoutId": "1",
"configCode": "BUTTON",
"configName": "底部按钮",
"configType": "BUTTON",
"configOrder": "40",
"tabFlag": "N",
"tabConfigId": null,
"tabFiledId": null,
"cssClass": "btn-button",
"enableFlag": "Y",
"hideForm": false,
"tabConfigCode": null,
"tabFiledCode": null,
"tabFiledName": null,
"layoutFiledList": [
{
"_token": "7e61d576cfa5d12ee68bdf7ec36d99b2",
"objectVersionNumber": 2,
"filedId": "3d7ba60e16594e1fb170790d166c8bb1",
"layoutId": "1",
"configId": "5c95cde581a64f42a86900712c53502a",
"filedCode": "save",
"filedName": "保存",
"defaultValue": null,
"filedType": "OTHES",
"inputType": "text",
"placeholder": null,
"filedOrder": "1",
"inputMode": "other",
"leftIcon": null,
"rightIcon": null,
"format": "N",
"proportion": "1,2",
"showName": true,
"showContent": true,
"showArrow": false,
"hasBorder": true,
"filedHeight": 45,
"enableFlag": "Y",
"tabContent": null,
"btnContent": null,
"cssClass": "save-btn"
},
{
"_token": "974a18dedc6a0960a4ad0f6be96dacea",
"objectVersionNumber": 1,
"filedId": "f64a1e6b0c834f5fa0db15e999e84eb0",
"layoutId": "1",
"configId": "5c95cde581a64f42a86900712c53502a",
"filedCode": "submit",
"filedName": "提交",
"defaultValue": null,
"filedType": "OTHES",
"inputType": "text",
"placeholder": null,
"filedOrder": "2",
"inputMode": "other",
"leftIcon": null,
"rightIcon": null,
"format": "N",
"proportion": "1,2",
"showName": true,
"showContent": true,
"showArrow": false,
"hasBorder": true,
"filedHeight": 45,
"enableFlag": "Y",
"tabContent": null,
"btnContent": null,
"cssClass": null
}
]
} }
] ]
} }
......
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