关于使用骨架屏提示app.json配置无效?

发布于 8 年前作者 yong6610740 次浏览最后编辑 8 年前来自 ask

配置骨架屏时 发现调试器出现了这个warm

无效的 app.json ["skeleton-config"]

这个有没有影响骨架屏的使用?

骨架屏是可以显示出来,但是样式不对劲

文档也没相关解释…求助

app.json

{
  "pages": [
    "pages/home/index/homeIndex",
    "pages/cloth/index/clothIndex",
    "pages/match/index/matchIndex",
    "pages/mine/index/mineIndex",
    "pages/index/index",
    "pages/logs/logs",
    "pages/commom/clothDetail/clothDeatil",
    "pages/commom/matchDetail/matchDetail",
    "pages/commom/search/search",
    "pages/mine/favor/favor",
    "pages/mine/advice/advice",
    "pages/mine/about/about",
    "pages/match/filter/filter",
    "pages/cloth/list/list",
    "pages/cloth/filter/filter",
    "pages/commom/login/login"
  ],
  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#fff",
    "navigationBarTitleText": "Weixin",
    "navigationBarTextStyle": "black",
    "onReachBottomDistance": 50
  },
  "tabBar": {
    "color": "#8a8a8a",
    "selectedColor": "#FC1B67",
    "borderStyle": "white",
    "list": [
      {
        "selectedIconPath": "img/home1.png",
        "iconPath": "img/home.png",
        "pagePath": "pages/home/index/homeIndex",
        "text": "首页"
      },
      {
        "selectedIconPath": "img/more1.png",
        "iconPath": "img/more.png",
        "pagePath": "pages/cloth/index/clothIndex",
        "text": "产品系列"
      },
      {
        "selectedIconPath": "img/copy1.png",
        "iconPath": "img/copy.png",
        "pagePath": "pages/match/filter/filter",
        "text": "搭配方案"
      },
      {
        "selectedIconPath": "img/profile1.png",
        "iconPath": "img/profile.png",
        "pagePath": "pages/mine/index/mineIndex",
        "text": "我的"
      }
    ]
  },
  "skeleton-config": {
    "global": {
      "loading": "shine",
      "text": {
        "color": "#EEEEEE"
      },
      "image": {
        "shape": "rect",
        "color": "#ffffff",
        "shapeOpposite": []
      },
      "button": {
        "color": "#EFEFEF",
        "excludes": []
      },
      "pseudo": {
        "color": "#EFEFEF",
        "shape": "rect",
        "shapeOpposite": []
      },
      "excludes": [],
      "remove": [],
      "empty": [],
      "hide": [],
      "grayBlock": [],
      "showNative": false,
      "backgroundColor": "transparent",
      "mode": "fullscreen",
      "templateName": "skeleton",
      "cssUnit": "rpx",
      "decimal": 4
    }
  },
  "sitemapLocation": "sitemap.json"  
}
2 回复
jkong
jkong1 楼5 年前

https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html

这个是骨架屏的文档 你方法用错了应该

juanhan
juanhan2 楼5 年前

按文档的说明,这个配置参数是放在project.config.json里的吧?