
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@mand-mobile/platform
Advanced tools
@mand-mobile/platform
Runtime shims and compiletime plugins for smoothing out differences between platforms.
import TransitionPrimitive from '@mand-mobile/platform/lib/runtime/component/transition'
false
import ScrollViewPrimitive from '@mand-mobile/platform/lib/runtime/component/scroll-view'
false
true
'auto'
false
0
import toastFactory from '@mand-mobile/platform/lib/runtime/component/toast'
import dialogFactory from '@mand-mobile/platform/lib/runtime/component/dialog'
import actionSheetFactory from '@mand-mobile/platform/lib/runtime/component/action-sheet'
import {Dom} from '@mand-mobile/platform/lib/runtime/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/lib/runtime/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 receives a total of 7 weekly downloads. As such, @mand-mobile/platform popularity was classified as not popular.
We found that @mand-mobile/platform 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.