GithubHelp home page GithubHelp logo

elemefe / mint-ui Goto Github PK

View Code? Open in Web Editor NEW
16.6K 476.0 3.5K 3.34 MB

Mobile UI elements for Vue.js

Home Page: http://mint-ui.github.io/#!/en

License: MIT License

Makefile 0.24% JavaScript 19.08% Vue 63.42% CSS 16.92% Smarty 0.19% Shell 0.15%
vue vue-components component ui-kit mobile

mint-ui's Introduction

Mint UI

Build Status npm NPM downloads JS gzip size CSS gzip size Join the chat at https://gitter.im/ElemeFE/mint-ui

Mobile UI elements for Vue 2.0

Installation

npm i mint-ui -S

# for Vue 1.x
npm i mint-ui@1 -S

Usage

Import all components.

import Vue from 'vue';
import Mint from 'mint-ui';
import 'mint-ui/lib/style.css';

Vue.use(Mint);

Or import specified component. (Use babel-plugin-component)

import { Cell, Checklist } from 'mint-ui';

Vue.component(Cell.name, Cell);
Vue.component(Checklist.name, Checklist);

Equals to

import Vue from 'vue';
import Mint from 'mint-ui';
import 'mint-ui/lib/style.css';

Vue.use(Mint);

// import specified component

import MtRadio from 'mint-ui/lib/radio';
import 'mint-ui/lib/radio/style.css';

Vue.component(MtRadio.name, MtRadio);

babel-plugin-component

  • Auto import css file
  • Modular import component

Installation

npm i babel-plugin-component -D

Usage

.babelrc

{
  "plugins": ["other-plugin", ["component", [
    { "libraryName": "mint-ui", "style": true }
  ]]]
}

CDN

RawGit

NPMCDN

Development

npm run dev

Contribution

Please make sure to read the Contributing Guide before making a pull request.

License

MIT

mint-ui's People

Contributors

alexqdjay avatar alvinyuxt avatar chobitssp avatar dafrok avatar deepkolos avatar eminoda avatar firesh avatar furybean avatar galenyuan avatar go7hic avatar gogu avatar itsjw avatar joe223 avatar kvker avatar leopoldthecoder avatar linjiajian999 avatar liuxg0112 avatar muuyao avatar nailuogg avatar qingwei-li avatar richardo2016 avatar russellmars avatar silenttiger avatar songlipeng2003 avatar suyi91 avatar twoer avatar win5do avatar yu1222 avatar yuchonghua avatar zhouhua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mint-ui's Issues

MessageBox 的一些建议

  • prompt 是不是可以弹出后,input 获取焦点
  • prompt input 框没有appearance: none; 可能导致不同浏览器的 input 样式会不一样

tabbar和tabcontainer不能关联

需求:类似tabbar例子,切换tab, tabbar同步切换

使用:结合tabbar和tabcontainer,按照官网给出的结构写的。
点击tab后,tabcontainer没有切换,还是处于display:none。
通过vuetool 观察到 active一直是undefined。

组件是以对象的形式注册的

截图:
vue组件:
image

vue树
image

css-loader不能正确加载css文件

import mintUi from 'mint-ui'
如上,我安装了babel-plugin-component,根据文档设置好了配置:

"plugins": ["transform-runtime", ["component", [
    { "libraryName": "mint-ui", "style": true }
  ]]],

然后加载button文件时提示
You may need an appropriate loader to handle this file type.
当我将button中的style.css内容全部删除后,编译正常通过不再报错,该文件中写入任意正常css代码都会报错
将该文件移动到其它文件夹,在入口文件手动引入:
import './style.css'
不报错
我查了一下午,没查出任何问题~~请问这是咋回事啊

Make dev 报错

ERROR in ./src/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' /Users/zhaozhe/Work/vue/mint-ui/packages/indicator/lib/style.css in /Users/zhaozhe/Work/vue/mint-ui/src
@ ./src/index.js 25:0-43
貌似是项目里没找到 css,但是项目里也确实是没有 css。

0.1.14中,部分js组件的css未加载。

浏览器:chrome 53
测试: 0.1.14中。使用toast, MessageBox等组件均出现样式破损,检查后发现css类名中并没有相应的属性,应该是css未加载。
测试2: 使用0.1.3,则恢复正常。

