上一页 1 2 3 4 5 6 ··· 28 下一页
摘要: 前面介绍的vue的组件书写中,必须要在data,methons,或者computed等模块中写上对应的内容,vue3提供了一种更加自由的写法,不用非得定义这些各个模块并只能将需要的内容写入固定的模块中,这种写法叫组合API。 如下Home.vue: <template> <div class="ho 阅读全文
posted @ 2021-07-03 12:23 maycpou 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 如果项目很大再store的index.js里面可能就有很多的内容,不便于管理,vuex支持在主模块下面创建子模块: store/index.js: import { createStore } from 'vuex' //新建一个子模块,也可以将这个子模块写在外面的一个js文件中,这里引入 cons 阅读全文
posted @ 2021-07-03 11:57 maycpou 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 用vscode新建一个hello.py的文件: name = input('请输入你的名字:')//获取用户的输出,括号中的参数为等该输入时的提示字符 print('你好',name)//控制台输出,用','隔开的两个参数在控制台中会用空格隔开 wait = input()//等待输入,防止控制台一 阅读全文
posted @ 2021-06-28 10:08 maycpou 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.bilibili.com/read/cv8965701/ 在vue3项目中测试的一个demo。 npm install @arcgis/core 安装包。 在main.js中全局引入样式:import '@arcgis/core/assets/esri/themes/l 阅读全文
posted @ 2021-06-25 10:40 maycpou 阅读(920) 评论(0) 推荐(0) 编辑
摘要: 当前端和后端的地址在同域下时,前端调用后端的接口不算跨域,不会出现跨域问题。同域要求地址和端口都一样。然后/后面的路径可以不一样。 为什么出现跨域问题。所谓的跨域问题就是当前端访问和自己不是同域的接口的时候报错的问题。 那么为什么会报错,是因为这种行为被浏览器禁止了,也就是和后端没有关系,是浏览器就 阅读全文
posted @ 2021-06-07 17:28 maycpou 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 正常使用provide的方式: 父组件中: provide:{ for:'demo' } 这样子组件中无论多深的子组件都可以使用:inject:['for'], data(){ return{ demo:this.for } } 但是上面的写法有一定的问题,比如父组件中for变量的值如果我们是在mo 阅读全文
posted @ 2021-06-07 11:26 maycpou 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: 首先确保你的license可用,方法是新建一个winform程序,向界面拖入license控件,如果能过成功则表示license没问题,如果拖入就直接报错则表明license有问题,需要重新安装或者换个安装包。 如果上面一步的license检查没有问题,在读取的时候报错HRESULT:0x80040 阅读全文
posted @ 2021-06-07 10:05 maycpou 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 在c++新标准之前通常使用c的函数rand来生成随机数。 现在可以使用下面这种方式: #include <random> #include <ctime> //生成0到9之前的随机整数 static std::default_random_engine e(time(0));//time(0)返回特 阅读全文
posted @ 2021-06-01 17:22 maycpou 阅读(213) 评论(0) 推荐(0) 编辑
摘要: let layerUrl = "http://xxx.xxx.xx.xx/server/rest/services/xxxx/xxxx/MapServer/194";//服务地址 let queryTask = new this.esriModules.QueryTask(layerUrl);//创 阅读全文
posted @ 2021-06-01 14:58 maycpou 阅读(689) 评论(0) 推荐(0) 编辑
摘要: var tileLayer = new VectorTileLayer({ url: "http://xxx.xxx.xx.xx/server/rest/services/Hosted/xxx/styles/root.json",//服务地址 }); this.map.add(tileLayer); 阅读全文
posted @ 2021-06-01 14:35 maycpou 阅读(413) 评论(2) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 28 下一页