refactor(components): 使用defineAsyncComponent优化异步组件加载
fix(public.js): 添加getScriptParameter函数并处理请求参数 style(index.html): 移除多余空行和注释 perf(bi.js): 移除冗余ajax方法并优化请求参数处理 docs(sign-in.txt): 调整样式和响应式布局
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// my-component.js
|
||||
// 引入全局 Vue 对象(因在 HTML 中通过 script 引入,Vue 已挂载到 window)
|
||||
const { defineComponent, ref } = Vue;
|
||||
const { defineComponent, ref, defineAsyncComponent } = Vue;
|
||||
|
||||
const { itemBottom } = await import(withVer("../item-bottom/item-bottom.js"));
|
||||
const { itemHead } = await import(withVer("../item-head/item-head.js"));
|
||||
const itemBottom = defineAsyncComponent(() => import(withVer("../item-bottom/item-bottom.js")).then((m) => m.itemBottom));
|
||||
const itemHead = defineAsyncComponent(() => import(withVer("../item-head/item-head.js")).then((m) => m.itemHead));
|
||||
|
||||
// 定义组件(直接使用模板)
|
||||
export const itemVote = defineComponent({
|
||||
|
||||
Reference in New Issue
Block a user