使用的安装方法: (测试仅切换版本,未做其它改动。)

import Vue from 'vue';
import MintUI from 'mint-ui';
import 'mint-ui/lib/style.css';

Vue.use(MintUI);

请问如何动态绑定 filed内input的值。

因为field中的内容 主要用于提交使用,但因为它是片段组件,无法通过v-model绑定,如何能获取其中input的值, 或者把field中的输入内容绑定到一个特定的变量上呢。
想请教一下。

message box 性能问题

demo页面在微信中打开的时候,message box的动画非常的卡顿,而vux的没有这个问题。

action sheet 也是一样,上拉动画不流畅。

mint-ui button 样式问题

.mint-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
    border: 0;
    box-sizing: border-box;
    color: inherit;
    display: block;
    font-size: 18px;
    height: 41px;
    line-height: 41.6px;
    line-height: 2.6rem;
    outline: 0;
    overflow: hidden;
    position: relative;
    text-align: center
}

俩line-height 是啥意思,
我的rem值比较大,文字都跑外面去了...

picker组件 滑动不流畅

picker组件 滑动不流畅
特别是滚动即将完的、确定哪一项是选择项的这一个过程。比如滑动到 a和b的之间,这时候需要计算哪一个才是选择项,这时候不流畅。希望能抽出时间优化一下。

search样式破损

微信下search样式破损

魅蓝note2 Android5.1 Flyme-5.1.6.0A : 有问题
华为mate8: 没问题

loadmore 上拉刷新的问题

因为采用上拉刷新的页面大部分都是可以点击的列表

在上拉刷新的时候 上拉手指都会停在屏幕上 一段时间 这样就很容易触发到页面上的click事件

这样就会很尴尬 。。。

希望能不能加个 droping的双向布尔属性 告诉我这边是在上拉了 我就想办法解绑列表的click属性呢

vue组件中的style声明

vue组件中的style声明 lang = "css", 为什么却有能使用变量和混合等呢,感觉像是scss语法。package.json 中没有看到scss相关的插件依赖, 查了cooking的配置,也没有将scss集成进去。

请问mini-ui中的style 设置为lang = “css”, 为什么能使用变量等呢?

单独引入Indicator组件时缺少样式

当按需加载Indecator组件时

var Indicator = require('mint-ui/lib/indicator')
require('mint-ui/lib/indicator/style.css')

缺少下面的必要的动画样式:

.kebab-spinner-snake {
    -webkit-animation: kebab-spinner-rotate .8s infinite linear;
    animation: kebab-spinner-rotate .8s infinite linear;
    border: 4px solid transparent;
    border-radius: 50%;
}

中间的旋转图标不显示,而当我引入全部的css样式后才正常:

var Indicator = require('mint-ui/lib/indicator')
require('mint-ui/lib/style.css')

这说明在/lib/indicator/style.css这个文件中缺少相关样式?请补全

未支持触摸事件

经测试,button组件未支持触摸事件,由此在移动端带来的副作用有:
1.会同时激发click和touchstart事件
2.Button中使用disabled禁用按钮,无法禁用touch事件
另外,由此引出的另一个问题是当经由touch事件调起的popup事件会出现后立即消失,猜测原因是先触发了touch事件,后又触发了默认的click事件,需要手动在处理函数中preventDefault才能正常工作

针对移动端的ui组件没有针对触摸事件进行优化,可谓一大遗憾
强烈建议对移动端触摸事件的支持和优化

扩展messageBox

messageBox组件中message不支持模板字符串(html),只支持句子,
vue-modal-plugin这款插件支持,不知道怎么扩展messageBox

使用tabbar时候报错

项目开发环境:node v5.9.0; npm v3.7.3; mint-ui v0.1.17
使用vue 官方模板 webpack standard
使用mint-ui组件,按照实例给出的使用方式,选择了按需加载组件的方式。

使用代码如下:
main.js:

import Vue from 'vue'
import App from './App'
import 'mint-ui/lib/style.css'
/* eslint-disable no-new */
new Vue({
el: 'body',
components: {App}
})

