上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页
摘要: 针对不在同一服务器,很可能出现跨域问题,解决方法 注意:修改了配置文件,需要重启才能生效 阅读全文
posted @ 2018-06-03 22:15 江山一族 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 可以试试玩ajax请求,个人觉得axios用Promise包装了下,代码美观 axios请求使用方法 https://github.com/axios/axios#using-applicationx-www-form-urlencoded-format 全局默认值 1.npm install ax 阅读全文
posted @ 2018-06-02 23:49 江山一族 阅读(537) 评论(0) 推荐(0) 编辑
摘要: <template> <div> 全局指令:<input type="text" name="" id="" value="" v-focus/> 局部指令: <input type="text" name="" id="" value="" v-focus1/> <p v-fontCss>自定义指 阅读全文
posted @ 2018-06-02 22:42 江山一族 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1.main.js 文件中定义全局指令 import Vue from 'vue'import App from './App'Vue.config.productionTip = false //定义全局指令Vue.directive('focus',{ inserted:function(el) 阅读全文
posted @ 2018-06-02 22:17 江山一族 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 没有去看update和findOneAndUpdate的区别了,困扰了一晚上的问题,查了下官网,改成这样就好了 await model.user.findOneAndUpdate({ openIds: {'name':'江山一族'} }, { $set: user }, { upsert: true 阅读全文
posted @ 2018-06-01 13:31 江山一族 阅读(489) 评论(0) 推荐(0) 编辑
摘要: big.vue <template> <div> big <p>{{view}}</p> <!--标准规范--> <component :is='view'></component> <button @click="changeView">切换组件</button> <button @click=" 阅读全文
posted @ 2018-05-30 23:48 江山一族 阅读(728) 评论(0) 推荐(0) 编辑
摘要: 父页面: <template> <div class="parent"> <p>父组件</p> <child> <div slot='s1'> <p >插槽1</p> <p >插槽101</p> </div> <p slot='s2'>插槽2</p> <p slot-scope='props' sl 阅读全文
posted @ 2018-05-30 23:04 江山一族 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 子页面: <template> <div> <p>子组件</p> <button @click="sendMsg">传递到父页面</button> </div></template> <script> export default { name: 'child', data() { return { 阅读全文
posted @ 2018-05-30 22:15 江山一族 阅读(15912) 评论(0) 推荐(0) 编辑
摘要: 父页面: <template> <div>{{msg}} <Son title='向子文件传递数据' :data='data' :lifemsg ='lifemsg' :num='num'/> <button @click="chageMsg">修改数据</button> <input type=" 阅读全文
posted @ 2018-05-29 23:47 江山一族 阅读(12068) 评论(0) 推荐(0) 编辑
摘要: v-bind = : v-on:click = @click 阅读全文
posted @ 2018-05-29 23:15 江山一族 阅读(458) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页