
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
zto-express-ui
Advanced tools
基于vue2的移动端组件库
🚀文档网站
# 通过 npm
npm i zto-express-ui
# 通过 yarn
yarn add zto-express-ui
# 通过 pnpm
pnpm add zto-express-ui
babel-plugin-import 是一款 babel 插件,它会在编译过程中将 import 的写法自动转换为按需引入的方式。
# 安装插件
npm install babel-plugin-import -D
// 在.babelrc 中添加配置
// 注意:webpack 1 无需设置 libraryDirectory
{
"plugins": [
["import", {
"libraryName": "zto-express-ui",
"libraryDirectory": "es",
"style": true
}]
]
}
// 对于使用 babel7 的用户,可以在 babel.config.js 中配置
module.exports = {
plugins: [
['import', {
libraryName: 'zto-express-ui',
libraryDirectory: 'es',
style: true
}, 'zto-express-ui']
]
};
<template>
<div>
<ze-button type="primary">按钮</ze-button>
</div>
</template>
<script>
import Vue from 'vue';
import { Button } from 'zto-express-ui';
Vue.use(Button);
export default {
data() {
return {};
}
}
</script>
<template>
<div>
<ze-button type="primary">按钮</ze-button>
</div>
</template>
<script>
import Vue from 'vue';
import Button from 'zto-express-ui/lib/button';
import 'zto-express-ui/lib/button/style';
Vue.use(Button);
export default {
data() {
return {};
}
}
</script>
支持一次性导入所有组件,引入所有组件会增加代码包体积,因此不推荐这种做法。
// main.js
import Vue from 'vue';
import zeUi from 'zto-express-ui';
import 'zto-express-ui/lib/index.css';
Vue.use(zeUi);
FAQs
Unknown package
The npm package zto-express-ui receives a total of 1 weekly downloads. As such, zto-express-ui popularity was classified as not popular.
We found that zto-express-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.