- 博客(15)
- 收藏
- 关注
原创 vue-echarts 横坐标缩放区域datazoom设置
index.vue<template> <vue-echarts @datazoom='onDataZoom($event, Echarts.option)' :option="options" /></template><script lang="ts" src="./index.ts"></script>index.tsexport default class ComponentName extends Vu..
2022-05-17 10:34:14 655
原创 vue3+vite+typeScript项目搭建步骤
1. 安装vue/cli yarn global add @vue/cli # 或 npm install -g @vue/cli2. 在想要创建项目的目录下输入以下指令,创建vite项目 # npm 6.x npm init vite@latest <project-name> -- --template vue # npm 7+,需要加上额外的双短横线 npm init vite@latest <project-name> -- --
2022-03-09 16:31:40 1050 2
原创 在vue+ts+element-ui项目中,校验循环的表单项
1.index.vue# index.vue<el-form-item label="数据丰富"> <div v-for="(item, index) in formData.richData" :key="index"> <el-col :span="17" class="mr-8"> <el-form-item :prop="`richData.${index}.richDataValue`" :rules="rules.richDa.
2022-03-09 14:24:12 174
原创 在vue+ts项目中使用vue-codemirror
1.npm install vue-codemirror --save2.src/common/typings/shims-global.d.tsdeclare module 'vue-codemirror';3.可以在自己使用的页面中直接引入import { codemirror } from 'vue-codemirror';import 'codemirror/lib/codemirror.css';@Component({ components: { codem
2022-03-09 14:02:58 1201 2
原创 mpvue/小程序问题记录
1. IOS系统日期不支持2019-12-31请换成2019/12/31const today = '2012-12-31'const newday = val.replace(/-/g, '/')2. input输入闪动v-model.lazy3.小程序对vue的watch监听支持不怎么好,有时候没有效果,换用小程序的@input方法// html<input ...
2019-12-31 10:57:55 108
原创 笔试题目
面试狗带的第一天1. 怎么判断一个字符串里面是否有重复的元素let a = 'stringsss'let b = a.split("")console.log(b)function abs() { let c = [] for(let i=0; i<b.length; i++){ if(c.indexOf(b[i])==-1){ console.log('1...
2019-09-12 11:09:23 206
原创 vue项目中使用mock模拟数据
1. 安装mock.jsnpm install mockjs --save-dev2. 新建mock文件夹和mock.js mock.js里面的内容const Mock = require('mockjs')//使用mockjs模拟数据const listData = Mock.mock({ 'reCode': 0, 'message': '成功', ...
2019-04-06 15:36:51 653
原创 /deep/深度作用域选择器
使用 scoped 后,父组件的样式将不会渗透到子组件中。<template lang="html"> <div class="header-search"> <Input class="header__search"/> </div></template><style lang="sc...
2019-04-06 14:56:07 1477
原创 git的常用命令
1. 远程拉取项目git clone https://github.com/×××git clone -b kaka/devhttps://github.com/×××(获取指定远程分支)2. 正常提交代码到远程流程------git add .------git commit -m "提交备注"------git status(状态信息)------git push...
2019-04-06 14:23:23 332
原创 时间轴
function getNowFormatDate() {let date = new Date()let year = date.getFullYear()let month = date.getMonth() + 1let dates = date.getDate()if (month >= 1 && month <= 9) {month...
2019-04-04 10:03:58 160
原创 求2个数组的中位数
const arrA = [11,10,25,26];const arrB = [9,6,5,3];let arrC = arrA.concat( arrB ).sort((a,b) => a-b );let valueOne = Math.floor(arrC.length/2);if(arrC.length%2==1){console.log( arrC[val...
2019-03-25 11:44:33 294
原创 微信小程序——支付结果查询
支付结果查询的方法:(没有使用小程序支付方法)1. 定时器查询(轮询)setInterval+clearIntervalclearInterval:支付完成/失败, (不在查询页面的时候)onUnload、2. webSocke连接 HTTP协议:一种无状态,无连接的,单向运用协议。webSocke:html5提供的一种在单个TCP(传输控制协议)连接上进行...
2018-08-23 10:45:42 6323 1
原创 微信小程序—自定义tabber
上集回顾:因为之前说过我们公司的登录流程,菜单的显示是根据不同的用户角色显示不同的,所以不能像小程序api提供的直接配置固定的菜单;微信api全局配置:https://developers.weixin.qq.com/miniprogram/dev/framework/config.html1. 先建文件,见图关于模块wxs/templates2. 代码如下-----t...
2018-08-21 18:50:46 2823
原创 微信小程序—登录
微信小程序登录api:https://developers.weixin.qq.com/miniprogram/dev/api/api-login.html?search-key=login我们公司做的小程序登录方面跟微信api上面的登录操作有点不同: 1. 小程序一打开app.json的加载的第一个页面是pages/login/login(也就是必须首先登录); ...
2018-08-21 16:03:36 1956
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人