| | |
| | | <template> |
| | | <div class="test-card"> |
| | | <div class="test-card-title"><slot name="title">{{title}}</slot></div> |
| | | <div class="test-card-content"> |
| | | <slot></slot> |
| | | <div class="test-card"> |
| | | <div class="test-card-title" v-if="!noHeader"> |
| | | <slot name="title">{{ title }}</slot> |
| | | </div> |
| | | <div class="test-card-content"> |
| | | <slot></slot> |
| | | </div> |
| | | <div class="test-card-footer" v-if="!noFooter"> |
| | | <slot name="footer"></slot> |
| | | </div> |
| | | </div> |
| | | <div class="test-card-footer" v-if="!noFooter"> |
| | | <slot name="footer"></slot> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "TestCard", |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: "" |
| | | name: "TestCard", |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | noHeader: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | noFooter: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | noFooter: { |
| | | type: Boolean, |
| | | default: false |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {}, |
| | | computed: {}, |
| | | mounted() { |
| | | |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: { |
| | | |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .test-card { |
| | | background-color: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border: 1px solid #e2e2e2; |
| | | background-color: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border: 1px solid #e2e2e2; |
| | | } |
| | | |
| | | .test-card-title { |
| | | background-color: rgb(242, 242, 242); |
| | | line-height: 50px; |
| | | padding-left: 16px; |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | color: #666666; |
| | | font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #e2e2e2; |
| | | background-color: rgb(242, 242, 242); |
| | | line-height: 50px; |
| | | padding-left: 16px; |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | color: #666666; |
| | | font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #e2e2e2; |
| | | } |
| | | |
| | | .test-card-content { |
| | | box-sizing: border-box; |
| | | padding: 8px; |
| | | box-sizing: border-box; |
| | | padding: 8px; |
| | | } |
| | | |
| | | .test-card-footer { |
| | | padding-right: 16px; |
| | | box-sizing: border-box; |
| | | border-top: 1px solid #e2e2e2; |
| | | padding-right: 16px; |
| | | box-sizing: border-box; |
| | | border-top: 1px solid #e2e2e2; |
| | | } |
| | | </style> |