当前位置: 首页 > news >正文

塔城建设局网站如何用模版做网站

塔城建设局网站,如何用模版做网站,闵行区网站设计,做专题页的网站五、UniAPP 常用组件简介 uni-app 为开发者提供了一系列基础组件#xff0c;类似 HTML 里的基础标签元素#xff0c;但 uni-app 的组件与 HTML 不同#xff0c;而是与小程序相同#xff0c;更适合手机端使用。 虽然不推荐使用 HTML 标签#xff0c;但实际上如果开发者写了…五、UniAPP 常用组件简介 uni-app 为开发者提供了一系列基础组件类似 HTML 里的基础标签元素但 uni-app 的组件与 HTML 不同而是与小程序相同更适合手机端使用。 虽然不推荐使用 HTML 标签但实际上如果开发者写了div等标签在编译到非H5平台时也会被编译器转换为 view 标签类似的还有 span 转 text、a 转navigator等包括 css 里的元素选择器也会转但为了管理方便、策略统一新写代码时仍然建议使用view等组件。 开发者可以通过组合这些基础组件进行快速开发 基于内置的基础组件可以开发各种扩展组件组件规范与vue组件相同。 案例知心姐姐布局实现 templateview classcontainer!-- 聊天列表 --view classchat-bodyblock v-for(item, index) in chatList :keyindexview classchat-one v-if!item.isMeimage classchat-face src/static/faces/head1.jpeg /view classchat-boxview classchat-sender知心姐姐/viewview classchat-content v-ifitem.type txt{{item.content}}/viewimage classchat-img v-ifitem.type img :srcitem.content modewidthFix //view/viewview v-else classchat-one chat-one-mineview classchat-boxview classchat-content v-ifitem.type txt{{item.content}}/viewimage classchat-img v-ifitem.type img :srcitem.content modewidthFix //viewimage classchat-face src/static/faces/head2.jpeg //view/block/view!-- 聊天输入 --view classchat-footerinput classmsg-input typetext cursor-spacing16 v-modelmyInput/image classimg-chose src/static/img.png clickchoseImgAndSend/view classsend-btn clicksendMsg发送/view/view/view /templatecss样式 style langscss scoped.container {background-color: #f1f1f1;min-height: 100vh;}.chat-body {padding-bottom: 178upx;.chat-time {text-align: center;color: #888;padding: 40upx 0 0;}.chat-one {display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;align-items: flex-start;padding: 20upx 0;}.chat-one-begin {padding: 40upx 0 0;}.chat-one-mine {justify-content: flex-end;}.chat-face {width: 84upx;height: 84upx;border-radius: 10upx;margin-left: 40upx;}.chat-one-mine .chat-face {margin-left: 0;margin-right: 40upx;}.chat-box {max-width: calc(100% - 290upx);margin-left: 20upx;font-size: 30upx;}.chat-one-mine .chat-box {margin-right: 20upx;}.chat-sender {color: #888;font-size: 28upx;margin-top: -8upx;margin-bottom: 10upx;}.chat-content {background-color: #fff;border-radius: 5px;padding: 10px;.micon {margin-right: 20upx;color: #666;}}.chat-img {float: left;max-width: 60%;border-radius: 5px;}.chat-one-mine .chat-img {float: right;}}.chat-footer {width: 670upx;padding: 0 40upx;height: 120upx;position: fixed;bottom: 0;left: 0;background-color: #f1f1f1;display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-between;align-items: center;align-content: center;border-top: 1upx solid #ddd;.msg-input {background-color: #fff;width: calc(100% - 300upx);height: 70upx;line-height: 70upx;font-size: 30upx;border-radius: 10upx;padding: 0 20upx;}.img-chose{height: 70upx;width: 70upx;}.send-btn {height: 60upx;line-height: 60upx;width: 120upx;text-align: center;background-color: green;color: #FFFFFF;border-radius: 12upx;}} /style 六、UniAPP 常用 API 简介 uni-app的 js 代码h5 端运行于浏览器中非 h5 端 Android 平台运行在 v8 引擎中iOS 平台运行在 iOS 自带的 jscore 引擎中。所以uni-app的 jsAPI 由标准 ECMAScript 的 js API 和 uni 扩展 API 这两部分组成。 ECMAScript 由 Ecma 国际管理是基础 js 语法。浏览器基于标准 js 扩充了window、document 等 js APINode.js 基于标准 js 扩充了 fs 等模块小程序也基于标准 js 扩展了各种 wx.xx、my.xx、swan.xx 的 API。 标准 ecmascript 的 API 非常多比如console、settimeout等等。 非 H5 端虽然不支持 window、document、navigator 等浏览器的 js API但也支持标准 ECMAScript。 开发者不要把浏览器里的 js 等价于标准 js。 所以 uni-app 的非 H5 端一样支持标准 js支持 if、for 等语法支持字符串、数组、时间等变量及各种处理方法仅仅是不支持浏览器专用对象。 scriptexport default {data() {return {// 保存聊天的内容chatList:[{isMe: false,type: txt,content: 你好我是可爱的知心姐姐请问你想和我聊什么呢},{isMe: false,type: img,content: /static/image/1.jpeg},{isMe: true,type: txt,content: 哇你真漂亮},{isMe: true,type: img,content: /static/image/2.jpeg}],myInput:}},onShow(){if(!!uni.getStorageSync(chatList)){this.chatList JSON.parse(uni.getStorageSync(chatList))uni.pageScrollTo({scrollTop: 999999,duration: 0})}},methods:{choseImgAndSend(){uni.chooseImage({count: 1,sizeType: [original, compressed],sourceType: [album, camera],success: res {console.log(res.tempFilePaths[0])let senMsg {isMe: true,type: img,content: res.tempFilePaths[0]}this.chatList.push(senMsg)let resMsg {isMe: false,type: img,content: res.tempFilePaths[0]}this.chatList.push(resMsg)uni.pageScrollTo({scrollTop: 999999,duration: 0})uni.setStorageSync(chatList, JSON.stringify(this.chatList))}})},sendMsg(){if(!this.myInput) returnlet senMsg {isMe: true,type: txt,content: this.myInput}this.chatList.push(senMsg)let resMsg {isMe: false,type: txt,content: this.myInput}this.chatList.push(resMsg)this.myInput uni.pageScrollTo({scrollTop: 999999,duration: 0})uni.setStorageSync(chatList, JSON.stringify(this.chatList))}}} /script效果展示
http://www.hkea.cn/news/14398675/

