Vue3快速入门+axios的异步请求(基础使用)

学习Vue之前先要学习html+css+js的基础使用

Vue其实是js的框架

常用到的Vue指令包括vue-on,vue-for,vue-blind,vue-if&vue-show,v-modul

vue的基础模板:




    
    
    Document


    

{{msg}}

常用到的Vue指令:

  1. v-for
    
    
    
        
        
        Document
    
    
    
        
    文章标题 分类 发表时间 状态 操作
    {{article.title}} {{article.category}} {{article.time}} {{article.state}}
  2. v-blind
     
    
    
    
        
        
        Document
    
    
        
        
    
    
  3. v-if&&v-show
     
    
    
    
    
        
        
        Document
    
    
    
        
    9.9 19.9 29.9
    9.9 19.9 29.9
  4. v-on
     
    
    
    
        
        
        Document
    
    
        
     
  5. v-module
    
    
    
    
        
        
        Document
    
    
    
        
    文章分类: {{searchConditions.category}} 发布状态: {{searchConditions.state}}

    文章标题 分类 发表时间 状态 操作
    {{article.title}} {{article.category}} {{article.time}} {{article.state}}

    axios使用:
     

    
    
    
        
        
        Document
    
    
        
        
        
    
    

    main.js是程序的入口 ,前端通过import的方式导入模块