Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@vnmf/components-react
Advanced tools
Vnmf 组件库(React 版本)。
@vnmf/components
使用了基于 Web Components
的 Stencil 框架进行开发,于部分手机会出现兼容性问题:
visibility
切换失败导致页面白屏因此开发者可以使用此包对 React 框架的 H5 组件库进行替代,来提高兼容性。
本特性还没发布,需要 link 到本地使用。
git clone https://github.com/vnpaycode/vnmf.git
cd vnmf
git checkout components-compat
yarn
yarn run bootstrap
yarn run build
cd packages/vnmf-webpack-runner
npm link
cd ../packages/vnmf-loader
npm link
cd ../packages/vnmf-components-react
npm link
h5.useHtmlComponents
// config/index.js
module.exports = {
h5: {
useHtmlComponents: true
}
}
npm link @vnmf/webpack-runner
npm link @vnmf/vnmf-loader
npm link @vnmf/components-react
vnmf build --type h5 --watch
目前只适配了 View
、Text
、Swiper
组件,开发者可以根据使用到的组件按以下改造方法进行适配:
从这里拷贝 Vnmf2 的对应组件到 vnmf/packages/vnmf-components-react/src/components
目录下。
组件需要修改的地方有:
Nerv
相关的引用修改为 react
.tsx
,增加 Typings(可选)在入口文件增加组件的导出:
// vnmf-components/react/index
export { xxxx } from './dist/xxx'
修改 rollup 配置,添加 input:
// vnmf-components/rollup.config.js
export default {
input: {
'xxx/index': 'src/components/xxx/index.[jsx|tsx]'
}
}
cd vnmf/packages/vnmf-components-react
npm run dev
# 完成后重新刷新浏览器即可
FAQs
Vnmf 组件库(React 版本)。
The npm package @vnmf/components-react receives a total of 0 weekly downloads. As such, @vnmf/components-react popularity was classified as not popular.
We found that @vnmf/components-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.