🐛(component): 修复 scroll 组件属性必填警告

This commit is contained in:
就眠儀式 2022-05-01 15:32:09 +08:00
parent 48f8f64ff4
commit e31cc623c9

View File

@ -12,7 +12,7 @@
ref="barRef" ref="barRef"
class="layui-scroll-track" class="layui-scroll-track"
:style="{ :style="{
backgroundColor: heightPre == 1 ? 'rgba(0,0,0,0)' : slotColor, backgroundColor: data.heightPre == 1 ? 'rgba(0,0,0,0)' : slotColor,
}" }"
> >
<!-- <!--
@ -44,7 +44,6 @@ export default {
<script lang="ts" setup> <script lang="ts" setup>
import "./index.less"; import "./index.less";
import { import {
defineComponent,
toRefs, toRefs,
onMounted, onMounted,
nextTick, nextTick,
@ -54,10 +53,10 @@ import {
} from "vue"; } from "vue";
export interface LayScrollProps { export interface LayScrollProps {
height: string; height?: string;
slotColor: string; slotColor?: string;
scrollColor: string; scrollColor?: string;
scrollWidth: number; scrollWidth?: number;
} }
const props = withDefaults(defineProps<LayScrollProps>(), { const props = withDefaults(defineProps<LayScrollProps>(), {