1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <div class="card">
- <div class="title">
- <div class="title-left">
- <i :class="iconName"></i>
- <div style="margin-left: 5px">{{ title }}</div>
- </div>
- <div v-if="More" class="more">查看更多></div>
- </div>
- <div class="content">
- <slot name="content"></slot>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "chiCard",
- props: {
- title: {
- type: String,
- required: "",
- },
- iconName: {
- type: String,
- required: "",
- },
- More: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {};
- },
- methods: {},
- };
- </script>
- <style scoped lang="scss">
- .card {
- border-radius: 4px;
- border: 1px solid #e6ebf5;
- background-color: #ffffff;
- overflow: hidden;
- color: #303133;
- -webkit-transition: 0.3s;
- transition: 0.3s;
- box-shadow: 0 2px 12px 0 #ddd8d8;
- margin-bottom: 10px;
- .title {
- color: #000;
- display: flex;
- border-bottom: 1px solid #e6ebf5;
- padding: 14px 15px 7px 10px;
- min-height: 40px;
- justify-content: space-between;
- margin: 0;
- .title-left {
- display: flex;
- i {
- align-self: center;
- font-size: 20px;
- }
- div {
- align-self: center;
- font-size: 16px;
- }
- }
- .more{
- color: #409eff;
- align-self: flex-end;
- font-size: 12px;
- }
- }
- .content {
- min-height: 50px;
- }
- }
- </style>
|