gxd-vue-library

依赖与element Ui插件库,聚福宝福利PC端插件库

Usage no npm install needed!

<script type="module">
  import gxdVueLibrary from 'https://cdn.skypack.dev/gxd-vue-library';
</script>

README

Gxd-vue-library

介绍

依赖与element Ui插件库,聚福宝福利PC端插件库

项目安装与引用

# 安装
npm install gxd-vue-library --save --registry=https://registry.npm.taobao.org


# Copy插件命令行,不建议全局引用,局部引用

{
    ...
    "scripts": {
        "copy:lib": "cp -rf node_modules/gxd-vue-library/src/components src/ && cp -rf node_modules/gxd-vue-library/src/dome src/ && cp -rf  node_modules/gxd-vue-library/src/common.scss src/ && cp -rf node_modules/gxd-vue-library/plugin.html.config.js ./",
    },
    ...
}

# 拷贝插件相关代码到项目中
npm run copy:lib


# 项目全局引用,在入口文件引用
import components from '@/components/XdAutoload';
components.map(component => {
    Vue['component'](component.name, component)
})

# 项目vue文件局部中引用
import Xdxxxx from "@/components/Xdxxxx";

配置public/index.html
<head>
    ...
    <!-- gxd-vue-library 相关配置-->
    <!--iconfont -> jufubao-base-admin-->
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_2954998_<%= htmlWebpackPlugin.options.custom.baseAdminIconVersion %>.css">
    <!--iconfont -> uni-app-->
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_2260472_<%= htmlWebpackPlugin.options.custom.baseUniAppVersion %>.css">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <% if (htmlWebpackPlugin.options.custom.baiduAK) { %>
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=<%= htmlWebpackPlugin.options.custom.baiduAK %>" type="text/javascript"></script>
    <script src="//api.map.baidu.com/getscript?ak=<%= htmlWebpackPlugin.options.custom.baiduAK %>&services=&t=20181204112130&&v=v1.0.0" type="text/javascript"></script>
    <script type="text/javascript">
      <%= htmlWebpackPlugin.options.custom.baiduBMapGLLib %>
    </script>
    <% } %>
    <!-- gxd-vue-library 相关配置-->
    ...
</head>