
前端
大秦白起
从前喜欢一个人,现在喜欢一个人,以后喜欢一个人
展开
-
uniapp 跨域
uniapp h5 跨域原创 2023-04-14 16:11:54 · 126 阅读 · 0 评论 -
window安装 nvm 切换 node 版本
nvm安装并切换版本原创 2023-02-18 16:17:01 · 184 阅读 · 1 评论 -
后台返回html完整源代码,前端打开新页面展示
后台返回html完整源代码,前端打开新页面展示原创 2022-12-28 17:46:42 · 3437 阅读 · 0 评论 -
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 · 334 阅读 · 0 评论 -
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 · 374 阅读 · 0 评论 -
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 · 487 阅读 · 0 评论 -
字体设置
上传字体: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 · 797 阅读 · 0 评论 -
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 · 716 阅读 · 0 评论 -
微信小程序 ----- 按钮拖拽
<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 · 672 阅读 · 0 评论 -
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 · 2542 阅读 · 0 评论 -
vue中拖拽
复制就可以用啦<template> <div id="app"> <div class="box box1" :style="box1Style" ref="box1" > <div class="dargbtn" @mousedown="box1ButtonDown">点此拖拽...原创 2019-07-30 17:51:29 · 290 阅读 · 0 评论 -
微信小程序(滑动)-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 · 535 阅读 · 0 评论 -
微信小程序动态切换城市,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 · 860 阅读 · 0 评论 -
微信小程序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 · 426 阅读 · 0 评论 -
伸缩盒(弹性)布局------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 · 748 阅读 · 0 评论 -
盒子居中
<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 · 219 阅读 · 0 评论 -
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 · 158 阅读 · 0 评论 -
Vue学习---------一
xxx.vue页面分成三个部分: <script>js部分</script> <template>html部分</template> ...原创 2018-09-25 09:46:12 · 127 阅读 · 0 评论 -
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 · 1618 阅读 · 0 评论 -
vue从一个页面引入另一个页面
1.先写好一个demo页面demo.vue <template> <div> <h1>11111</h1> </div> </template> <script> export default {} </script> <style原创 2018-11-12 14:46:30 · 47024 阅读 · 8 评论 -
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 · 239 阅读 · 0 评论 -
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 · 747 阅读 · 0 评论 -
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 · 227 阅读 · 0 评论 -
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 · 164 阅读 · 0 评论 -
微信小程序---定位和逆地址解析
1.获取微信小程序定位,首先需要授权wx.getSetting 获取用户当前的授权状态wx.openSetting 打开设置界面,引导用户开启授权(是用户已经 授权/拒绝 的权限)wx.authorize 进行授权 scope.userInfo wx.getUserInfo 用户信息 scope.userLocation wx.getLocation, wx...原创 2019-03-15 11:28:02 · 1289 阅读 · 0 评论 -
传统布局------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 · 353 阅读 · 0 评论