@smt-ui/component
Advanced tools
Comparing version 1.1.30 to 1.1.31
{ | ||
"name": "@smt-ui/component", | ||
"version": "1.1.30", | ||
"version": "1.1.31", | ||
"description": "extension base", | ||
@@ -43,3 +43,3 @@ "author": "jialipeng <jialipeng@baidu.com>", | ||
}, | ||
"gitHead": "41efd2c1d582bf4f627320115710ae916f8256a5", | ||
"gitHead": "cab01ee82f8c680409a9c38f2aeda73b29f68cbb", | ||
"dependencies": { | ||
@@ -46,0 +46,0 @@ "@babel/runtime": "^7.7.7" |
@@ -1,1 +0,1 @@ | ||
{"npmPackageName":"@smt-ui/component","npmPackageVersion":"1.1.29","componentsList":[{"name":"layout","label":"布局组件","icon":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU4ICg4NDY2MykgLSBodHRwczovL3NrZXRjaC5jb20gLS0+CiAgICA8dGl0bGU+5biD5bGA57uE5Lu2PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IuWumueovyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IueZvuW6puW8gOWPkeiAheW3peWFt+Wbvuagh+W6kyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM1NS4wMDAwMDAsIC0xMDMwLjAwMDAwMCkiIGZpbGw9IiMzMzMzMzMiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxnIGlkPSLlrrnlmajop4blm74iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDM1NS4wMDAwMDAsIDEwMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIsMi41IEMxMy4zODA3MTE5LDIuNSAxNC41LDMuNjE5Mjg4MTMgMTQuNSw1IEwxNC41LDExIEMxNC41LDEyLjM4MDcxMTkgMTMuMzgwNzExOSwxMy41IDEyLDEzLjUgTDUsMTMuNSBDMy42MTkyODgxMywxMy41IDIuNSwxMi4zODA3MTE5IDIuNSwxMSBMMi41LDUgQzIuNSwzLjYxOTI4ODEzIDMuNjE5Mjg4MTMsMi41IDUsMi41IEwxMiwyLjUgWiBNNS45OTksNi41IEwzLjQ5OSw2LjUgTDMuNSwxMSBDMy41LDExLjgyODQyNzEgNC4xNzE1NzI4OCwxMi41IDUsMTIuNSBMNS45OTksMTIuNSBMNS45OTksNi41IFogTTEzLjQ5OSw2LjUgTDYuOTk5LDYuNSBMNi45OTksMTIuNSBMMTIsMTIuNSBDMTIuODI4NDI3MSwxMi41IDEzLjUsMTEuODI4NDI3MSAxMy41LDExIEwxMy40OTksNi41IFogTTEyLDMuNSBMNSwzLjUgQzQuMTcxNTcyODgsMy41IDMuNSw0LjE3MTU3Mjg4IDMuNSw1IEwzLjQ5OSw1LjUgTDEzLjQ5OSw1LjUgTDEzLjUsNSBDMTMuNSw0LjE3MTU3Mjg4IDEyLjgyODQyNzEsMy41IDEyLDMuNSBaIiBpZD0i5ZCI5bm25b2i54q2Ij48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==","components":[{"name":"smt-feed-item","label":"信息流子项","description":"信息流子项:包括左文右图、纯文本、上文下图、多图及视频模式。","codeSnap":"<smt-feed-item theme='default' status='0'></smt-feed-item>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-feed-item/smt-feed-item","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-feed-item/smt-feed-item","fragement":"swanide://fragment/afebdafc13cda2201207a3d6721577481577175550244","properties":{"attributes":[{"name":"theme","type":"string","description":"信息流子项的主题","required":"是","default":"default"},{"name":"content","type":"Object","description":"信息流子项目的内容","required":"是","default":"{title: '标题',infoSource: '网易新闻',commentsNum: 2,images: []}"},{"name":"video","type":"Object","description":"是否为视频和视频信息","required":"否","default":"{isVideo: true, time: '05:00'}"},{"name":"status","type":"String","description":"阅读状态:0未读,1已读","required":"否","default":"0"}],"events":[{"name":"bindfeeditemtap","type":"Event","description":"点击feed-item之后的回调","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-feed-item/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-feed-item.png","usingComponents":{"smt-feed-item":"@smt-ui/component/src/feed-item"},"dynamicLibConfig":{"usingDynamicLib":{"smt-feed-item":"dynamicLib://smartUI/smt-feed-item"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"feed","label":"信息流","description":"信息流组件,可配置下拉刷新、列表加载、上滑加载功能,适用于列表信息展示,并可放置在页面的任何部分;组件包含手势下拉以及api调用两种使用方式\n* 注意:\n1. 和scroll-view一样,信息流组件作为局部滚动组件,必须在它的父级或本身指定高度\n2. 当同时启用下拉刷新和上滑加载且请求不稳定时,可使用CancelToken取消先前的请求","codeSnap":"<smt-feed pull-to-refresh><view>list</view></smt-feed>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-feed/smt-feed","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-feed/smt-feed","fragement":"swanide://fragment/7b9bf19d0c974d45d9b68fd9fc4429b31577200628346","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":"-"},{"name":"loadingHeight","type":"Number","description":"加载、话术区域高度,单位为设备px,转换方法: import {upx2dpx} from '@smt-ui/component/src/common/utils/px';","required":"否","default":"192px(设计稿宽度为1242)"},{"name":"pullToRefresh","type":"Boolean","description":"是否开启手势下拉刷新; 默认只能通过组件api调起","required":"否","default":"false"},{"name":"lowerThreshold","type":"Number","description":"触发scrolltolower事件的阈值","required":"否","default":"150px(设备上的px)"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"否","default":"建议最多显示18个汉字,超出内容截断"},{"name":"refresh","type":"EventHandle","description":"手势滑动触发加载时,响应该onRefresh事件; 通过调用api加载,不会触发该事件","required":"否","default":""},{"name":"startRefresh","type":"EventHandle","description":"手动调用该api,触发加载","required":"否","default":""},{"name":"stopRefresh","type":"EventHandle","description":"手动调用该api,停止加载,并弹出加载提示(对应属性text);可使用await等待关闭动画结束","required":"否","default":""},{"name":"closeLoading","type":"EventHandle","description":"手动调用该api,立即关闭加载,不弹出加载提示;例如接口异常,建义直接关闭加载(小球交替一次大约为500ms,调用前可加延时避免关闭太快)","required":"否","default":""},{"name":"smt-feed-container","type":"externalClass","description":"组件整体class名","required":"否","default":"-"},{"name":"smt-feed-loading","type":"externalClass","description":"加载区域class名","required":"否","default":"-"},{"name":"smt-feed-content","type":"externalClass","description":"滚动区域class名,用于设置ios回弹背景","required":"false","default":""},{"name":"smt-refresh-circle-left","type":"externalClass","description":"加载中左侧小球class名","required":"否","default":"-"},{"name":"smt-refresh-circle-right","type":"externalClass","description":"加载中右侧小球class名","required":"否","default":"-"},{"name":"ext-cls-content","type":"externalClass","description":"滚动区域class名","required":"否","default":"-"},{"name":"smt-refresh-result-container","type":"externalClass","description":"加载话术外框class名","required":"否","default":"-"},{"name":"ext-cls-result-text","type":"externalClass","description":"加载话术文字class名","required":"否","default":"-"}],"events":[{"name":"bindscroll","type":"Event","description":"滚动时触发,返回当前组件的值","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/feed/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/feed.png","usingComponents":{"feed":"@smt-ui/component/src/feed"},"dynamicLibConfig":{"usingDynamicLib":{"feed":"dynamicLib://smartUI/feed"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"icon","label":"图标","description":"包括天气、系统设置、互动社交、生活服务、书籍影音、政务服务、交通出行7个行业类别的图标。请扫描示例二维码查看图标全集。","codeSnap":"<smt-icon name='add'></smt-icon>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-icon/smt-icon","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-icon/smt-icon","fragement":"swanide://fragment/0f37439a2a95dbf9b44cc206c3f822c51585029516902","properties":{"attributes":[{"name":"name","type":"String","description":"icon的英文名称","required":"是"},{"name":"color","type":"String, Array.<String>","description":"icon的颜色,多色图标支持传入色值的数组"},{"name":"size","type":"String","description":"icon的尺寸,必须包含单位(px, rpx, vw, vh, %, em等)","default":"25px"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/icon/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/icon.png","usingComponents":{"icon":"@smt-ui/component/src/icon"},"dynamicLibConfig":{"usingDynamicLib":{"icon":"dynamicLib://smartUI/icon"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-image-uploader","label":"图片上传器","description":"上传图片组件,支持大图、多图模式,可配置图片个数、大小限制等","codeSnap":"<smt-image-uploader picture-list={{['https://b.bdstatic.com/searchbox/icms/searchbox/img/ripple-init.gif','https://imgsa.baidu.com/news/q%3D100/sign=c57a83945bfbb2fb322b5c127f4b2043/9213b07eca80653890432fda99dda144ac34824a.jpg']}}></smt-image-uploader>","groups":"layout","autoReadme":true,"demopath":"extensions/component/smt-image-uploader/smt-image-uploader","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-image-uploader/smt-image-uploader","fragement":"swanide://fragment/d05e46c6ee440831c1c56600dc7dd59d1587556647748","properties":{"attributes":[{"name":"theme","type":"String","description":"主题:default为小图,large为大图模式","default":"default","required":"否"},{"name":"pictureList","type":"Array","description":"i上传图片地址列表","default":"[]","required":"否"},{"name":"pictureLimit","type":"Number","description":"上传图片个数上限","default":"9","required":"否"},{"name":"showPreview","type":"Boolean","description":"是否支持预览","default":"false","required":"否"},{"name":"showTips","type":"Boolean","description":"是否展示提示信息","default":"false","required":"否"},{"name":"pictureSizeLimit","type":"Number","description":"单张图片大小限制","default":"1e7","required":"否"},{"name":"pictureSelectLimit","type":"Number","description":"从本地相册中选择图片个数","default":"2","required":"否"}],"events":[{"name":"binddelimage","type":"Event","description":"删除图片时触发","required":"否","default":"-"},{"name":"bindchooseimage","type":"Event","description":"选择图片时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-image-uploader/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-image-uploader.png","usingComponents":{"smt-image-uploader":"@smt-ui/component/src/image-uploader"}},{"name":"navigation","label":"顶部导航bar","description":"顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题","codeSnap":"<smt-navigation></smt-navigation>","fragement":"swanide://fragment/2cb7a3d38f1df3854fc5cabb679654771587898970846","groups":"layout","demopath":"extensions/component/smt-navigation/smt-navigation","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-navigation/smt-navigation","properties":{"attributes":[{"name":"backgroundColor","type":"string","description":"导航背景色","required":"否","default":"#fff"},{"name":"frontColor","type":"string","description":"前景颜色(目前特指字体颜色)","required":"否","default":"#000"},{"name":"opacity","type":"Number","description":"导航背景透明度","required":"否","default":1},{"name":"navigationStyle","type":"Object","description":"导航容器自定义样式(加在行间样式上)","required":"否","default":"{}"},{"name":"navigationAreaStyle","type":"Object","description":"导航内容可视区自定义样式(加在行间样式上)","required":"否","default":"{}"},{"name":"type","type":"String","description":"自定义导航类型:default为默认,switchNav为切换导航栏模式","required":"否","default":"default"},{"name":"backIcon","type":"Boolean","description":"是否显示返回图标","required":"否","default":false},{"name":"homeIcon","type":"Boolean","description":"是否显示首页图标","required":"否","default":false},{"name":"switchStartPosition","type":"Number","description":"切换模式下,导航栏起始位置,默认状态栏的高度","required":"否","default":"statusBarHeight(计算得来的默认状态栏的高度)"},{"name":"switchEndPosition","type":"Number","description":"切换模式下,是否隐藏顶部","required":"否","default":100},{"name":"commonBar","type":"Object","description":"切换模式下,初始的导航样式","required":"否","default":"{'opacity':1,'title':’','frontColor':'#000','bgColor':'#fff','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}"},{"name":"fixedBar","type":"Object","description":"切换模式下,滚动后的导航样式","required":"否","default":"{'opacity':1,'title':'fixed','frontColor':'#000','bgColor':'pink','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}"}],"events":[{"name":"bindbackHdl","type":"Event","description":"点击返回按钮触发事件","required":"否","default":"-"},{"name":"bindhomeHdl","type":"Event","description":"点击返回首页触发事件","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/navigation/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/navigation.png","usingComponents":{"navigation":"@smt-ui/component/src/navigation"}},{"name":"page-status","label":"页面状态组件","description":"页面状态组件,可用于全屏和半屏。用于展示页面加载,页面异常-有操作、页面异常-无操作三种页面状态。","codeSnap":"<smt-page-status></smt-page-status>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-page-status/smt-page-status","fragment":"swanide://fragment/4cc92982287ac8a30b5fe19f220dc8f71577190736077","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-page-status/smt-page-status","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;沉浸式主题请指定dark","required":"否","default":""},{"name":"loading","type":"Boolean","description":"页面状态配置,默认不展示加载状态页面","required":"否","default":"false"},{"name":"icon","type":"String","description":"空态/缺省页面下的图标名称","required":"否","default":"content"},{"name":"loadingTitle","type":"String","description":"加载页面下的标题文案","required":"否","default":"正在加载..."},{"name":"title","type":"String","description":"空态/缺省页面下的标题文案","required":"否","default":"单行标题"},{"name":"desc","type":"String","description":"空态/缺省页面下的描述文案","required":"否","default":""},{"name":"showBtn","type":"Boolean","description":"是否展示空态/缺省页面下的操作按钮,默认展示","required":"否","default":"true"},{"name":"btnText","type":"String","description":"空态/缺省页面下,操作按钮的描述文案,建议最多显示4个汉字,超出内容截断","required":"否","default":"重新加载"}],"events":[{"name":"reloading","type":"Event","description":"空态/缺省页面下,点击操作按钮时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/page-status/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/page-status.png","usingComponents":{"page-status":"@smt-ui/component/src/page-status"},"dynamicLibConfig":{"usingDynamicLib":{"page-status":"dynamicLib://smartUI/page-status"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"refresh","label":"刷新","description":"可用于页面任意区域;使用时需自行添加下拉逻辑改变offset-y参数;smt-feed组件对smt-refresh进行了封装,支持手势交互和api调起刷新。","codeSnap":"<smt-refresh offset-y=\"{{0}}\" status=\"{{1}}\" text=\"为你推荐15条更新\"></smt-refresh>","fragement":"swanide://fragment/598510a21b650b89e2e5d13c814dc46c1577192328823","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-refresh/smt-refresh","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-refresh/smt-refresh","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":"-"},{"name":"loadingHgt","type":"Number","description":"加载区域高度","required":"否","default":"192px(需转换为设备尺寸)"},{"name":"offsetY","type":"Number","description":"垂直移动距离,*建议后续在sjs中使用","required":"否","default":"0"},{"name":"status","type":"Number","description":"加载状态 0: 未开始 1: 加载中 2: 展示话术","required":"否","default":"0"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"否","default":"建议最多显示18个汉字,超出内容截断"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/refresh/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/refresh.png","usingComponents":{"refresh":"@smt-ui/component/src/refresh"},"dynamicLibConfig":{"usingDynamicLib":{"refresh":"dynamicLib://smartUI/refresh"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-search-bar","label":"自定义搜索框","description":"自定义搜索框,支持配置多种主题,搜索默认文案,容器样式等","codeSnap":"<smt-search-bar></smt-search-bar>","fragement":"swanide://fragment/2b0d6221d42399bdab724ac54198b9851587900957820","groups":"layout","demopath":"extensions/component/smt-search-bar/smt-search-bar","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-search-bar/smt-search-bar","properties":{"attributes":[{"name":"theme","type":"String","description":"搜索框主题样式:default为搜索框灰色填充主题,border为搜索框描边主题,white为搜索框白色填充主题,transparent为搜索框透明主题","required":"否","default":"default"},{"name":"placeholder","type":"String","description":"输入内容默认文案","required":"否","default":"搜索关键词"},{"name":"placeholderStyle","type":"String","description":"输入内容默认文案的样式","required":"否","default":""},{"name":"searchIconColor","type":"String","description":"搜索icon的颜色","required":"否","default":"#999"},{"name":"confirmType","type":"String","description":"键盘右下角按钮文字","required":"否","default":"search"},{"name":"value","type":"String","description":"搜索框内容","required":"否","default":""},{"name":"focus","type":"Boolean","description":"聚焦,调起输入键盘","required":"否","default":false},{"name":"containerStyle","type":"Object","description":"最外层容器的样式,但theme权重大于该样式","required":"否","default":"{'background': '#f4f5f6', 'opacity': 1}"},{"name":"contentStyle","type":"Object","description":"内层搜索容器的样式","required":"否","default":"{'width': 688.41,'minWidth': 218}"}],"events":[{"name":"bindinput","type":"Event","description":"输入时触发","required":"否","default":"-"},{"name":"bindfocus","type":"Event","description":"聚焦时触发","required":"否","default":"-"},{"name":"bindclear","type":"Event","description":"点击清除按钮时触发","required":"否","default":"-"},{"name":"bindblur","type":"Event","description":"失焦时触发","required":"否","default":"-"},{"name":"bindsearch","type":"Event","description":"搜索时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-search-bar/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-search-bar.png","usingComponents":{"smt-search-bar":"@smt-ui/component/src/search-bar"}},{"name":"spin","label":"加载","description":"加载组件,可用于全屏和半屏。用于展示加载状态,点击加载、正在加载、加载完成、重新加载四种状态。","codeSnap":"<smt-spin status='1'></smt-spin>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-spin/smt-spin","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-spin/smt-spin","fragement":"swanide://fragment/25af44248f8aad73b64e274ead38d6151577191316430","properties":{"attributes":[{"name":"status","type":"Number","description":"加载状态配置","required":"是"},{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":""},{"name":"textConfig","type":"Array","description":"加载状态对应的文案","required":"否","default":"['点击加载更多', '正在加载...', '已经到底啦', '加载失败 点击重新加载']"},{"name":"secureBottom","type":"Boolean","description":"默认兼容iPhoneX 及以上型号底部安全区,非全屏可关闭","required":"否","default":"true"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/spin/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/spin.png","usingComponents":{"spin":"@smt-ui/component/src/spin"},"dynamicLibConfig":{"usingDynamicLib":{"spin":"dynamicLib://smartUI/spin"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-textarea","label":"自定义多行输入框","description":"多行输入框,支持白色主题(默认)、 边框主题和深色模式主题,可配置字符限制、错误提示方式等","codeSnap":"<smt-textarea></smt-textarea>","fragement":"swanide://fragment/92cabcc9b9a53f18dfb7b3a9fe8252181587899191806","groups":"layout","demopath":"extensions/component/smt-textarea/smt-textarea","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-textarea/smt-textarea","properties":{"attributes":[{"name":"theme","type":"String","description":"多行输入框主题:default: 默认白色主题,border: 边框主题,dark: 深色模式主题","required":"否","default":"default"},{"name":"placeholder","type":"String","description":"输入内容默认文案","required":"否","default":"请输入内容"},{"name":"placeholderStyle","type":"String","description":"输入内容默认文案的样式","required":"否","default":""},{"name":"contentLimit","type":"Number","description":"输入内容长度限制","required":"否","default":120},{"name":"width","type":"String","description":"输入框宽度","required":"否","default":"auto"},{"name":"autoHeight","type":"Boolean","description":"输入框高度是否自适应","required":"否","default":false},{"name":"promptType","type":"String","description":"输入超限提示类型: 1.text:框下文字提示; 2.toast:toast提示超限; 3.none:不提示","required":"否","default":"toast"},{"name":"tipsEdge","type":"Number","description":"promptType为text时,出现提示时的剩余可输入字符个数","required":"否","default":20},{"name":"toastText","type":"String","description":"promptType为toast时,提示文案内容","required":"否","default":"超出字数限制"},{"name":"submitText","type":"String","description":"发布按钮的文字内容","required":"否","default":"发表"}],"events":[{"name":"bindinput","type":"Event","description":"输入时触发事件","required":"否","default":"-"},{"name":"bindconfirm","type":"Event","description":"键盘点击确认触发","required":"否","default":"-"},{"name":"bindblur","type":"Event","description":"失焦时触发","required":"否","default":"-"},{"name":"bindsubmit","type":"Event","description":"发表成功失触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-textarea/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-textarea.png","usingComponents":{"smt-textarea":"@smt-ui/component/src/textarea"}}]}]} | ||
{"npmPackageName":"@smt-ui/component","npmPackageVersion":"1.1.30","componentsList":[{"name":"layout","label":"布局组件","icon":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU4ICg4NDY2MykgLSBodHRwczovL3NrZXRjaC5jb20gLS0+CiAgICA8dGl0bGU+5biD5bGA57uE5Lu2PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IuWumueovyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IueZvuW6puW8gOWPkeiAheW3peWFt+Wbvuagh+W6kyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM1NS4wMDAwMDAsIC0xMDMwLjAwMDAwMCkiIGZpbGw9IiMzMzMzMzMiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxnIGlkPSLlrrnlmajop4blm74iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDM1NS4wMDAwMDAsIDEwMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIsMi41IEMxMy4zODA3MTE5LDIuNSAxNC41LDMuNjE5Mjg4MTMgMTQuNSw1IEwxNC41LDExIEMxNC41LDEyLjM4MDcxMTkgMTMuMzgwNzExOSwxMy41IDEyLDEzLjUgTDUsMTMuNSBDMy42MTkyODgxMywxMy41IDIuNSwxMi4zODA3MTE5IDIuNSwxMSBMMi41LDUgQzIuNSwzLjYxOTI4ODEzIDMuNjE5Mjg4MTMsMi41IDUsMi41IEwxMiwyLjUgWiBNNS45OTksNi41IEwzLjQ5OSw2LjUgTDMuNSwxMSBDMy41LDExLjgyODQyNzEgNC4xNzE1NzI4OCwxMi41IDUsMTIuNSBMNS45OTksMTIuNSBMNS45OTksNi41IFogTTEzLjQ5OSw2LjUgTDYuOTk5LDYuNSBMNi45OTksMTIuNSBMMTIsMTIuNSBDMTIuODI4NDI3MSwxMi41IDEzLjUsMTEuODI4NDI3MSAxMy41LDExIEwxMy40OTksNi41IFogTTEyLDMuNSBMNSwzLjUgQzQuMTcxNTcyODgsMy41IDMuNSw0LjE3MTU3Mjg4IDMuNSw1IEwzLjQ5OSw1LjUgTDEzLjQ5OSw1LjUgTDEzLjUsNSBDMTMuNSw0LjE3MTU3Mjg4IDEyLjgyODQyNzEsMy41IDEyLDMuNSBaIiBpZD0i5ZCI5bm25b2i54q2Ij48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==","components":[{"name":"smt-feed-item","label":"信息流子项","description":"信息流子项:包括左文右图、纯文本、上文下图、多图及视频模式。","codeSnap":"<smt-feed-item theme='default' status='0'></smt-feed-item>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-feed-item/smt-feed-item","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-feed-item/smt-feed-item","fragement":"swanide://fragment/afebdafc13cda2201207a3d6721577481577175550244","properties":{"attributes":[{"name":"theme","type":"string","description":"信息流子项的主题","required":"是","default":"default"},{"name":"content","type":"Object","description":"信息流子项目的内容","required":"是","default":"{title: '标题',infoSource: '网易新闻',commentsNum: 2,images: []}"},{"name":"video","type":"Object","description":"是否为视频和视频信息","required":"否","default":"{isVideo: true, time: '05:00'}"},{"name":"status","type":"String","description":"阅读状态:0未读,1已读","required":"否","default":"0"}],"events":[{"name":"bindfeeditemtap","type":"Event","description":"点击feed-item之后的回调","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-feed-item/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-feed-item.png","usingComponents":{"smt-feed-item":"@smt-ui/component/src/feed-item"},"dynamicLibConfig":{"usingDynamicLib":{"smt-feed-item":"dynamicLib://smartUI/smt-feed-item"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"feed","label":"信息流","description":"信息流组件,可配置下拉刷新、列表加载、上滑加载功能,适用于列表信息展示,并可放置在页面的任何部分;组件包含手势下拉以及api调用两种使用方式\n* 注意:\n1. 和scroll-view一样,信息流组件作为局部滚动组件,必须在它的父级或本身指定高度\n2. 当同时启用下拉刷新和上滑加载且请求不稳定时,可使用CancelToken取消先前的请求","codeSnap":"<smt-feed pull-to-refresh><view>list</view></smt-feed>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-feed/smt-feed","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-feed/smt-feed","fragement":"swanide://fragment/7b9bf19d0c974d45d9b68fd9fc4429b31577200628346","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":"-"},{"name":"loadingHeight","type":"Number","description":"加载、话术区域高度,单位为设备px,转换方法: import {upx2dpx} from '@smt-ui/component/src/common/utils/px';","required":"否","default":"192px(设计稿宽度为1242)"},{"name":"pullToRefresh","type":"Boolean","description":"是否开启手势下拉刷新; 默认只能通过组件api调起","required":"否","default":"false"},{"name":"lowerThreshold","type":"Number","description":"触发scrolltolower事件的阈值","required":"否","default":"150px(设备上的px)"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"否","default":"建议最多显示18个汉字,超出内容截断"},{"name":"refresh","type":"EventHandle","description":"手势滑动触发加载时,响应该onRefresh事件; 通过调用api加载,不会触发该事件","required":"否","default":""},{"name":"startRefresh","type":"EventHandle","description":"手动调用该api,触发加载","required":"否","default":""},{"name":"stopRefresh","type":"EventHandle","description":"手动调用该api,停止加载,并弹出加载提示(对应属性text);可使用await等待关闭动画结束","required":"否","default":""},{"name":"closeLoading","type":"EventHandle","description":"手动调用该api,立即关闭加载,不弹出加载提示;例如接口异常,建义直接关闭加载(小球交替一次大约为500ms,调用前可加延时避免关闭太快)","required":"否","default":""},{"name":"smt-feed-container","type":"externalClass","description":"组件整体class名","required":"否","default":"-"},{"name":"smt-feed-loading","type":"externalClass","description":"加载区域class名","required":"否","default":"-"},{"name":"smt-feed-content","type":"externalClass","description":"滚动区域class名,用于设置ios回弹背景","required":"false","default":""},{"name":"smt-refresh-circle-left","type":"externalClass","description":"加载中左侧小球class名","required":"否","default":"-"},{"name":"smt-refresh-circle-right","type":"externalClass","description":"加载中右侧小球class名","required":"否","default":"-"},{"name":"ext-cls-content","type":"externalClass","description":"滚动区域class名","required":"否","default":"-"},{"name":"smt-refresh-result-container","type":"externalClass","description":"加载话术外框class名","required":"否","default":"-"},{"name":"ext-cls-result-text","type":"externalClass","description":"加载话术文字class名","required":"否","default":"-"}],"events":[{"name":"bindscroll","type":"Event","description":"滚动时触发,返回当前组件的值","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/feed/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/feed.png","usingComponents":{"feed":"@smt-ui/component/src/feed"},"dynamicLibConfig":{"usingDynamicLib":{"feed":"dynamicLib://smartUI/feed"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"icon","label":"图标","description":"包括天气、系统设置、互动社交、生活服务、书籍影音、政务服务、交通出行7个行业类别的图标。请扫描示例二维码查看图标全集。","codeSnap":"<smt-icon name='add'></smt-icon>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-icon/smt-icon","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-icon/smt-icon","fragement":"swanide://fragment/0f37439a2a95dbf9b44cc206c3f822c51585029516902","properties":{"attributes":[{"name":"name","type":"String","description":"icon的英文名称","required":"是"},{"name":"color","type":"String, Array.<String>","description":"icon的颜色,多色图标支持传入色值的数组"},{"name":"size","type":"String","description":"icon的尺寸,必须包含单位(px, rpx, vw, vh, %, em等)","default":"25px"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/icon/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/icon.png","usingComponents":{"icon":"@smt-ui/component/src/icon"},"dynamicLibConfig":{"usingDynamicLib":{"icon":"dynamicLib://smartUI/icon"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-image-uploader","label":"图片上传器","description":"上传图片组件,支持大图、多图模式,可配置图片个数、大小限制等","codeSnap":"<smt-image-uploader picture-list={{['https://b.bdstatic.com/searchbox/icms/searchbox/img/ripple-init.gif','https://imgsa.baidu.com/news/q%3D100/sign=c57a83945bfbb2fb322b5c127f4b2043/9213b07eca80653890432fda99dda144ac34824a.jpg']}}></smt-image-uploader>","groups":"layout","autoReadme":true,"demopath":"extensions/component/smt-image-uploader/smt-image-uploader","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-image-uploader/smt-image-uploader","fragement":"swanide://fragment/d05e46c6ee440831c1c56600dc7dd59d1587556647748","properties":{"attributes":[{"name":"theme","type":"String","description":"主题:default为小图,large为大图模式","default":"default","required":"否"},{"name":"pictureList","type":"Array","description":"i上传图片地址列表","default":"[]","required":"否"},{"name":"pictureLimit","type":"Number","description":"上传图片个数上限","default":"9","required":"否"},{"name":"showPreview","type":"Boolean","description":"是否支持预览","default":"false","required":"否"},{"name":"showTips","type":"Boolean","description":"是否展示提示信息","default":"false","required":"否"},{"name":"pictureSizeLimit","type":"Number","description":"单张图片大小限制","default":"1e7","required":"否"},{"name":"pictureSelectLimit","type":"Number","description":"从本地相册中选择图片个数","default":"2","required":"否"}],"events":[{"name":"binddelimage","type":"Event","description":"删除图片时触发","required":"否","default":"-"},{"name":"bindchooseimage","type":"Event","description":"选择图片时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-image-uploader/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-image-uploader.png","usingComponents":{"smt-image-uploader":"@smt-ui/component/src/image-uploader"}},{"name":"navigation","label":"顶部导航bar","autoReadme":true,"description":"顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题","codeSnap":"<smt-navigation></smt-navigation>","fragement":"swanide://fragment/2cb7a3d38f1df3854fc5cabb679654771587898970846","groups":"layout","demopath":"extensions/component/smt-navigation/smt-navigation","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-navigation/smt-navigation","properties":{"attributes":[{"name":"backgroundColor","type":"string","description":"导航背景色","required":"否","default":"#fff"},{"name":"frontColor","type":"string","description":"前景颜色(目前特指字体颜色)","required":"否","default":"#000"},{"name":"opacity","type":"Number","description":"导航背景透明度","required":"否","default":1},{"name":"navigationStyle","type":"Object","description":"导航容器自定义样式(加在行间样式上)","required":"否","default":"{}"},{"name":"navigationAreaStyle","type":"Object","description":"导航内容可视区自定义样式(加在行间样式上)","required":"否","default":"{}"},{"name":"type","type":"String","description":"自定义导航类型:default为默认,switchNav为切换导航栏模式","required":"否","default":"default"},{"name":"backIcon","type":"Boolean","description":"是否显示返回图标","required":"否","default":false},{"name":"homeIcon","type":"Boolean","description":"是否显示首页图标","required":"否","default":false},{"name":"switchStartPosition","type":"Number","description":"切换模式下,导航栏起始位置,默认状态栏的高度","required":"否","default":"statusBarHeight(计算得来的默认状态栏的高度)"},{"name":"switchEndPosition","type":"Number","description":"切换模式下,是否隐藏顶部","required":"否","default":100},{"name":"commonBar","type":"Object","description":"切换模式下,初始的导航样式","required":"否","default":"{'opacity':1,'title':’','frontColor':'#000','bgColor':'#fff','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}"},{"name":"fixedBar","type":"Object","description":"切换模式下,滚动后的导航样式","required":"否","default":"{'opacity':1,'title':'fixed','frontColor':'#000','bgColor':'pink','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}"},{"name":"homeIconSize","type":"String","value":"35.02rpx"},{"name":"backIconSize","type":"String","value":"35.02rpx"}],"events":[{"name":"bindbackHdl","type":"Event","description":"点击返回按钮触发事件","required":"否","default":"-"},{"name":"bindhomeHdl","type":"Event","description":"点击返回首页触发事件","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/navigation/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/navigation.png","usingComponents":{"navigation":"@smt-ui/component/src/navigation"}},{"name":"page-status","label":"页面状态组件","description":"页面状态组件,可用于全屏和半屏。用于展示页面加载,页面异常-有操作、页面异常-无操作三种页面状态。","codeSnap":"<smt-page-status></smt-page-status>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-page-status/smt-page-status","fragment":"swanide://fragment/4cc92982287ac8a30b5fe19f220dc8f71577190736077","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-page-status/smt-page-status","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;沉浸式主题请指定dark","required":"否","default":""},{"name":"loading","type":"Boolean","description":"页面状态配置,默认不展示加载状态页面","required":"否","default":"false"},{"name":"icon","type":"String","description":"空态/缺省页面下的图标名称","required":"否","default":"content"},{"name":"loadingTitle","type":"String","description":"加载页面下的标题文案","required":"否","default":"正在加载..."},{"name":"title","type":"String","description":"空态/缺省页面下的标题文案","required":"否","default":"单行标题"},{"name":"desc","type":"String","description":"空态/缺省页面下的描述文案","required":"否","default":""},{"name":"showBtn","type":"Boolean","description":"是否展示空态/缺省页面下的操作按钮,默认展示","required":"否","default":"true"},{"name":"btnText","type":"String","description":"空态/缺省页面下,操作按钮的描述文案,建议最多显示4个汉字,超出内容截断","required":"否","default":"重新加载"}],"events":[{"name":"reloading","type":"Event","description":"空态/缺省页面下,点击操作按钮时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/page-status/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/page-status.png","usingComponents":{"page-status":"@smt-ui/component/src/page-status"},"dynamicLibConfig":{"usingDynamicLib":{"page-status":"dynamicLib://smartUI/page-status"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"refresh","label":"刷新","description":"可用于页面任意区域;使用时需自行添加下拉逻辑改变offset-y参数;smt-feed组件对smt-refresh进行了封装,支持手势交互和api调起刷新。","codeSnap":"<smt-refresh offset-y=\"{{0}}\" status=\"{{1}}\" text=\"为你推荐15条更新\"></smt-refresh>","fragement":"swanide://fragment/598510a21b650b89e2e5d13c814dc46c1577192328823","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-refresh/smt-refresh","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-refresh/smt-refresh","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":"-"},{"name":"loadingHgt","type":"Number","description":"加载区域高度","required":"否","default":"192px(需转换为设备尺寸)"},{"name":"offsetY","type":"Number","description":"垂直移动距离,*建议后续在sjs中使用","required":"否","default":"0"},{"name":"status","type":"Number","description":"加载状态 0: 未开始 1: 加载中 2: 展示话术","required":"否","default":"0"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"否","default":"建议最多显示18个汉字,超出内容截断"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/refresh/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/refresh.png","usingComponents":{"refresh":"@smt-ui/component/src/refresh"},"dynamicLibConfig":{"usingDynamicLib":{"refresh":"dynamicLib://smartUI/refresh"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-search-bar","label":"自定义搜索框","description":"自定义搜索框,支持配置多种主题,搜索默认文案,容器样式等","codeSnap":"<smt-search-bar></smt-search-bar>","fragement":"swanide://fragment/2b0d6221d42399bdab724ac54198b9851587900957820","groups":"layout","demopath":"extensions/component/smt-search-bar/smt-search-bar","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-search-bar/smt-search-bar","properties":{"attributes":[{"name":"theme","type":"String","description":"搜索框主题样式:default为搜索框灰色填充主题,border为搜索框描边主题,white为搜索框白色填充主题,transparent为搜索框透明主题","required":"否","default":"default"},{"name":"placeholder","type":"String","description":"输入内容默认文案","required":"否","default":"搜索关键词"},{"name":"placeholderStyle","type":"String","description":"输入内容默认文案的样式","required":"否","default":""},{"name":"searchIconColor","type":"String","description":"搜索icon的颜色","required":"否","default":"#999"},{"name":"confirmType","type":"String","description":"键盘右下角按钮文字","required":"否","default":"search"},{"name":"value","type":"String","description":"搜索框内容","required":"否","default":""},{"name":"focus","type":"Boolean","description":"聚焦,调起输入键盘","required":"否","default":false},{"name":"containerStyle","type":"Object","description":"最外层容器的样式,但theme权重大于该样式","required":"否","default":"{'background': '#f4f5f6', 'opacity': 1}"},{"name":"contentStyle","type":"Object","description":"内层搜索容器的样式","required":"否","default":"{'width': 688.41,'minWidth': 218}"}],"events":[{"name":"bindinput","type":"Event","description":"输入时触发","required":"否","default":"-"},{"name":"bindfocus","type":"Event","description":"聚焦时触发","required":"否","default":"-"},{"name":"bindclear","type":"Event","description":"点击清除按钮时触发","required":"否","default":"-"},{"name":"bindblur","type":"Event","description":"失焦时触发","required":"否","default":"-"},{"name":"bindsearch","type":"Event","description":"搜索时触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-search-bar/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-search-bar.png","usingComponents":{"smt-search-bar":"@smt-ui/component/src/search-bar"}},{"name":"spin","label":"加载","description":"加载组件,可用于全屏和半屏。用于展示加载状态,点击加载、正在加载、加载完成、重新加载四种状态。","codeSnap":"<smt-spin status='1'></smt-spin>","groups":"layout","isDynamicLib":true,"demopath":"extensions/component/smt-spin/smt-spin","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-spin/smt-spin","fragement":"swanide://fragment/25af44248f8aad73b64e274ead38d6151577191316430","properties":{"attributes":[{"name":"status","type":"Number","description":"加载状态配置","required":"是"},{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"否","default":""},{"name":"textConfig","type":"Array","description":"加载状态对应的文案","required":"否","default":"['点击加载更多', '正在加载...', '已经到底啦', '加载失败 点击重新加载']"},{"name":"secureBottom","type":"Boolean","description":"默认兼容iPhoneX 及以上型号底部安全区,非全屏可关闭","required":"否","default":"true"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/spin/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/spin.png","usingComponents":{"spin":"@smt-ui/component/src/spin"},"dynamicLibConfig":{"usingDynamicLib":{"spin":"dynamicLib://smartUI/spin"},"dynamicLib":{"smartUI":{"provider":"smart-ui"}}}},{"name":"smt-textarea","label":"自定义多行输入框","description":"多行输入框,支持白色主题(默认)、 边框主题和深色模式主题,可配置字符限制、错误提示方式等","codeSnap":"<smt-textarea></smt-textarea>","fragement":"swanide://fragment/92cabcc9b9a53f18dfb7b3a9fe8252181587899191806","groups":"layout","demopath":"extensions/component/smt-textarea/smt-textarea","webUrl":"https://qft12m.smartapps.cn/extensions/component/smt-textarea/smt-textarea","properties":{"attributes":[{"name":"theme","type":"String","description":"多行输入框主题:default: 默认白色主题,border: 边框主题,dark: 深色模式主题","required":"否","default":"default"},{"name":"placeholder","type":"String","description":"输入内容默认文案","required":"否","default":"请输入内容"},{"name":"placeholderStyle","type":"String","description":"输入内容默认文案的样式","required":"否","default":""},{"name":"contentLimit","type":"Number","description":"输入内容长度限制","required":"否","default":120},{"name":"width","type":"String","description":"输入框宽度","required":"否","default":"auto"},{"name":"autoHeight","type":"Boolean","description":"输入框高度是否自适应","required":"否","default":false},{"name":"promptType","type":"String","description":"输入超限提示类型: 1.text:框下文字提示; 2.toast:toast提示超限; 3.none:不提示","required":"否","default":"toast"},{"name":"tipsEdge","type":"Number","description":"promptType为text时,出现提示时的剩余可输入字符个数","required":"否","default":20},{"name":"toastText","type":"String","description":"promptType为toast时,提示文案内容","required":"否","default":"超出字数限制"},{"name":"submitText","type":"String","description":"发布按钮的文字内容","required":"否","default":"发表"}],"events":[{"name":"bindinput","type":"Event","description":"输入时触发事件","required":"否","default":"-"},{"name":"bindconfirm","type":"Event","description":"键盘点击确认触发","required":"否","default":"-"},{"name":"bindblur","type":"Event","description":"失焦时触发","required":"否","default":"-"},{"name":"bindsubmit","type":"Event","description":"发表成功失触发","required":"否","default":"-"}]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-textarea/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-textarea.png","usingComponents":{"smt-textarea":"@smt-ui/component/src/textarea"}}]}]} |
{ | ||
"name": "navigation", | ||
"label": "顶部导航bar", | ||
"autoReadme": true, | ||
"description": "顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题", | ||
@@ -100,2 +101,10 @@ "codeSnap": "<smt-navigation></smt-navigation>", | ||
"default": "{'opacity':1,'title':'fixed','frontColor':'#000','bgColor':'pink','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}" | ||
}, { | ||
"name": "homeIconSize", | ||
"type": "String", | ||
"value": "35.02rpx" | ||
},{ | ||
"name": "backIconSize", | ||
"type": "String", | ||
"value": "35.02rpx" | ||
}], | ||
@@ -102,0 +111,0 @@ "events": [{ |
@@ -54,2 +54,12 @@ /** | ||
value: '#000' | ||
}, | ||
// 主页图标大小 | ||
homeIconSize: { | ||
type: String, | ||
value: '35.02rpx' | ||
}, | ||
// 返回图标大小 | ||
backIconSize: { | ||
type: String, | ||
value: '35.02rpx' | ||
} | ||
@@ -68,2 +78,8 @@ }, | ||
}, | ||
lifetimes: { | ||
attached: function () { | ||
this.initIcons(); | ||
} | ||
}, | ||
methods: { | ||
@@ -75,3 +91,9 @@ /** | ||
initIcons() { | ||
const {homeIcon, backIcon} = this.data; | ||
const { | ||
homeIcon, | ||
backIcon, | ||
homeIconSize, | ||
backIconSize | ||
} = this.data; | ||
this.setData({ | ||
@@ -81,7 +103,7 @@ icons: [{ | ||
show: backIcon, | ||
size: '35.02rpx' | ||
size: backIconSize | ||
}, { | ||
type: 'home', | ||
show: homeIcon, | ||
size: '35.02rpx' | ||
size: homeIconSize | ||
}] | ||
@@ -88,0 +110,0 @@ }); |
#### 组件名称 | ||
smt-navigation | ||
navigation | ||
#### 解释: | ||
顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染 | ||
顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题 | ||
@@ -11,2 +11,15 @@ #### 属性说明: | ||
|backgroundColor |string |否|#fff|导航背景色| | ||
|frontColor |string |否|#000|前景颜色(目前特指字体颜色)| | ||
|opacity |Number |否|1|导航背景透明度| | ||
|navigationStyle |Object |否|{}|导航容器自定义样式(加在行间样式上)| | ||
|navigationAreaStyle |Object |否|{}|导航内容可视区自定义样式(加在行间样式上)| | ||
|type |String |否|default|自定义导航类型:default为默认,switchNav为切换导航栏模式| | ||
|backIcon |Boolean |否|false|是否显示返回图标| | ||
|homeIcon |Boolean |否|false|是否显示首页图标| | ||
|switchStartPosition |Number |否|statusBarHeight(计算得来的默认状态栏的高度)|切换模式下,导航栏起始位置,默认状态栏的高度| | ||
|switchEndPosition |Number |否|100|切换模式下,是否隐藏顶部| | ||
|commonBar |Object |否|{'opacity':1,'title':’','frontColor':'#000','bgColor':'#fff','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}|切换模式下,初始的导航样式| | ||
|fixedBar |Object |否|{'opacity':1,'title':'fixed','frontColor':'#000','bgColor':'pink','backIcon':true,'homeIcon':false,'navigationStyle':{},'navigationAreaStyle':{}}|切换模式下,滚动后的导航样式| | ||
|homeIconSize |String |||顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题| | ||
|backIconSize |String |||顶部自定义的导航栏,其中不包含界面,仅仅是限制了开发者写顶部bar内容的区域,使之在安全区内完成顶部内容的渲染;支持配置返回首页、上一页按钮,和滑动切换效果主题| | ||
@@ -16,8 +29,37 @@ #### 代码示例 | ||
``` | ||
<smt-navigation> | ||
<view> | ||
<text>{{title}}</text> | ||
<text>{{subTitle}}</text> | ||
<view class="wrap"> | ||
<image class="iphone-image-area" | ||
mode="widthFix" | ||
src="{{showSwicthNav ? iphoneGifSrc : iphoneImgSrc}}" | ||
/> | ||
<image class="status-image-area {{showSwicthNav ? 'hide' : ''}}" | ||
mode="widthFix" | ||
src="{{statusImgSrc}}" | ||
/> | ||
<smt-navigation | ||
navigation-style="{{navigationStyle}}" | ||
navigation-area-style="{{navigationAreaStyle}}" | ||
back-icon="{{backIcon}}" | ||
home-icon="{{homeIcon}}" | ||
front-color="#fff" | ||
bindbackHdl="backHdl" | ||
bindhomeHdl="homeHdl" | ||
backgroundColor="transparent"> | ||
<view class="navigation-content-area {{showTitle ? '' : 'hide'}}"> | ||
<text class="navigation-title">{{title}}</text> | ||
<text class="navigation-desc">{{desc}}</text> | ||
</view> | ||
</smt-navigation> | ||
<view class="btns-area"> | ||
<button s-for="item,index in btnsList" | ||
type="primary" | ||
data-type="{{item.type}}" | ||
data-index="{{index}}" | ||
disabled="{{item.disabled}}" | ||
hover-stop-propagation="true" | ||
bind:tap="tapHdl"> | ||
{{item.text}} | ||
</button> | ||
</view> | ||
</smt-navigation> | ||
</view> | ||
``` | ||
@@ -28,10 +70,198 @@ js: | ||
data: { | ||
title: '主标题', | ||
subTitle: '副标题' | ||
homeIcon: false, | ||
backIcon: false, | ||
btnsList: [{ | ||
type: 'back', | ||
text: '显示"返回上一页"按钮' | ||
}, { | ||
type: 'home', | ||
text: '显示"返回首页"按钮' | ||
}, { | ||
type: 'both', | ||
text: '显示"返回上一页&返回首页"按钮' | ||
}, { | ||
type: 'switch', | ||
text: '点击演示上滑页面导航变色' | ||
}, { | ||
type: 'reset', | ||
text: '重置' | ||
}], | ||
iphoneImgSrc: 'https://b.bdstatic.com/miniapp/images/simulator.png', | ||
iphoneGifSrc: 'https://b.bdstatic.com/miniapp/images/simulator.gif', | ||
statusImgSrc: 'https://b.bdstatic.com/miniapp/images/smt_status.png', | ||
navigationStyle: { | ||
'position': 'relative', | ||
'margin-top': '-836rpx', | ||
'padding': '0 0 0 30.19rpx', | ||
'height': '30px', | ||
'width': '100%' | ||
}, | ||
navigationAreaStyle: { | ||
height: '45px' | ||
} | ||
}, | ||
/** | ||
* 点击返回上一级按钮 | ||
* | ||
*/ | ||
backHdl() { | ||
this.changeNavHdl('上一页面'); | ||
}, | ||
/** | ||
* 点击返回首页按钮 | ||
* | ||
*/ | ||
homeHdl() { | ||
this.changeNavHdl('小程序首页'); | ||
}, | ||
/** | ||
* 切换模拟器公共方法 | ||
* | ||
* @param {string} title 标题 | ||
* @param {string} desc 描述 | ||
* @param {boolean} backIcon 是否配置返回按钮 | ||
* @param {boolean} homeIcon 是否配置返回首页按钮 | ||
*/ | ||
changeNavHdl(title) { | ||
this.setData({ | ||
title, | ||
desc: 'detail', | ||
backIcon: false, | ||
homeIcon: false | ||
}); | ||
setTimeout(() => { | ||
this.setData({ | ||
showTitle: true | ||
}); | ||
}, 300); | ||
}, | ||
/** | ||
* 点击按钮触发 | ||
* | ||
* @param {Event} e 事件对象 | ||
* @param {Object} e.currentTarget.dataset 该按钮的数据对象 | ||
*/ | ||
tapHdl(e) { | ||
const {type, index} = e.currentTarget.dataset; | ||
const homeIcon = /home|both/.test(type); | ||
const backIcon = /back|both/.test(type); | ||
this.setData({ | ||
title: '', | ||
desc: '', | ||
homeIcon, | ||
backIcon, | ||
showTitle: false, | ||
showSwicthNav: type === 'switch', | ||
btnsList: this.data.btnsList.filter((btnVal, btnIndex) => { | ||
if (type === 'reset') { | ||
btnVal.disabled = false; | ||
} | ||
else if (btnIndex === index) { | ||
btnVal.disabled = true; | ||
} | ||
return btnVal; | ||
}) | ||
}); | ||
} | ||
}); | ||
``` | ||
css: | ||
``` | ||
.wrap { | ||
height: 100%; | ||
padding: 0; | ||
background: #f5f5f5; | ||
} | ||
.hide { | ||
opacity: 0; | ||
} | ||
.header-content-custom { | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
.header-content-area { | ||
height: 100%; | ||
flex: 1; | ||
box-sizing: border-box; | ||
} | ||
.wrap .smt-card-area { | ||
margin: 25.362rpx 0 72.464rpx; | ||
background: #fff; | ||
} | ||
.wrap .area-content { | ||
height: 635.87rpx; | ||
} | ||
.header-content-subtitle { | ||
z-index: 99; | ||
display: block; | ||
font-size: .13rem; | ||
color: #999; | ||
} | ||
.wrap .item-logo { | ||
display: inline-block; | ||
width: 32.609rpx; | ||
height: 32.609rpx; | ||
margin: 34.005rpx 0; | ||
} | ||
.page-status-hover { | ||
opacity: .2; | ||
} | ||
.iphone-image-area { | ||
width: 702.9rpx; | ||
height: 580.92rpx; | ||
margin: 22.34rpx 23.55rpx; | ||
} | ||
.status-image-area { | ||
width: 661.84rpx; | ||
position: relative; | ||
top: -766rpx; | ||
left: 44rpx; | ||
} | ||
.btns-area { | ||
/* position: relative; | ||
top: 362.32rpx; */ | ||
position: fixed; | ||
width: 100%; | ||
bottom: 18.12rpx; | ||
background: #f5f5f5;; | ||
padding-top: 12.08rpx; | ||
} | ||
.navigation-content-area { | ||
width: 100%; | ||
margin-left: 20%; | ||
} | ||
.navigation-desc { | ||
font-size: 23.55rpx; | ||
} | ||
.navigation-title, | ||
.navigation-desc { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
transition: opacity .5; | ||
} | ||
.navigation-desc { | ||
opacity: .6; | ||
} | ||
``` |
@@ -86,2 +86,10 @@ /** | ||
value: 100 | ||
}, | ||
homeIconSize: { | ||
type: String, | ||
value: '35.02rpx' | ||
}, | ||
backIconSize: { | ||
type: String, | ||
value: '35.02rpx' | ||
} | ||
@@ -88,0 +96,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"1.1.29"} | ||
{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"1.1.30"} |
Sorry, the diff of this file is not supported yet
1143848
7684