GithubHelp home page GithubHelp logo

talkingdata / iview-weapp Goto Github PK

View Code? Open in Web Editor NEW
6.5K 160.0 1.2K 2.72 MB

一套高质量的微信小程序 UI 组件库

Home Page: https://weapp.iviewui.com

License: Other

JavaScript 44.90% Less 55.10%
weapp weixin wechat iview ui-kit ui-design components

iview-weapp's Introduction

iView Weapp

一套高质量的微信小程序 UI 组件库

文档

http://inmap.talkingdata.com/wx/index_prod.html

体验

使用微信扫一扫体验小程序组件示例

快速上手

使用之前

在开始使用 iView Weapp 之前,你需要先阅读 微信小程序自定义组件 的相关文档。

如何使用

GitHub 下载 iView Weapp 的代码,将 dist 目录拷贝到自己的项目中。然后按照如下的方式使用组件,以 Button 为例,其它组件在对应的文档页查看:

  1. 添加需要的组件。在页面的 json 中配置(路径根据自己项目位置配置):
"usingComponents": {
    "i-button": "../../dist/button/index"
}
  1. 在 wxml 中使用组件:
<i-button type="primary" bind:click="handleClick">这是一个按钮</i-button>

预览所有组件

我们内置了所有组件的示例,您可以扫描右侧的小程序码体验,或按以下方式在微信开发者工具中查看:

# 从 GitHub 下载后,安装依赖
npm install

# 编译组件
npm run dev

然后,将 examples 目录在微信开发者工具中打开即可。

License

MIT

Copyright (c) 2018-present, TalkingData

iview-weapp's People

Contributors

debugisfalse avatar icarusion avatar martinx avatar nanflower avatar stenders avatar xiaokezz avatar ytstrive 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

iview-weapp's Issues

下载之后测试无法运行

您好,我将github仓库上所有代码打包下载到本地。解压iview-weapp-master之后,我将dist文件夹拷贝到example文件夹中。然后使用PC端的开发者工具是可以打开示例的。然而,当我使用远程调试的时候,在手机端是无法查看例子的,即页面没有渲染出来。并且在控制台显示:
WXMLRT_$gwx:./pages/icon/index.wxml:view:2:6: Now you can provide attr wx:key for a wx:for to improve performance.

我的微信和开发者工具均为最新版,手机型号为iphone6s和华为。

在官网上的二维码进入demo是没有问题的,文档中的npm方式未尝试。

请问这是什么问题呢?

i-tab-bar 和 i-tar-bar-item

使用i-tab-bar和i-tab-bar-item的时候怎么定义每个tab要显示的页面,每个 tab显示的页面怎么与 i-tab-bar组件关联起来

TabBar与Tabs的点击触发区域太小

使用手机扫码预览组件示例的时候发现TabBar与Tabs的切换区域太小..好像只有文字部分被点击才能触发, 实际上假如一个标签栏被分成4个标签项时, 每个标签项的受点击区域应该是宽25%, 高100%才比较好用吧..

另外Input组件在获取/失去焦点时, placeholder会有闪烁现象...

关于i-tab-bar和i-tab-bar-item的问题

请问,使用i-tab-bar和i-tab-bar-item的时候怎么定义每个tab要显示的页面?我看了一下这两个组件,并没有设置tab页面的功能,如果是点击tab的时候用navigateTo方法跳转到指定的页面的话,跳转到页面是没有tabbar,我也想过在每个tab页面上都加个tabbar,但是tabbar会跟页面一起滑动,而且这样的做法太low了,所以很郁闷,不知道设计这两个组件的目的是什么?

在wepy的component自定义组件中可以引用iview吗

试了两种方法:
一种是使用官网指南usingComponents属性,但是wepy 的组件component实例中没有config这个属性,自然也就没有usingComponents;
另一种是使用import方法,但是iview的组件没有export;

是不是现阶段就不可以在自定义组件引用iview??

`i-tab-bar`父级绑定`tap`事件,开发工具报错

i-tab-bar父级绑定tap事件,点击切换图标

<view bindtap="bindViewTap">
  <i-tab-bar current="{{ current }}" bindchange="handleChange">
      <i-tab-bar-item key="homepage" icon="homepage" current-icon="homepage_fill" title="Home"></i-tab-bar-item>
      <i-tab-bar-item key="group" icon="group" current-icon="group_fill" title="Friends"></i-tab-bar-item>
      <i-tab-bar-item key="remind" icon="remind" current-icon="remind_fill" count="3" title="Notice"></i-tab-bar-item>
      <i-tab-bar-item key="mine" icon="mine" current-icon="mine_fill" dot title="My"></i-tab-bar-item>
  </i-tab-bar>
</view>

点击切换tab,开发工具报错
image

编译的时候总出错

Finished 'default' 到这里就不动了。用开发者工具打开就提示no such file or directory \examples\game.json

input输入框组件中发现几个小问题

