- 博客(39)
- 收藏
- 关注
原创 h5 pdf 预览or下载
vue一、浏览器中1.1、直接获取到pdf文件的url,使用window.open()1.2、通过 a 标签,设置 href 为 url 值,点击 a 标签即可完成下载<a href='url' download='文件名'></a>我直接使用以上方法会直接下载,但是看到有些人说会打开新的窗口查看pdf。
2023-06-13 15:51:49
1901
原创 uniapp 前端瀑布流demo
vue瀑布流demo<template> <view class="waterfall"> <view class="waterfall-left"> <view class="waterfall-item" v-for="(item, index) in leftImage" :key="index" > <image :src="item" mode="widt...
2021-04-21 09:30:02
329
原创 Unexpected token o in JSON at position 1 报错原因
JSON.parse()和JSON.stringify()之间互转JSON.parse():json字符串转json对象JSON.stringify():json对象转json字符串let aa = {a: 2, b: 3, c: 4}let aaa = JSON.stringify(aa)console.log(aaa) ==> {"a":2,"b":3,"c":4}wx.setStorageSync('aa', aaa)let bb = wx.getStora...
2021-01-11 17:55:55
366
原创 js时间戳与当前时间和倒计时
当前时间:let timestamp = Date.parse(new Date())当前时间转时间戳:function timeStampTime(DateTime) {if (DateTime && DateTime.length > 0) {return new Date(DateTime).getTime()} else {return new Date().getTime()}}倒计时:function getTimeDay(tim
2020-06-16 11:57:53
482
原创 字体设置
上传字体:https://transfonter.org/选择你需要的字体格式,下载放入js中,@font-face {font-family: 'zihun95hao-shoukesong'; src: url("/font/zihun95hao-shoukesong-Regular.eot"); font-weight: normal; font-style: norm...
2020-04-15 11:21:21
789
原创 JAVA安装Mac
下载资源包:安装jdk:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html idea:https://www.jetbrains.com/idea/直接解压安装就可以了...
2019-11-23 23:22:49
163
原创 JAVA安装windows
系统:Windows64安装 Eclipse 前你需要确保你的电脑已安装 JDK1.下载jdk: jdk-12_windows-x64_bin官网地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载eclipse: eclipse-inst-win642.安装jdk, 一直下一步就好...
2019-11-23 23:17:50
163
原创 vue下安装iview-admin后台管理(连载中)
一: 安装1) 安装vue npm install vue2) 安装 iview-admin: npm install iview --save 引入全局iview: import iView from 'iview' Vue.use(iView)3)...
2019-08-08 09:50:29
708
原创 iview-admin配置post请求(随笔)
1,注释main.js下的if (process.env.NODE_ENV !== 'production') require('@/mock')2.设置跨域vue.config.js里 // devServer: { // proxy: 'http://xxxxxx/api/' //}3.设置headers头lib/axios.js文件里,删除conten...
2019-08-05 11:50:05
2539
原创 vue中拖拽
复制就可以用啦<template> <div id="app"> <div class="box box1" :style="box1Style" ref="box1" > <div class="dargbtn" @mousedown="box1ButtonDown">点此拖拽...
2019-07-30 17:51:29
283
原创 微信小程序(滑动)-animation
官方api: https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/wx.createAnimation.html例:<style lang="less">.container { display: flex; flex-direction: column; box-siz...
2019-07-24 14:35:28
531
原创 微信小程序 ----- 按钮拖拽
<view class="body-suspension" style="top: {{UDnumber}}px; left: {{LRnumber}}px;" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend"> 拖拽</view>data...
2019-07-23 15:38:52
668
原创 正则表达式学习
^[0-9]+abc$ [0-9]+匹配多个数字, [0-9] 匹配单个数字,+ 匹配一个或者多个。 abc$匹配字母 abc 并以 abc 结尾 {2, 4} 2到4个字符的长度 字符 描述 ^ 匹配输入字符串开始的位置。如果设置了 RegExp 对象的 Multiline 属性,^ 还会与 \n 或 \r 之后的位置匹配。 ...
2019-06-10 15:42:13
122
原创 微信小程序动态切换城市,swiper显示不同,一张图到多张图可以, 多张图到一张图不可以
<swiper class="swiper-box" current="{{current}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" @change="bannerChange"> <block w...
2019-06-01 09:00:34
858
原创 微信小程序map地图
<style lang="less"> @import "../../assets/styles/base"; @import "../../assets/styles/px"; @import "../../assets/styles/icons"; page { background-color: #F8F8F8; height: 100%; ...
2019-04-19 16:42:59
421
原创 微信小程序---定位和逆地址解析
1.获取微信小程序定位,首先需要授权wx.getSetting 获取用户当前的授权状态wx.openSetting 打开设置界面,引导用户开启授权(是用户已经 授权/拒绝 的权限)wx.authorize 进行授权 scope.userInfo wx.getUserInfo 用户信息 scope.userLocation wx.getLocation, wx...
2019-03-15 11:28:02
1283
原创 transfrom 滑动 ,
暂不完整,等待后续itemArr:[ {id: 1,name: "张三"}, {id: 2,name: "李四"}, {id: 3,name: "王五"}]<ul class="conMain-content"> <li class="divLi" v-for="(item, index) in itemArr" :k
2018-12-21 17:27:45
162
原创 vue中路由传参
A页面<div @click="jump"></div>jump(){ this.$router.push({ name: 'B页面的路由名字', params: { id: id } }) // 跳转到更新页面并传递参数id}B页面mounted(){let routerParams = this.$r...
2018-12-21 16:34:11
225
原创 list循环 点击当前对象 class类名添加
list: [ //一个简单的数组数据{id : 1, name: '张三'},{id : 2, name: '李四'},{id : 3, name: '王五'},]num=2,//你需要第几个添加class类名.blur{ //添加的class类名color: red;}<ul>//当item.id == num时,添加blu...
2018-12-21 16:27:25
741
原创 Vue请求使用axios
安装 axios npm install --save axios配置 axios 调用方法里写://请求的url 地址const url = 'http://192.168.123.130:8085/account/message/send'//使用URLSerchParms来处理参数,URLSerchParams的兼容性较差,注意:(可使用babel来转换)...
2018-11-14 14:36:14
236
原创 vue从一个页面引入另一个页面
1.先写好一个demo页面demo.vue <template> <div> <h1>11111</h1> </div> </template> <script> export default {} </script> <style
2018-11-12 14:46:30
46988
8
原创 iview-admin-------上传组件Upload
上传给后台<Upload ref="upload" :show-upload-list="false" 是否显示已上传文件列表 :default-file-list="defaultList" 默认已上传的文件列表 :on-success="handleSuccess" // 文件上传成功时的函数,返回字段为 response, file, fileList :fo...
2018-11-12 14:34:36
1614
原创 上传到码云上
在要上传的文件内打开 Git Bash Here例如:我需要上传MTWechatCatering文件,在MTWechatCatering文件目录下,打开git bash herenpm instalnpm installgit pull ------拉取项目git clone https://gitee.com/q-y-p/sham.git 更新的项目 ...
2018-09-27 17:54:11
264
原创 Vue学习---------一
xxx.vue页面分成三个部分: <script>js部分</script> <template>html部分</template> ...
2018-09-25 09:46:12
125
原创 Vue安装配置demo
安装依赖: npm install vue-cli -g检查当前vue版本 : vue -V创建一个新的helloword项目:vue init webpack helloword跳转到新建的目录 cd helloword编译项目 npm install npm install -production运行端口查看: npm run dev...
2018-09-05 15:03:46
157
原创 微信小程序wepy框架
标题---》头部 ------在app.wpy里或当前页面更改导航栏---》底部 ------只能在app.wpy里更改npm install wepy-cli -g 安装更新最新的wepywepy init standard myproject 创建生成demo项目(会将以前的项目覆盖,修改app,生成index页面)npm install 安装依赖wep...
2018-08-30 11:34:22
216
原创 小程序获取页面的输入值input-buttom
一:立即刷新(我自己也不知道为什么,在手机上并不能显示button按钮)WXML:<input class='address'type="text" placeholder="合肥市蜀山区蔚蓝商务港A座" bindinput="voteTitle"><button >查询</button></input>(本来是想点击再查询,谁知
2018-07-18 11:26:00
1741
原创 微信小程序轮播图
wxml中编写<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for="{{imgUrls}}"> <swiper-ite
2018-07-09 17:04:22
385
原创 盒子居中
<div class="father"> <div class="son"></div></div>一: .father{width:400px;height:400px;border:1px solid red;position:relative;}.son{width:100px;height:100px;background-color:...
2018-07-07 15:03:20
212
原创 伸缩盒(弹性)布局------display:flex
display:flex; 让父元素变成伸缩盒布局,子元素默认水平排列(row);flex-wrap:wrap;换行;flex-direction:column;子元素竖着排列;flex是flex-grow、flex-shrink、flex-basis的缩写flex-grow:定义弹性盒子项(flex item)的拉伸因子 flex-...
2018-07-07 14:24:06
744
原创 传统布局------display的三个值:block,inline,inline-block
block元素通常被现实为独立的一块,会单独换一行;(变为:块级元素)inline元素则前后不会产生换行,一系列inline元素都在一行内显示,直到该行排满。(变为:行级元素)大体来说HTML元素各有其自身的布局级别(block元素还是inline元素):常见的块级元素有 DIV, FORM, TABLE, P, PRE, H1~H6, DL, OL, UL 等。常见的内联元素有 SPAN, A,...
2018-07-05 11:24:46
350
原创 微信小程序wepy框架使用
https://blog.youkuaiyun.com/res_min/article/details/72848189 网址链接下载node
2018-07-03 15:42:42
373
3
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人