Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weilan-ui

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weilan-ui

  • 0.1.4
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by800%
Maintainers
1
Weekly downloads
 
Created
Source

wlui

精美易用的前端复杂组件及市场上未出现的需求组件收录

文档地址

引入WeilanUi

你可以引入整个 weilan-ui,也可以根据需要仅引入部分组件。

全部引入

在main.js写入一下内容:


import Vue from 'vue';
import WeilanUi from 'weilan-ui';
import 'weilan-ui/weilan-ui.css';
import App from './App.vue';

Vue.use(WeilanUi);

new Vue({
  el: '#app',
  render: h => h(App)
});

按需引入

如果你只希望引入部分组件,比如 Gantt 和 Explorer,那么可以在 main.js 中写入以下内容:

import Vue from 'vue';
import App from './App.vue';
import { WlGantt, WlExplorer } from 'weilan-ui';
import 'weilan-ui/weilan-ui.css';

Vue.use(WlGantt)
Vue.use(WlExplorer)

new Vue({
  el: '#app',
  render: h => h(App)
});

cdn script标签引入

通过script标签方式使用weilan-ui需要同时引入element-ui

<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="https://unpkg.com/weilan-ui/weilan-ui.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/weilan-ui/weilan-ui.umd.min.js"></script>

完整示例如下:

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <link rel="stylesheet" href="https://unpkg.com/weilan-ui/weilan-ui.css">
</head>

<body>
  <div id="app">
    <wl-add @click="visible = true"></wl-add>
    <wl-fade-in :show="visible">
      我出现啦
      <template #footer>
        <wl-add @click="visible = false">取 消</wl-add>
        <wl-add @click="visible = false">确 定</wl-add>
      </template>
    </wl-fade-in>
  </div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/weilan-ui/weilan-ui.umd.min.js"></script>
<script>
  new Vue({
    el: '#app',
    data: function () {
      return { visible: false }
    }
  })
</script>

</html>

Donation

如果你有心,可以请作者喝杯咖啡

社区

IssueQQ群
wlui/issues

Keywords

FAQs

Package last updated on 07 Jul 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc