Skip to content

Commit fda7fcc

Browse files
committed
v1.0.1
1 parent 699f51b commit fda7fcc

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

dist/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Element form-builder v1.0.0
2+
* Element form-builder v1.0.1
33
* (c) 2019 Felix Yang
44
*/
55
var _extends = Object.assign || function (target) {
@@ -182,17 +182,17 @@ var FormBuilder = {
182182

183183
children = [checkbox];
184184
} else if (tag === 'el-radio') {
185-
var radios = (detail.items || []).map(function (rc) {
186-
var rcDetail = _extends({
185+
var radios = (detail.items || []).map(function (option) {
186+
option = _extends({
187187
name: detail.name
188-
}, rc);
188+
}, option);
189189
return h(tag, {
190-
attrs: _extends({}, rcDetail),
190+
attrs: _extends({}, option),
191191
props: _extends({
192192
value: value
193-
}, rcDetail),
193+
}, option),
194194
on: _extends({}, modelEvents)
195-
}, [rc.text]);
195+
}, [option.text]);
196196
});
197197
children = [].concat(toConsumableArray(radios));
198198
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-form-builder",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Build element-ui forms with JSON schema.",
55
"main": "dist/index.js",
66
"scripts": {

src/formbuilder.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,26 +176,26 @@ export default {
176176

177177
children = [checkbox]
178178
} else if (tag === 'el-radio') {
179-
const radios = (detail.items || []).map(rc => {
180-
const rcDetail = {
179+
const radios = (detail.items || []).map(option => {
180+
option = {
181181
name: detail.name,
182-
...rc
182+
...option
183183
}
184184
return h(
185185
tag,
186186
{
187187
attrs: {
188-
...rcDetail
188+
...option
189189
},
190190
props: {
191191
value,
192-
...rcDetail
192+
...option
193193
},
194194
on: {
195195
...modelEvents
196196
}
197197
},
198-
[rc.text]
198+
[option.text]
199199
)
200200
})
201201
children = [...radios]

0 commit comments

Comments
 (0)