Former-commit-id: 3e3292799b6004ececc2a2df0f7f90b83ddd74c0 [formerly 3e3292799b6004ececc2a2df0f7f90b83ddd74c0 [formerly 3e3292799b6004ececc2a2df0f7f90b83ddd74c0 [formerly 3e3292799b6004ececc2a2df0f7f90b83ddd74c0 [formerly 3d81fb081e5cb89109618cd64ad879cab2f14258 [formerly d81191c75b0c34fe555c4096a966109715b6d841]]]]]
Former-commit-id: 2fa3664208ec69b7baa112f5fcc1090fd1569f34
Former-commit-id: de12556ffa740139915e8594add6fbb3e87c0c9c
Former-commit-id: be0a447172362bc1190a35f1562907aac8498fbb [formerly ac662db0542b6ce34c5d0a6846b42d379e488248]
Former-commit-id: 1fbea33902875cc0c2b9e61b029b50c2a776f651
Former-commit-id: fc68289f9fb02a4f62ddf58530011615157e3b0e
Former-commit-id: 39faeb044da9dbd23c984beb3b7273af8b175ca1
Former-commit-id: 891b382ca2d4e753db2d591ee601521fb9369b3a
Former-commit-id: 8685670c0f29495d7bd4d3c3f18d7044cfcdf74a
This commit is contained in:
孙昊翔
2018-12-25 10:05:31 +08:00
parent 8dae631c72
commit be85c96e7e
4 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ export default `<template>
:columns="columns"
:data="data"
:rowHandle="rowHandle"
:form-template="formTemplate"
:edit-template="editTemplate"
@d2-data-change="handleDataChange"
@row-edit="handleRowEdit"
@dialog-cancel="handleDialogCancel"/>
@@ -73,7 +73,7 @@ export default {
size: 'small'
}
},
formTemplate: {
editTemplate: {
date: {
title: '日期',
value: ''

View File

@@ -5,7 +5,7 @@ export default `<template>
:columns="columns"
:data="data"
:rowHandle="rowHandle"
:form-template="formTemplate"
:edit-template="editTemplate"
@d2-data-change="handleDataChange"
@row-edit="handleRowEdit"
@dialog-cancel="handleDialogCancel"/>
@@ -78,7 +78,7 @@ export default {
size: 'small'
}
},
formTemplate: {
editTemplate: {
date: {
title: '日期',
value: ''

View File

@@ -1 +1 @@
`formTemplate` 中需要渲染自定义组件的 `component` 对象 `name` 中传入自定义组件来进行渲染,如果是[全局注册](https://cn.vuejs.org/v2/guide/components-registration.html#%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C)的自定义组件,只需传入组件名即可;如果是[局部注册](https://cn.vuejs.org/v2/guide/components-registration.html#%E5%B1%80%E9%83%A8%E6%B3%A8%E5%86%8C)的组件,则需要传入`import` 的那个组件对象。自定义组件的写法需要符合[自定义组件使用v-model](https://cn.vuejs.org/v2/guide/components-custom-events.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6%E7%9A%84-v-model)的写法,代码如下:
`addTemplate``editTemplate` 中需要渲染自定义组件的 `component` 对象 `name` 中传入自定义组件来进行渲染,如果是[全局注册](https://cn.vuejs.org/v2/guide/components-registration.html#%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C)的自定义组件,只需传入组件名即可;如果是[局部注册](https://cn.vuejs.org/v2/guide/components-registration.html#%E5%B1%80%E9%83%A8%E6%B3%A8%E5%86%8C)的组件,则需要传入`import` 的那个组件对象。自定义组件的写法需要符合[自定义组件使用v-model](https://cn.vuejs.org/v2/guide/components-custom-events.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6%E7%9A%84-v-model)的写法,代码如下:

View File

@@ -6,7 +6,7 @@
:columns="columns"
:data="data"
:rowHandle="rowHandle"
:form-template="formTemplate"
:edit-template="editTemplate"
@d2-data-change="handleDataChange"
@row-edit="handleRowEdit"
@dialog-cancel="handleDialogCancel"/>
@@ -106,7 +106,7 @@ export default {
size: 'small'
}
},
formTemplate: {
editTemplate: {
date: {
title: '日期',
value: ''