|
|
@@ -15,138 +15,138 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
-import { computed, defineProps } from 'vue';
|
|
|
-import _ from 'lodash';
|
|
|
+ import { computed, defineProps } from 'vue';
|
|
|
+ import _ from 'lodash';
|
|
|
|
|
|
-let props = withDefaults(
|
|
|
- defineProps<{
|
|
|
- /** B | C */
|
|
|
- type: string;
|
|
|
- /** 列表表头配置,每个prop都有其对应的slot来提供定制化功能 */
|
|
|
- columns: { prop: string; name: string }[];
|
|
|
- data: any[];
|
|
|
- defaultValue: string;
|
|
|
- }>(),
|
|
|
- {
|
|
|
- type: 'B',
|
|
|
- columns: () => [],
|
|
|
- data: () => [],
|
|
|
- defaultValue: '-',
|
|
|
- }
|
|
|
-);
|
|
|
+ let props = withDefaults(
|
|
|
+ defineProps<{
|
|
|
+ /** B | C */
|
|
|
+ type: string;
|
|
|
+ /** 列表表头配置,每个prop都有其对应的slot来提供定制化功能 */
|
|
|
+ columns: { prop: string; name: string }[];
|
|
|
+ data: any[];
|
|
|
+ defaultValue: string;
|
|
|
+ }>(),
|
|
|
+ {
|
|
|
+ type: 'B',
|
|
|
+ columns: () => [],
|
|
|
+ data: () => [],
|
|
|
+ defaultValue: '-',
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
-const flexBasis = computed(() => {
|
|
|
- return Math.fround(100 / props.columns.length) + '%';
|
|
|
-});
|
|
|
+ const flexBasis = computed(() => {
|
|
|
+ return Math.fround(100 / props.columns.length) + '%';
|
|
|
+ });
|
|
|
|
|
|
-function get(o, p) {
|
|
|
- const d = _.get(o, p);
|
|
|
- return _.isNil(d) ? props.defaultValue : d === '' ? props.defaultValue : d;
|
|
|
-}
|
|
|
+ function get(o, p) {
|
|
|
+ const d = _.get(o, p);
|
|
|
+ return _.isNil(d) ? props.defaultValue : d === '' ? props.defaultValue : d;
|
|
|
+ }
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
-@import '/@/design/theme.less';
|
|
|
-@import '@/design/theme.less';
|
|
|
-
|
|
|
-@font-face {
|
|
|
- font-family: 'douyuFont';
|
|
|
- src: url('/@/assets/font/douyuFont.otf');
|
|
|
-}
|
|
|
+ @import '/@/design/theme.less';
|
|
|
+ @import '@/design/theme.less';
|
|
|
|
|
|
-@{theme-deepblue} {
|
|
|
- .table__content {
|
|
|
- --image-content-label: url('/@/assets/images/fireNew/11-1.png');
|
|
|
- --image-content-back: url('/@/assets/images/fireNew/11-2.png');
|
|
|
+ @font-face {
|
|
|
+ font-family: 'douyuFont';
|
|
|
+ src: url('/@/assets/font/douyuFont.otf');
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-.table__content {
|
|
|
- --image-content-label: url('/@/assets/images/fireNew/11-1.png');
|
|
|
- --image-content-back: url('/@/assets/images/fireNew/11-2.png');
|
|
|
- height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- padding: 13px;
|
|
|
|
|
|
- .table__content_label {
|
|
|
- width: 400px;
|
|
|
- height: 32px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
- .label-t {
|
|
|
- text-align: center;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
- .table__content_label_A {
|
|
|
- background-image: var(--image-content-label);
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- margin-top: 10px;
|
|
|
- }
|
|
|
- .table__content_label_B {
|
|
|
- background-image: linear-gradient(to top, #04698c, #04698c00);
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- color: #31b9ef;
|
|
|
- }
|
|
|
- .table__content_label_C {
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-image: var(--image-content-label);
|
|
|
- margin-top: 10px;
|
|
|
- .label-t {
|
|
|
+ @{theme-deepblue} {
|
|
|
+ .table__content {
|
|
|
+ --image-content-label: url('/@/assets/images/fireNew/11-1.png');
|
|
|
+ --image-content-back: url('/@/assets/images/fireNew/11-2.png');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .table__content_list {
|
|
|
- height: calc(100% - 50px);
|
|
|
- width: 380px;
|
|
|
+ .table__content {
|
|
|
+ --image-content-label: url('/@/assets/images/fireNew/11-1.png');
|
|
|
+ --image-content-back: url('/@/assets/images/fireNew/11-2.png');
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- padding: 5px 0;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow-y: auto;
|
|
|
- background-image: var(--image-content-back);
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: center;
|
|
|
- .table__content_list_row {
|
|
|
- width: 100%;
|
|
|
+ align-items: center;
|
|
|
+ padding: 13px;
|
|
|
+
|
|
|
+ .table__content_label {
|
|
|
+ width: 400px;
|
|
|
+ height: 32px;
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
align-items: center;
|
|
|
- color: #fff;
|
|
|
- margin-bottom: 5px;
|
|
|
- span {
|
|
|
- display: inline-block;
|
|
|
+ .label-t {
|
|
|
text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- .table__content_list_A {
|
|
|
- .table__content_list_row {
|
|
|
- &:nth-child(2n) {
|
|
|
- background: #0b2d3d;
|
|
|
+ .table__content_label_A {
|
|
|
+ background-image: var(--image-content-label);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .table__content_label_B {
|
|
|
+ background-image: linear-gradient(to top, #04698c, #04698c00);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ color: #31b9ef;
|
|
|
+ }
|
|
|
+ .table__content_label_C {
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-image: var(--image-content-label);
|
|
|
+ margin-top: 10px;
|
|
|
+ .label-t {
|
|
|
}
|
|
|
- &:nth-child(2n + 1) {
|
|
|
- background: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ .table__content_list {
|
|
|
+ height: calc(100% - 50px);
|
|
|
+ width: 380px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 5px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-y: auto;
|
|
|
+ background-image: var(--image-content-back);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center;
|
|
|
+ .table__content_list_row {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ color: #fff;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ span {
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .table__content_list_C {
|
|
|
- .table__content_list_row {
|
|
|
- &:nth-child(2n) {
|
|
|
- background: #0b2d3d;
|
|
|
+
|
|
|
+ .table__content_list_A {
|
|
|
+ .table__content_list_row {
|
|
|
+ &:nth-child(2n) {
|
|
|
+ background: #0b2d3d;
|
|
|
+ }
|
|
|
+ &:nth-child(2n + 1) {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
}
|
|
|
- &:nth-child(2n + 1) {
|
|
|
- background: transparent;
|
|
|
+ }
|
|
|
+ .table__content_list_C {
|
|
|
+ .table__content_list_row {
|
|
|
+ &:nth-child(2n) {
|
|
|
+ background: #0b2d3d;
|
|
|
+ }
|
|
|
+ &:nth-child(2n + 1) {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</style>
|