记录一个vue学习因自己粗心挖的坑,原因是没在script标签上加lang=“ts”
解析不了这个页面。
<script lang="ts">
Module parse failed: Unexpected token (122:24)
File was processed with these loaders:
 * ./node_modules/cache-loader/dist/cjs.js
 * ./node_modules/vue-loader-v16/dist/index.js
You may need an additional loader to handle the result of these loaders.
|       })
|     };
>     const edit = (record: any) => {
|       modalVisible.value = true;
|       ebook.value = Tool.copy(record);
 @ ./src/views/admin/admin-ebook.vue?vue&type=script&lang=js 1:0-188 1:0-188 1:189-366 1:189-366
 @ ./src/views/admin/admin-ebook.vue
 @ ./src/router/index.ts
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://192.168.11.188:8881&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts   
                
                  
                  
                  
                  
本文记录了在使用Vue开发过程中,由于忽视了在script标签中添加lang='ts'导致的解析错误,详细描述了解决步骤和经验教训。
          
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					6724
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            