// my-component.js // 引入全局 Vue 对象(因在 HTML 中通过 script 引入,Vue 已挂载到 window) const { defineComponent, ref } = Vue; const { itemBottom } = await import(withVer("../item-bottom/item-bottom.js")); const { itemHead } = await import(withVer("../item-head/item-head.js")); // 定义组件(直接使用模板) export const itemMj = defineComponent({ name: "item-mj", props: { itemdata: { type: Object, default: () => {}, }, page: { type: String, default: "", }, }, setup(props) { let item = ref({ ...props.itemdata }); item.value['url'] = '/details/' + item.value.uniqid; return { item }; }, components: { itemBottom, itemHead, }, template: `
{{ item.data.schoolname }}
{{ item.data.project ? '专业' : '项目/专业' }}
{{ item.data.professional }}
项目
{{ item.data.project }}
面试
{{ item.data.interviewtime }}
{{ item.content }}
`, });