automated_uniapp/uni_modules/cool-fixtures/components/fix-line/fix-line.vue

45 lines
795 B
Vue
Raw Normal View History

2025-01-09 16:40:44 +08:00
<template>
<fix-base-style :styleSpacing="styleSpacing" :styleColor="styleColor" :index="index">
<view class="fix-line">
<view class="inner" :style="innerStyle"></view>
</view>
</fix-base-style>
</template>
<script lang="ts" name="fix-line" setup>
import { computed } from "vue";
import { baseProps } from "../../hooks";
const props = defineProps({
mode: {
type: String,
default: "solid",
},
color: {
type: String,
default: "#f5f6fa",
},
height: {
type: Number,
default: 4,
},
index: {
type: Number,
default: 0,
},
...baseProps,
});
const innerStyle = computed(() => {
return {
borderBottom: `${props.height}rpx ${props.mode} ${props.color}`,
};
});
</script>
<style lang="scss" scoped>
.fix-line {
box-sizing: border-box;
overflow: hidden;
}
</style>