相关文章:

  • 简单的电影网站模板wordpress自动汉化版
  • 医疗网站建设精英深圳的网站建设公司的外文名是
  • 商城网站开发需要多少钱线上营销模式
  • 重庆建网站计划做外贸开通哪个网站好
  • 西宁做网站需要多少钱wordpress防止采集插件
  • 烟台建网站公司哪家好品牌设计师需要具备什么能力
  • 一个网站域名ip手机类网站设计
  • 地方门户网站的前途厦门维品网站建设
  • 优秀企业网站模板下载微网站建设c
  • 一个主机域名可以做多少个网站wordpress只能下载一个文件
  • 国内做的比较大的外贸电商网站个人做网站接装修活哪个网站好
  • 公司网站自己可以做吗WordPress启用不了主题
  • wordpress档案插件柳州网站优化公司
  • 公明网站建设公司淘宝客做的最好的网站
  • ftp怎么连接网站软件开发类论文基本结构
  • 犀牛云网站建设深圳网站建设方案服务公司
  • 工业信息化网站备案系统做商标网站
  • 两个彩票网站做赔付开发区人才网最新招聘信息
  • 仿百度百科网站源码图片网站优化
  • 某企业网站搜索引擎优化网站关键词优化的步骤和过程
  • 建站公司兴田德润实惠网站开发期末作品代码和数据库运行好大全
  • 鹤山做网站国内最新经济新闻
  • 信息发布型企业网站的特点外贸网站商城
  • 重庆企业网络推广网站模板网站建设公司哪个好
  • 网站建设营改增深圳市城乡建设局网站
  • 淘客网站备案教程团员电子档案查询网
  • 如何免费制作企业网站公众号流量投放
  • 农产品电商网站的建设需求增加网站关键词库
  • wordpress制作电商网站做网站标配
  • 深圳建网站三千贵阳网站开发方舟网络