Convert Figma logo to code with AI

eteplus logovue-sui-demo

用vue 和 SUI-Mobile 写了一个移动端demo,用来反馈学习vue的成果(禁用了SUI自带的路由,使用vue-router, vue-resource, webpack)[a web app written by vue & sui-mobile]

1,728
529
1,728
9

Top Related Projects

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

54,105

A Vue.js 2.0 UI Toolkit for Web

23,961

A high quality UI Toolkit built on Vue.js 2.0

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

23,249

A lightweight, customizable Vue UI library for mobile web apps.

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

Quick Overview

Vue-sui-demo is a demonstration project showcasing the integration of Vue.js with SUI Mobile, a lightweight mobile UI library. It provides a set of mobile-friendly components and layouts built with Vue.js, allowing developers to create responsive and visually appealing mobile web applications.

Pros

  • Combines the power of Vue.js with the mobile-optimized UI components of SUI Mobile
  • Offers a variety of pre-built components for rapid mobile app development
  • Provides a responsive layout system for creating mobile-friendly interfaces
  • Includes examples and documentation to help developers get started quickly

Cons

  • The project appears to be outdated, with the last commit made several years ago
  • May not be compatible with the latest versions of Vue.js or SUI Mobile
  • Limited ongoing support or updates, which could lead to potential compatibility issues
  • Lacks comprehensive documentation for all components and features

Code Examples

  1. Creating a simple button component:
<template>
  <sui-button @click="handleClick">Click me</sui-button>
</template>

<script>
export default {
  methods: {
    handleClick() {
      console.log('Button clicked!')
    }
  }
}
</script>
  1. Implementing a list view:
<template>
  <sui-list>
    <sui-list-item v-for="item in items" :key="item.id">
      {{ item.name }}
    </sui-list-item>
  </sui-list>
</template>

<script>
export default {
  data() {
    return {
      items: [
        { id: 1, name: 'Item 1' },
        { id: 2, name: 'Item 2' },
        { id: 3, name: 'Item 3' }
      ]
    }
  }
}
</script>
  1. Using a modal component:
<template>
  <div>
    <sui-button @click="showModal = true">Open Modal</sui-button>
    <sui-modal v-model="showModal">
      <h2>Modal Title</h2>
      <p>Modal content goes here.</p>
      <sui-button @click="showModal = false">Close</sui-button>
    </sui-modal>
  </div>
</template>

<script>
export default {
  data() {
    return {
      showModal: false
    }
  }
}
</script>

Getting Started

To get started with vue-sui-demo:

  1. Clone the repository:

    git clone https://github.com/eteplus/vue-sui-demo.git
    
  2. Install dependencies:

    cd vue-sui-demo
    npm install
    
  3. Run the development server:

    npm run dev
    
  4. Open your browser and navigate to http://localhost:8080 to view the demo application.

Competitor Comparisons

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Pros of Vue

  • Much larger and more active community with over 200k stars on GitHub
  • Comprehensive documentation and extensive ecosystem of plugins/tools
  • Powers many large-scale production applications

Cons of Vue

  • Steeper learning curve for beginners compared to simpler demos
  • Potentially overkill for small projects or prototypes
  • More complex build process and configuration

Code Comparison

vue-sui-demo:

<template>
  <div id="app">
    <h1>{{ msg }}</h1>
  </div>
</template>

<script>
export default {
  data () {
    return {
      msg: 'Hello Vue!'
    }
  }
}
</script>

Vue:

import { createApp } from 'vue'

const app = createApp({
  data() {
    return {
      message: 'Hello Vue!'
    }
  }
})

app.mount('#app')

The vue-sui-demo example uses Vue 2 syntax with a single-file component, while the Vue example shows Vue 3 composition API setup. Vue offers more flexibility and advanced features, but may require more setup for simple use cases.

54,105

A Vue.js 2.0 UI Toolkit for Web

