|
@@ -5,13 +5,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="title">
|
|
|
<span v-if="returns">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- plan
|
|
|
- circle
|
|
|
- @click="$router.push({ path: returns })"
|
|
|
- style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
|
|
|
- >
|
|
|
+ <el-button size="mini" plan circle @click="toReturn" style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)">
|
|
|
<span class="el-icon-arrow-left" style="zoom:1.5;font-weight:700"></span>
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -30,6 +24,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import _ from 'lodash';
|
|
|
export default {
|
|
|
name: 'detail-frame',
|
|
|
props: {
|
|
@@ -51,7 +46,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ toReturn() {
|
|
|
+ if (_.isFunction(this.returns)) this.returns();
|
|
|
+ else this.$router.push({ path: this.returns });
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|