Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ant Design Mobile of Weex

License

NotificationsYou must be signed in to change notification settings

hminghe/weex-amui

Repository files navigation

安装

npm i weex-amui -S

使用

<template>  <div>    <am-button@click="handleClick"text="确定"type="primary"/>  </div></template><script>import {AmButton }from'weex-amui';exportdefault {    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      }    ]  ]}
  • 如果你使用了weex-vue-render@1.x 版本(现在使用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 inpm run start

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

Ant Design Mobileweex-uiweex-flymeui


[8]ページ先頭

©2009-2025 Movatter.jp