New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@smt-ui/component

Package Overview
Dependencies
Maintainers
8
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smt-ui/component - npm Package Compare versions

Comparing version 0.0.40-alpha.0 to 0.0.43-alpha.0

4

package.json
{
"name": "@smt-ui/component",
"version": "0.0.40-alpha.0",
"version": "0.0.43-alpha.0",
"description": "extension base",

@@ -40,3 +40,3 @@ "author": "jialipeng <jialipeng@baidu.com>",

},
"gitHead": "bb84322af8edf7fa7379049afa4fe7c68066101b",
"gitHead": "20a554636608281a96c302cb8b4bbf18210ddacc",
"dependencies": {

@@ -43,0 +43,0 @@ "@babel/runtime": "^7.7.7"

@@ -1,1 +0,1 @@

{"npmPackageName":"@smt-ui/component","npmPackageVersion":"0.0.39-alpha.0","componentsList":[{"name":"layout","label":"布局组件","icon":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NiA2NiI+PHBhdGggZD0iTTIzLjkgMjUuOGMtMS40IDAtMi41IDEuMS0yLjUgMi41VjM5YzAgMS40IDEuMSAyLjUgMi41IDIuNXMyLjUtMS4xIDIuNS0yLjVWMjguM2MwLTEuNC0xLjEtMi41LTIuNS0yLjV6TTQ1LjkgMjYuOWMtMS0xLTIuNS0xLTMuNSAwTDM4IDMxLjNjLS42LjYtLjkgMS40LS44IDIuMi0uMS44LjIgMS42LjggMi4xbDQuNCA0LjRjLjUuNSAxLjEuNyAxLjguN3MxLjMtLjMgMS44LS43LjctMS4xLjctMS44LS4zLTEuMy0uNy0xLjhsLTMtMyAzLTNjLjktLjkuOS0yLjUtLjEtMy41eiIvPjxwYXRoIGQ9Ik01MC44IDE0LjdjLTMuNy0xLjgtMTAuNC0zLjEtMTcuNi0zLjItNy4yLjEtMTQgMS4zLTE3LjcgMy4yLTUuNyAyLjctOCA4LjMtOCAxOS4yIDAgOC43IDIuNCAxNSA2LjUgMTcuMiA1LjMgMi43IDEwLjEgMy42IDE5LjEgMy42IDkuMSAwIDEzLjktLjkgMTktMy41IDQuMi0yLjMgNi42LTguNyA2LjYtMTcuMyAwLTEwLjgtMi40LTE2LjUtNy45LTE5LjJ6bTIuOSAxOS4xYzAgNy40LTIgMTEuOC0zLjkgMTIuOS0zLjggMS45LTcuNiAyLjktMTYuNyAyLjktOSAwLTEyLjktMS0xNi44LTIuOS0xLjktMS0zLjgtNS41LTMuOC0xMi45IDAtOC43IDEuNS0xMi45IDUuMS0xNC44IDMtMS41IDkuMi0yLjYgMTUuNS0yLjYgNi4zLjEgMTIuNSAxLjIgMTUuNSAyLjYgMy42IDEuOSA1LjEgNi4xIDUuMSAxNC44eiIvPjwvc3ZnPg==","components":[{"name":"smt-feed-item","label":"信息流子项","description":"信息流子项:包括左文右图、纯文本、上文下图、多图及视频模式。","codeSnap":"<smt-feed-item theme='default' content='title: '宠物自己在家时, 如何帮助它度过孤独时光',infoSource: '萌宠在家',commentsNum: 2' status='0'></smt-feed-item>","groups":"layout","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/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"}},{"name":"smt-feed","label":"信息流","description":"信息流组件,可配置下拉刷新、列表加载、上滑加载功能,适用于列表信息展示,并可放置在页面的任何部分;组件包含手势下拉以及api调用两种使用方式\n* 注意:\n1. 和scroll-view一样,信息流组件作为局部滚动组件,必须在它的父级或本身指定高度\n2. 当同时启用下拉刷新和上滑加载且请求不稳定时,可使用CancelToken取消先前的请求","codeSnap":"<smt-feed pull-to-refresh><view>list</view></smt-feed>","groups":"layout","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/component/smt-feed","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-feed.png","usingComponents":{"smt-feed":"@smt-ui/component/src/feed"}},{"name":"smt-icon","label":"图标","description":"包括天气、系统设置、互动社交、生活服务、书籍影音、政务服务、交通出行7个行业类别的图标。请扫描示例二维码查看图标全集。","codeSnap":"<smt-icon name='add'></smt-icon>","groups":"layout","fragement":"swanide://fragment/1151cb408d98313c4e79bb6a62755bfa1577193673206","properties":{"attributes":[{"name":"name","type":"String","description":"icon的英文名称","required":"是"},{"name":"color","type":"String, Array.<String>","description":"icon的颜色,多色图标支持传入色值的数组"},{"name":"size","type":"Number","description":"icon的尺寸,单位px","default":25}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/component/smt-icon","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-icon.png","usingComponents":{"smt-icon":"@smt-ui/component/src/icon"}},{"name":"navigation","label":"顶部导航bar","description":"顶部导航bar可以自定义","codeSnap":"<smt-navigation></smt-navigation>","groups":"layout","properties":{"properties":[],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/component/navigation","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/navigation.png","usingComponents":{"navigation":"@smt-ui/component/src/navigation"}},{"name":"smt-page-status","label":"页面状态组件","description":"页面状态组件,可用于全屏和半屏。用于展示页面加载,页面异常-有操作、页面异常-无操作三种页面状态。","codeSnap":"<smt-page-status></smt-page-status>","groups":"layout","fragment":"swanide://fragment/4cc92982287ac8a30b5fe19f220dc8f71577190736077","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/component/smt-page-status","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-page-status.png","usingComponents":{"smt-page-status":"@smt-ui/component/src/page-status"}},{"name":"publish","label":"发布器","description":"发布器组件可以用于用户直接发布文章使用,可以包含文字与图片,在支持发布器的客户端上,会直接调用API来展示发布器,在不支持发布器的客户端上,则会展示降级版的发布器","codeSnap":"<smt-publish></smt-publish>","groups":"layout","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"false","default":"-"},{"name":"loadingHgt","type":"Number","description":"加载区域高度","required":"false","default":"192px(需转换为设备尺寸)"},{"name":"offsetY","type":"Number","description":"垂直移动距离,*建议后续在sjs中使用","required":"false","default":"0"},{"name":"status","type":"Number","description":"加载状态 0: 未开始 1: 加载中 2: 展示话术","required":"false","default":"0"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"false","default":"建议最多显示18个汉字,超出内容截断"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/component/publish","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/publish.png","usingComponents":{"publish":"@smt-ui/component/src/publish"}},{"name":"smt-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","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/component/smt-refresh","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-refresh.png","usingComponents":{"smt-refresh":"@smt-ui/component/src/refresh"}},{"name":"smt-spin","label":"加载","description":"加载组件,可用于全屏和半屏。用于展示加载状态,点击加载、正在加载、加载完成、重新加载四种状态。","codeSnap":"<spin status='1'></spin>","groups":"layout","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/component/smt-spin","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-spin.png","usingComponents":{"smt-spin":"@smt-ui/component/src/spin"}}]}]}
{"npmPackageName":"@smt-ui/component","npmPackageVersion":"0.0.42-alpha.0","componentsList":[{"name":"layout","label":"布局组件","icon":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NiA2NiI+PHBhdGggZD0iTTIzLjkgMjUuOGMtMS40IDAtMi41IDEuMS0yLjUgMi41VjM5YzAgMS40IDEuMSAyLjUgMi41IDIuNXMyLjUtMS4xIDIuNS0yLjVWMjguM2MwLTEuNC0xLjEtMi41LTIuNS0yLjV6TTQ1LjkgMjYuOWMtMS0xLTIuNS0xLTMuNSAwTDM4IDMxLjNjLS42LjYtLjkgMS40LS44IDIuMi0uMS44LjIgMS42LjggMi4xbDQuNCA0LjRjLjUuNSAxLjEuNyAxLjguN3MxLjMtLjMgMS44LS43LjctMS4xLjctMS44LS4zLTEuMy0uNy0xLjhsLTMtMyAzLTNjLjktLjkuOS0yLjUtLjEtMy41eiIvPjxwYXRoIGQ9Ik01MC44IDE0LjdjLTMuNy0xLjgtMTAuNC0zLjEtMTcuNi0zLjItNy4yLjEtMTQgMS4zLTE3LjcgMy4yLTUuNyAyLjctOCA4LjMtOCAxOS4yIDAgOC43IDIuNCAxNSA2LjUgMTcuMiA1LjMgMi43IDEwLjEgMy42IDE5LjEgMy42IDkuMSAwIDEzLjktLjkgMTktMy41IDQuMi0yLjMgNi42LTguNyA2LjYtMTcuMyAwLTEwLjgtMi40LTE2LjUtNy45LTE5LjJ6bTIuOSAxOS4xYzAgNy40LTIgMTEuOC0zLjkgMTIuOS0zLjggMS45LTcuNiAyLjktMTYuNyAyLjktOSAwLTEyLjktMS0xNi44LTIuOS0xLjktMS0zLjgtNS41LTMuOC0xMi45IDAtOC43IDEuNS0xMi45IDUuMS0xNC44IDMtMS41IDkuMi0yLjYgMTUuNS0yLjYgNi4zLjEgMTIuNSAxLjIgMTUuNSAyLjYgMy42IDEuOSA1LjEgNi4xIDUuMSAxNC44eiIvPjwvc3ZnPg==","components":[{"name":"smt-feed-item","label":"信息流子项","description":"信息流子项:包括左文右图、纯文本、上文下图、多图及视频模式。","codeSnap":"<smt-feed-item theme='default' status='0'></smt-feed-item>","groups":"layout","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"}},{"name":"smt-feed","label":"信息流","description":"信息流组件,可配置下拉刷新、列表加载、上滑加载功能,适用于列表信息展示,并可放置在页面的任何部分;组件包含手势下拉以及api调用两种使用方式\n* 注意:\n1. 和scroll-view一样,信息流组件作为局部滚动组件,必须在它的父级或本身指定高度\n2. 当同时启用下拉刷新和上滑加载且请求不稳定时,可使用CancelToken取消先前的请求","codeSnap":"<smt-feed pull-to-refresh><view>list</view></smt-feed>","groups":"layout","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/smt-feed/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-feed.png","usingComponents":{"smt-feed":"@smt-ui/component/src/feed"}},{"name":"smt-icon","label":"图标","description":"包括天气、系统设置、互动社交、生活服务、书籍影音、政务服务、交通出行7个行业类别的图标。请扫描示例二维码查看图标全集。","codeSnap":"<smt-icon name='add'></smt-icon>","groups":"layout","fragement":"swanide://fragment/1151cb408d98313c4e79bb6a62755bfa1577193673206","properties":{"attributes":[{"name":"name","type":"String","description":"icon的英文名称","required":"是"},{"name":"color","type":"String, Array.<String>","description":"icon的颜色,多色图标支持传入色值的数组"},{"name":"size","type":"Number","description":"icon的尺寸,单位px","default":25}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-icon/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-icon.png","usingComponents":{"smt-icon":"@smt-ui/component/src/icon"}},{"name":"smt-navigation","label":"顶部导航bar","description":"顶部导航bar可以自定义","codeSnap":"<smt-navigation></smt-navigation>","fragement":"swanide://fragment/3be4d7bcac11266b9481dd018449a7271577692166749","groups":"layout","properties":{"attributes":[{"name":"backgroundColor","type":"string","description":"导航背景色","required":"否","default":"#fff"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/smt-navigation/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-navigation.png","usingComponents":{"smt-navigation":"@smt-ui/component/src/navigation"}},{"name":"smt-page-status","label":"页面状态组件","description":"页面状态组件,可用于全屏和半屏。用于展示页面加载,页面异常-有操作、页面异常-无操作三种页面状态。","codeSnap":"<smt-page-status></smt-page-status>","groups":"layout","fragment":"swanide://fragment/4cc92982287ac8a30b5fe19f220dc8f71577190736077","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/smt-page-status/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-page-status.png","usingComponents":{"smt-page-status":"@smt-ui/component/src/page-status"}},{"name":"publish","label":"发布器","description":"发布器组件可以用于用户直接发布文章使用,可以包含文字与图片,在支持发布器的客户端上,会直接调用API来展示发布器,在不支持发布器的客户端上,则会展示降级版的发布器","codeSnap":"<smt-publish></smt-publish>","groups":"layout","properties":{"attributes":[{"name":"theme","type":"String","description":"主题配置,默认浅色;深色主题请指定dark","required":"false","default":"-"},{"name":"loadingHgt","type":"Number","description":"加载区域高度","required":"false","default":"192px(需转换为设备尺寸)"},{"name":"offsetY","type":"Number","description":"垂直移动距离,*建议后续在sjs中使用","required":"false","default":"0"},{"name":"status","type":"Number","description":"加载状态 0: 未开始 1: 加载中 2: 展示话术","required":"false","default":"0"},{"name":"text","type":"String","description":"加载成功时的展示话术","required":"false","default":"建议最多显示18个汉字,超出内容截断"}],"events":[]},"type":"component","doc":"https://smartprogram.baidu.com/docs/develop/extended/ui_component/publish/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/publish.png","usingComponents":{"publish":"@smt-ui/component/src/publish"}},{"name":"smt-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","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/smt-refresh/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-refresh.png","usingComponents":{"smt-refresh":"@smt-ui/component/src/refresh"}},{"name":"smt-spin","label":"加载","description":"加载组件,可用于全屏和半屏。用于展示加载状态,点击加载、正在加载、加载完成、重新加载四种状态。","codeSnap":"<smt-spin status='1'></smt-spin>","groups":"layout","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/smt-spin/","qrCode":"https://b.bdstatic.com/miniapp/assets/images/doc_demo/smt-spin.png","usingComponents":{"smt-spin":"@smt-ui/component/src/spin"}}]}]}

@@ -5,3 +5,3 @@ {

"description": "信息流子项:包括左文右图、纯文本、上文下图、多图及视频模式。",
"codeSnap": "<smt-feed-item theme='default' content='title: '宠物自己在家时, 如何帮助它度过孤独时光',infoSource: '萌宠在家',commentsNum: 2' status='0'></smt-feed-item>",
"codeSnap": "<smt-feed-item theme='default' status='0'></smt-feed-item>",
"groups": "layout",

@@ -8,0 +8,0 @@ "fragement": "swanide://fragment/afebdafc13cda2201207a3d6721577481577175550244",

@@ -54,2 +54,8 @@ "use strict";

},
// 加载话术停留时间 * 用于单测
textStayTime: {
type: Number,
value: 800
},
// 主题定义
theme: {

@@ -178,3 +184,3 @@ type: String,

_context.t0 = type;
_context.next = _context.t0 === 'touchstart' ? 7 : _context.t0 === 'touchmove' ? 37 : _context.t0 === 'touchend' ? 70 : 99;
_context.next = _context.t0 === 'touchstart' ? 7 : _context.t0 === 'touchmove' ? 37 : _context.t0 === 'touchend' ? 71 : 100;
break;

@@ -247,3 +253,3 @@

case 36:
return _context.abrupt("break", 99);
return _context.abrupt("break", 100);

@@ -310,3 +316,3 @@ case 37:

if (!(!pullDown && this.status !== STATUS.IDLE && Math.abs(offsetY) > 20)) {
_context.next = 66;
_context.next = 67;
break;

@@ -321,8 +327,9 @@ }

this.status = STATUS.IDLE;
this.triggerEvent('statuschange', STATUS.IDLE);
this.lastOffsetY = this.offsetY = 0;
return _context.abrupt("return");
case 66:
case 67:
if (!disabled) {
_context.next = 68;
_context.next = 69;
break;

@@ -333,3 +340,3 @@ }

case 68:
case 69:
// offsetY快,setData慢,可能造成向上划没到顶。

@@ -355,9 +362,9 @@ // 要注意 初始就向下划,过滤掉

return _context.abrupt("break", 99);
return _context.abrupt("break", 100);
case 70:
case 71:
_iteratorNormalCompletion3 = true;
_didIteratorError3 = false;
_iteratorError3 = undefined;
_context.prev = 73;
_context.prev = 74;

@@ -373,14 +380,14 @@ for (_iterator3 = changedTouches[Symbol.iterator](); !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {

_context.next = 81;
_context.next = 82;
break;
case 77:
_context.prev = 77;
_context.t3 = _context["catch"](73);
case 78:
_context.prev = 78;
_context.t3 = _context["catch"](74);
_didIteratorError3 = true;
_iteratorError3 = _context.t3;
case 81:
_context.prev = 81;
case 82:
_context.prev = 82;
_context.prev = 83;

@@ -391,7 +398,7 @@ if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {

case 84:
_context.prev = 84;
case 85:
_context.prev = 85;
if (!_didIteratorError3) {
_context.next = 87;
_context.next = 88;
break;

@@ -402,11 +409,11 @@ }

case 87:
return _context.finish(84);
case 88:
return _context.finish(81);
return _context.finish(85);
case 89:
return _context.finish(82);
case 90:
if (!(touches.length || disabled)) {
_context.next = 91;
_context.next = 92;
break;

@@ -417,3 +424,3 @@ }

case 91:
case 92:
this.touching = false;

@@ -433,2 +440,3 @@ this.pos = {}; // 判断是否加载

this.status = STATUS.LOADING;
this.triggerEvent('statuschange', STATUS.LOADING);
}

@@ -450,5 +458,5 @@

this.lastOffsetY = this.offsetY = result;
return _context.abrupt("break", 99);
return _context.abrupt("break", 100);
case 99:
case 100:
case "end":

@@ -458,3 +466,3 @@ return _context.stop();

}
}, _callee, this, [[11, 24, 28, 36], [29,, 31, 35], [41, 45, 49, 57], [50,, 52, 56], [73, 77, 81, 89], [82,, 84, 88]]);
}, _callee, this, [[11, 24, 28, 36], [29,, 31, 35], [41, 45, 49, 57], [50,, 52, 56], [74, 78, 82, 90], [83,, 85, 89]]);
}));

@@ -499,3 +507,3 @@

this.closing = true;
this.offsetY = 0;
this.debCloseLoading.cancel();

@@ -531,2 +539,3 @@ if (this.data.enableScroll) {

case 11:
this.triggerEvent('statuschange', STATUS.IDLE);
this.status = STATUS.IDLE;

@@ -536,3 +545,3 @@ this.lastOffsetY = this.offsetY = 0;

case 14:
case 15:
case "end":

@@ -591,4 +600,5 @@ return _context2.stop();

});
this.triggerEvent('statuschange', STATUS.LOADING);
case 6:
case 7:
case "end":

@@ -633,6 +643,7 @@ return _context3.stop();

});
_context4.next = 8;
this.triggerEvent('statuschange', STATUS.SHOWTEXT);
_context4.next = 9;
return this.debCloseLoading();
case 8:
case 9:
case "end":

