Git Product home page Git Product logo

weex-amui's Introduction

Weex-AMUI

安装

npm i weex-amui -S

使用

<template>
  <div>
    <am-button
      @click="handleClick"
      text="确定"
      type="primary"/>
  </div>
</template>

<script>
  import { AmButton } from 'weex-amui';

  export default {
    components: { AmButton },
    methods: {
      handleClick () {
        // enter your code
      }
    }
  };
</script>

使用前

  • 安装 less-loader 以正确编译less源码
npm i less less-loader -D
npm i babel-preset-stage-0 babel-plugin-component  -D
// 增加一个plugins的配置到 .babelrc 中
{
  "presets": ["es2015", "stage-0"],
  "plugins": [
    [
      "component",
      {
        "libraryName": "weex-amui",
        "libDir": "packages",
        "style": false
      }
      // 如果要和 weex-ui 一起用,配置加上下面这个
      ,{
        "libraryName": "weex-ui",
        "libDir": "packages",
        "style": false
      }
    ]
  ]
}
  • 如果你使用了 [email protected] 版本(现在使用 weex-toolkit 创建的项目可选0.x1.x),1.x版本依赖的 weex-vue-precompiler 当前版本会把自定义组件的 click, change 等事件处理出错,需要安装一下另外一个修改的版本。
npm i https://github.com/HMingHe/weex-vue-precompiler.git -D

eros 用户

  • 请修改 .babelrc 文件,如下:
{
  ...
  "plugins": [
    ["import",[
      {
        "libraryName": "weex-amui",
        "libraryDirectory": "packages",
        "style": false
      }
    ]
  ...
}

运行 Demo

npm i
npm run start

参考或者直接使用了他们的代码,感谢

Ant Design Mobile weex-ui weex-flymeui

weex-amui's People

Contributors

bk1d avatar chenarno avatar dependabot[bot] avatar hminghe 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

weex-amui's Issues

am-button的@click在h5下无效,只能是@click.native

<template>
  <div>
    <am-button
      @click="handleClick"
      text="确定"
      type="primary"/>
  </div>
</template>

<script>
  import { AmButton } from 'weex-amui';

  export default {
    components: { AmButton },
    methods: {
      handleClick () {
        // enter your code
        console.log('here')
      }
    }
  };
</script>

提个需求,做个weex表格组件

很喜欢这个组件库,很多实用的组件。大佬加油!(题外话)

正题:

表格在APP中也是经常使用的,找了很多个weex组件发现都没有表格组件。功能强大的表格组件 类似饿了么的表格组件 十分强大。特别是过滤、筛选、排序,表头固定、侧边表固定横向滚动等。

am-image 怎么得到image的ref ?

父组件中使用,报错
this.$refs['image'].save((result) => {
if (result.success) {
this.$notice.toast({ message: '已保存至本地' })
} else {
this.$notice.toast({ message: '保存失败!请稍后再试试~' })
}
});

am-picker-view绑定固定显示值问题

请问am-picker-view绑定固定显示值 v-model="value", 这个value的数据格式是什么样的, 我看文档中没有解释, 请问, 能帮我看看嘛, 我实在是没看懂代码,谢谢🙏

am-picker

没有change事件,am-picker-view不是想要的效果,能给picker加个事件吗?

am-icon 显示问题

am-icon 在iOS中,只能同时加载一个库,使用weexPlayground 查看示例,自定义图标为问号,Android正常。
iOS版本为13.4.1。

主题定制问题

我通过 variable.less 定制了主题,比如品牌颜色、字体大小等,debug 模式正常,但是 weex compile 后主题没有生效可能是 less 没有被编译进去?我该怎么解决呢?

图片自适应问题

Android 5.1使用自适应宽高加载有问题

        <text class="text">自动高</text>
        <am-image :image-style="{width: '200px'}" auto-height src="https://gw.alicdn.com/tfs/TB1KF_ybRTH8KJjy0FiXXcRsXXa-890-1186.png"></am-image>

直接粘贴例子代码

btnStyle不生效

组件的btnStyle属性如何设置;试了不能生效,是否可以举例说明一下

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.