jsp页面解析.vue文件

130 阅读1分钟
app.component('dict-tag', loadVueComponentFile('/js/vue3Page/common/DictTag/index.vue') )
function loadVueComponentFile(url) {
    url = url+'?v='+new Date().getTime();
    return Vue.defineAsyncComponent(httpVueLoader(url))
}

httpVueLoader方法来自httpVueLoader.js插件;引入的.vue文件后缀会加入时间戳,不然有本地缓存。

<template>
 
</template>

<script>
let {ref,reactive,getCurrentInstance ,nextTick,watch}=Vue;
const {ElMessage,ElLoading } = ElementPlus
module.exports={
  props: {
   
  },
  setup(props,{emit}){
   
  },
}
</script>

<style scoped>

</style>

.vue模板,使用选项式写法