feat: 添加新图片资源及更新组件样式与功能
style: 调整CSS样式及优化布局 refactor: 重构组件逻辑及API调用 fix: 修复路径引用及图片加载问题 docs: 更新注释及文档内容
This commit is contained in:
19
component/load-box/load-box.js
Normal file
19
component/load-box/load-box.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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>`,
|
||||
});
|
||||
Reference in New Issue
Block a user