# Loading
# 基础用法
<template>
<div class="demo-spinner">
<d-loading></d-loading>
<d-loading type="spinner"></d-loading>
</div>
</template>
<script>
export default {
methods: {},
};
</script>
<style lang="scss">
.demo-spinner {
.d-loading {
margin-left: 10px;
}
}
</style>
# 自定义颜色
<template>
<div class="demo-spinner">
<d-loading :style="{ color: '#FF980E' }"></d-loading>
<d-loading type="spinner" class="custom-loading"></d-loading>
</div>
</template>
<style lang="scss" scoped>
.demo-spinner {
display: flex;
.custom-loading {
color: #ff980e;
}
}
</style>
# 自定义大小
<template>
<div class="demo-spinner">
<d-loading class="custom-loading"></d-loading>
<d-loading type="spinner" class="custom-loading"></d-loading>
</div>
</template>
<style lang="scss" scoped>
.demo-spinner {
.custom-loading {
font-size: 24px;
}
}
</style>
# 加载文案
加载中...
<template>
<div class="demo-spinner">
<d-loading>加载中...</d-loading>
</div>
</template>
<script>
export default {
methods: {},
};
</script>
<style lang="scss">
.demo-spinner {
display: flex;
.d-loading {
margin-left: 10px;
}
}
</style>
# 垂直排列
加载中...
<template>
<div class="demo-spinner">
<d-loading vertical>加载中...</d-loading>
</div>
</template>
<script>
export default {
methods: {},
};
</script>
<style lang="scss">
.demo-spinner {
display: flex;
.d-loading {
margin-left: 10px;
}
}
</style>
# 自定义文本颜色
加载中...
加载中...
<template>
<div class="demo-spinner">
<d-loading vertical class="custom-loading">加载中...</d-loading>
<d-loading type="spinner" vertical class="custom-loading">加载中...</d-loading>
</div>
</template>
<style lang="scss" scoped>
.demo-spinner {
display: flex;
.custom-loading {
::v-deep {
.d-loading-text {
color: #ff980e;
}
}
}
}
</style>