摘要: 1 使用第三方插件 https://github.com/vuejs/awesome-vue#components--libraries 集合了来自社区贡献的数以千计的插件和库。 2 使用第三方UI框架 饿了么UED团队推出的vue 前端框架: PC(web端)框架: (element UI , i 阅读全文
posted @ 2022-02-15 19:07 甜甜de微笑 阅读(323) 评论(0) 推荐(0) 编辑
摘要: # 步骤 -安装 cnpm install -S axios -在组件中导入 import ajax from 'axios' -使用 created() { ajax.get('http://127.0.0.1:5000/').then(res => { console.log(res.data) 阅读全文
posted @ 2022-02-15 18:44 甜甜de微笑 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 一、组件的使用 1 每个组件都有三部分 <template>写html内容,原来组件的template</template> <script> js,data,methods,created,</script> <style>样式</style> 注意:写的html要在div中,不然可能会报错 2 阅读全文
posted @ 2022-02-15 17:31 甜甜de微笑 阅读(876) 评论(0) 推荐(0) 编辑
摘要: vue项目创建 1 vue环境 1.1 安装node: 直接下一步下一步 官网下载: https://nodejs.org/zh-cn/ 1.2 安装cnpm npm install 模块名 #npm比较慢,用某宝的cnpm来替换npm npm install -g cnpm --registry= 阅读全文
posted @ 2022-02-15 15:48 甜甜de微笑 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 1 vue官方 https://cn.vuejs.org/​cn.vuejs.org/ 2 Vue CLI # 创建vue项目,需要使用vue-cli ,vue脚手架:程序项目的骨架,只需要在固定位置写代码即可 # vue-cli需要基于源nodejs,安装 # python node python 阅读全文
posted @ 2022-02-15 14:45 甜甜de微笑 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 插槽 # 在定义组件是,预留一个地方使用标签 <slot></slot> 占位# 以后在父组件中的子组件的标签内部写 内容,html内容 就会被替换到<slot></slot>中 1 slot插槽 (内容分发) a. 单个slot b. 具名slot *混合父组件的内容与子组件自己的模板-->内容分 阅读全文
posted @ 2022-02-15 10:26 甜甜de微笑 阅读(25) 评论(0) 推荐(0) 编辑