随笔分类 -  JavaScript

摘要:1、封装一个js文件 // bmpgl.js export function BMPGL (ak) { // ak为百度地图api申请应用后获得 return new Promise(function (resolve, reject) { window.init = function () { / 阅读全文
posted @ 2023-03-01 10:34 fnasklf 阅读(157) 评论(0) 推荐(0) 编辑
摘要:template <uni-forms-item label="验证码" name="code" style="position: relative;"> <input maxlength="6" type="number" placeholder="请输入验证码" v-model="formDat 阅读全文
posted @ 2023-01-09 10:39 fnasklf 阅读(241) 评论(0) 推荐(0) 编辑
摘要:这里需要用到moment.js插件 官网:Moment.js 中文网 (momentjs.cn) 我这里将插件的实例挂载到了this.$moment上 let initTime = e.createTime // 格式 2022-12-12 12:30:51 // let a = this.$mom 阅读全文
posted @ 2023-01-06 19:28 fnasklf 阅读(285) 评论(0) 推荐(0) 编辑
摘要:安装 npm install postcss-px-to-viewport --save-dev 在vue中使用 根目录新建postcss.config.js文件 输入以下代码 module.exports = { plugins: { 'postcss-px-to-viewport': { uni 阅读全文
posted @ 2022-11-30 17:26 fnasklf 阅读(453) 评论(0) 推荐(0) 编辑
摘要:1、安装配置插件 pinyin-pro官网网址: pinyin-pro - npm (npmjs.com) npm 安装 npm install pinyin-pro 项目中引入 import { pinyin } from 'pinyin-pro'; 2.编写工具类方法 定义三个变量: // 双向 阅读全文
posted @ 2022-11-22 16:48 fnasklf 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-09-23 20:12 fnasklf 阅读(318) 评论(0) 推荐(0) 编辑
摘要:function Start(uname, age) { this.uname = uname; this.age = age; this.sayhai = function () { console.log('hi'); } } var zjl = new Start('zjl', '41'); 阅读全文
posted @ 2020-09-22 19:40 fnasklf 阅读(263) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示