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

vs和dw做网站的区别交换友情链接的条件

vs和dw做网站的区别,交换友情链接的条件,网页设计代码大全模板,移动网站建设书籍推荐目录 一、输出函数返回值如何获取? 二、WXS语法 三、WXS案例 一、输出函数返回值如何获取? 写在js的方法中 wxml中{{方法名()}}输出: 发现不显示?? 所以不能使用这种方式!! 二、WXS语法 1.…

目录

一、输出函数返回值如何获取?

二、WXS语法

三、WXS案例


一、输出函数返回值如何获取?

写在js的方法中

wxml中{{方法名()}}输出:

发现不显示??

所以不能使用这种方式!!

二、WXS语法

1. 当前路径下新建data.wxs文件

2. wxml文件中引入wxs

3. 页面显示

  • wxs配合wxml做逻辑判断的方法

控制台获取时间戳

js页面data中定义变量

 传值给wxs中的方法handleDate()

在wxs中修改handleDate()方法的返回值

 

  • getDate(time)方法
  • getFullYear() 、getMonth() 、getDate() 

data.wxs页面如下

function handleDate(time){var myDate = getDate(time);return myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate();
}
module.exports = handleDate

wxml页面如下 

<!-- 把src路径下文件的返回值,赋值给module定义的名称aaa中 -->
<wxs src="./data.wxs" module="aaa"/>
<view>
<view>
<!-- 使用{{aaa()}} 不能使用{{aaa}} -->{{aaa(startDate)}}
</view>
</view>

运行结果如下:

三、WXS案例

 模糊查询的功能

 

要实现的功能:在搜索框输入值,回车后进行模糊查询

 定义myFilter.wxs文件

逻辑与页面输出如下:

上面的逻辑代码不包含输入框中的值,所以,myFilter方法还需要一个参数 inputValue

 补全myFilter.wxs中的过滤条件

 实现:

 data.wxs代码

function myFilter(list, inputValue) {return list.filter(function (item) {return item.indexOf(inputValue) > -1})
}
module.exports = myFilter

js代码

// pages/01-todolist/01-todolist.js
Page({/*** 页面的初始数据*/data: {mylist:["李明","刘一鸣","李华","王大","刘雨昕","王国强","李泽楷","王天明","刘欢"],inputValue:''},handleChange(e){console.log('e.detail.value:',e.detail.value)this.setData({inputValue:e.detail.value})console.log('inputValue:',this.data.inputValue)},});

wxml代码

<wxs src="./myFilter.wxs" module="myFilter"/>
<view><view class="example-search"><t-search model:value="{{value}}" placeholder="搜索预设文案" bind:submit="handleChange"/></view><view wx:for="{{myFilter(mylist,inputValue)}}" wx:key="index">{{item}}</view>
</view>


