avue
Avue.js2.0是基于现有的element-ui库进行的二次封装,简化一些繁琐的操作,核心理念为数据驱动视图,主要的组件库针对table表格和form表单场景,同时衍生出更多企业常用的组件,达到高复用,容易维护和扩展的框 架,同时内置了丰富了数据展示组件,让开发变得更加容易
Top Related Projects
:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin
Vue 2.0 admin management system template based on iView
👨🏻💻👩🏻💻 Use Ant Design Vue like a Pro! (vue2)
A cross-platform framework using Vue.js
A Vue.js 2.0 UI Toolkit for Web
🐉 Vue Component Framework
Quick Overview
The nmxiaowei/avue repository is a Vue.js-based UI framework that provides a comprehensive set of components and tools for building web applications. It aims to simplify the development process and enhance the user experience.
Pros
- Comprehensive Component Library: Avue offers a wide range of pre-built components, including tables, forms, dialogs, and more, which can be easily integrated into your project.
- Customizable and Flexible: The framework allows for extensive customization, enabling developers to tailor the UI to their specific needs.
- Performance Optimization: Avue is designed with performance in mind, utilizing techniques like virtual scrolling to optimize rendering and improve user experience.
- Extensive Documentation: The project provides detailed documentation, making it easier for developers to get started and understand the various features and capabilities of the framework.
Cons
- Learning Curve: As with any new framework, there may be a learning curve for developers who are not familiar with Vue.js or the Avue-specific syntax and conventions.
- Dependency on Vue.js: Avue is tightly coupled with the Vue.js framework, which means that developers must have a good understanding of Vue.js to effectively use the Avue framework.
- Limited Community Support: Compared to more popular UI frameworks like Bootstrap or Material UI, Avue may have a smaller community and fewer resources available for troubleshooting and support.
- Potential Performance Issues: While Avue is designed for performance, complex or heavily customized applications may still experience performance challenges, especially on older or less powerful devices.
Code Examples
Here are a few examples of how to use the Avue framework:
- Creating a Table Component:
<template>
<avue-table
:data="tableData"
:option="tableOption"
>
</avue-table>
</template>
<script>
export default {
data() {
return {
tableData: [
{ id: 1, name: 'John Doe', age: 30 },
{ id: 2, name: 'Jane Smith', age: 25 },
{ id: 3, name: 'Bob Johnson', age: 35 }
],
tableOption: {
column: [
{ label: 'ID', prop: 'id' },
{ label: 'Name', prop: 'name' },
{ label: 'Age', prop: 'age' }
]
}
}
}
}
</script>
- Creating a Form Component:
<template>
<avue-form
:option="formOption"
v-model="formData"
>
</avue-form>
</template>
<script>
export default {
data() {
return {
formData: {
name: '',
email: '',
password: ''
},
formOption: {
column: [
{ label: 'Name', prop: 'name', rules: [{ required: true, message: 'Name is required' }] },
{ label: 'Email', prop: 'email', type: 'email', rules: [{ required: true, message: 'Email is required' }] },
{ label: 'Password', prop: 'password', type: 'password', rules: [{ required: true, message: 'Password is required' }] }
]
}
}
}
}
</script>
- Creating a Dialog Component:
<template>
<avue-dialog
v-model="dialogVisible"
:title="dialogTitle"
:width="dialogWidth"
>
<p>{{ dialogContent }}</p>
<template #footer>
<button @click="dialogVisible = false">Cancel</button>
<button @click="handleConfirm">Confirm</button>
</template>
</avue-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
dialogTitle: 'Confirmation',
dialog
Competitor Comparisons
:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin
Pros of vue-element-admin
- More comprehensive and feature-rich, offering a complete admin panel solution
- Extensive documentation and community support
- Includes advanced features like permission control and i18n out of the box
Cons of vue-element-admin
- Steeper learning curve due to its complexity
- May be overkill for smaller projects or simpler admin interfaces
- Potentially more challenging to customize extensively
Code Comparison
vue-element-admin:
import permission from './permission'
Vue.use(permission)
// In a component
export default {
permission: {
role: ['admin', 'editor']
}
}
avue:
import Avue from '@smallwei/avue'
Vue.use(Avue)
// In a component
export default {
data() {
return {
option: {
column: [
{ label: 'Name', prop: 'name' }
]
}
}
}
}
vue-element-admin provides a more structured approach to permission management, while avue focuses on simplifying form and table creation with a declarative syntax. vue-element-admin is better suited for large-scale applications with complex requirements, whereas avue excels in rapid development of simpler admin interfaces with its low-code approach.
Vue 2.0 admin management system template based on iView
Pros of iview-admin
- More comprehensive and feature-rich admin template
- Better documentation and community support
- Includes advanced components like charts and tables
Cons of iview-admin
- Steeper learning curve due to complexity
- Less flexibility for customization
- Larger bundle size, potentially impacting performance
Code Comparison
iview-admin:
<template>
<div>
<Table :columns="columns" :data="data"></Table>
<Page :total="100" show-elevator />
</div>
</template>
avue:
<template>
<div>
<avue-crud :option="option" :data="data"></avue-crud>
</div>
</template>
Key Differences
- iview-admin uses separate components for tables and pagination, while avue combines them into a single
avue-crud
component - avue's approach is more concise and requires less boilerplate code
- iview-admin offers more granular control over individual components
- avue's configuration-driven approach may be easier for rapid development
Conclusion
iview-admin is a more comprehensive solution with a wider range of features, making it suitable for complex admin interfaces. avue, on the other hand, offers a simpler and more flexible approach, which may be preferable for projects requiring quick development or extensive customization. The choice between the two depends on the specific needs of the project and the development team's preferences.
👨🏻💻👩🏻💻 Use Ant Design Vue like a Pro! (vue2)
Pros of ant-design-vue-pro
- More comprehensive and feature-rich UI components based on Ant Design
- Better documentation and community support
- Stronger focus on enterprise-level applications
Cons of ant-design-vue-pro
- Steeper learning curve due to its complexity
- Larger bundle size, which may impact initial load times
- Less flexibility for customization compared to Avue
Code Comparison
ant-design-vue-pro:
<template>
<a-form :form="form" @submit="handleSubmit">
<a-form-item label="Username">
<a-input v-decorator="['username', { rules: [{ required: true }] }]" />
</a-form-item>
<a-form-item>
<a-button type="primary" html-type="submit">Submit</a-button>
</a-form-item>
</a-form>
</template>
Avue:
<template>
<avue-form :option="option" v-model="form" @submit="handleSubmit">
<template slot="username">
<el-input v-model="form.username"></el-input>
</template>
</avue-form>
</template>
The code comparison shows that ant-design-vue-pro uses Ant Design components directly, while Avue provides a more abstracted approach with its own form component and options configuration. This demonstrates the difference in flexibility and ease of use between the two libraries.
A cross-platform framework using Vue.js
Pros of uni-app
- Supports multiple platforms (iOS, Android, Web, etc.) with a single codebase
- Large and active community with extensive documentation and resources
- Integrates well with Vue.js, leveraging its ecosystem and familiarity
Cons of uni-app
- Steeper learning curve due to its cross-platform nature and custom syntax
- May have performance limitations compared to native development
- Some platform-specific features might require additional workarounds
Code Comparison
uni-app:
<template>
<view class="content">
<text>{{ title }}</text>
<button @click="changeTitle">Change Title</button>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
methods: {
changeTitle() {
this.title = 'New Title'
}
}
}
</script>
Avue:
<template>
<avue-crud :option="option" :data="data"></avue-crud>
</template>
<script>
export default {
data() {
return {
option: {
column: [
{ label: 'Name', prop: 'name' },
{ label: 'Age', prop: 'age' }
]
},
data: [
{ name: 'John', age: 30 },
{ name: 'Jane', age: 25 }
]
}
}
}
</script>
This comparison highlights the different focus areas of uni-app (cross-platform development) and Avue (rapid CRUD interface creation). uni-app offers more flexibility for various app types, while Avue specializes in admin panel development.
A Vue.js 2.0 UI Toolkit for Web
Pros of Element
- Larger community and more widespread adoption, leading to better support and resources
- More comprehensive component library with a wider range of UI elements
- Better documentation and examples for developers
Cons of Element
- Heavier package size, which may impact performance for smaller projects
- Less flexibility in customization compared to Avue's low-code approach
- Steeper learning curve for beginners due to its extensive feature set
Code Comparison
Element:
<el-form :model="form" :rules="rules" ref="form">
<el-form-item label="Name" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">Submit</el-button>
</el-form-item>
</el-form>
Avue:
<avue-form :option="option" v-model="form" @submit="handleSubmit">
<template slot="menuForm">
<el-button type="primary" @click="handleSubmit">Submit</el-button>
</template>
</avue-form>
Summary
Element offers a more comprehensive UI library with better community support, while Avue provides a low-code approach with greater flexibility for rapid development. Element may be better suited for larger projects requiring a wide range of components, whereas Avue could be more efficient for smaller projects or those requiring quick prototyping.
🐉 Vue Component Framework
Pros of Vuetify
- Larger community and more extensive documentation
- Wider range of pre-built components and features
- Better support for internationalization and accessibility
Cons of Vuetify
- Steeper learning curve due to its extensive feature set
- Larger bundle size, which may impact performance
- Less flexibility in customizing the overall design system
Code Comparison
Vuetify component usage:
<template>
<v-app>
<v-btn color="primary">Click me</v-btn>
</v-app>
</template>
Avue component usage:
<template>
<avue-crud :option="option" :data="data"></avue-crud>
</template>
Summary
Vuetify is a more comprehensive UI framework with a larger ecosystem, offering a wide range of components and features. It's well-suited for large-scale applications requiring extensive UI elements and internationalization support. However, this comes at the cost of a steeper learning curve and larger bundle size.
Avue, on the other hand, focuses more on rapid development and simplicity, particularly for admin interfaces and data-driven applications. It offers a more streamlined approach but may have fewer pre-built components compared to Vuetify.
The choice between the two depends on project requirements, team expertise, and the desired balance between feature richness and simplicity.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ä»ç»
Avue.jsæ¯åºäºç°æçelement-uiåºè¿è¡çäºæ¬¡å°è£ ï¼ä»èç®åä¸äºç¹ççæä½ï¼æ ¸å¿ç念为æ°æ®é©±å¨è§å¾,主è¦çç»ä»¶åºé对tableè¡¨æ ¼åform表ååºæ¯ï¼åæ¶è¡çåºæ´å¤ä¼ä¸å¸¸ç¨çç»ä»¶ï¼è¾¾å°é«å¤ç¨ï¼å®¹æç»´æ¤åæ©å±çæ¡æ¶ï¼åæ¶å ç½®äºä¸°å¯äºæ°æ®å±ç¤ºç»ä»¶ï¼è®©å¼ååå¾æ´å 容æ.
æµè§å¨å ¼å®¹æ§
æ¯æææ符åES5æ åçæµè§å¨(ä¸æ¯æIE8å以ä¸çæ¬ï¼.
æ件
æ件å | ç¨é |
---|---|
avue.min.js | ç产ç¯å¢ |
avue.js | å¼åç¯å¢ |
ææ¡£
è¦æ¥çLive Examplesåææ¡£ï¼è¯·è®¿é®https://avuejs.com.
é®ç
æå ³é®é¢åæ¯æï¼è¯·ä½¿ç¨issuesæå å ¥QQ群606410437.
issues
æå¼é®é¢ä¹åï¼è¯·å¡å¿ æä¾è¯¦ç»çé®é¢è¿ç¨åæªå¾ï¼ä¸ç¬¦åååçé®é¢å°ä¼è¢«æç».
Changelog
åè¡è¯´æä¸è®°å½äºæ¯ä¸ªçæ¬ç详ç»æ´æ¹ã
License
Copyright (c) 2017-present, Smallwei
Top Related Projects
:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin
Vue 2.0 admin management system template based on iView
👨🏻💻👩🏻💻 Use Ant Design Vue like a Pro! (vue2)
A cross-platform framework using Vue.js
A Vue.js 2.0 UI Toolkit for Web
🐉 Vue Component Framework
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot