|
35 | 35 | <span v-if="data.returnValue">{{ returnValue(data) }}</span> |
36 | 36 | <el-divider v-if="data.returnValue" direction="vertical" /> |
37 | 37 | <span>{{ data.name }}</span> |
38 | | - <el-divider v-if="data.params && data.params.length > 0" direction="vertical" /> |
39 | | - <span v-if="data.params && data.params.length > 0">{{ params(data) }}</span> |
40 | 38 | </template> |
41 | 39 | </el-cascader> |
42 | 40 | </template> |
@@ -113,10 +111,6 @@ import 'codemirror/addon/fold/brace-fold' |
113 | 111 | import 'codemirror/addon/fold/comment-fold' |
114 | 112 | import ImageInput from '@/components/ImageInput' |
115 | 113 | export default { |
116 | | - props: { |
117 | | - // 当前编辑的actionId |
118 | | - curActionId: Number |
119 | | - }, |
120 | 114 | components: { |
121 | 115 | ActionDetail, |
122 | 116 | ImageInput |
@@ -178,11 +172,6 @@ export default { |
178 | 172 | } |
179 | 173 | } |
180 | 174 | }, |
181 | | - params() { |
182 | | - return function(action) { |
183 | | - return '(' + action.params.map(p => p.type + ' ' + p.name).join(', ') + ')' |
184 | | - } |
185 | | - }, |
186 | 175 | projectId() { |
187 | 176 | return this.$store.state.project.id |
188 | 177 | }, |
@@ -258,9 +247,6 @@ export default { |
258 | 247 | fetchActionCascader() { |
259 | 248 | getActionCascader(this.projectId, this.platform).then(resp => { |
260 | 249 | this.selectableActions = resp.data |
261 | | - if (this.curActionId) { // 编辑action时,第一次拿不到curActionId |
262 | | - this.disableCurActionInSelectableActions(this.curActionId) |
263 | | - } |
264 | 250 | this.$emit('selectableActionsChange', this.selectableActions) |
265 | 251 | }) |
266 | 252 | }, |
@@ -302,22 +288,6 @@ export default { |
302 | 288 | } |
303 | 289 | } |
304 | 290 | } |
305 | | - }, |
306 | | - disableAction(actions, actionId) { |
307 | | - for (let i = 0; i < actions.length; i++) { |
308 | | - if (actions[i].children) { |
309 | | - this.disableAction(actions[i].children, actionId) |
310 | | - } else { |
311 | | - if (actions[i].id === actionId) { |
312 | | - console.log('disable action', actions[i].id) |
313 | | - actions[i].disabled = true |
314 | | - } |
315 | | - } |
316 | | - } |
317 | | - }, |
318 | | - // 禁用当前编辑的action |
319 | | - disableCurActionInSelectableActions(actionId) { |
320 | | - this.disableAction(this.selectableActions, actionId) |
321 | 291 | } |
322 | 292 | } |
323 | 293 | } |
|
0 commit comments