提交 6ceecc63 编写于 作者: DCloud_JSON's avatar DCloud_JSON

新增 模板示例-drop-card

上级 7619f280
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabBar/component/component",
"style": {
"navigationBarTitleText": "内置组件",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/component/view/view",
"style": {
"navigationBarTitleText": "view"
}
},
{
"path": "pages/component/scroll-view/scroll-view",
"style": {
"navigationBarTitleText": "scroll-view"
}
},
{
"path": "pages/component/text/text",
"style": {
"navigationBarTitleText": "text"
}
},
{
"path": "pages/component/progress/progress",
"style": {
"navigationBarTitleText": "progress"
}
},
{
"path": "pages/component/button/button",
"style": {
"navigationBarTitleText": "button"
}
},
{
"path": "pages/component/radio/radio",
"style": {
"navigationBarTitleText": "radio"
}
},
{
"path": "pages/component/checkbox/checkbox",
"style": {
"navigationBarTitleText": "checkbox"
}
},
{
"path": "pages/component/input/input",
"style": {
"navigationBarTitleText": "input"
}
},
{
"path": "pages/component/textarea/textarea",
"style": {
"navigationBarTitleText": "textarea"
}
},
{
"path": "pages/component/slider/slider",
"style": {
"navigationBarTitleText": "slider"
}
},
{
"path": "pages/component/slider-100/slider-100",
"style": {
"navigationBarTitleText": "slider x 100"
}
},
{
"path": "pages/component/switch/switch",
"style": {
"navigationBarTitleText": "switch"
}
},
{
"path": "pages/component/swiper/swiper",
"style": {
"navigationBarTitleText": "swiper"
}
},
{
"path": "pages/component/image/image",
"style": {
"navigationBarTitleText": "image"
}
},
{
"path": "pages/component/image/image-format",
"style": {
"navigationBarTitleText": "image-format"
}
},
{
"path": "pages/component/image/image-mode",
"style": {
"navigationBarTitleText": "image-mode"
}
},
{
"path": "pages/component/image/image-path",
"style": {
"navigationBarTitleText": "image-path"
}
},
{
"path": "pages/component/web-view/web-view",
"style": {
"navigationBarTitleText": "web-view"
}
},
{
"path": "pages/component/web-view-local/web-view-local",
"style": {
"navigationBarTitleText": "web-view-local"
}
},
{
"path": "pages/tabBar/API/API",
"style": {
"navigationBarTitleText": "接口",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/API/navigator/navigator",
"style": {
"navigationBarTitleText": "页面跳转"
}
},
{
"path": "pages/API/navigator/new-page/new-uvue-page-1",
"style": {
"navigationBarTitleText": "新UVUE页面1"
}
},
{
"path": "pages/API/navigator/new-page/new-uvue-page-2",
"style": {
"navigationBarTitleText": "新UVUE页面2"
}
},
{
"path": "pages/API/storage/storage",
"style": {
"navigationBarTitleText": "数据存储"
}
},
{
"path": "pages/API/action-sheet/action-sheet",
"style": {
"navigationBarTitleText": "操作菜单"
}
},
{
"path": "pages/API/modal/modal",
"style": {
"navigationBarTitleText": "模态弹窗"
}
},
{
"path": "pages/API/show-loading/show-loading",
"style": {
"navigationBarTitleText": "加载提示框"
}
},
{
"path": "pages/API/toast/toast",
"style": {
"navigationBarTitleText": "消息提示框"
}
},
{
"path": "pages/API/get-location/get-location",
"style": {
"navigationBarTitleText": "获取定位"
}
},
{
"path": "pages/tabBar/CSS/CSS",
"style": {
"navigationBarTitleText": "CSS",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/CSS/background/background-color",
"style": {
"navigationBarTitleText": "background-color"
}
},
{
"path": "pages/CSS/background/background-image",
"style": {
"navigationBarTitleText": "background-image"
}
},
{
"path": "pages/CSS/border/border-color",
"style": {
"navigationBarTitleText": "border-color"
}
},
{
"path": "pages/CSS/border/border-radius",
"style": {
"navigationBarTitleText": "border-radius"
}
},
{
"path": "pages/CSS/border/border-style",
"style": {
"navigationBarTitleText": "border-style"
}
},
{
"path": "pages/CSS/border/border-width",
"style": {
"navigationBarTitleText": "border-width"
}
},
{
"path": "pages/CSS/border/border",
"style": {
"navigationBarTitleText": "border"
}
},
{
"path": "pages/CSS/box-shadow/box-shadow",
"style": {
"navigationBarTitleText": "box-shadow"
}
},
{
"path": "pages/CSS/flex/align-content",
"style": {
"navigationBarTitleText": "align-content"
}
},
{
"path": "pages/CSS/flex/align-items",
"style": {
"navigationBarTitleText": "align-items"
}
},
{
"path": "pages/CSS/flex/flex-basis",
"style": {
"navigationBarTitleText": "flex-basis"
}
},
{
"path": "pages/CSS/flex/flex-direction",
"style": {
"navigationBarTitleText": "flex-direction"
}
},
{
"path": "pages/CSS/flex/flex-flow",
"style": {
"navigationBarTitleText": "flex-flow"
}
},
{
"path": "pages/CSS/flex/flex-grow",
"style": {
"navigationBarTitleText": "flex-grow"
}
},
{
"path": "pages/CSS/flex/flex-shrink",
"style": {
"navigationBarTitleText": "flex-shrink"
}
},
{
"path": "pages/CSS/flex/flex",
"style": {
"navigationBarTitleText": "flex"
}
},
{
"path": "pages/CSS/flex/justify-content",
"style": {
"navigationBarTitleText": "justify-content"
}
},
{
"path": "pages/CSS/layout/height",
"style": {
"navigationBarTitleText": "height"
}
},
{
"path": "pages/CSS/layout/max-height",
"style": {
"navigationBarTitleText": "max-height"
}
},
{
"path": "pages/CSS/layout/max-width",
"style": {
"navigationBarTitleText": "max-width"
}
},
{
"path": "pages/CSS/layout/min-height",
"style": {
"navigationBarTitleText": "min-height"
}
},
{
"path": "pages/CSS/layout/min-width",
"style": {
"navigationBarTitleText": "min-width"
}
},
{
"path": "pages/CSS/layout/position",
"style": {
"navigationBarTitleText": "position"
}
},
{
"path": "pages/CSS/layout/width",
"style": {
"navigationBarTitleText": "width"
}
},
{
"path": "pages/CSS/margin/margin-bottom",
"style": {
"navigationBarTitleText": "margin-bottom"
}
},
{
"path": "pages/CSS/margin/margin-left",
"style": {
"navigationBarTitleText": "margin-left"
}
},
{
"path": "pages/CSS/margin/margin-right",
"style": {
"navigationBarTitleText": "margin-right"
}
},
{
"path": "pages/CSS/margin/margin-top",
"style": {
"navigationBarTitleText": "margin-top"
}
},
{
"path": "pages/CSS/margin/margin",
"style": {
"navigationBarTitleText": "margin"
}
},
{
"path": "pages/CSS/padding/padding-bottom",
"style": {
"navigationBarTitleText": "padding-bottom"
}
},
{
"path": "pages/CSS/padding/padding-left",
"style": {
"navigationBarTitleText": "padding-left"
}
},
{
"path": "pages/CSS/padding/padding-right",
"style": {
"navigationBarTitleText": "padding-right"
}
},
{
"path": "pages/CSS/padding/padding-top",
"style": {
"navigationBarTitleText": "padding-top"
}
},
{
"path": "pages/CSS/padding/padding",
"style": {
"navigationBarTitleText": "padding"
}
},
{
"path": "pages/CSS/text/color",
"style": {
"navigationBarTitleText": "color"
}
},
{
"path": "pages/CSS/text/font-family",
"style": {
"navigationBarTitleText": "font-family"
}
},
{
"path": "pages/CSS/text/font-size",
"style": {
"navigationBarTitleText": "font-size"
}
},
{
"path": "pages/CSS/text/font-style",
"style": {
"navigationBarTitleText": "font-style"
}
},
{
"path": "pages/CSS/text/font-weight",
"style": {
"navigationBarTitleText": "font-weight"
}
},
{
"path": "pages/CSS/text/line-height",
"style": {
"navigationBarTitleText": "line-height"
}
},
{
"path": "pages/CSS/text/text-align",
"style": {
"navigationBarTitleText": "text-align"
}
},
{
"path": "pages/CSS/text/text-decoration-line",
"style": {
"navigationBarTitleText": "text-decoration-line"
}
},{
"path": "pages/CSS/transition/transition",
"style": {
"navigationBarTitleText": "Transition"
}
},{
"path": "pages/CSS/transform/transform",
"style": {
"navigationBarTitleText": "Transform"
}
}, {
"path": "pages/API/request/request",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabBar/component/component",
"style": {
"navigationBarTitleText": "内置组件",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/component/view/view",
"style": {
"navigationBarTitleText": "view"
}
},
{
"path": "pages/component/scroll-view/scroll-view",
"style": {
"navigationBarTitleText": "scroll-view"
}
},
{
"path": "pages/component/text/text",
"style": {
"navigationBarTitleText": "text"
}
},
{
"path": "pages/component/progress/progress",
"style": {
"navigationBarTitleText": "progress"
}
},
{
"path": "pages/component/button/button",
"style": {
"navigationBarTitleText": "button"
}
},
{
"path": "pages/component/radio/radio",
"style": {
"navigationBarTitleText": "radio"
}
},
{
"path": "pages/component/checkbox/checkbox",
"style": {
"navigationBarTitleText": "checkbox"
}
},
{
"path": "pages/component/input/input",
"style": {
"navigationBarTitleText": "input"
}
},
{
"path": "pages/component/textarea/textarea",
"style": {
"navigationBarTitleText": "textarea"
}
},
{
"path": "pages/component/slider/slider",
"style": {
"navigationBarTitleText": "slider"
}
},
{
"path": "pages/component/slider-100/slider-100",
"style": {
"navigationBarTitleText": "slider x 100"
}
},
{
"path": "pages/component/switch/switch",
"style": {
"navigationBarTitleText": "switch"
}
},
{
"path": "pages/component/swiper/swiper",
"style": {
"navigationBarTitleText": "swiper"
}
},
{
"path": "pages/component/image/image",
"style": {
"navigationBarTitleText": "image"
}
},
{
"path": "pages/component/image/image-format",
"style": {
"navigationBarTitleText": "image-format"
}
},
{
"path": "pages/component/image/image-mode",
"style": {
"navigationBarTitleText": "image-mode"
}
},
{
"path": "pages/component/image/image-path",
"style": {
"navigationBarTitleText": "image-path"
}
},
{
"path": "pages/component/web-view/web-view",
"style": {
"navigationBarTitleText": "web-view"
}
},
{
"path": "pages/component/web-view-local/web-view-local",
"style": {
"navigationBarTitleText": "web-view-local"
}
},
{
"path": "pages/tabBar/API/API",
"style": {
"navigationBarTitleText": "接口",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/API/navigator/navigator",
"style": {
"navigationBarTitleText": "页面跳转"
}
},
{
"path": "pages/API/navigator/new-page/new-uvue-page-1",
"style": {
"navigationBarTitleText": "新UVUE页面1"
}
},
{
"path": "pages/API/navigator/new-page/new-uvue-page-2",
"style": {
"navigationBarTitleText": "新UVUE页面2"
}
},
{
"path": "pages/API/storage/storage",
"style": {
"navigationBarTitleText": "数据存储"
}
},
{
"path": "pages/API/action-sheet/action-sheet",
"style": {
"navigationBarTitleText": "操作菜单"
}
},
{
"path": "pages/API/modal/modal",
"style": {
"navigationBarTitleText": "模态弹窗"
}
},
{
"path": "pages/API/show-loading/show-loading",
"style": {
"navigationBarTitleText": "加载提示框"
}
},
{
"path": "pages/API/toast/toast",
"style": {
"navigationBarTitleText": "消息提示框"
}
},
{
"path": "pages/API/get-location/get-location",
"style": {
"navigationBarTitleText": "获取定位"
}
},
{
"path": "pages/tabBar/CSS/CSS",
"style": {
"navigationBarTitleText": "CSS",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/CSS/background/background-color",
"style": {
"navigationBarTitleText": "background-color"
}
},
{
"path": "pages/CSS/background/background-image",
"style": {
"navigationBarTitleText": "background-image"
}
},
{
"path": "pages/CSS/border/border-color",
"style": {
"navigationBarTitleText": "border-color"
}
},
{
"path": "pages/CSS/border/border-radius",
"style": {
"navigationBarTitleText": "border-radius"
}
},
{
"path": "pages/CSS/border/border-style",
"style": {
"navigationBarTitleText": "border-style"
}
},
{
"path": "pages/CSS/border/border-width",
"style": {
"navigationBarTitleText": "border-width"
}
},
{
"path": "pages/CSS/border/border",
"style": {
"navigationBarTitleText": "border"
}
},
{
"path": "pages/CSS/box-shadow/box-shadow",
"style": {
"navigationBarTitleText": "box-shadow"
}
},
{
"path": "pages/CSS/flex/align-content",
"style": {
"navigationBarTitleText": "align-content"
}
},
{
"path": "pages/CSS/flex/align-items",
"style": {
"navigationBarTitleText": "align-items"
}
},
{
"path": "pages/CSS/flex/flex-basis",
"style": {
"navigationBarTitleText": "flex-basis"
}
},
{
"path": "pages/CSS/flex/flex-direction",
"style": {
"navigationBarTitleText": "flex-direction"
}
},
{
"path": "pages/CSS/flex/flex-flow",
"style": {
"navigationBarTitleText": "flex-flow"
}
},
{
"path": "pages/CSS/flex/flex-grow",
"style": {
"navigationBarTitleText": "flex-grow"
}
},
{
"path": "pages/CSS/flex/flex-shrink",
"style": {
"navigationBarTitleText": "flex-shrink"
}
},
{
"path": "pages/CSS/flex/flex",
"style": {
"navigationBarTitleText": "flex"
}
},
{
"path": "pages/CSS/flex/justify-content",
"style": {
"navigationBarTitleText": "justify-content"
}
},
{
"path": "pages/CSS/layout/height",
"style": {
"navigationBarTitleText": "height"
}
},
{
"path": "pages/CSS/layout/max-height",
"style": {
"navigationBarTitleText": "max-height"
}
},
{
"path": "pages/CSS/layout/max-width",
"style": {
"navigationBarTitleText": "max-width"
}
},
{
"path": "pages/CSS/layout/min-height",
"style": {
"navigationBarTitleText": "min-height"
}
},
{
"path": "pages/CSS/layout/min-width",
"style": {
"navigationBarTitleText": "min-width"
}
},
{
"path": "pages/CSS/layout/position",
"style": {
"navigationBarTitleText": "position"
}
},
{
"path": "pages/CSS/layout/width",
"style": {
"navigationBarTitleText": "width"
}
},
{
"path": "pages/CSS/margin/margin-bottom",
"style": {
"navigationBarTitleText": "margin-bottom"
}
},
{
"path": "pages/CSS/margin/margin-left",
"style": {
"navigationBarTitleText": "margin-left"
}
},
{
"path": "pages/CSS/margin/margin-right",
"style": {
"navigationBarTitleText": "margin-right"
}
},
{
"path": "pages/CSS/margin/margin-top",
"style": {
"navigationBarTitleText": "margin-top"
}
},
{
"path": "pages/CSS/margin/margin",
"style": {
"navigationBarTitleText": "margin"
}
},
{
"path": "pages/CSS/padding/padding-bottom",
"style": {
"navigationBarTitleText": "padding-bottom"
}
},
{
"path": "pages/CSS/padding/padding-left",
"style": {
"navigationBarTitleText": "padding-left"
}
},
{
"path": "pages/CSS/padding/padding-right",
"style": {
"navigationBarTitleText": "padding-right"
}
},
{
"path": "pages/CSS/padding/padding-top",
"style": {
"navigationBarTitleText": "padding-top"
}
},
{
"path": "pages/CSS/padding/padding",
"style": {
"navigationBarTitleText": "padding"
}
},
{
"path": "pages/CSS/text/color",
"style": {
"navigationBarTitleText": "color"
}
},
{
"path": "pages/CSS/text/font-family",
"style": {
"navigationBarTitleText": "font-family"
}
},
{
"path": "pages/CSS/text/font-size",
"style": {
"navigationBarTitleText": "font-size"
}
},
{
"path": "pages/CSS/text/font-style",
"style": {
"navigationBarTitleText": "font-style"
}
},
{
"path": "pages/CSS/text/font-weight",
"style": {
"navigationBarTitleText": "font-weight"
}
},
{
"path": "pages/CSS/text/line-height",
"style": {
"navigationBarTitleText": "line-height"
}
},
{
"path": "pages/CSS/text/text-align",
"style": {
"navigationBarTitleText": "text-align"
}
},
{
"path": "pages/CSS/text/text-decoration-line",
"style": {
"navigationBarTitleText": "text-decoration-line"
}
}, {
"path": "pages/CSS/transition/transition",
"style": {
"navigationBarTitleText": "Transition"
}
}, {
"path": "pages/CSS/transform/transform",
"style": {
"navigationBarTitleText": "Transform"
}
}, {
"path": "pages/API/request/request",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/upload-file/upload-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/download-file/download-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/websocket-socketTask/websocket-socketTask",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/upload-file/upload-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/websocket-global/websocket-global",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/download-file/download-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-system-info/get-system-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/websocket-socketTask/websocket-socketTask",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-device-info/get-device-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/websocket-global/websocket-global",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-app-base-info/get-app-base-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-system-info/get-system-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-system-setting/get-system-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-device-info/get-device-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-app-authorize-setting/get-app-authorize-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-app-base-info/get-app-base-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/preview-image/preview-image",
"style": {
"navigationBarTitleText": "图片预览",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-system-setting/get-system-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/component/scroll-view/scroll-view-refresher",
"style": {
"navigationBarTitleText": "scroll-view-refresher",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-app-authorize-setting/get-app-authorize-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/component/list/list",
"style": {
"navigationBarTitleText": "列表到详情示例",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/preview-image/preview-image",
"style": {
"navigationBarTitleText": "图片预览",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/get-network-type/get-network-type",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path" : "pages/component/scroll-view/scroll-view-refresher",
"style" :
{
"navigationBarTitleText": "scroll-view-refresher",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/component/list/list",
"style" :
{
"navigationBarTitleText": "列表到详情示例",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/API/get-network-type/get-network-type",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/component/list/detail/detail",
"style" :
{
"navigationBarTitleText": "详情示例",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/API/page-scrollTo/page-scrollTo",
"style" : {
"navigationBarTitleText": "pageScrollTo",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"pageOrientation": "portrait",
"navigationBarTitleText": "Hello uniapp x",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#007AFF",
"backgroundColor": "#efeff4",
"backgroundColorTop": "#F4F5F6",
"backgroundColorBottom": "#F4F5F6",
"h5": {
"maxWidth": 1190,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F1F1F1"
}
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#F8F8F8",
"list": [{
"pagePath": "pages/tabBar/component/component",
"iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png",
"text": "内置组件"
},
{
"pagePath": "pages/tabBar/API/API",
"iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png",
"text": "接口"
},
{
"pagePath": "pages/tabBar/CSS/CSS",
"iconPath": "static/extui.png",
"selectedIconPath": "static/extuiHL.png",
"text": "CSS"
}
]
},
"uniIdRouter": {},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}, {
"path": "pages/component/list/detail/detail",
"style": {
"navigationBarTitleText": "详情示例",
"enablePullDownRefresh": false
}
}, {
"path": "pages/API/page-scrollTo/page-scrollTo",
"style": {
"navigationBarTitleText": "pageScrollTo",
"enablePullDownRefresh": false
}
}, {
"path": "pages/template/drop-card/drop-card",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/tabBar/template/template",
"style": {
"navigationBarTitleText": "模板",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"pageOrientation": "portrait",
"navigationBarTitleText": "Hello uniapp x",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#007AFF",
"backgroundColor": "#efeff4",
"backgroundColorTop": "#F4F5F6",
"backgroundColorBottom": "#F4F5F6",
"h5": {
"maxWidth": 1190,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F1F1F1"
}
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#F8F8F8",
"list": [{
"pagePath": "pages/tabBar/component/component",
"iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png",
"text": "内置组件"
},
{
"pagePath": "pages/tabBar/API/API",
"iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png",
"text": "接口"
},
{
"pagePath": "pages/tabBar/CSS/CSS",
"iconPath": "static/extui.png",
"selectedIconPath": "static/extuiHL.png",
"text": "CSS"
},
{
"pagePath": "pages/tabBar/template/template",
"iconPath": "static/template.png",
"selectedIconPath": "static/templateHL.png",
"text": "模板"
}
]
},
"uniIdRouter": {},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
}
\ No newline at end of file
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/templateIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">以下是部分模板示例,更多模板见插件市场:</text>
<u-link class="hello-link" href="https://ext.dcloud.net.cn" :text="'https://ext.dcloud.net.cn'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon" class="uni-icon">
</image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text" :class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url : string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [
{
id: "drop-card",
url: "drop-card",
name: "drop-card",
open: false,
enable: true,
pages: [] as Page[]
}
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url!
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url.indexOf('platform') > -1 ? e.url : `/pages/template/${e.url}/${e.url}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../../common/uni-uvue.css';
.uni-container {
flex: 1;
}
</style>
\ No newline at end of file
<template>
<view class="root">
<view class="card"
:style="{'top':Math.abs(x)/-60 + 90 +'px',transform:'scale('+(movePercent/10+0.80)+')','height':cardHeight+'px'}">
<image class="user-img" :src="userList[0]"></image>
</view>
<view class="card"
:style="{'top':Math.abs(x)/-30 + 45 +'px',transform:'scale('+(movePercent/10+0.90)+')','height':cardHeight+'px'}">
<image class="user-img" :src="userList[1]"></image>
</view>
<view @touchmove="touchmove" @touchstart="touchstart" @touchend="touchend"
:style="{'transform':'translate('+x+'px,'+y+'px) rotate('+x/-30+'deg)','height':cardHeight+'px'}" class="card">
<image class="user-img" :src="userList[2]"></image>
<view class="state">
<image class="state-icon like" :style="{'opacity':x < 0 ? 0 : movePercent * 10}" src="/static/template/drop-card/like.png" mode="widthFix"></image>
<image class="state-icon dislike" :style="{'opacity':x > 0 ? 0 : movePercent * 10}" src="/static/template/drop-card/dislike.png" mode="widthFix"></image>
</view>
</view>
</view>
</template>
<script lang="ts">
let sX : number = 0,
sY : number = 0,
screenWidth : number = 1;
export default {
data() {
return {
x: 0,
y: 0,
cardHeight:1,
userList: [
'/static/template/drop-card/1.png',
'/static/template/drop-card/2.png',
'/static/template/drop-card/3.png'
]
}
},
computed: {
movePercent() : number {
return Math.abs(this.x) / screenWidth
},
likeOpacity() : number{
return this.x < 0 ? 0 : this.movePercent * 100
},
dislikeOpacity() : number{
return this.x > 0 ? 0 : this.movePercent * 100
}
},
onLoad() {
uni.getSystemInfo({
success: (e) => {
console.log('e',e);
screenWidth = e.screenWidth
this.cardHeight = e.screenHeight - 200
}
})
},
methods: {
changeUserList() {
let user:string = this.userList[this.userList.length - 1]
this.userList.unshift(user)
this.userList.pop()
this.x = 0;
this.y = 0;
},
touchstart(e : TouchEvent) {
sX = e.touches[0].screenX;
sY = e.touches[0].screenY;
},
touchmove(e : TouchEvent) {
this.x += e.touches[0].screenX - sX;
this.y += e.touches[0].screenY - sY;
sX = e.touches[0].screenX;
sY = e.touches[0].screenY;
},
touchend() {
if (this.x > screenWidth / 6) {
let interval : number = 0;
interval = setInterval(() => {
this.x += 10
this.y += 3
if (this.x > screenWidth) {
clearInterval(interval)
this.changeUserList()
}
}, 6)
} else if (this.x < screenWidth * -1 / 6) {
let interval : number = 0;
interval = setInterval(() => {
this.x -= 10
this.y += 3
if (this.x < -screenWidth) {
clearInterval(interval)
this.changeUserList()
}
}, 6)
} else {
this.x = 0
this.y = 0
}
}
}
}
</script>
<style>
.root {
flex: 1;
position: relative;
}
.card {
width: 700rpx;
height: 750rpx;
position: absolute;
margin: 0 25rpx;
margin-top: 30px;
border-radius: 10px;
color: #FFF;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.user-img{
border-radius: 10px;
}
.state {
top: 20rpx;
left: 20rpx;
width: 650rpx;
padding: 4px;
position: absolute;
flex-direction: row;
justify-content: space-between;
}
.state-icon {
width: 30px;
height: 30px;
border: 1px solid #FFF;
background-color: #FFF;
padding: 3px;
border-radius: 100px;
box-shadow: 0 0 1px #EBEBEB;
}
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册