Pros of element

  • Larger community and more active development (30k+ stars vs 260+ for vue-sui-demo)
  • Comprehensive documentation and extensive component library
  • Regular updates and maintenance

Cons of element

  • Steeper learning curve due to more complex architecture
  • Larger bundle size, which may impact performance for smaller projects
  • Less flexibility for customization compared to vue-sui-demo's simpler structure

Code Comparison

element:

<el-button type="primary" @click="handleClick">Click me</el-button>
<el-input v-model="inputValue" placeholder="Enter text"></el-input>
<el-table :data="tableData">
  <el-table-column prop="name" label="Name"></el-table-column>
  <el-table-column prop="age" label="Age"></el-table-column>
</el-table>

vue-sui-demo:

<sui-button class="primary" @click="handleClick">Click me</sui-button>
<sui-input v-model="inputValue" placeholder="Enter text"></sui-input>
<sui-table :data="tableData">
  <sui-table-column prop="name" label="Name"></sui-table-column>
  <sui-table-column prop="age" label="Age"></sui-table-column>
</sui-table>

The code comparison shows that both libraries have similar component structures and usage patterns. However, element uses the "el-" prefix for its components, while vue-sui-demo uses "sui-". The syntax and attributes are largely similar, making it relatively easy for developers to switch between the two libraries if needed.

23,961

A high quality UI Toolkit built on Vue.js 2.0

Pros of iView

  • More comprehensive UI component library with 40+ components
  • Better documentation and examples
  • Larger community and more active development

Cons of iView

  • Steeper learning curve due to more complex components
  • Potentially heavier bundle size if not using tree-shaking

Code Comparison

vue-sui-demo:

<template>
  <sui-button>Click me</sui-button>
</template>

<script>
import { suiButton } from 'vue-sui'
export default {
  components: { suiButton }
}
</script>

iView:

<template>
  <Button type="primary">Click me</Button>
</template>

<script>
import { Button } from 'iview'
export default {
  components: { Button }
}
</script>

Summary

iView offers a more robust and feature-rich UI library compared to vue-sui-demo. It provides a wider range of components and better documentation, making it suitable for larger projects. However, this comes at the cost of a steeper learning curve and potentially larger bundle size.

vue-sui-demo, on the other hand, is simpler and more lightweight, which could be advantageous for smaller projects or those requiring a minimal UI framework. The code comparison shows that both libraries have similar usage patterns, but iView's components are more customizable out-of-the-box.

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

Pros of ant-design-vue

  • More comprehensive UI component library with a wider range of components
  • Better documentation and examples for developers
  • Larger community and more frequent updates

Cons of ant-design-vue

  • Heavier package size due to more components and features
  • Steeper learning curve for beginners due to its complexity

Code Comparison

vue-sui-demo:

<template>
  <sui-button>Click me</sui-button>
</template>

<script>
import { SuiButton } from 'sui-vue'
export default {
  components: { SuiButton }
}
</script>

ant-design-vue:

<template>
  <a-button>Click me</a-button>
</template>

<script>
import { Button } from 'ant-design-vue'
export default {
  components: { 'a-button': Button }
}
</script>

Summary

ant-design-vue offers a more extensive component library with better documentation and community support, making it suitable for larger projects. However, it comes with a larger package size and a steeper learning curve. vue-sui-demo, on the other hand, is simpler and lighter, which may be preferable for smaller projects or beginners. The code comparison shows that both libraries have similar usage patterns, with slight differences in component naming conventions.

23,249

A lightweight, customizable Vue UI library for mobile web apps.

Pros of Vant

  • Significantly more popular with 20.8k stars vs 1.1k for vue-sui-demo
  • Actively maintained with frequent updates and releases
  • Comprehensive documentation and extensive component library

Cons of Vant

  • Larger bundle size due to more components and features
  • Steeper learning curve for beginners compared to vue-sui-demo
  • May require more configuration for custom styling

Code Comparison

vue-sui-demo:

