0.0.3 • Published 7 months ago

u-fenix-r v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

一套企业级 UI 设计语言和 vue 组件库。

NPM version

✨ 特性

  • 🌈 提炼自企业级中后台产品的交互语言和视觉风格。
  • ⚙️ 全链路开发和设计工具体系。

🖥 兼容环境

IE / EdgeFirefoxChromeSafari
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

依赖

样式库是基于ant-design-vue组件库进行设计的,使用本样式库请确保项目已经安装ant-design-vue组件库.

npm install antd --save
yarn add antd

📦 安装

npm install u-fenix-r --force
yarn add u-fenix-r --force

使用

import 'u-fenix-r/style/index.less';

建议在Layoutmain中添加如下代码切换明暗主题

// 更换主题色 
    changeTheme = () => {
      const theme = localStorage.getItem("theme") || "dark";
      const body = document.querySelector("body");
      if (body) {
        if (theme === "light") {
          body.classList.remove("uih-light-theme");
          body.classList.add("uih-dark-theme");
          localStorage.setItem("theme", "dark");
          // this.props.switchTheme('dark')
        } else {
          body.classList.remove("uih-dark-theme");
          body.classList.add("uih-light-theme");
          localStorage.setItem("theme", "light");
          // this.props.switchTheme('light')
        }
      }
    }

🔗 文档地址

可访问链接

0.0.3

7 months ago