App.vue:
template

script
import {tabbar} from 'mint-ui'
export default {
components: {
tabbar
}
}

错误提示为:
[Vue warn]: Unknown custom element: - did you mean ? HTML is case-insensitive, remember to use kebab-case in templates.

google下,发现同样的问题,不过这个项目不使用了vuex,原因是vuex的错误
注;我的项目中没有使用vuex

把tabbar替换成我自己的.vue 模板,可以正确在渲染。
在build 文件中,可以找到mint-ui的样式,说明mint-ui样式已经引入;
注:build 文件中出现了变量没有被编译的问题
image

field 组件怎么配合vue-validator呢

项目中使用了vue-validator作为表单验证的插件
由于form下包含了多个子组件, 这样的话整个表单有三级构成,如图:
注:第三级为引入mint-ui组件
vue

请问min-ui怎么引入validate作为验证器呢

trying make dist, get extract-text-webpack-plugin loader error

ERROR in /Users/${userName}//extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!/Users/${userName}/.cooking//vue-style-loader!/Users/${userName}//css-loader!/Users/${userName}/.cooking//vue-loader/lib/style-rewriter.js!/Users/${userName}/.cooking/~/vue-loader/lib/selector.js?type=style&index=0!./src/components/header.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
at Object.module.exports.pitch (/Users/${userName}/node_modules/extract-text-webpack-plugin/loader.js:21:9)
@ ./src/components/header.vue 2:0-324

ERROR in /Users/${userName}/~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!/Users/${userName}/.cooking/~/vue-style-loader!/Users/${userName}/~/css-loader!/Users/${userName}/.cooking/~/vue-loader/lib/style-rewriter.js!/Users/${userName}/.cooking/~/vue-loader/lib/selector.js?type=style&index=0!./src/components/button.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.module.exports.pitch (/Users/${userName}/node_modules/extract-text-webpack-plugin/loader.js:21:9)
 @ ./src/components/button.vue 2:0-324

ERROR in /Users/${userName}/~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!/Users/${userName}/.cooking/~/vue-style-loader!/Users/${userName}/~/css-loader!/Users/${userName}/.cooking/~/vue-loader/lib/style-rewriter.js!/Users/${userName}/.cooking/~/vue-loader/lib/selector.js?type=style&index=0!./src/components/cell.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.module.exports.pitch (/Users/${userName}/node_modules/extract-text-webpack-plugin/loader.js:21:9)
 @ ./src/components/cell.vue 2:0-322

ERROR in /Users/${userName}/~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!/Users/${userName}/.cooking/~/vue-style-loader!/Users/${userName}/~/css-loader!/Users/${userName}/.cooking/~/vue-loader/lib/style-rewriter.js!/Users/${userName}/.cooking/~/vue-loader/lib/selector.js?type=style&index=0!./src/components/field.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.module.exports.pitch (/Users/${userName}/node_modules/extract-text-webpack-plugin/loader.js:21:9)
 @ ./src/components/field.vue 2:0-323

ERROR in /Users/${userName}/~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!/Users/${userName}/.cooking/~/vue-style-loader!/Users/${userName}/~/css-loader!/Users/${userName}/.cooking/~/vue-loader/lib/style-rewriter.js!/Users/${userName}/.cooking/~/vue-loader/lib/selector.js?type=style&index=0!./src/components/badge.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.module.exports.pitch (/Users/${userName}/node_modules/extract-text-webpack-plugin/loader.js:21:9)
 @ ./src/components/badge.vue 2:0-323

English translation

Mint-UI looks great, looking forward to English translation of the main site in time :)

messageBox状态没有同步

我的页面里有A,B按钮触发两个messageBox,当第一次点击A弹出msgbox的时候,提示内容一切正常,接着点击B,发现msgbox的内容还是A的内容,接着点击A,发现A的内容变成了B的内容。

我是这样引入的,CSS单独拷贝到了自己的CSS文件中,
import MessageBox from 'mint-ui/lib/msgbox';

文档栗子错误

文档中tabbar 组件部分, 栗子
import { Tabbar, TabbarItem } from 'mint-ui';
中导出的变量名TabbarItem有误...应为TabItem

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.