1、收货人和联系电话的内容在获取焦点时位置会比之前低2px,视觉上像是抖动了一下
2、详细地址内容填完后,焦点切换到联系人再切换回详细地址,点输入法中的删除按键无效,点输入法左上角“完成”后,一切又正常

微信6.6.7 vivo x7 plus 搜狗输入法

对话框i-modal的大小如何调整?

没看到具体参数!
model
不知道怎么回事,设置了 show-ok、show-cancel 为 false,依然显示
<i-modal title="今天干了啥" visible="{{ dayDialogVisible }}" show-ok="false" show-cancel="false" bind:cancel="closeDialog" i-class="modal-style"> <i-row> <i-button...../> </i-row> </i-modal>

提供一种直接引入 src 的使用方式,可以方便修改自定义和修改主题样式

链接地址:
https://github.com/tolerance-go/weapp-start

直接拷贝src下的样式和组件
image

我的 weapp.config 配置方案,我项目主样式语言是 stylus,

module.exports = {
  plugins: [
    [
      'weapp-plugin-filter',
      {
        throw: /styles\/.*\.less$|\.styl$/, // 过滤了 iview 的样式主题文件
      },
    ],
    'weapp-plugin-eslint',
    [
      'weapp-plugin-babel',
      {
        ignore: /we7\/(util|base64|htmlToWxml|md5|underscore|webview)\.js$/,
      },
    ],
    'weapp-plugin-require',
    'weapp-plugin-stylus',
    [
      'weapp-plugin-less',
      {
        match: /\.less$/,
      },
    ],
    [
      'weapp-plugin-replace',
      {
        match: /\.wxss$/,
        config: {
          find: /([0-9.]+)px/gi,
          replace: (match, count) => {
            return count * 2 + 'rpx';
          },
        },
      },
    ],
    'weapp-plugin-pug',
  ],
  env: {
    production: {
      plugins: [
        [
          'weapp-plugin-jsmin',
          {
            extra: true,
            ignore: /we7\/(util|base64|htmlToWxml|md5|underscore|webview)\.js$/,
          },
        ],
        'weapp-plugin-filemin',
        'weapp-plugin-imgmin',
        [
          'weapp-plugin-postcss',
          {
            plugins: [
              require('autoprefixer')({
                browsers: ['Android >= 2.3', 'Chrome > 20', 'iOS >= 6'],
              }),
            ],
          },
        ],
      ],
    },
  },
};

组件库的构建工具也可以从 gulp 换成 weapp-start

加个日历插件就完美了

最近刚看到小程序版的iview,如果加个日历插件就完美了,单选,多选,可以有不同的颜色,

关于使用 ... 操作符的问题

小程序官方提供的是ES6转ES5,但是这样使用Promise将会出现问题。如果关闭ES6转ES5, ... 操作符将无法通过编译,能否提供一个方案解决这个问题呢?我目前是使用关闭ES6转ES5,并把 ... 操作都改掉的方法。

建议

ui库非常好用,文件也很小,单位建议使用rpx ,建议加入Datetime组件

执行npm run dev出现编译错误,这个是什么问题?

但是我在package.json目录下执行,出现了编译错误。这个是什么原因呀?
JovinsdeMacBook-Pro:iview-weapp Jovins$ npm run dev

[email protected] dev /Users/Jovins/Desktop/小程序/iview-weapp
gulp --gulpfile build/build-dev.js

sh: gulp: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: gulp --gulpfile build/build-dev.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Jovins/.npm/_logs/2018-06-13T10_40_07_697Z-debug.log

目前Message等组件无法在组件中使用

目前组件中代码中默认从当前page中获取组件,导致无法在组件中使用

function getCtx (selector) {
const pages = getCurrentPages();
const ctx = pages[pages.length - 1];

const componentCtx = ctx.selectComponent(selector);

if (!componentCtx) {
    console.error('无法找到对应的组件,请按文档说明使用组件');
    return null;
}
return componentCtx;

},

能否添加一个参数, 可以将ctx设置成当前组件

npm run dev在哪个根目录下执行的?

但是我在package.json目录下执行,出现了编译错误。这个是什么原因呀?
JovinsdeMacBook-Pro:iview-weapp Jovins$ npm run dev

[email protected] dev /Users/Jovins/Desktop/小程序/iview-weapp
gulp --gulpfile build/build-dev.js

sh: gulp: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: gulp --gulpfile build/build-dev.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Jovins/.npm/_logs/2018-06-13T10_40_07_697Z-debug.log

搜索条

建议新增一个搜索条,这个还是比较常用的。

i-tab-bar的使用场景问题

如果使用该组件替换官方的tabbar,那么该组件如何在全局使用呢?难道要在底部的4个page中都引入该组件吗?

请问如何在form里面使用i-button

<form bindsubmit="formSubmit" bindreset="formReset">
    ...
    <button formType="submit">提交申请</button>
    <i-button bind:click="formSubmit"  type="primary">Primary</i-button>
</form>

请问这种情况下ibutton怎么使用呀,直接调用formSubmit e.detail 是undefined。Panel properties里面也没有formType呢,谢谢。

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.