Skip to content

Commit 03481e4

Browse files
committed
Merge branch 'release/1.3.1'
2 parents 00aba53 + ea916df commit 03481e4

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

dist/d2-crud.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/d2-crud.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@d2-projects/d2-crud",
33
"description": "A d2-projects project",
4-
"version": "1.3.0",
4+
"version": "1.3.1",
55
"author": "孙昊翔 <673686754@qq.com>",
66
"license": "MIT",
77
"private": false,

src/components/renderCustomComponent.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ export default {
1414
componentName: {
1515
required: true
1616
},
17+
/**
18+
* @description 传入的自定义参数
19+
*/
20+
props: {
21+
default: null
22+
},
1723
/**
1824
* @description 传入的行数据
1925
*/
@@ -26,6 +32,7 @@ export default {
2632
return h(self.componentName, {
2733
props: {
2834
value: self.value,
35+
props: self.props,
2936
scope: self.scope
3037
},
3138
on: {

src/d2-crud.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
v-else-if="item.component && item.component.name"
188188
v-model="scope.row[item.key]"
189189
:component-name="item.component.name"
190+
:props="item.component.props ? item.component.props : null"
190191
:scope="scope">
191192
</render-custom-component>
192193
<render-component
@@ -330,6 +331,7 @@
330331
v-else-if="item2.component && item2.component.name"
331332
v-model="scope.row[item2.key]"
332333
:component-name="item2.component.name"
334+
:props="item2.component.props ? item2.component.props : null"
333335
:scope="scope">
334336
</render-custom-component>
335337
<render-component
@@ -473,6 +475,7 @@
473475
v-else-if="item3.component && item3.component.name"
474476
v-model="scope.row[item3.key]"
475477
:component-name="item3.component.name"
478+
:props="item3.component.props ? item3.component.props : null"
476479
:scope="scope">
477480
</render-custom-component>
478481
<render-component

0 commit comments

Comments
 (0)