Skip to content

Commit

Permalink
feat(core): added closeBadge options for ui-check tool
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhandsome committed Jun 2, 2020
1 parent 1d8de57 commit d602252
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions packages/core/src/component/ui-check/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,30 @@ uiCheckPlugin.install = function (weDebug, options = {}) {
}
}
},
options
options.rule
)
);

closeBadge = weDebug.createBadge({
key: 'close',
show: false,
draggable: true,
position: {
right: 10,
top: 10
},
handler: {
bindTap() {
event.emit(prefix + 'destory');
}
}
});
closeBadge = weDebug.createBadge(
Object.assign(
{},
{
key: 'close',
show: false,
draggable: true,
position: {
right: 10,
top: 10
},
handler: {
bindTap() {
event.emit(prefix + 'destory');
}
}
},
options.closeBadge
)
);

weDebug.addBadge([closeBadge]);
weDebug.addFormRule([rule]);
Expand Down

0 comments on commit d602252

Please sign in to comment.