diff --git a/component/item-bottom/item-bottom.js b/component/item-bottom/item-bottom.js new file mode 100644 index 0000000..22f6782 --- /dev/null +++ b/component/item-bottom/item-bottom.js @@ -0,0 +1,24 @@ +// my-component.js +// 引入全局 Vue 对象(因在 HTML 中通过 script 引入,Vue 已挂载到 window) +const { defineComponent, ref } = Vue; +// 定义组件(直接使用模板) +export const itemBottom = defineComponent({ + name: "item-bottom", + props: { + title: { + type: String, + default: "默认标题", + }, + itemdata: { + type: Object, + default: () => {}, + }, + }, + + setup(props) { + let item = ref({ ...props.itemdata }); + return { item }; + }, + + template: `
+ 这是从text文件加载的模板内容
- -这是从text文件加载的模板内容
- -
+
-
-
-
- UID: 3276161
-
-
勋章 6
-
+ UID: 3276161
+
+
勋章 6
+