<template>
  <div class="page">
    <header class="bar bar-nav">
      <h1 class="title">SUI Mobile</h1>
    </header>
    <div class="content">
      <!-- Content here -->
    </div>
  </div>
</template>

Vant:

<template>
  <van-nav-bar title="Vant" />
  <van-cell-group>
    <van-cell title="Cell" value="Content" />
    <van-cell title="Cell" value="Content" label="Description" />
  </van-cell-group>
</template>

The code comparison shows that Vant uses more specific component tags, while vue-sui-demo relies on general HTML structure with classes. Vant's approach may lead to cleaner and more maintainable code, but vue-sui-demo's method might be more familiar to developers used to traditional HTML and CSS.

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

Pros of vue-element-admin

  • More comprehensive and feature-rich admin template
  • Extensive documentation and community support
  • Integrates with Element UI, a popular Vue.js component library

Cons of vue-element-admin

  • Steeper learning curve due to its complexity
  • Potentially overkill for smaller projects
  • Heavier bundle size compared to vue-sui-demo

Code Comparison

vue-element-admin:

<template>
  <div class="app-container">
    <el-table :data="list" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row>
      <!-- Table columns -->
    </el-table>
  </div>
</template>

vue-sui-demo:

<template>
  <div class="page">
    <header class="bar bar-nav">
      <h1 class="title">SUI Mobile</h1>
    </header>
    <nav class="bar bar-tab">
      <!-- Navigation items -->
    </nav>
  </div>
</template>

The code comparison shows that vue-element-admin uses Element UI components like el-table, while vue-sui-demo focuses on mobile-first design with SUI Mobile classes. vue-element-admin's code structure is more complex, reflecting its comprehensive nature, while vue-sui-demo's code is simpler and tailored for mobile applications.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

vue-sui-demo

线上访问地址 http://eteplus.github.io/vue-sui-demo

如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^

对于那些发邮件给我的同学说声抱歉, 由于本人的邮箱忘记密码了,最近才找回, 如果遇到什么问题的,欢迎一起交流和学习!(2016-07-11)


Vue很轻量,易定制,比较适合移动端,很喜欢Vue写组件的方式, 所有用VUE 和 SUI-Mobile 写了一个移动端demo,用来反馈vue的学习成果(禁用了SUI自带的路由,使用Vue-router)

环境
  1. node v5.12.0
  2. cnpm 4.2.0
  3. npm 3.3.9
技术栈

vue

vue-router

vue-resource

webpack

sui-mobile

es6-babel


截图


print


安装

项目地址:(使用git clone)

git clone https://github.com/eteplus/vue-sui-demo.git

通过npm安装本地服务第三方依赖模块(需要已安装Node.js),使用npm安装依赖模块可能会很慢,建议换成cnpm

npm install -g cnpm --registry=http://registry.npm.taobao.org
# 安装依赖模块
cnpm install

# 启动服务
npm run dev

# 发布代码
npm run build

开发

目录结构

.
├── README.md           
├── dist                     // 项目build目录
├── config                   // 环境变量和入口,出口配置
├── static                   // 静态资源目录
├── build                    // 项目的配置文件目录
│   ├── dev-server.js        // 开发的服务配置
│   ├── webpack-dev-conf.js  // 开发的Webpack 配置文件
│   ├── webpack-prod-conf.js // 生产的Webpack 配置文件
│   ├── webpack-base-conf.js // 基本的Webpack 配置文件
├── package.json             // 项目配置文件
├── src                      // 生产目录
│   ├── assets               // css js 和图片资源
│   ├── data                 // 数据文件
│   ├── components           // 各种组件
│   ├── views                // 各种页面
│   ├── directives           // 各种指令
│   ├── filters.js           // 各种过滤器
│   ├── router.js            // 路由配置
│   └── main.vue             // 根组件
│   └── app.js               // Webpack 预编译入口         
├── index.html               // 项目入口文件
.

更新记录

参看 CHANGELOG.md