2023年9月14日
摘要: const query = wx.createSelectorQuery() query.select('#box-body').boundingClientRect() query.selectViewport().scrollOffset(); query.exec(function (res) 阅读全文
posted @ 2023-09-14 11:01 刘世涛6192 阅读(1025) 评论(0) 推荐(0) 编辑
  2023年6月13日
摘要: const getRangeDate = function (startDate: Date, endDate: Date) { const targetArr = [] const start = new Date(startDate) const end = new Date(endDate) 阅读全文
posted @ 2023-06-13 14:03 刘世涛6192 阅读(84) 评论(0) 推荐(0) 编辑
  2022年12月23日
摘要: <div style={{ flex: '1.3', marginRight: '10px', position: 'relative', height: '230px', }} > <Image layout="fill" objectFit="cover" height="230" src="/ 阅读全文
posted @ 2022-12-23 14:59 刘世涛6192 阅读(196) 评论(0) 推荐(0) 编辑
  2022年10月19日
摘要: 1.文件下新建SvgIcon文件夹以及子文件index.js,index.vue,svg文件夹(用于存放svg图片) 2.编写index.vue组件 <template> <svg :class="svgClass" aria-hidden="true"> <use :xlink:href="ico 阅读全文
posted @ 2022-10-19 12:04 刘世涛6192 阅读(1304) 评论(0) 推荐(0) 编辑
  2022年10月18日
摘要: 转载: https://www.codenong.com/cs106535155/ 打开后如下图红框内就是我们要更改的文件。 index.html* 的更改 main.js* 的更改 splash.png* style-mobile.css* 的更改 Cocos Creator(后续简称 CCC)在 阅读全文
posted @ 2022-10-18 14:14 刘世涛6192 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 假设现在我们有两个游戏场景,一个是Home,一个是Game,现在来设置背景音乐。 1.创建节点 首先,在Home的场景中,创建一个空节点Audio,注意,这里必须是跟节点! node.png 2.编写脚本 创建一个脚本AudioManager.js, cc.Class({ extends: cc.C 阅读全文
posted @ 2022-10-18 14:09 刘世涛6192 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 组件使用mask的地方只需要两个组件:自带的Node和渲染组件里的Mask 使用组件首先要有一个使用mask组件的图层,设置好宽高。他下面有张图片。层级结构如图: mask_exam的暂定为宽高都是300(没有宽高看不到效果),然后我们给他加一个mask组件(在渲染组件里,点击添加组件按钮就能找到了 阅读全文
posted @ 2022-10-18 14:06 刘世涛6192 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 转载于: http://t.zoukankan.com/jhy-ocean-p-11436498.html 定义变量 firstX = null; firsty = null; 点击 获取坐标 this.viewNode.on(cc.Node.EventType.TOUCH_START,functi 阅读全文
posted @ 2022-10-18 14:02 刘世涛6192 阅读(196) 评论(0) 推荐(0) 编辑
  2022年8月2日
摘要: <li class="more" v-if="showMore" style="position:relative;" @click="showMorTime">更多日期 <el-date-picker v-model="chooseCurrentDtae" type="date" ref="tim 阅读全文
posted @ 2022-08-02 16:44 刘世涛6192 阅读(628) 评论(0) 推荐(0) 编辑
  2022年6月29日
摘要: 问题描述: 部分谷歌浏览器(我这里遇到vue3项目)要求只能输入数字类型,我这里输入中文后再次输入数字后不生效(页面显示数据和定义变量赋值不匹配也就是双向绑定失效); 错误代码示范: <el-input v-model="ruleForm.code" type="text" onkeyup="val 阅读全文
posted @ 2022-06-29 18:37 刘世涛6192 阅读(269) 评论(0) 推荐(0) 编辑