摘要:<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:在当前项目的uniCloud-database目录上右键 "新建DB Schema" 填上要新建的表名字 table1.schema.json 在properties字段里 _id字段后面再追加字段 table1.schema.json // 文档教程: https://uniapp.dcloud.
阅读全文
摘要:先下载所有db schema 在前端代码中直接访问数据库表拿数据 index.vue <template> <view class="content"> <view v-for="item in dataList" :key="item._id"> {{item.name}} {{item.gend
阅读全文
摘要:在项目的uniCloud cloudfunctions文件夹上右键,新建云函数/云对象 单选框选择"云对象", 命名,创建 云对象代码 const db = uniCloud.database() module.exports = { _before: function() {}, // 定义云对象
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> html, body { margin: 0; padding: 0; } .outer { width: calc(100vw - 200px)
阅读全文
摘要:<template> <view class="test2"> <view class="upload-group"> <view v-if="imagesUrl" class="box img" v-for="(item,idx) in imagesUrl"> <view class="box-c
阅读全文
摘要:Array.prototype.map() 示例代码 //将创建一个新数组, 由原数组中每个元素都调用一次提供的函数后的返回值组成. //callbackFunc 是数组中的每个元素执行的函数,它的返回值作为一个元素被添加到新数组中。 // callbackFunc函数被每次循环调用时将传入以下参数
阅读全文