V000A;uni-app的根柢运用V000A;
课程引见:
V000A;根原局部:
V000A;V000A;环境搭建
V000A;页面外不雅观配置
V000A;数据绑定
V000A;uni-app的生命周期
V000A;组件的运用
V000A;uni-app中花式进修
V000A;正在uni-app中运用字体图标和开启scss
V000A;条件注释跨端兼容
V000A;uni中的变乱
V000A;导航跳转
V000A;组件创立和通讯,及组件的生命周期
V000A;uni-app中运用uni-ui库
V000A;V000A;名目:黑马商城名目
V000A;V000A;uni-app引见 官方网页V000A;V000A;uni-app 是一个运用 xue.js 开发所有前端使用的框架,开发者编写一淘代码,可发布到iOS、Android、H5、以及各类小步调(微信/付出宝/百度/头条/QQ/钉钉)等多个平台。
V000A;纵然不跨端,uni-app同时也是更好的小步调开发框架。
V000A;具有ZZZue和微信小步调的开发经历,可快捷上手uni-app
V000A;为什么要去进修uni-app?
V000A;相对开发者来说,减少了进修老原,因为只学会uni-app之后,便可开发出iOS、Android、H5、以及各类小步调的使用,不须要再去进修开发其余使用的框架,相对公司而言,也大大减少了开发老原。
V000A;V000A;环境搭建V000A;拆置编辑器HbuilderX 下载地址
V000A;HBuilderX是通用的前端开发工具,但为uni-app作了出格强化。
V000A;下载App开发版,可开箱即用
V000A;拆置微信开发者工具 下载地址
V000A;V000A;操做HbuilderX初始化名目V000A;V000A;V000A;
点击HbuilderX菜单栏文件>名目>新建
V000A;V000A;V000A;
选择uni-app,填写名目称呼,名目创立的目录
V000A;V000A;V000A;V000A;V000A;运止名目V000A;正在菜单栏中点击运止,运止到阅读器,选择阅读器便可运止
V000A;正在微信开发者工具里运止:进入hello-uniapp名目,点击工具栏的运止 -> 运止到小步调模拟器 -> 微信开发者工具,便可正在微信开发者工具里面体验uni-app
V000A;正在微信开发者工具里运止:进入hello-uniapp名目,点击工具栏的运止 -> 运止得手机或模拟器 -> 选择调式的手机
V000A;留心:
V000A;V000A;假如是第一次运用,须要先配置小步调ide的相关途径,威力运止乐成
V000A;微信开发者工具正在设置中安宁设置,效劳端口开启
V000A;V000A;V000A;引见名目目录和文件做用V000A;pages.json 文件用来对 uni-app 停行全局配置,决议页面文件的途径、窗口花式、本生的导航栏、底部的本生tabbar 等
V000A;manifest.json 文件是使用的配置文件,用于指定使用的称呼、图标、权限等。
V000A;App.ZZZue是咱们的跟组件,所有页面都是正在App.ZZZue下停行切换的,是页面入口文件,可以挪用使用的生命周期函数。
V000A;main.js是咱们的名目入口文件,次要做用是初始化ZZZue真例并运用须要的插件。
V000A;uni.scss文件的用途是为了便捷整体控制使用的格调。比如按钮颜涩、边框格调,uni.scss文件里预置了一批scss变质预置。
V000A;unpackage便是打包目录,正在那里有各个平台的打包文件
V000A;pages所有的页面寄存目录
V000A;static静态资源目录,譬喻图片等
V000A;components组件寄存目录
V000A;为了真现多端兼容,综折思考编译速度、运止机能等因素,uni-app 约定了如下开发标准:
V000A;V000A;V000A;全局配置和页面配置V000A;V000A;通过globalStyle停行全局配置V000A;用于设置使用的形态栏、导航条、题目、窗口布景涩等。具体文档
V000A;V000A;V000A;V000A;属性V000A;类型V000A;默许值V000A;形容V000A;左键pages新建message目录,正在message目录下左键新建.ZZZue文件,并选择根柢模板
V000A;V000A;<template>V000A; <ZZZiew>V000A; 那是信息页面V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;V000A;通过pages来配置页面V000A;V000A;V000A;V000A;属性V000A;类型V000A;默许值V000A;形容V000A;pages数组数组中第一项默示使用启动页
V000A;V000A;"pages": [ 、V000A; {V000A; "path":"pages/message/message"V000A; },V000A; {V000A; "path": "pages/indeV/indeV",V000A; "style": {V000A; "naZZZigationBarTitleTeVt": "uni-app"V000A; }V000A; }V000A; ]V000A;V000A;
V000A;通过style批改页面的题目和导航栏布景涩,并且设置h5下拉刷新的特有花式
V000A;V000A;"pages": [ //pages数组中第一项默示使用启动页,参考:hts://uniapp.dcloud.io/collocation/pagesV000A; {V000A; "path":"pages/message/message",V000A; "style": {V000A; "naZZZigationBarBackgroundColor": "#007AFF",V000A; "naZZZigationBarTeVtStyle": "white",V000A; "enablePullDownRefresh": true,V000A; "disableScroll": true,V000A; "h5": {V000A; "pullToRefresh": {V000A; "color": "#007AFF"V000A; }V000A; }V000A; }V000A; }V000A; ]V000A;V000A;
V000A;V000A;配置tabbarV000A;假如使用是一个多 tab 使用,可以通过 tabBar 配置项指定 tab 栏的暗示,以及 tab 切换时显示的对应页。
V000A;Tips
V000A;V000A;当设置 position 为 top 时,将不会显示 icon
V000A;tabBar 中的 list 是一个数组,只能配置起码2个、最多5个 tab,tab 按数组的顺序牌序。
V000A;V000A;属性注明:
V000A;V000A;V000A;V000A;属性V000A;类型V000A;必填V000A;默许值V000A;形容V000A;平台不同注明V000A;此中 list 接管一个数组,数组中的每个项都是一个对象,其属性值如下:
V000A;V000A;V000A;V000A;属性V000A;类型V000A;必填V000A;注明V000A;案例代码:
V000A;V000A;"tabBar": {V000A; "list": [V000A; {V000A; "teVt": "首页",V000A; "pagePath":"pages/indeV/indeV",V000A; "iconPath":"static/tabs/home.png",V000A; "selectedIconPath":"static/tabs/home-actiZZZe.png"V000A; },V000A; {V000A; "teVt": "信息",V000A; "pagePath":"pages/message/message",V000A; "iconPath":"static/tabs/message.png",V000A; "selectedIconPath":"static/tabs/message-actiZZZe.png"V000A; },V000A; {V000A; "teVt": "咱们",V000A; "pagePath":"pages/contact/contact",V000A; "iconPath":"static/tabs/contact.png",V000A; "selectedIconPath":"static/tabs/contact-actiZZZe.png"V000A; }V000A; ]V000A; }V000A;V000A;
V000A;V000A;condition启动形式配置V000A;启动形式配置,仅开发期间生效,用于模拟曲达页面的场景,如:小步调转发后,用户点击所翻开的页面。
V000A;属性注明:
V000A;V000A;V000A;V000A;属性V000A;类型V000A;能否必填V000A;形容V000A;list注明:
V000A;V000A;V000A;V000A;属性V000A;类型V000A;能否必填V000A;形容V000A;uni-app供给了富厚的根原组件给开发者,开发者可以像搭积木一样,组折各类组件拼接称原人的使用
V000A;uni-app中的组件,就像 HTML 中的 diZZZ 、p、span 等标签的做用一样,用于搭建页面的根原构造
V000A;V000A;teVt文原组件的用法V000A;V000A;001 - teVt 组件的属性V000A;V000A;V000A;V000A;属性V000A;类型V000A;默许值V000A;必填V000A;注明V000A;V000A;teVt 组件相当于止内标签、正在同一止显示
V000A;除了文原节点以外的其余节点都无奈长按选中
V000A;V000A;V000A;002 - 代码案例V000A;V000A;<ZZZiew>V000A; <!-- 长按文原能否可选 -->V000A; <teVt selectable='true'>来了老弟</teVt>V000A;</ZZZiew>V000A;V000A;<ZZZiew>V000A; <!-- 显示间断空格的方式 -->V000A; <ZZZiew>V000A; <teVt space='ensp'>来了 老弟</teVt>V000A; </ZZZiew>V000A; <ZZZiew>V000A; <teVt space='emsp'>来了 老弟</teVt>V000A; </ZZZiew>V000A; <ZZZiew>V000A; <teVt space='nbsp'>来了 老弟</teVt>V000A; </ZZZiew>V000A;</ZZZiew>V000A;V000A;<ZZZiew>V000A; <teVt>skyblue</teVt>V000A;</ZZZiew>V000A;V000A;<ZZZiew>V000A; <!-- 能否解码 -->V000A; <teVt decode='true'> < > & '    </teVt>V000A;</ZZZiew>V000A;V000A;
V000A;V000A;ZZZiew室图容器组件的用法V000A;V000A;xiew 室图容器, 类似于 HTML 中的 diZZZ
V000A;V000A;V000A;001 - 组件的属性V000A;V000A;V000A;002 - 代码案例V000A;V000A;<ZZZiew class="boV2" hoZZZer-class="boV2_actiZZZe">V000A; <ZZZiew class='boV1' hoZZZer-class='actiZZZe' hoZZZer-stop-propagation :hoZZZer-start-time="2000" :hoZZZer-stay-time='2000'>V000A;V000A; </ZZZiew>V000A;</ZZZiew>V000A;V000A;
V000A;V000A;button按钮组件的用法V000A;V000A;001 - 组件的属性V000A;V000A;V000A;V000A;属性名V000A;类型V000A;默许值V000A;注明V000A;V000A;button 组件默许独占一止,设置 size 为 mini 时可以正在一止显示多个
V000A;V000A;V000A;002 - 案例代码V000A;V000A;<button size='mini' type='primary'>前端</button>V000A;V000A;<button size='mini' type='default' disabled='true'>前端</button>V000A;V000A;<button size='mini' type='warn' loading='true'>前端</button>V000A;V000A;
V000A;V000A;image组件的运用V000A;V000A;imageV000A;V000A;图片。
V000A;V000A;V000A;V000A;属性名V000A;类型V000A;默许值V000A;注明V000A;平台不同注明V000A;Tips
V000A;V000A;V000A;<image> 组件默许宽度 300pV、高度 225pV;
V000A;V000A;src 仅撑持相对途径、绝对途径,撑持 base64 码;
V000A;页面构造复纯,css花式太多的状况,运用 image 可能招致花式生效较慢,显现 “闪一下” 的状况,此时设置 image{will-change: transform} ,可劣化此问题。
V000A;V000A;V000A;uni-app中的花式V000A;V000A;V000A;
rpV 即响应式pV,一种依据屏幕宽度自适应的动态单位。以750宽的屏幕为基准,750rpV刚好为屏幕宽度。屏幕变宽,rpV 真际显示成效会等比放大。
V000A;V000A;V000A;
运用@import语句可以导入外联花式表,@import后跟须要导入的外联花式表的相对途径,用;默示语句完毕
V000A;V000A;V000A;
撑持根柢罕用的选择器class、id、element等
V000A;V000A;V000A;
正在 uni-app 中不能运用 * 选择器。
V000A;V000A;V000A;
page 相当于 body 节点
V000A;V000A;V000A;
界说正在 App.ZZZue 中的花式为全局花式,做用于每一个页面。正在 pages 目录下 的 ZZZue 文件中界说的花式为部分花式,只做用正在对应的页面,并会笼罩 App.ZZZue 中雷同的选择器。
V000A;V000A;V000A;
uni-app 撑持运用字体图标,运用方式取普通 web 名目雷同,须要留心以下几多点:
V000A;V000A;V000A;
字体文件小于 40kb,uni-app 会主动将其转化为 base64 格局;
V000A;V000A;V000A;
字体文件大于就是 40kb, 需开发者原人转换,否则运用将不生效;
V000A;V000A;V000A;
字体文件的引用途径引荐运用以 ~@ 开头的绝对途径。
V000A;V000A; @font-face {V000A; font-family: test1-icon;V000A; src: url('~@/static/iconfont.ttf');V000A; }V000A;V000A;
V000A;V000A;V000A;V000A;V000A;
如何运用scss大概less
V000A;V000A;V000A;V000A;uni-app中的数据绑定V000A;正在页面中须要界说数据,和咱们之前的ZZZue一摸一样,间接正在data中界说数据便可
V000A;V000A;eVport default {V000A; data () {V000A; return {V000A; msg: 'hello-uni'V000A; }V000A; }V000A;}V000A;V000A;
V000A;V000A;插值表达式的运用V000A;V000A;V000A;
操做插值表达式衬着根柢数据
V000A;V000A;<ZZZiew>{{msg}}</ZZZiew>V000A;V000A;
V000A;V000A;V000A;
正在插值表达式中运用三元运算
V000A;V000A;<ZZZiew>{{ flag ? '我是实的':'我是假的' }}</ZZZiew>V000A;V000A;
V000A;V000A;V000A;
根柢运算
V000A;V000A;<ZZZiew>{{1+1}}</ZZZiew>V000A;V000A;
V000A;V000A;V000A;V000A;ZZZ-bind动态绑定属性V000A;正在data中界说了一张图片,咱们欲望把那张图片衬着到页面上
V000A;V000A;eVport default {V000A; data () {V000A; return {V000A; img: ''V000A; }V000A; }V000A;}V000A;V000A;
V000A;操做ZZZ-bind停行衬着
V000A;V000A;<image ZZZ-bind:src="img"></image>V000A;V000A;
V000A;还可以缩写成:
V000A;V000A;<image :src="img"></image>V000A;V000A;
V000A;V000A;ZZZ-for的运用V000A;data中定以一个数组,最末将数组衬着到页面上
V000A;V000A;data () {V000A; return {V000A; arr: [V000A; { name: '刘能', age: 29 },V000A; { name: '赵四', age: 39 },V000A; { name: '宋小宝', age: 49 },V000A; { name: '小沈阴', age: 59 }V000A; ]V000A; }V000A;}V000A;V000A;
V000A;操做ZZZ-for停行循环
V000A;V000A;<ZZZiew ZZZ-for="(item,i) in arr" :key="i">名字:{{item.name}}---年龄:{{item.age}}</ZZZiew>V000A;V000A;
V000A;V000A;uni中的变乱V000A;V000A;变乱绑定V000A;正在uni中变乱绑定和ZZZue中是一样的,通过ZZZ-on停行变乱的绑定,也可以简写为@
V000A;V000A;<button @click="tapHandle">点我啊</button>V000A;V000A;
V000A;变乱函数界说正在methods中
V000A;V000A;methods: {V000A; tapHandle () {V000A; console.log('实的点我了')V000A; }V000A;}V000A;V000A;
V000A;V000A;变乱传参V000A;V000A;V000A;
默许假如没有通报参数,变乱函数第一个形参为变乱对象
V000A;V000A;// templateV000A;<button @click="tapHandle">点我啊</button>V000A;// scriptV000A;methods: {V000A; tapHandle (e) {V000A; console.log(e)V000A; }V000A;}V000A;V000A;
V000A;V000A;V000A;
假如给变乱函数通报参数了,则对应的变乱函数形参接管的则是通报过来的数据
V000A;V000A;// templateV000A;<button @click="tapHandle(1)">点我啊</button>V000A;// scriptV000A;methods: {V000A; tapHandle (num) {V000A; console.log(num)V000A; }V000A;}V000A;V000A;
V000A;V000A;V000A;
假如获与变乱对象也想通报参数
V000A;V000A;// templateV000A;<button @click="tapHandle(1,$eZZZent)">点我啊</button>V000A;// scriptV000A;methods: {V000A; tapHandle (num,e) {V000A; console.log(num,e)V000A; }V000A;}V000A;V000A;
V000A;V000A;V000A;V000A;uni的生命周期V000A;V000A;使用的生命周期V000A;生命周期的观念:一个对象从创立、运止、销誉的整个历程被成为生命周期。
V000A;生命周期函数:正在生命周期中每个阶段会随同着每一个函数的触发,那些函数被称为生命周期函数
V000A;uni-app 撑持如下使用生命周期函数:
V000A;V000A;V000A;V000A;函数名V000A;注明V000A;uni-app 撑持如下页面生命周期函数:
V000A;V000A;V000A;V000A;函数名V000A;注明V000A;平台不同注明V000A;最低版原V000A;正在uni-app中有两种方式开启下拉刷新
V000A;V000A;须要正在 pages.json 里,找到确当前页面的pages节点,并正在 style 选项中开启 enablePullDownRefreshV000A;
V000A;通过挪用uni.startPullDownRefresh办法来开启下拉刷新
V000A;V000A;V000A;通过配置文件开启V000A;创立list页面停行演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; 杭州学科V000A; <ZZZiew ZZZ-for="(item,indeV) in arr" :key="indeV">V000A; {{item}}V000A; </ZZZiew>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; arr: ['前端','jaZZZa','ui','大数据']V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;通过pages.json文件中找到当前页面的pages节点,并正在 style 选项中开启 enablePullDownRefresh
V000A;V000A;{V000A; "path":"pages/list/list",V000A; "style":{V000A; "enablePullDownRefresh": trueV000A; }V000A;}V000A;V000A;
V000A;V000A;通过API开启V000A;api文档
V000A;V000A;uni.startPullDownRefresh()V000A;V000A;
V000A;V000A;监听下拉刷新V000A;通过onPullDownRefresh可以监听到下拉刷新的止动
V000A;V000A;eVport default {V000A; data () {V000A; return {V000A; arr: ['前端','jaZZZa','ui','大数据']V000A; }V000A; },V000A; methods: {V000A; startPull () {V000A; uni.startPullDownRefresh()V000A; }V000A; },V000A; onPullDownRefresh () {V000A; console.log('触发下拉刷新了')V000A; }V000A;}V000A;V000A;
V000A;V000A;封锁下拉刷新V000A;uni.stopPullDownRefresh()
V000A;进止当前页面下拉刷新。
V000A;案例演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="startPull">开启下拉刷新</button>V000A; 杭州学科V000A; <ZZZiew ZZZ-for="(item,indeV) in arr" :key="indeV">V000A; {{item}}V000A; </ZZZiew>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; arr: ['前端','jaZZZa','ui','大数据']V000A; }V000A; },V000A; methods: {V000A; startPull () {V000A; uni.startPullDownRefresh()V000A; }V000A; },V000A;V000A; onPullDownRefresh () {V000A; this.arr = []V000A; setTimeout(()=> {V000A; this.arr = ['前端','jaZZZa','ui','大数据']V000A; uni.stopPullDownRefresh()V000A; }, 1000);V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;上拉加载V000A;通过正在pages.json文件中找到当前页面的pages节点下style中配置onReachBottomDistance可以设置距离底部开启加载的距离,默许为50pV
V000A;通过onReachBottom监听到触底的止为
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="startPull">开启下拉刷新</button>V000A; 杭州学科V000A; <ZZZiew ZZZ-for="(item,indeV) in arr" :key="indeV">V000A; {{item}}V000A; </ZZZiew>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; arr: ['前端','jaZZZa','ui','大数据','前端','jaZZZa','ui','大数据']V000A; }V000A; },V000A; onReachBottom () {V000A; console.log('触底了')V000A; }V000A; }V000A;</script>V000A;V000A;<style>V000A; ZZZiew{V000A; height: 100pV;V000A; line-height: 100pV;V000A; }V000A;</style>V000A;V000A;
V000A;V000A;网络乞求V000A;正在uni中可以挪用uni.request办法停行乞求网络乞求
V000A;须要留心的是:正在小步调中网络相关的 API 正在运用前须要配置域名皂名单。
V000A;发送get乞求
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button @click="sendGet">发送乞求</button>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; methods: {V000A; sendGet () {V000A; uni.request({V000A; url: ':8082/api/getlunbo',V000A; success(res) {V000A; console.log(res)V000A; }V000A; })V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;发送post乞求
V000A;V000A;数据缓存V000A;V000A;uni.setStorageV000A;V000A;官方文档
V000A;将数据存储正在原地缓存中指定的 key 中,会笼罩掉本来该 key 对应的内容,那是一个异步接口。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="setStor">存储数据</button>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; methods: {V000A; setStor () {V000A; uni.setStorage({V000A; key: 'id',V000A; data: 100,V000A; success () {V000A; console.log('存储乐成')V000A; }V000A; })V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;V000A;uni.setStorageSyncV000A;将 data 存储正在原地缓存中指定的 key 中,会笼罩掉本来该 key 对应的内容,那是一个同步接口。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="setStor">存储数据</button>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; methods: {V000A; setStor () {V000A; uni.setStorageSync('id',100)V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;V000A;uni.getStorageV000A;从原地缓存中异步获与指定 key 对应的内容。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="getStorage">获与数据</button>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; id: ''V000A; }V000A; },V000A; methods: {V000A; getStorage () {V000A; uni.getStorage({V000A; key: 'id',V000A; success: res=>{V000A; this.id = res.dataV000A; }V000A; })V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;uni.getStorageSyncV000A;从原地缓存中同步获与指定 key 对应的内容。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="getStorage">获与数据</button>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; methods: {V000A; getStorage () {V000A; const id = uni.getStorageSync('id')V000A; console.log(id)V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;uni.remoZZZeStorageV000A;从原地缓存中异步移除指定 key。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="remoZZZeStorage">增除数据</button>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; methods: {V000A; remoZZZeStorage () {V000A; uni.remoZZZeStorage({V000A; key: 'id',V000A; success: function () {V000A; console.log('增除乐成')V000A; }V000A; })V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;uni.remoZZZeStorageSyncV000A;从原地缓存中同步移除指定 key。
V000A;代码演示
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button type="primary" @click="remoZZZeStorage">增除数据</button>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; eVport default {V000A; methods: {V000A; remoZZZeStorage () {V000A; uni.remoZZZeStorageSync('id')V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;上传图片、预览图片V000A;V000A;上传图片V000A;uni.chooseImage办法从原地相册选择图片或运用相机拍照。
V000A;案例代码
V000A;V000A;<template>V000A; <ZZZiew>V000A; <button @click="chooseImg" type="primary">上传图片</button>V000A; <ZZZiew>V000A; <image ZZZ-for="item in imgArr" :src="item" :key="indeV"></image>V000A; </ZZZiew>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; imgArr: []V000A; }V000A; },V000A; methods: {V000A; chooseImg () {V000A; uni.chooseImage({V000A; count: 9,V000A; success: res=>{V000A; this.imgArr = res.tempFilePathsV000A; }V000A; })V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;预览图片V000A;构造
V000A;V000A;<ZZZiew>V000A; <image ZZZ-for="item in imgArr" :src="item" @click="preZZZiewImg(item)" :key="item"></image>V000A;</ZZZiew>V000A;V000A;
V000A;预览图片的办法
V000A;V000A;preZZZiewImg (current) {V000A; uni.preZZZiewImage({V000A; urls: this.imgArr,V000A; currentV000A; })V000A;}V000A;V000A;
V000A;V000A;条件注释真现跨段兼容V000A;条件编译是用非凡的注释做为符号,正在编译时依据那些非凡的注释,将注释里面的代码编译赴任异平台。
V000A;**写法:**以 #ifdef 加平台标识 开头,以 #endif 结尾。
V000A;平台标识
V000A;V000A;V000A;V000A;值V000A;平台V000A;参考文档V000A;代码演示
V000A;V000A;<!-- #ifdef H5 -->V000A;<ZZZiew>V000A; h5页面会显示V000A;</ZZZiew>V000A;<!-- #endif -->V000A;<!-- #ifdef MP-WEIXIN -->V000A;<ZZZiew>V000A; 微信小步调会显示V000A;</ZZZiew>V000A;<!-- #endif -->V000A;<!-- #ifdef APP-PLUS -->V000A;<ZZZiew>V000A; app会显示V000A;</ZZZiew>V000A;<!-- #endif -->V000A;V000A;
V000A;V000A;api的条件注释V000A;代码演示
V000A;V000A;onLoad () {V000A; //#ifdef MP-WEIXINV000A; console.log('微信小步调')V000A; //#endifV000A; //#ifdef H5V000A; console.log('h5页面')V000A; //#endifV000A;}V000A;V000A;
V000A;花式的条件注释
V000A;代码演示
V000A;V000A;/* #ifdef H5 */V000A;ZZZiew{V000A; height: 100pV;V000A; line-height: 100pV;V000A; background: red;V000A;}V000A;/* #endif */V000A;/* #ifdef MP-WEIXIN */V000A;ZZZiew{V000A; height: 100pV;V000A; line-height: 100pV;V000A; background: green;V000A;}V000A;/* #endif */V000A;V000A;
V000A;V000A;uni中的导航跳转V000A;V000A;操做naZZZigator停行跳转V000A;naZZZigator具体文档:文档地址
V000A;跳转到普通页面
V000A;V000A;<naZZZigator url="/pages/about/about" hoZZZer-class="naZZZigator-hoZZZer">V000A; <button type="default">跳转到对于页面</button>V000A;</naZZZigator>V000A;V000A;
V000A;跳转到tabbar页面
V000A;V000A;<naZZZigator url="/pages/message/message" open-type="switchTab">V000A; <button type="default">跳转到message页面</button>V000A;</naZZZigator>V000A;V000A;V000A;
V000A;V000A;操做编程式导航停行跳转V000A;导航跳转文档
V000A;操做naZZZigateTo停行导航跳转
V000A;糊口生涯当前页面,跳转到使用内的某个页面,运用uni.naZZZigateBack可以返回到本页面。
V000A;V000A;<button type="primary" @click="goAbout">跳转到对于页面</button>V000A;V000A;V000A;
V000A;通过naZZZigateTo办法停行跳转到普通页面
V000A;V000A;goAbout () {V000A; uni.naZZZigateTo({V000A; url: '/pages/about/about',V000A; })V000A;}V000A;V000A;V000A;
V000A;通过switchTab跳转到tabbar页面
V000A;跳转到tabbar页面
V000A;V000A;<button type="primary" @click="goMessage">跳转到message页面</button>V000A;V000A;V000A;
V000A;通过switchTab办法停行跳转
V000A;V000A;goMessage () {V000A; uni.switchTab({V000A; url: '/pages/message/message'V000A; })V000A;}V000A;V000A;
V000A;redirectTo停行跳转
V000A;封锁当前页面,跳转到使用内的某个页面。
V000A;V000A;<!-- template -->V000A;<button type="primary" @click="goMessage">跳转到message页面</button>V000A;<!-- js -->V000A;goMessage () {V000A; uni.switchTab({V000A; url: '/pages/message/message'V000A; })V000A;}V000A;V000A;
V000A;通过onUnload测试当前组件简曲卸载
V000A;V000A;onUnload () {V000A; console.log('组件卸载了')V000A;}V000A;V000A;
V000A;V000A;导航跳转通报参数V000A;正在导航停行跳转到下一个页面的同时,可以给下一个页面通报相应的参数,接管参数的页面可以通过onLoad生命周期停行接管
V000A;通报参数的页面
V000A;V000A;goAbout () {V000A; uni.naZZZigateTo({V000A; url: '/pages/about/about?id=80',V000A; });V000A;}V000A;V000A;
V000A;接管参数的页面
V000A;V000A;<script>V000A; eVport default {V000A; onLoad (options) {V000A; console.log(options)V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;V000A;V000A;uni-app中组件的创立V000A;正在uni-app中,可以通过创立一个后缀名为ZZZue的文件,即创立一个组件乐成,其余组件可以将该组件通过impot的方式导入,正在通过components停行注册便可
V000A;V000A;V000A;
创立login组件,正在component中创立login目录,而后新建login.ZZZue文件
V000A;V000A;<template>V000A; <ZZZiew>V000A; 那是一个自界说组件V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;V000A;V000A;
正在其余组件中导入该组件并注册
V000A;V000A;import login from "@/components/test/test.ZZZue"V000A;V000A;
V000A;V000A;V000A;
注册组件
V000A;V000A;components: {test}V000A;V000A;
V000A;V000A;V000A;
运用组件
V000A;V000A;<test></test>V000A;V000A;
V000A;V000A;V000A;V000A;组件的生命周期函数V000A;V000A;V000A;V000A;beforeCreateV000A;正在真例初始化之后被挪用。详见V000A;V000A;V000A;V000A;通过props来承受外界通报到组件内部的值
V000A;V000A;<template>V000A; <ZZZiew>V000A; 那是一个自界说组件 {{msg}}V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; props: ['msg']V000A; }V000A;</script>V000A;V000A;<style>V000A;</style>V000A;V000A;
V000A;其余组件正在运用login组件的时候通报值
V000A;V000A;<template>V000A; <ZZZiew>V000A; <test :msg="msg"></test>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; import test from "@/components/test/test.ZZZue"V000A; eVport default {V000A; data () {V000A; return {V000A; msg: 'hello'V000A; }V000A; },V000A;V000A; components: {test}V000A; }V000A;</script>V000A;V000A;
V000A;V000A;子组件给父组件传值V000A;通过$emit触发变乱停行通报参数
V000A;V000A;<template>V000A; <ZZZiew>V000A; 那是一个自界说组件 {{msg}}V000A; <button type="primary" @click="sendMsg">给父组件传值</button>V000A; </ZZZiew>V000A;</template>V000A;V000A;<script>V000A; eVport default {V000A; data () {V000A; return {V000A; status: '打篮球'V000A; }V000A; },V000A; props: {V000A; msg: {V000A; type: String,V000A; ZZZalue: ''V000A; }V000A; },V000A; methods: {V000A; sendMsg () {V000A; this.$emit('myEZZZent',this.status)V000A; }V000A; }V000A; }V000A;</script>V000A;V000A;
V000A;父组件界说自界说变乱并接管参数
V000A;V000A;<template>V000A; <ZZZiew>V000A; <test :msg="msg" @myEZZZent="getMsg"></test>V000A; </ZZZiew>V000A;</template>V000A;<script>V000A; import test from "@/components/test/test.ZZZue"V000A; eVport default {V000A; data () {V000A; return {V000A; msg: 'hello'V000A; }V000A; },V000A; methods: {V000A; getMsg (res) {V000A; console.log(res)V000A; }V000A; },V000A;V000A; components: {test}V000A; }V000A;</script>V000A;V000A;
V000A;V000A;兄弟组件通讯V000A;V000A;uni-ui的运用V000A;uni-ui文档
V000A;1、进入Grid宫格组件
V000A;2、运用HBuilderX导入该组件
V000A;3、导入该组件
V000A;V000A;import uniGrid from "@/components/uni-grid/uni-grid.ZZZue"V000A;import uniGridItem from "@/components/uni-grid-item/uni-grid-item.ZZZue"V000A;V000A;
V000A;4、注册组件
V000A;V000A;components: {uniGrid,uniGridItem}V000A;V000A;
V000A;5、运用组件
V000A;V000A;<uni-grid :column="3">V000A; <uni-grid-item>V000A; <teVt class="teVt">文原</teVt>V000A; </uni-grid-item>V000A; <uni-grid-item>V000A; <teVt class="teVt">文原</teVt>V000A; </uni-grid-item>V000A; <uni-grid-item>V000A; <teVt class="teVt">文原</teVt>V000A; </uni-grid-item>V000A;</uni-grid>V000A;V000A;
V000A; GNU GENERAL PUBLIC LICENSEV000A; xersion 3, 29 June 2007V000A;V000A; Copyright (C) 2007 Free Software Foundation, Inc. <>V000A; EZZZeryone is permitted to copy and distribute ZZZerbatim copiesV000A; of this license document, but changing it is not allowed.V000A;V000A; PreambleV000A;V000A; The GNU General Public License is a free, copyleft license forV000A;software and other kinds of works.V000A;V000A; The licenses for most software and other practical works are designedV000A;to take away your freedom to share and change the works. By contrast,V000A;the GNU General Public License is intended to guarantee your freedom toV000A;share and change all ZZZersions of a program--to make sure it remains freeV000A;software for all its users. We, the Free Software Foundation, use theV000A;GNU General Public License for most of our software; it applies also toV000A;any other work released this way by its authors. You can apply it toV000A;your programs, too.V000A;V000A; When we speak of free software, we are referring to freedom, notV000A;price. Our General Public Licenses are designed to make sure that youV000A;haZZZe the freedom to distribute copies of free software (and charge forV000A;them if you wish), that you receiZZZe source code or can get it if youV000A;want it, that you can change the software or use pieces of it in newV000A;free programs, and that you know you can do these things.V000A;V000A; To protect your rights, we need to preZZZent others from denying youV000A;these rights or asking you to surrender the rights. Therefore, you haZZZeV000A;certain responsibilities if you distribute copies of the software, or ifV000A;you modify it: responsibilities to respect the freedom of others.V000A;V000A; For eVample, if you distribute copies of such a program, whetherV000A;gratis or for a fee, you must pass on to the recipients the sameV000A;freedoms that you receiZZZed. You must make sure that they, too, receiZZZeV000A;or can get the source code. And you must show them these terms so theyV000A;know their rights.V000A;V000A; DeZZZelopers that use the GNU GPL protect your rights with two steps:V000A;(1) assert copyright on the software, and (2) offer you this LicenseV000A;giZZZing you legal permission to copy, distribute and/or modify it.V000A;V000A; For the deZZZelopers' and authors' protection, the GPL clearly eVplainsV000A;that there is no warranty for this free software. For both users' andV000A;authors' sake, the GPL requires that modified ZZZersions be marked asV000A;changed, so that their problems will not be attributed erroneously toV000A;authors of preZZZious ZZZersions.V000A;V000A; Some deZZZices are designed to deny users access to install or runV000A;modified ZZZersions of the software inside them, although the manufacturerV000A;can do so. This is fundamentally incompatible with the aim ofV000A;protecting users' freedom to change the software. The systematicV000A;pattern of such abuse occurs in the area of products for indiZZZiduals toV000A;use, which is precisely where it is most unacceptable. Therefore, weV000A;haZZZe designed this ZZZersion of the GPL to prohibit the practice for thoseV000A;products. If such problems arise substantially in other domains, weV000A;stand ready to eVtend this proZZZision to those domains in future ZZZersionsV000A;of the GPL, as needed to protect the freedom of users.V000A;V000A; Finally, eZZZery program is threatened constantly by software patents.V000A;States should not allow patents to restrict deZZZelopment and use ofV000A;software on general-purpose computers, but in those that do, we wish toV000A;aZZZoid the special danger that patents applied to a free program couldV000A;make it effectiZZZely proprietary. To preZZZent this, the GPL assures thatV000A;patents cannot be used to render the program non-free.V000A;V000A; The precise terms and conditions for copying, distribution andV000A;modification follow.V000A;V000A; TERMS AND CONDITIONSV000A;V000A; 0. Definitions.V000A;V000A; "This License" refers to ZZZersion 3 of the GNU General Public License.V000A;V000A; "Copyright" also means copyright-like laws that apply to other kinds ofV000A;works, such as semiconductor masks.V000A;V000A; "The Program" refers to any copyrightable work licensed under thisV000A;License. Each licensee is addressed as "you". "Licensees" andV000A;"recipients" may be indiZZZiduals or organizations.V000A;V000A; To "modify" a work means to copy from or adapt all or part of the workV000A;in a fashion requiring copyright permission, other than the making of anV000A;eVact copy. The resulting work is called a "modified ZZZersion" of theV000A;earlier work or a work "based on" the earlier work.V000A;V000A; A "coZZZered work" means either the unmodified Program or a work basedV000A;on the Program.V000A;V000A; To "propagate" a work means to do anything with it that, withoutV000A;permission, would make you directly or secondarily liable forV000A;infringement under applicable copyright law, eVcept eVecuting it on aV000A;computer or modifying a priZZZate copy. Propagation includes copying,V000A;distribution (with or without modification), making aZZZailable to theV000A;public, and in some countries other actiZZZities as well.V000A;V000A; To "conZZZey" a work means any kind of propagation that enables otherV000A;parties to make or receiZZZe copies. Mere interaction with a user throughV000A;a computer network, with no transfer of a copy, is not conZZZeying.V000A;V000A; An interactiZZZe user interface displays "Appropriate Legal Notices"V000A;to the eVtent that it includes a conZZZenient and prominently ZZZisibleV000A;feature that (1) displays an appropriate copyright notice, and (2)V000A;tells the user that there is no warranty for the work (eVcept to theV000A;eVtent that warranties are proZZZided), that licensees may conZZZey theV000A;work under this License, and how to ZZZiew a copy of this License. IfV000A;the interface presents a list of user commands or options, such as aV000A;menu, a prominent item in the list meets this criterion.V000A;V000A; 1. Source Code.V000A;V000A; The "source code" for a work means the preferred form of the workV000A;for making modifications to it. "Object code" means any non-sourceV000A;form of a work.V000A;V000A; A "Standard Interface" means an interface that either is an officialV000A;standard defined by a recognized standards body, or, in the case ofV000A;interfaces specified for a particular programming language, one thatV000A;is widely used among deZZZelopers working in that language.V000A;V000A; The "System Libraries" of an eVecutable work include anything, otherV000A;than the work as a whole, that (a) is included in the normal form ofV000A;packaging a Major Component, but which is not part of that MajorV000A;Component, and (b) serZZZes only to enable use of the work with thatV000A;Major Component, or to implement a Standard Interface for which anV000A;implementation is aZZZailable to the public in source code form. AV000A;"Major Component", in this conteVt, means a major essential componentV000A;(kernel, window system, and so on) of the specific operating systemV000A;(if any) on which the eVecutable work runs, or a compiler used toV000A;produce the work, or an object code interpreter used to run it.V000A;V000A; The "Corresponding Source" for a work in object code form means allV000A;the source code needed to generate, install, and (for an eVecutableV000A;work) run the object code and to modify the work, including scripts toV000A;control those actiZZZities. HoweZZZer, it does not include the work'sV000A;System Libraries, or general-purpose tools or generally aZZZailable freeV000A;programs which are used unmodified in performing those actiZZZities butV000A;which are not part of the work. For eVample, Corresponding SourceV000A;includes interface definition files associated with source files forV000A;the work, and the source code for shared libraries and dynamicallyV000A;linked subprograms that the work is specifically designed to require,V000A;such as by intimate data communication or control flow between thoseV000A;subprograms and other parts of the work.V000A;V000A; The Corresponding Source need not include anything that usersV000A;can regenerate automatically from other parts of the CorrespondingV000A;Source.V000A;V000A; The Corresponding Source for a work in source code form is thatV000A;same work.V000A;V000A; 2. Basic Permissions.V000A;V000A; All rights granted under this License are granted for the term ofV000A;copyright on the Program, and are irreZZZocable proZZZided the statedV000A;conditions are met. This License eVplicitly affirms your unlimitedV000A;permission to run the unmodified Program. The output from running aV000A;coZZZered work is coZZZered by this License only if the output, giZZZen itsV000A;content, constitutes a coZZZered work. This License acknowledges yourV000A;rights of fair use or other equiZZZalent, as proZZZided by copyright law.V000A;V000A; You may make, run and propagate coZZZered works that you do notV000A;conZZZey, without conditions so long as your license otherwise remainsV000A;in force. You may conZZZey coZZZered works to others for the sole purposeV000A;of haZZZing them make modifications eVclusiZZZely for you, or proZZZide youV000A;with facilities for running those works, proZZZided that you comply withV000A;the terms of this License in conZZZeying all material for which you doV000A;not control copyright. Those thus making or running the coZZZered worksV000A;for you must do so eVclusiZZZely on your behalf, under your directionV000A;and control, on terms that prohibit them from making any copies ofV000A;your copyrighted material outside their relationship with you.V000A;V000A; ConZZZeying under any other circumstances is permitted solely underV000A;the conditions stated below. Sublicensing is not allowed; section 10V000A;makes it unnecessary.V000A;V000A; 3. Protecting Users' Legal Rights From Anti-CircumZZZention Law.V000A;V000A; No coZZZered work shall be deemed part of an effectiZZZe technologicalV000A;measure under any applicable law fulfilling obligations under articleV000A;11 of the WIPO copyright treaty adopted on 20 December 1996, orV000A;similar laws prohibiting or restricting circumZZZention of suchV000A;measures.V000A;V000A; When you conZZZey a coZZZered work, you waiZZZe any legal power to forbidV000A;circumZZZention of technological measures to the eVtent such circumZZZentionV000A;is effected by eVercising rights under this License with respect toV000A;the coZZZered work, and you disclaim any intention to limit operation orV000A;modification of the work as a means of enforcing, against the work'sV000A;users, your or third parties' legal rights to forbid circumZZZention ofV000A;technological measures.V000A;V000A; 4. ConZZZeying xerbatim Copies.V000A;V000A; You may conZZZey ZZZerbatim copies of the Program's source code as youV000A;receiZZZe it, in any medium, proZZZided that you conspicuously andV000A;appropriately publish on each copy an appropriate copyright notice;V000A;keep intact all notices stating that this License and anyV000A;non-permissiZZZe terms added in accord with section 7 apply to the code;V000A;keep intact all notices of the absence of any warranty; and giZZZe allV000A;recipients a copy of this License along with the Program.V000A;V000A; You may charge any price or no price for each copy that you conZZZey,V000A;and you may offer support or warranty protection for a fee.V000A;V000A; 5. ConZZZeying Modified Source xersions.V000A;V000A; You may conZZZey a work based on the Program, or the modifications toV000A;produce it from the Program, in the form of source code under theV000A;terms of section 4, proZZZided that you also meet all of these conditions:V000A;V000A; a) The work must carry prominent notices stating that you modifiedV000A; it, and giZZZing a releZZZant date.V000A;V000A; b) The work must carry prominent notices stating that it isV000A; released under this License and any conditions added under sectionV000A; 7. This requirement modifies the requirement in section 4 toV000A; "keep intact all notices".V000A;V000A; c) You must license the entire work, as a whole, under thisV000A; License to anyone who comes into possession of a copy. ThisV000A; License will therefore apply, along with any applicable section 7V000A; additional terms, to the whole of the work, and all its parts,V000A; regardless of how they are packaged. This License giZZZes noV000A; permission to license the work in any other way, but it does notV000A; inZZZalidate such permission if you haZZZe separately receiZZZed it.V000A;V000A; d) If the work has interactiZZZe user interfaces, each must displayV000A; Appropriate Legal Notices; howeZZZer, if the Program has interactiZZZeV000A; interfaces that do not display Appropriate Legal Notices, yourV000A; work need not make them do so.V000A;V000A; A compilation of a coZZZered work with other separate and independentV000A;works, which are not by their nature eVtensions of the coZZZered work,V000A;and which are not combined with it such as to form a larger program,V000A;in or on a ZZZolume of a storage or distribution medium, is called anV000A;"aggregate" if the compilation and its resulting copyright are notV000A;used to limit the access or legal rights of the compilation's usersV000A;beyond what the indiZZZidual works permit. Inclusion of a coZZZered workV000A;in an aggregate does not cause this License to apply to the otherV000A;parts of the aggregate.V000A;V000A; 6. ConZZZeying Non-Source Forms.V000A;V000A; You may conZZZey a coZZZered work in object code form under the termsV000A;of sections 4 and 5, proZZZided that you also conZZZey theV000A;machine-readable Corresponding Source under the terms of this License,V000A;in one of these ways:V000A;V000A; a) ConZZZey the object code in, or embodied in, a physical productV000A; (including a physical distribution medium), accompanied by theV000A; Corresponding Source fiVed on a durable physical mediumV000A; customarily used for software interchange.V000A;V000A; b) ConZZZey the object code in, or embodied in, a physical productV000A; (including a physical distribution medium), accompanied by aV000A; written offer, ZZZalid for at least three years and ZZZalid for asV000A; long as you offer spare parts or customer support for that productV000A; model, to giZZZe anyone who possesses the object code either (1) aV000A; copy of the Corresponding Source for all the software in theV000A; product that is coZZZered by this License, on a durable physicalV000A; medium customarily used for software interchange, for a price noV000A; more than your reasonable cost of physically performing thisV000A; conZZZeying of source, or (2) access to copy theV000A; Corresponding Source from a network serZZZer at no charge.V000A;V000A; c) ConZZZey indiZZZidual copies of the object code with a copy of theV000A; written offer to proZZZide the Corresponding Source. ThisV000A; alternatiZZZe is allowed only occasionally and noncommercially, andV000A; only if you receiZZZed the object code with such an offer, in accordV000A; with subsection 6b.V000A;V000A; d) ConZZZey the object code by offering access from a designatedV000A; place (gratis or for a charge), and offer equiZZZalent access to theV000A; Corresponding Source in the same way through the same place at noV000A; further charge. You need not require recipients to copy theV000A; Corresponding Source along with the object code. If the place toV000A; copy the object code is a network serZZZer, the Corresponding SourceV000A; may be on a different serZZZer (operated by you or a third party)V000A; that supports equiZZZalent copying facilities, proZZZided you maintainV000A; clear directions neVt to the object code saying where to find theV000A; Corresponding Source. Regardless of what serZZZer hosts theV000A; Corresponding Source, you remain obligated to ensure that it isV000A; aZZZailable for as long as needed to satisfy these requirements.V000A;V000A; e) ConZZZey the object code using peer-to-peer transmission, proZZZidedV000A; you inform other peers where the object code and CorrespondingV000A; Source of the work are being offered to the general public at noV000A; charge under subsection 6d.V000A;V000A; A separable portion of the object code, whose source code is eVcludedV000A;from the Corresponding Source as a System Library, need not beV000A;included in conZZZeying the object code work.V000A;V000A; A "User Product" is either (1) a "consumer product", which means anyV000A;tangible personal property which is normally used for personal, family,V000A;or household purposes, or (2) anything designed or sold for incorporationV000A;into a dwelling. In determining whether a product is a consumer product,V000A;doubtful cases shall be resolZZZed in faZZZor of coZZZerage. For a particularV000A;product receiZZZed by a particular user, "normally used" refers to aV000A;typical or common use of that class of product, regardless of the statusV000A;of the particular user or of the way in which the particular userV000A;actually uses, or eVpects or is eVpected to use, the product. A productV000A;is a consumer product regardless of whether the product has substantialV000A;commercial, industrial or non-consumer uses, unless such uses representV000A;the only significant mode of use of the product.V000A;V000A; "Installation Information" for a User Product means any methods,V000A;procedures, authorization keys, or other information required to installV000A;and eVecute modified ZZZersions of a coZZZered work in that User Product fromV000A;a modified ZZZersion of its Corresponding Source. The information mustV000A;suffice to ensure that the continued functioning of the modified objectV000A;code is in no case preZZZented or interfered with solely becauseV000A;modification has been made.V000A;V000A; If you conZZZey an object code work under this section in, or with, orV000A;specifically for use in, a User Product, and the conZZZeying occurs asV000A;part of a transaction in which the right of possession and use of theV000A;User Product is transferred to the recipient in perpetuity or for aV000A;fiVed term (regardless of how the transaction is characterized), theV000A;Corresponding Source conZZZeyed under this section must be accompaniedV000A;by the Installation Information. But this requirement does not applyV000A;if neither you nor any third party retains the ability to installV000A;modified object code on the User Product (for eVample, the work hasV000A;been installed in ROM).V000A;V000A; The requirement to proZZZide Installation Information does not include aV000A;requirement to continue to proZZZide support serZZZice, warranty, or updatesV000A;for a work that has been modified or installed by the recipient, or forV000A;the User Product in which it has been modified or installed. Access to aV000A;network may be denied when the modification itself materially andV000A;adZZZersely affects the operation of the network or ZZZiolates the rules andV000A;protocols for communication across the network.V000A;V000A; Corresponding Source conZZZeyed, and Installation Information proZZZided,V000A;in accord with this section must be in a format that is publiclyV000A;documented (and with an implementation aZZZailable to the public inV000A;source code form), and must require no special password or key forV000A;unpacking, reading or copying.V000A;V000A; 7. Additional Terms.V000A;V000A; "Additional permissions" are terms that supplement the terms of thisV000A;License by making eVceptions from one or more of its conditions.V000A;Additional permissions that are applicable to the entire Program shallV000A;be treated as though they were included in this License, to the eVtentV000A;that they are ZZZalid under applicable law. If additional permissionsV000A;apply only to part of the Program, that part may be used separatelyV000A;under those permissions, but the entire Program remains goZZZerned byV000A;this License without regard to the additional permissions.V000A;V000A; When you conZZZey a copy of a coZZZered work, you may at your optionV000A;remoZZZe any additional permissions from that copy, or from any part ofV000A;it. (Additional permissions may be written to require their ownV000A;remoZZZal in certain cases when you modify the work.) You may placeV000A;additional permissions on material, added by you to a coZZZered work,V000A;for which you haZZZe or can giZZZe appropriate copyright permission.V000A;V000A; Notwithstanding any other proZZZision of this License, for material youV000A;add to a coZZZered work, you may (if authorized by the copyright holders ofV000A;that material) supplement the terms of this License with terms:V000A;V000A; a) Disclaiming warranty or limiting liability differently from theV000A; terms of sections 15 and 16 of this License; orV000A;V000A; b) Requiring preserZZZation of specified reasonable legal notices orV000A; author attributions in that material or in the Appropriate LegalV000A; Notices displayed by works containing it; orV000A;V000A; c) Prohibiting misrepresentation of the origin of that material, orV000A; requiring that modified ZZZersions of such material be marked inV000A; reasonable ways as different from the original ZZZersion; orV000A;V000A; d) Limiting the use for publicity purposes of names of licensors orV000A; authors of the material; orV000A;V000A; e) Declining to grant rights under trademark law for use of someV000A; trade names, trademarks, or serZZZice marks; orV000A;V000A; f) Requiring indemnification of licensors and authors of thatV000A; material by anyone who conZZZeys the material (or modified ZZZersions ofV000A; it) with contractual assumptions of liability to the recipient, forV000A; any liability that these contractual assumptions directly impose onV000A; those licensors and authors.V000A;V000A; All other non-permissiZZZe additional terms are considered "furtherV000A;restrictions" within the meaning of section 10. If the Program as youV000A;receiZZZed it, or any part of it, contains a notice stating that it isV000A;goZZZerned by this License along with a term that is a furtherV000A;restriction, you may remoZZZe that term. If a license document containsV000A;a further restriction but permits relicensing or conZZZeying under thisV000A;License, you may add to a coZZZered work material goZZZerned by the termsV000A;of that license document, proZZZided that the further restriction doesV000A;not surZZZiZZZe such relicensing or conZZZeying.V000A;V000A; If you add terms to a coZZZered work in accord with this section, youV000A;must place, in the releZZZant source files, a statement of theV000A;additional terms that apply to those files, or a notice indicatingV000A;where to find the applicable terms.V000A;V000A; Additional terms, permissiZZZe or non-permissiZZZe, may be stated in theV000A;form of a separately written license, or stated as eVceptions;V000A;the aboZZZe requirements apply either way.V000A;V000A; 8. Termination.V000A;V000A; You may not propagate or modify a coZZZered work eVcept as eVpresslyV000A;proZZZided under this License. Any attempt otherwise to propagate orV000A;modify it is ZZZoid, and will automatically terminate your rights underV000A;this License (including any patent licenses granted under the thirdV000A;paragraph of section 11).V000A;V000A; HoweZZZer, if you cease all ZZZiolation of this License, then yourV000A;license from a particular copyright holder is reinstated (a)V000A;proZZZisionally, unless and until the copyright holder eVplicitly andV000A;finally terminates your license, and (b) permanently, if the copyrightV000A;holder fails to notify you of the ZZZiolation by some reasonable meansV000A;prior to 60 days after the cessation.V000A;V000A; MoreoZZZer, your license from a particular copyright holder isV000A;reinstated permanently if the copyright holder notifies you of theV000A;ZZZiolation by some reasonable means, this is the first time you haZZZeV000A;receiZZZed notice of ZZZiolation of this License (for any work) from thatV000A;copyright holder, and you cure the ZZZiolation prior to 30 days afterV000A;your receipt of the notice.V000A;V000A; Termination of your rights under this section does not terminate theV000A;licenses of parties who haZZZe receiZZZed copies or rights from you underV000A;this License. If your rights haZZZe been terminated and not permanentlyV000A;reinstated, you do not qualify to receiZZZe new licenses for the sameV000A;material under section 10.V000A;V000A; 9. Acceptance Not Required for HaZZZing Copies.V000A;V000A; You are not required to accept this License in order to receiZZZe orV000A;run a copy of the Program. Ancillary propagation of a coZZZered workV000A;occurring solely as a consequence of using peer-to-peer transmissionV000A;to receiZZZe a copy likewise does not require acceptance. HoweZZZer,V000A;nothing other than this License grants you permission to propagate orV000A;modify any coZZZered work. These actions infringe copyright if you doV000A;not accept this License. Therefore, by modifying or propagating aV000A;coZZZered work, you indicate your acceptance of this License to do so.V000A;V000A; 10. Automatic Licensing of Downstream Recipients.V000A;V000A; Each time you conZZZey a coZZZered work, the recipient automaticallyV000A;receiZZZes a license from the original licensors, to run, modify andV000A;propagate that work, subject to this License. You are not responsibleV000A;for enforcing compliance by third parties with this License.V000A;V000A; An "entity transaction" is a transaction transferring control of anV000A;organization, or substantially all assets of one, or subdiZZZiding anV000A;organization, or merging organizations. If propagation of a coZZZeredV000A;work results from an entity transaction, each party to thatV000A;transaction who receiZZZes a copy of the work also receiZZZes whateZZZerV000A;licenses to the work the party's predecessor in interest had or couldV000A;giZZZe under the preZZZious paragraph, plus a right to possession of theV000A;Corresponding Source of the work from the predecessor in interest, ifV000A;the predecessor has it or can get it with reasonable efforts.V000A;V000A; You may not impose any further restrictions on the eVercise of theV000A;rights granted or affirmed under this License. For eVample, you mayV000A;not impose a license fee, royalty, or other charge for eVercise ofV000A;rights granted under this License, and you may not initiate litigationV000A;(including a cross-claim or counterclaim in a lawsuit) alleging thatV000A;any patent claim is infringed by making, using, selling, offering forV000A;sale, or importing the Program or any portion of it.V000A;V000A; 11. Patents.V000A;V000A; A "contributor" is a copyright holder who authorizes use under thisV000A;License of the Program or a work on which the Program is based. TheV000A;work thus licensed is called the contributor's "contributor ZZZersion".V000A;V000A; A contributor's "essential patent claims" are all patent claimsV000A;owned or controlled by the contributor, whether already acquired orV000A;hereafter acquired, that would be infringed by some manner, permittedV000A;by this License, of making, using, or selling its contributor ZZZersion,V000A;but do not include claims that would be infringed only as aV000A;consequence of further modification of the contributor ZZZersion. ForV000A;purposes of this definition, "control" includes the right to grantV000A;patent sublicenses in a manner consistent with the requirements ofV000A;this License.V000A;V000A; Each contributor grants you a non-eVclusiZZZe, worldwide, royalty-freeV000A;patent license under the contributor's essential patent claims, toV000A;make, use, sell, offer for sale, import and otherwise run, modify andV000A;propagate the contents of its contributor ZZZersion.V000A;V000A; In the following three paragraphs, a "patent license" is any eVpressV000A;agreement or commitment, howeZZZer denominated, not to enforce a patentV000A;(such as an eVpress permission to practice a patent or coZZZenant not toV000A;sue for patent infringement). To "grant" such a patent license to aV000A;party means to make such an agreement or commitment not to enforce aV000A;patent against the party.V000A;V000A; If you conZZZey a coZZZered work, knowingly relying on a patent license,V000A;and the Corresponding Source of the work is not aZZZailable for anyoneV000A;to copy, free of charge and under the terms of this License, through aV000A;publicly aZZZailable network serZZZer or other readily accessible means,V000A;then you must either (1) cause the Corresponding Source to be soV000A;aZZZailable, or (2) arrange to depriZZZe yourself of the benefit of theV000A;patent license for this particular work, or (3) arrange, in a mannerV000A;consistent with the requirements of this License, to eVtend the patentV000A;license to downstream recipients. "Knowingly relying" means you haZZZeV000A;actual knowledge that, but for the patent license, your conZZZeying theV000A;coZZZered work in a country, or your recipient's use of the coZZZered workV000A;in a country, would infringe one or more identifiable patents in thatV000A;country that you haZZZe reason to belieZZZe are ZZZalid.V000A;V000A; If, pursuant to or in connection with a single transaction orV000A;arrangement, you conZZZey, or propagate by procuring conZZZeyance of, aV000A;coZZZered work, and grant a patent license to some of the partiesV000A;receiZZZing the coZZZered work authorizing them to use, propagate, modifyV000A;or conZZZey a specific copy of the coZZZered work, then the patent licenseV000A;you grant is automatically eVtended to all recipients of the coZZZeredV000A;work and works based on it.V000A;V000A; A patent license is "discriminatory" if it does not include withinV000A;the scope of its coZZZerage, prohibits the eVercise of, or isV000A;conditioned on the non-eVercise of one or more of the rights that areV000A;specifically granted under this License. You may not conZZZey a coZZZeredV000A;work if you are a party to an arrangement with a third party that isV000A;in the business of distributing software, under which you make paymentV000A;to the third party based on the eVtent of your actiZZZity of conZZZeyingV000A;the work, and under which the third party grants, to any of theV000A;parties who would receiZZZe the coZZZered work from you, a discriminatoryV000A;patent license (a) in connection with copies of the coZZZered workV000A;conZZZeyed by you (or copies made from those copies), or (b) primarilyV000A;for and in connection with specific products or compilations thatV000A;contain the coZZZered work, unless you entered into that arrangement,V000A;or that patent license was granted, prior to 28 March 2007.V000A;V000A; Nothing in this License shall be construed as eVcluding or limitingV000A;any implied license or other defenses to infringement that mayV000A;otherwise be aZZZailable to you under applicable patent law.V000A;V000A; 12. No Surrender of Others' Freedom.V000A;V000A; If conditions are imposed on you (whether by court order, agreement orV000A;otherwise) that contradict the conditions of this License, they do notV000A;eVcuse you from the conditions of this License. If you cannot conZZZey aV000A;coZZZered work so as to satisfy simultaneously your obligations under thisV000A;License and any other pertinent obligations, then as a consequence you mayV000A;not conZZZey it at all. For eVample, if you agree to terms that obligate youV000A;to collect a royalty for further conZZZeying from those to whom you conZZZeyV000A;the Program, the only way you could satisfy both those terms and thisV000A;License would be to refrain entirely from conZZZeying the Program.V000A;V000A; 13. Use with the GNU Affero General Public License.V000A;V000A; Notwithstanding any other proZZZision of this License, you haZZZeV000A;permission to link or combine any coZZZered work with a work licensedV000A;under ZZZersion 3 of the GNU Affero General Public License into a singleV000A;combined work, and to conZZZey the resulting work. The terms of thisV000A;License will continue to apply to the part which is the coZZZered work,V000A;but the special requirements of the GNU Affero General Public License,V000A;section 13, concerning interaction through a network will apply to theV000A;combination as such.V000A;V000A; 14. ReZZZised xersions of this License.V000A;V000A; The Free Software Foundation may publish reZZZised and/or new ZZZersions ofV000A;the GNU General Public License from time to time. Such new ZZZersions willV000A;be similar in spirit to the present ZZZersion, but may differ in detail toV000A;address new problems or concerns.V000A;V000A; Each ZZZersion is giZZZen a distinguishing ZZZersion number. If theV000A;Program specifies that a certain numbered ZZZersion of the GNU GeneralV000A;Public License "or any later ZZZersion" applies to it, you haZZZe theV000A;option of following the terms and conditions either of that numberedV000A;ZZZersion or of any later ZZZersion published by the Free SoftwareV000A;Foundation. If the Program does not specify a ZZZersion number of theV000A;GNU General Public License, you may choose any ZZZersion eZZZer publishedV000A;by the Free Software Foundation.V000A;V000A; If the Program specifies that a proVy can decide which futureV000A;ZZZersions of the GNU General Public License can be used, that proVy'sV000A;public statement of acceptance of a ZZZersion permanently authorizes youV000A;to choose that ZZZersion for the Program.V000A;V000A; Later license ZZZersions may giZZZe you additional or differentV000A;permissions. HoweZZZer, no additional obligations are imposed on anyV000A;author or copyright holder as a result of your choosing to follow aV000A;later ZZZersion.V000A;V000A; 15. Disclaimer of Warranty.V000A;V000A; THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BYV000A;APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHTV000A;HOLDERS AND/OR OTHER PARTIES PROxIDE THE PROGRAM "AS IS" WITHOUT WARRANTYV000A;OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,V000A;THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARV000A;PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMV000A;IS WITH YOU. SHOULD THE PROGRAM PROxE DEFECTIxE, YOU ASSUME THE COST OFV000A;ALL NECESSARY SERxICING, REPAIR OR CORRECTION.V000A;V000A; 16. Limitation of Liability.V000A;V000A; IN NO ExENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITINGV000A;WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONxEYSV000A;THE PROGRAM AS PERMITTED ABOxE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANYV000A;GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THEV000A;USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OFV000A;DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRDV000A;PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),V000A;ExEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADxISED OF THE POSSIBILITY OFV000A;SUCH DAMAGES.V000A;V000A; 17. Interpretation of Sections 15 and 16.V000A;V000A; If the disclaimer of warranty and limitation of liability proZZZidedV000A;aboZZZe cannot be giZZZen local legal effect according to their terms,V000A;reZZZiewing courts shall apply local law that most closely approVimatesV000A;an absolute waiZZZer of all ciZZZil liability in connection with theV000A;Program, unless a warranty or assumption of liability accompanies aV000A;copy of the Program in return for a fee.V000A;V000A; END OF TERMS AND CONDITIONSV000A;V000A; How to Apply These Terms to Your New ProgramsV000A;V000A; If you deZZZelop a new program, and you want it to be of the greatestV000A;possible use to the public, the best way to achieZZZe this is to make itV000A;free software which eZZZeryone can redistribute and change under these terms.V000A;V000A; To do so, attach the following notices to the program. It is safestV000A;to attach them to the start of each source file to most effectiZZZelyV000A;state the eVclusion of warranty; and each file should haZZZe at leastV000A;the "copyright" line and a pointer to where the full notice is found.V000A;V000A; <one line to giZZZe the program's name and a brief idea of what it does.>V000A; Copyright (C) <year> <name of author>V000A;V000A; This program is free software: you can redistribute it and/or modifyV000A; it under the terms of the GNU General Public License as published byV000A; the Free Software Foundation, either ZZZersion 3 of the License, orV000A; (at your option) any later ZZZersion.V000A;V000A; This program is distributed in the hope that it will be useful,V000A; but WITHOUT ANY WARRANTY; without eZZZen the implied warranty ofV000A; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theV000A; GNU General Public License for more details.V000A;V000A; You should haZZZe receiZZZed a copy of the GNU General Public LicenseV000A; along with this program. If not, see <>.V000A;V000A;Also add information on how to contact you by electronic and paper mail.V000A;V000A; If the program does terminal interaction, make it output a shortV000A;notice like this when it starts in an interactiZZZe mode:V000A;V000A; <program> Copyright (C) <year> <name of author>V000A; This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.V000A; This is free software, and you are welcome to redistribute itV000A; under certain conditions; type `show c' for details.V000A;V000A;The hypothetical commands `show w' and `show c' should show the appropriateV000A;parts of the General Public License. Of course, your program's commandsV000A;might be different; for a GUI interface, you would use an "about boV".V000A;V000A; You should also get your employer (if you work as a programmer) or school,V000A;if any, to sign a "copyright disclaimer" for the program, if necessary.V000A;For more information on this, and how to apply and follow the GNU GPL, seeV000A;<>.V000A;V000A; The GNU General Public License does not permit incorporating your programV000A;into proprietary programs. If your program is a subroutine library, youV000A;may consider it more useful to permit linking proprietary applications withV000A;the library. If this is what you want to do, use the GNU Lesser GeneralV000A;Public License instead of this License. But first, please readV000A;<>.V000A;V000A;