@@ -719,3 +730,3 @@ return _context4.stop();

return new Promise(function (r) {
return setTimeout(r, 800);
return setTimeout(r, _this5.data.textStayTime);
});

@@ -722,0 +733,0 @@

@@ -60,2 +60,9 @@ /**

// 加载话术停留时间 * 用于单测
textStayTime: {
type: Number,
value: 800
},
// 主题定义
theme: {

@@ -208,2 +215,3 @@ type: String,

this.status = STATUS.IDLE;
this.triggerEvent('statuschange', STATUS.IDLE);
this.lastOffsetY = this.offsetY = 0;

@@ -256,2 +264,3 @@ return;

this.status = STATUS.LOADING;
this.triggerEvent('statuschange', STATUS.LOADING);
}

@@ -299,3 +308,3 @@ this.startRefreshTime = Date.now();

this.closing = true;
this.offsetY = 0;
this.debCloseLoading.cancel();
if (!this.data.enableScroll) {

@@ -309,2 +318,3 @@ await syncSetData(this, {enableScroll: true});

await syncSetData(this, {status: STATUS.IDLE});
this.triggerEvent('statuschange', STATUS.IDLE);
this.status = STATUS.IDLE;

@@ -335,2 +345,3 @@ this.lastOffsetY = this.offsetY = 0;

});
this.triggerEvent('statuschange', STATUS.LOADING);
},

@@ -350,2 +361,3 @@

});
this.triggerEvent('statuschange', STATUS.SHOWTEXT);
await this.debCloseLoading();

@@ -413,3 +425,3 @@ },

await this.debOffsetCheck();
await new Promise(r => setTimeout(r, 800));
await new Promise(r => setTimeout(r, this.data.textStayTime));
await this.closeLoading();

@@ -416,0 +428,0 @@ }, 100);

{
"name": "navigation",
"name": "smt-navigation",
"label": "顶部导航bar",
"description": "顶部导航bar可以自定义",
"codeSnap": "<smt-navigation></smt-navigation>",
"fragement": "swanide://fragment/3be4d7bcac11266b9481dd018449a7271577692166749",
"groups": "layout",

@@ -12,5 +13,11 @@ "demoCode": {

"properties": {
"properties": [],
"attributes": [{
"name": "backgroundColor",
"type": "string",
"description": "导航背景色",
"required": "否",
"default": "#fff"
}],
"events": []
}
}
#### 组件名称
navigation
smt-navigation

@@ -10,2 +10,3 @@ #### 解释:

|---|---|---|---|---|
|backgroundColor |string |否|#fff|导航背景色|

@@ -12,0 +13,0 @@ #### 代码示例

@@ -5,3 +5,3 @@ {

"description": "加载组件,可用于全屏和半屏。用于展示加载状态,点击加载、正在加载、加载完成、重新加载四种状态。",
"codeSnap": "<spin status='1'></spin>",
"codeSnap": "<smt-spin status='1'></smt-spin>",
"groups": "layout",

@@ -8,0 +8,0 @@ "fragement": "swanide://fragment/25af44248f8aad73b64e274ead38d6151577191316430",

@@ -1,1 +0,1 @@

{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"0.0.39-alpha.0"}
{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"0.0.42-alpha.0"}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc