no message
Former-commit-id: 8ff8a8111a9bd3f05c94c68d22954772767f2e92 Former-commit-id: b2b7fa01dd87535a3374180f365d3c4a96323434 Former-commit-id: 8b184918d2177a0b6262790a114cca89edc7f5b9
This commit is contained in:
65
src/pages/demo/plugins/mock/components/MockDemoCard.vue
Normal file
65
src/pages/demo/plugins/mock/components/MockDemoCard.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<el-card class="dd-mb">
|
||||
<div slot="header" class="dd-clearfix">
|
||||
<el-button type="text" size="mini">{{title}}</el-button>
|
||||
<el-tooltip content="重新 mock 数据" placement="top-end">
|
||||
<el-button type="primary" size="mini" @click="$emit('reload')" class="dd-fr">刷新</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<div class="col col-l">
|
||||
<Highlight :code="code"></Highlight>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="col col-r">
|
||||
<Highlight :code="mock"></Highlight>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'Mock Demo'
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
mock: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/style/public.scss';
|
||||
.col {
|
||||
padding: $margin;
|
||||
border-radius: $border-radius;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
font-size: 16px;
|
||||
}
|
||||
.col-l {
|
||||
background-color: lighten($color-info, 40%);
|
||||
border-color: lighten($color-info, 35%);
|
||||
}
|
||||
.col-r {
|
||||
background-color: lighten($color-success, 47%);
|
||||
border-color: lighten($color-success, 40%);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user