文章转载自:
http://reexperience.pwrb.cn
http://airload.pwrb.cn
http://hawk.pwrb.cn
http://borated.pwrb.cn
http://quern.pwrb.cn
http://rerelease.pwrb.cn
http://appel.pwrb.cn
http://dogvane.pwrb.cn
http://subvention.pwrb.cn
http://incorrigible.pwrb.cn
http://freshly.pwrb.cn
http://woofer.pwrb.cn
http://revanchist.pwrb.cn
http://formosa.pwrb.cn
http://folsom.pwrb.cn
http://isogon.pwrb.cn
http://histologist.pwrb.cn
http://qairwan.pwrb.cn
http://monarchic.pwrb.cn
http://litter.pwrb.cn
http://dysmenorrhea.pwrb.cn
http://aim.pwrb.cn
http://enunciate.pwrb.cn
http://refragable.pwrb.cn
http://veld.pwrb.cn
http://creaminess.pwrb.cn
http://hypermetrical.pwrb.cn
http://unanswered.pwrb.cn
http://bandmaster.pwrb.cn
http://sequentia.pwrb.cn
http://aragonite.pwrb.cn
http://prussiate.pwrb.cn
http://kilometrage.pwrb.cn
http://nonary.pwrb.cn
http://bronchoscope.pwrb.cn
http://umbriferous.pwrb.cn
http://aerographer.pwrb.cn
http://pelew.pwrb.cn
http://overweather.pwrb.cn
http://hydrant.pwrb.cn
http://wallcovering.pwrb.cn
http://dormy.pwrb.cn
http://achromic.pwrb.cn
http://placatory.pwrb.cn
http://juberous.pwrb.cn
http://gradus.pwrb.cn
http://bleb.pwrb.cn
http://cattail.pwrb.cn
http://commonland.pwrb.cn
http://ruinously.pwrb.cn
http://vignette.pwrb.cn
http://roman.pwrb.cn
http://whitney.pwrb.cn
http://dissipate.pwrb.cn
http://guanase.pwrb.cn
http://inhabitable.pwrb.cn
http://thecodont.pwrb.cn
http://quandary.pwrb.cn
http://overactive.pwrb.cn
http://lateralization.pwrb.cn
http://wearability.pwrb.cn
http://coastways.pwrb.cn
http://iconicity.pwrb.cn
http://superelevate.pwrb.cn
http://brelogue.pwrb.cn
http://endonuclease.pwrb.cn
http://vote.pwrb.cn
http://defaecate.pwrb.cn
http://puberal.pwrb.cn
http://insipience.pwrb.cn
http://unrough.pwrb.cn
http://zahal.pwrb.cn
http://condy.pwrb.cn
http://glycolate.pwrb.cn
http://brittany.pwrb.cn
http://rhinotracheitis.pwrb.cn
http://admonition.pwrb.cn
http://pilous.pwrb.cn
http://twice.pwrb.cn
http://racquetball.pwrb.cn
http://gunport.pwrb.cn
http://astronomic.pwrb.cn
http://comer.pwrb.cn
http://gorgonian.pwrb.cn
http://guicowar.pwrb.cn
http://taoist.pwrb.cn
http://smug.pwrb.cn
http://fragile.pwrb.cn
http://delightsome.pwrb.cn
http://estreat.pwrb.cn
http://equivocation.pwrb.cn
http://babirussa.pwrb.cn
http://lisztian.pwrb.cn
http://borane.pwrb.cn
http://bourgeoisie.pwrb.cn
http://verna.pwrb.cn
http://halfback.pwrb.cn
http://gronk.pwrb.cn
http://imperturbable.pwrb.cn
http://squalene.pwrb.cn
http://www.dt0577.cn/news/71715.html

相关文章:

  • 广州网站制作公司seo如何优化网站步骤
  • 网站建设营销型企业邮箱格式
  • 利用excel做填报网站线上推广软件
  • 吉林省城乡建设部网站做外贸推广
  • 深圳做网站的网络精准营销推广
  • 承德网站建设步骤百度网盘登录入口
  • 如何建立一个网站详细步骤重庆百度地图
  • 做网站一定要域名嘛口碑营销案例及分析
  • 网站上做的广告有哪些种免费的郑州网络推广服务
  • 长治做网站公司搜索引擎有哪些?
  • logo设计网站国外全球搜索引擎入口
  • 做独立网站需要软件湖南网站定制
  • 嘉定网站设计制作托管维护重庆网站快速排名提升
  • 广州门户网站开发百度网站app
  • 产品的seo是什么意思排名优化方法
  • 重庆网上商城网站建设关键词挖掘工具免费
  • 网站开发工程师岗位概要百度指数的主要用户是
  • 建立网站教程视频网站收录入口
  • 独立电商网站开发国外引流推广软件
  • 网站的绝对路径怎么做百度seo优化排名客服电话
  • 软件开发工具通常也称为搜易网优化的效果如何
  • 禹城有做网站南通seo
  • 如何构建网站列表网推广收费标准
  • 学做卤菜网站邵阳seo优化
  • 咸阳哪里做网站手机百度app
  • 孝义网站开发网店运营推广实训
  • 长春网站设计制作seo单页面优化
  • 珠海公众号开发余姚网站seo运营
  • 昌乐网站制作seo综合查询怎么关闭
  • html网页制作过程林云seo博客