
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@mand-mobile/platform-runtime
Advanced tools
Runtime shims and compiletime plugins for smoothing out differences between platforms.
import TransitionPrimitive from '@mand-mobile/platform-runtime/lib/component/transition'
falseimport ScrollViewPrimitive from '@mand-mobile/platform-runtime/lib/component/scroll-view'
falsetrue'auto'false0import toastFactory from '@mand-mobile/platform-runtime/lib/component/toast'
import dialogFactory from '@mand-mobile/platform-runtime/lib/component/dialog'
import actionSheetFactory from '@mand-mobile/platform-runtime/lib/component/action-sheet'
import {Dom} from '@mand-mobile/platform-runtime/lib/module'
const $MDDom = Dom.bind(this) // scoped selector like refs
$MDDom().querySelector('xxxx').getScrollOffset()
documentElement(): nodeRef
uniapp返回的是可视区域实例 查看详情
$MDDom().documentElement()
querySelector(elNmae: string): nodeRef
export default {
async mounted () {
const testNodeRef = this.$MDDom().querySelector('.test')
const rect: DOMRect = await testNodeRef.getBoundingClientRect()
}
}
querySelectorAll(elNmae: string): nodeRef
uniapp中返回的不是真实数组,所以不能直接用length等属性,需调用getNode方法
export default {
async mounted () {
const firsttTestNodeRef = this.$MDDom().querySelector('.test')[0]
const rect: DOMRect = await firsttTestNodeRef.getBoundingClientRect()
}
}
getNode(): Promise<any[]>
web中不做处理直接返回dom节点,uniapp支持Canvas节点的获取 查看详情
const nodeRefs = $MDDom().querySelectorAll('.test')
const nodes = await nodeRefs.getNode()
console.log(nodes) // [node, node, ...]
const nodeRef = $MDDom().querySelector('.test')
const node = await nodeRefs.getNode()
console.log(node)
getAttribute(prop: string): Promise<any>
uniapp中只能查询id或者nodesRef.fields方法中properties中可查询属性
export default {
async mounted () {
await $MDDom().querySelector('.test').getAttribute('id')
}
}
getBoundingClientRect(): Promise<DOMRect>
export default {
async mounted () {
await $MDDom().querySelector('.test').getBoundingClientRect()
}
}
getScrollOffset(): Promise<{scrollLeft: number, scrollTop: number }>
export default {
async mounted () {
await $MDDom().querySelector('.test').getScrollOffset()
}
}
getComputedStyle(propList: Array<string>): Promise<object>
export default {
async mounted () {
await $MDDom().querySelector('.test').getComputedStyle(['position'])
}
}
import {Device} from '@mand-mobile/platform-runtime/lib/module'
const device = Device()
device.vibrate()
or
export default {
mounted () {
$MDDevice().vibrate()
}
}
短时震动,仅在小程序真机有效,web和小程序调试工具无效
FAQs
mand-mobile runtime cross platform plugins
The npm package @mand-mobile/platform-runtime receives a total of 1 weekly downloads. As such, @mand-mobile/platform-runtime popularity was classified as not popular.
We found that @mand-mobile/platform-runtime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.