uniapp
wflynn
研究代码中...将随缘更新
展开
-
typescript配置支持uniapp uni关键字
安装包:"@dcloudio/types": "*"tsconfig.,json原创 2021-02-05 21:24:56 · 1419 阅读 · 0 评论 -
Uncaught Error: Redirected when going from “/*“ to “/*“
Uncaught Error: Redirected when going from “/" to "/”this.$router.push({path: this.redirect || ‘/’,query: this.otherQuery}).catch(()=>{})原创 2020-12-19 14:31:45 · 1237 阅读 · 1 评论 -
canvas合成任意数量图片、合成二维码加文字封装处理
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.git<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"&.原创 2020-05-10 14:55:59 · 363 阅读 · 0 评论 -
微信小程序发布新版本提示用户更新代码封装
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.gitApp.vueonLaunch () { this.autoUpdate()},method: { autoUpdate: function () { // 自动更新 var self = this // 获取小程序更新机制兼容 if (wx.canIUse('getUpdateManager')) { const upd原创 2020-05-10 16:11:53 · 631 阅读 · 0 评论 -
微信小程序设置全局分享
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.gitApp.vueonShow () { // #ifdef MP-WEIXIN this.share() // #endif console.log('onShow:应用页面显示')},method: { share: function () { // 全局分享 wx.onAppRoute(res => { .原创 2020-05-10 16:13:44 · 1556 阅读 · 1 评论 -
vue及原生html实现列表无缝上下滚动,以及单行滚动
vue版本npm i vue-seamless-scroll -S<template> <vue-seamless-scroll :data="listData" :class-option="optionHover" class="seamless-warp "> <ul class="item"> <li v-for="item in listData"> <span class="title" v-text="it.原创 2020-05-12 13:19:06 · 1907 阅读 · 0 评论 -
vue监听用户离开页面并根据离开次数设置判断-可用于微信浏览器
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.git动画效果的处理遇到的一个问题,当用户离开页面再回来时我会更换一张图片,同时给图片加上晃动的动画效果但是如何animation直接写死,只会触发一次,当用户离开页面再回来时动画效果并不会再次触发。此时只需要把相同的动画css复制一份,改一下动画名称,然后在页面离开事件中处理即可。下面为代码示例<div v-if="!modalStatus" style="position:原创 2020-05-13 13:31:55 · 1287 阅读 · 0 评论 -
easycom模式使vue组件无需引入即可使用
easycomHBuilderX 2.5.5起支持easycom组件模式。传统vue组件,需要安装、引用、注册,三个步骤后才能使用组件。easycom将其精简为一步。 只要组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。就可以不用引用、注册,直接在页面中使用。 如下:<template> <vi...原创 2020-04-19 11:51:51 · 21612 阅读 · 0 评论 -
vue头像组件封装
<template> <view> <view class="cu-avatar margin-left" :class="[false ? 'radius' : 'round', ['sm', 'lg', 'xl', ''][3], ]" style="background-image:url(http...原创 2020-04-23 11:11:31 · 531 阅读 · 0 评论 -
vue消息提示组件封装
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.git使用示例<template> <view class="bg-white padding"> <!--顶部消息--> <messTip ref="toast" v-if="index==0...原创 2020-04-26 09:34:07 · 1445 阅读 · 0 评论 -
vue二维码生成可自定义logo
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.git<template xlang="wxml"> <view class="container"> <!-- pdground="rgba(123, 191, 234, 1) qrR(res) { this.src = res }-->...原创 2020-04-26 09:57:42 · 657 阅读 · 0 评论 -
vue监听页面离开事件
vue监听页面离开事件可加入变量判断,根据离开次数加入不同的事件var app = new Vue({ el: '#app', data() { }, mounted() { document.addEventListener('visibilitychange', this...原创 2020-04-27 11:11:21 · 10275 阅读 · 0 评论 -
在 WebStorm 中开发 uni-app
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.gitCLI 工程全局安装 vue-cli 3.x(如已安装请跳过此步骤)npm install -g @vue/cli通过 CLI 创建 uni-app 项目vue create -p dcloudio/uni-preset-vue my-project此时...原创 2020-04-27 14:06:40 · 29644 阅读 · 6 评论 -
vue之图片上传组件封装
代码已上传至githubgithub代码地址:https://github.com/Miofly/mio.git使用方法<template> <view class="bg-white"> <upLoadImgSingle ref="uploadImg"></upLoadImgSingle> <button @tap="s...原创 2020-04-21 19:22:38 · 1231 阅读 · 0 评论 -
uniapp
初始化npm initvuenpm i vue vuex vue-routerfont-awesomenpm i font-awesome -Simport 'font-awesome/css/font-awesome.min.css'sassnpm install --save-dev sass-loadernpm install --save nod...原创 2020-01-07 15:32:23 · 142 阅读 · 0 评论