zoukankan      html  css  js  c++  java
  • 「小程序JAVA实战」小程序页面引用外部wxml通用页面(21)

    转自:https://idig8.com/2018/08/09/xiaochengxu-chuji-21/

    现在都是讲究开发的效率,原来单纯的android 和 ios 已经不在吃香了,都是混合开发,混合开发很多页面的结构基本都是上中下,head,body,foot,所以小程序也要这么的满足如图例。源码:https://github.com/limingios/wxProgram.git 中的No.8

    小程序的引入外部的页面

    include 可以将目标文件除了 template ,wxs 外的整个代码引入,相当于是拷贝到 include 位置。

    1. 关键字 include
    2. 官方的阐述
      >https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/import.html

    1. 演示调用外部的页面

    head.wxml


    <view class="container"> head </view>

    body.wxml

    <view class="container">
    body
    </view>
    

    isInclude.wxml

    <include src="head.wxml"/>
    <include src="body.wxml"/>
    <view class="container">
    foot
    </view>
    

    PS:就是为了相似的页面互相的调用,搬砖也的想办法找技巧对吧 哈哈!

  • 相关阅读:
    vue
    vue
    vue
    vue
    vue
    vue
    vue
    vue
    vue
    vue
  • 原文地址:https://www.cnblogs.com/sharpest/p/10284659.html
Copyright © 2011-2022 走看看