zoukankan      html  css  js  c++  java
  • VsCode vue自定义代码片段 快速vue模板

    {
        "vue": {
            "prefix": "vue",
            "body": [
                "<!--  -->",
                "<template>",
                "  <div></div>",
                "</template>",
                "",
                "<script>",
                "//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)",
                "//例如:import 《组件名称》 from '《组件路径》';",
                "",
                "export default {",
                "  //import引入的组件需要注入到对象中才能使用",
                "  components: {},",
                "  data() {",
                "    //这里存放数据",
                "    return {};",
                "  },",
                "  //监听属性 类似于data概念",
                "  computed: {},",
                "  //监控data中的数据变化",
                "  watch: {},",
                "  //方法集合",
                "  methods: {},",
                "  //生命周期 - 创建完成(可以访问当前this实例)",
                "  created() {},",
                "  //生命周期 - 挂载完成(可以访问DOM元素)",
                "  mounted() {},",
                "  beforeCreate() {}, //生命周期 - 创建之前",
                "  beforeMount() {}, //生命周期 - 挂载之前",
                "  beforeUpdate() {}, //生命周期 - 更新之前",
                "  updated() {}, //生命周期 - 更新之后",
                "  beforeDestroy() {}, //生命周期 - 销毁之前",
                "  destroyed() {}, //生命周期 - 销毁完成",
                "  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发",
                "};",
                "</script>",
                "<style scoped>",
                "</style>"
            ],
            "description": "自定义的vue代码段"
        }
    }
  • 相关阅读:
    赛前一个月
    Barricade---hdu5889(最短路+网络流)
    Tea---hdu5881(规律)
    The Best Path---hdu5883(欧拉路径)
    Cure---hdu5879(打表+找规律)
    Python列表操作
    Zabbix在Docker中的应用和监控
    flannel网络设置
    Volume
    Service资源清单
  • 原文地址:https://www.cnblogs.com/rqx-20181108/p/14689627.html
Copyright © 2011-2022 走看看