Giter Site home page Giter Site logo

components-playgroud's Introduction

爱速搭自定义组件本地开发环境

开发指南

# 安装依赖
npm i

# 开启本地服务
npm start

# 访问
��组件测试:http://localhost:3000/
组件编辑器插件测试:http://localhost:3000/editor

在对应的文件夹下,新建组件文件,并编写代码,例如:

  • src/components/vue/formitem 目录下新建组件文件,文件夹内可以包括组件文件、样式文件(只支持.scss),如果需要开发编辑器插件,可以在组件文件夹目录下新建plugin目录,该目录包括组件插件文件,导入到爱速搭后,会解析为 vue 表单项 组件。
  • src/util 目录下新建文件,导入到爱速搭后,会解析为 其他类型 的组件。

文件支持 js、jsx、tsx 后缀

开发完成后,运行 npm run build 生成自定义组件压缩包 components.zip ,然后进入爱速搭 应用管理-自定义组件,点击「导入组件」,选中压缩包导入,等待组件编译完成后即可使用。

注意事项

导入到爱速搭解析时,会自动根据文件名生成对应的组件 key,并在前加 custom- 前缀。

例如:一个名字为 vue-text.js 的组件文件,导入后,是通过 "type": "custom-vue-text" 来使用的。

所以组件的文件名不可以重复

components-playgroud's People

Contributors

2betop avatar hsm-lv avatar rickcole21 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.