<template> <view class="load-image" :style="{width: width + 'rpx', height: height + 'rpx' }"> <image class="load-image-show" :style="{borderRadius: borderRadius + 'rpx'}" :class="{load: imgLoaded}" :src="imgLoaded ? loadImage : $img('images/imagefail.png', { from: 'local' })" mode="aspectFill" @load="imgLoaded = true" /> </view> </template> <
H5版本 /** * 压缩 * @param {Object} imgSrc 图片url * @param {Object} callback 回调设置返回值 */ translate(imgSrc, callback) { var that = this var img = new Image(); img.src = imgSrc; img.onload = function() { var _that = this; var h = _that.height; // 默认按比例压缩 var w = _that.width; var canvas = document.createElement('canvas');
$white: #ffffff; $primary: #fa4427; $secondary: #fe8800; $theme-color-primary: $primary; // 主色 $theme-color-secondary: $secondary; // 副色 $text-black: #222222; // 文本主色 $text-gray: #656565; // $text-white: $white; // 白色 $background-color: #f5f5f5; $border-color: #e0e0e0; // flex 样式 .z-w-100 { width: 100%; } .z-h-100 { height: 100%; } // flex 布局 .z-flex { display: flex; align-items: center; } .z-flex-1 { flex: 1; } .z-flex-wrap { flex-wrap: wrap; } .z-col-start { display:
文字不会写,直接上图
程序无外乎就是数据的处理,基础的数据操作我们还是应该学习学习的云开发开通省略...数据库增操作db.collection('counters').add({ data: { name: 'lettered; // 新增一条 name为lettered 的数据 } }).then(res => { console.log(res) })数据库查操作where 查询条件 get 获取到数据db.collection('counters').where({ name: 'lettered; // 查找name为lettered 的数据 }).get().then(res => { console.log(res) // 这里返回的是合集 })数据库改操作改可以直接doc 更改db.collection('counters').doc("唯一引缩值_id").update({ data: { name: "某某" } }).then(res =
lettered
生,亦我所欲也;义,亦我所欲也。