Files
PC-Light-Forum/component/load-box/load-box.js
DESKTOP-RQ919RC\Pc 3365e5ee0a feat: 添加新图片资源及更新组件样式与功能
style: 调整CSS样式及优化布局
refactor: 重构组件逻辑及API调用
fix: 修复路径引用及图片加载问题
docs: 更新注释及文档内容
2025-11-05 19:10:43 +08:00

20 lines
619 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// my-component.js
// 引入全局 Vue 对象(因在 HTML 中通过 script 引入Vue 已挂载到 window
const { defineComponent, ref, onMounted, onUnmounted } = Vue;
// 定义组件(直接使用模板)
export const loadBox = defineComponent({
name: "load-box",
props: {
loading: {
type: String,
default: "",
},
},
setup(props) {
return { };
},
template: `<div class="list-load-box flexcenter" :class="{'show': loading}"><img class="list-load-icon" src="/img/load-icon.svg" /><div class="list-load-text">加载中</div></div>`,
});