apache / incubator-weex-ui Goto Github PK
View Code? Open in Web Editor NEW🏄 A rich interaction, lightweight, high performance UI library based on Weex.
Home Page: https://apache.github.io/incubator-weex-ui/#/
License: Apache License 2.0
🏄 A rich interaction, lightweight, high performance UI library based on Weex.
Home Page: https://apache.github.io/incubator-weex-ui/#/
License: Apache License 2.0
ERROR in invoice.js from UglifyJs
Unexpected token: name (TRADITIONAL_HOLIDAY) [invoice.js:1973,4]
ERROR in setting.js from UglifyJs
Unexpected token: name (TRADITIONAL_HOLIDAY) [setting.js:1206,4]
The font size does not change when the window resets the size.
weex -v
v1.1.0-beta.6
I hava update my weex-toolkit to latest version.
I run the following command:
$ weex debug **.vue
or
$ weex **.vue
The website show nothing and has following error:
Uncaught SyntaxError: Unexpected token export :8081/index.js:851
line 851 is: export { default } from './index.vue';
I scan the QR-Code with android phone, android Logcat output the following log
ReportException : Exception: SyntaxError: Unexpected keyword 'export'
at (global function):452
Function@[native code]
Function@[native code]
w@(weex framework):4:1545
a@(weex framework):3:30112
(weex framework):8:22648
chunk {0} index.web.js, index.web.js.map (index) 443 kB [entry] [rendered]
[45] .//babel-loader/lib!.//vue-loader/lib/selector.js?type=script&index=0!./src/index.vue 2.04 kB {0} [built]
[94] ./src/index.vue 1.47 kB {0} [built]
[95] .//vue-loader/lib/template-compiler.js?id=data-v-0d12c4ca!.//vue-loader/lib/selector.js?type=template&index=0!./src/index.vue 1.81 kB {0} [built]
[106] (webpack)/hot nonrecursive ^./log$ 160 bytes {0} [built]
[115] .//css-loader?sourceMap!.//vue-loader/lib/style-rewriter.js?id=data-v-0d12c4ca&scoped=true!.//vue-loader/lib/selector.js?type=styles&index=0!./src/index.vue 3.57 kB {0} [built]/babel-loader/lib!./
[135] .//vue-loader/lib/selector.js?type=script&index=0!.//weex-ui/packages/wxc-rich-text/index.vue 936 bytes {0} [built]
[141] .//babel-loader/lib!.//vue-loader/lib/selector.js?type=script&index=0!./src/wxc-item.vue 5.75 kB {0} [built]
[147] .//css-loader?sourceMap!.//vue-loader/lib/style-rewriter.js?id=data-v-77bf1996&scoped=true!.//vue-loader/lib/selector.js?type=styles&index=0!./src/wxc-item.vue 15.1 kB {0} [built]/weex-ui/packages/wxc-rich-text/index.vue 1.47 kB {0} [built]
[148] ./
[150] .//weex-ui/packages/wxc-special-rich-text/index.vue 1.48 kB {0} [built]/vue-loader/lib/template-compiler.js?id=data-v-77bf1996!./
[151] ./src/wxc-item.vue 1.48 kB {0} [built]
[158] .//vue-loader/lib/selector.js?type=template&index=0!./src/wxc-item.vue 3.06 kB {0} [built]/vue-style-loader!./
[164] .//css-loader?sourceMap!.//vue-loader/lib/style-rewriter.js?id=data-v-77bf1996&scoped=true!.//vue-loader/lib/selector.js?type=styles&index=0!./src/wxc-item.vue 1.4 kB {0} [built]/weex-ui/packages/wxc-rich-text/index.js 38 bytes {0} [built]
[165] ./
[166] ./~/weex-ui/packages/wxc-special-rich-text/index.js 38 bytes {0} [built]
+ 126 hidden modules
ERROR in index.web.js from UglifyJs
Unexpected token: punc (() [index.web.js:10679,17]
Child html-webpack-plugin for "index.html":
chunk {0} index.html 963 bytes [entry]
+ 1 hidden modules
webpack: Failed to compile.
我自己写了个项目,看到weex-ui很好看,npm install weex-ui引入后
然后页面import { WxcSearchbar } from 'weex-ui' 后,运行起来怎么报错了
Uncaught Error: Module build failed: SyntaxError: Unexpected token (35:8)
at Object.<anonymous> (Search.web.js:1175)
at __webpack_require__ (Search.web.js:22)
at Object.<anonymous> (Search.web.js:6660)
at __webpack_require__ (Search.web.js:22)
at Object.module.exports.arrowIcon (Search.web.js:10649)
at __webpack_require__ (Search.web.js:22)
at Object.<anonymous> (Search.web.js:10542)
at __webpack_require__ (Search.web.js:22)
at Object.<anonymous> (Search.web.js:5933)
at __webpack_require__ (Search.web.js:22)
首先恭喜weex终于有了官方的ui库,祝weex越来越好。
我迫不及待地试用了下,当我用以下命令测试的时候发现报了标题中的错。
weex src/index.vue
另外执行
weex run android
模拟器上打开后也是一直 loading 状态。
我当前的项目使用 weex-toolkit 脚手框工具生成,版本为:v1.0.9
测试页面很简单,就使用了 wxcButton
<template>
<div class="wrapper">
<wxc-button text="登录" type="normal" @wxcButtonClicked="onSubmit"></wxc-button>
</div>
</template>
<script>
var modal = weex.requireModule('modal')
import { wxcButton } from 'weex-ui'
export default {
components: {
wxcButton
},
data () {
return {}
},
methods: {
onSubmit () {
modal.toast({message: 'login'})
}
}
}
</script>
<style>
.wrapper {
display: flex;
flex-direction: columns;
align-items: center;
justify-content: center;
}
</style>
看了下报错的地方,是因为 weex-ui 使用了如下的导出方式:
export { default } from './index.vue';
了解到可能的原因是 weex preview build 不支持 export 这种es6的方式。不知有没有比较好的处理方法?
when I slide wxc-ep-slider I do,it can't work
mask组件的overlay-can-close属性不起作用,查看了源码就没有使用到
希望增加以下组件
上拉加载
下拉刷新
瀑布流(滚动加载)
购物车业务组件
SKU业务组件(类似vantui)
{
"presets": ["es2015", "stage-0"],
"plugins": [
[
"component",
{
"libraryName": "weex-ui",
"libDir": "packages"
}
]
]
}
按照readme中的方式使用weex-ui,在导入部分组件的时候直接报错,发现是由于那些组件vue文件中使用了module.exports初始化,改成export default就不报错了,所以目前是直接copy源码修改了在使用。望修改
wxc-button 组件的props中,按钮文字的字段为text,文档示例为title,功能没问题,就是可能会有一些误导
用的ios,如果手指只是滑动一点点,页面是不动的,滑动的大的话,会根据手势,通过动画过渡到另一页,但没有随我的手指一点一点滑动,但是看你的demo,是可以这样的。原因是wxc-item吗?
设备为红米note 4x,Android6.0.1
快速点击字母会出现大灰色遮罩层
期待:
不要出现超大遮罩层
手指向下滑动字母排序时,能选择对应城市
wxc-tab-page的示例用Weex Playground不能左右滑动,但在tmall是可以的,请问什么原因。
this is my babelrc:
{ "presets": [{ "es2015": { "modules": false }}, "stage-0"], "plugins": [ [ "component", { "libraryName": "weex-ui", "libDir": "packages" } ] ] }
it throw error:
i google this problem,and i guess the set modules=false cause this problem. does weex-ui component compat with this setting?
sorry for my poor vue and weex knowledge
请求帮助,预览报错
//"use strict";
Object.defineProperty(webpack_exports, "__esModule", { value: true });
const STYLE_MAP = {
taobao: {
backgroundColor: '#FF5000'
},
fliggy: {
backgroundColor: '#FFC900'
},
normal: {
backgroundColor: '#FFFFFF',
borderColor: '#A5A5A5',
borderWidth: '1px'
},
highlight: {
backgroundColor: '#FFFFFF',
borderColor: '#EE9900',
borderWidth: '1px'
}
};
编出的js文件中这行代码报错, 但是把"use strict";注释掉就OK了.这是源码的问题,还是编译出了问题?
wxc-tab-page这个组件一般显示的是nav导航栏在上方,main内容在下方.
wxc-tab-page这个组件怎么把main的内容放在上方.nav导航栏放在最下方
看了一下属性,没有这个属性功能.看了组件的源码 要引多重js.
所以勉强用了绝对定位定到最下面.把main隐藏了.自己再手写一个main,所以就没有左右滑动的效果.
发帖问问大神们怎么解决的
any detail information or document about expressionBinding feature ? i can not find this feature in offical document website
and how can i import this module as you say in this readme?
thanks!
Module build failed: SyntaxError: E:\代码\weex\weex-hackernews\node_modules_weex-ui@0.1.0@weex-ui\packages\wxc-button\index.vue: Unexpected token (35:8)
33 | const { type, disabled, btnStyle } = this;
34 | const mrBtnStyle = {
> 35 | ...STYLE_MAP[type],
| ^
36 | ...btnStyle
37 | };
38 | return disabled ? {
In specialConfigList of wxc-rich-text, we can use one 'tag' and one 'text'. When we try to use two 'tag's and one 'text', then there's error.
Can it be multi 'tag's and 'text's?
在页面中引入weex-ui组件,weex debug调试时发现页面空白,但是去掉weex-ui组件就可以正常显示;我把weex-ui的组件(比如weex-ui/packages/wxc-button文件夹)放入自己项目中,然后在页面中引入,调试就可以正常显示。
1.用weex create test创建weex项目
2.后续按照weex-ui提示做:
npm i weex-ui -S
import { WxcButton, WxcPopup } from 'weex-ui';
添加到index.vue里面
3.运行看效果 weexpack run android 不能显示出来
界面提示 : render error:-2013
log提示:10-12 10:47:11.022 19480-20668/com.alibaba.weex E/jsengine: ReportException :undefined:630: SyntaxError: Unexpected token (
10-12 10:47:11.025 19480-20668/com.alibaba.weex E/jsengine: ReportException : SyntaxError: Unexpected token (
at Jt ((weex):4:2004)
at Object.Dt [as createInstance] ((weex):3:31729)
at Object.R [as createInstance] ((weex):1:7385)
at global.(anonymous function) ((weex):7:1148)
10-12 10:47:11.026 19480-20668/com.alibaba.weex E/weex: reportJSException >>>> instanceId:1, exception function:createInstance, exception:SyntaxError: Unexpected token (
Before you start writing a issue,Please make sure there have not the same issue.
weex v1.1.0
一个最简单的例子, 一个按钮没有响应它的点击事件.
1.安装weex & weex create xxx
2. cd 到 weex project 目录
3. npm i weex-ui -S
4. npm i babel-plugin-component -D
5. 替换该目录下的.babelrc
6. 修改index.vue, 添加一个按钮
7. npm run dev & npm run serve
Uncaught ReferenceError: weex is not defined
at eval (index.vue?ab67:37)
at Object. (app.js:1808)
at webpack_require (app.js:678)
at fn (app.js:88)
at eval (index.vue?c5c5:1)
at Object. (app.js:1795)
at webpack_require (app.js:678)
at fn (app.js:88)
at eval (index.js?9340:1)
at Object. (app.js:1788)
import WxcButton from './packages/wxc-button';
Uncaught SyntaxError: Unexpected token import
按钮模块引入不进来
有弹出的组件点击弹出后,再次点击时,界面上所有的按钮都无效,不能进行点击
.cell-arrow-icon {
width: 22px;
height: 22px;
position: absolute;
top: 41px;
right: 24px;
}
改为
.cell-arrow-icon {
width: 22px;
height: 22px;
}
这样动态设置cell的高度时,图标还能自动居中.
还是说有别的原因?
I create a weex project by weex-toolkit , run web successfully,but run android get an error render error :-2013
dialog的组件有一些问题,可能是自定义标签造成的,希望回答一下
"dependencies": {
"vue": "^2.1.10",
"vue-router": "^2.1.1",
"vuex": "^2.1.1",
"vuex-router-sync": "^4.0.1",
"weex-ui": "^0.2.4",
"weex-vue-render": "^0.12.3"
},
"devDependencies": {
"babel-core": "^6.20.0",
"babel-loader": "^6.2.9",
"babel-plugin-component": "^0.10.1",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.26.1",
"serve": "^1.4.0",
"vue-loader": "^10.0.2",
"vue-template-compiler": "^2.1.10",
"webpack": "^2.2.1",
"weex-loader": "^0.4.4"
}
node v8.9.1
weex、weex-toolkit都是根据最新的安装的,windows7
-如果我吧wxc-dialog组件的index.vue的mask标签改成div后是能正常的显示的
textarea
的背景色为red,但通过onSelected
回调后,textarea
的背景色就会变成class里边定义的gray.代码如下<template>
<div class="wrapper">
<option-text class="option"
@onSelected="selectedValue => item.value = selectedValue">
</option-text>
<textarea class="input" style="background-color: red"></textarea>
</div>
</template>
<script>
import optionText from '../../component/option-text.vue'
export default {
components: {
optionText,
},
data() {
return {
item:{
value: 2,
remark: '备注4',
}
}
},
methods: {}
}
</script>
<style scoped>
.wrapper {
width: 750px;
background-color: white;
flex-direction: column;
}
.option {
height: 70px;
width: 280px;
margin: 5px;
}
.input {
background-color: gray;
}
</style>
但是如果通过动态绑定的方式如将textarea
的代码修改为
<textarea class="input" :style="{backgroundColor: red}"></textarea>
这样就没问题了,这个是什么原因?
When the config type is 'link', click the text, an error occur:
ReferenceError: Can't find variable: appendProtocol goToH5Page onLinkClick [email protected]:8:9230 native-bundle-main.js:3:26676 forEach@[native code] [email protected]:3:26575 native-bundle-main.js:8:16204
本来想用下WxcCell这个组件的,发现只要注册过WxcCell的组件打包就过不了
ERROR in goods-edit.js from UglifyJs
Unexpected token: punc (() [goods-edit.js:1574,17]
.babelrc里已经按照文档里写了
{
"presets": ["stage-3","es2015"],
"plugins": [
"transform-es2015-modules-commonjs",
"transform-export-extensions",
[
"component",
{
"libraryName": "weex-ui",
"libDir": "packages"
}
],
[
"transform-runtime",
{
"helpers": false,
"polyfill": false
}
]
]
}
其他组件倒是没有发现这个问题
weex-ui可以打包成HTML5的发布包吗?跑哪个命令可以直接生成html的发布包?
weex号称可以三端统一,但找了好久,只看到用浏览器调试页面的文档,看不到可以打包成html5发布包的相关文档......
如果你的webpack.config.js中 babel-loader 配置有对 node_modules 进行 exclude 处理,需要排除掉 weex-ui 包才可以使用 exclude: /node_modules(?!/.(weex).)/。
排除了整个/node_modules,不就包含了/node_modules(?!/.(weex).)/吗?
Before you start writing a issue,Please make sure there have not the same issue.
没有tab吗,就像iOS下面常见的tabbar一样
补充:动态样式响应
11-10 18:48:53.253 19142-19161/com.alibaba.weex E/jsengine: ReportException :undefined:92: SyntaxError: Use of const in strict mode.
11-10 18:48:53.253 19142-19161/com.alibaba.weex E/jsengine: ReportException : SyntaxError: Use of const in strict mode.
at Jt ((weex):4:2004)
at Object.Dt [as createInstance] ((weex):3:31729)
at Object.R [as createInstance] ((weex):1:7385)
at global.(anonymous function) ((weex):7:1148)
11-10 18:48:53.253 19142-19161/com.alibaba.weex E/weex: reportJSException >>>> instanceId:4, exception function:createInstance, exception:SyntaxError: Use of const in strict mode.
我知道这个问题应该简单,但是作为新转过来的,找不到问题,也搜不到 ,求解,求大神解惑
module navigationBar don't support by weex,could it open source to weex?
调用tabpage的时候,报这个错误
目前此项目中都是使用的图片作为图标。http://www.iconfont.cn/ 中有大量的资源可以使用,图标是否可以直接使用字体图标。现在项目使用都是自行来替换,估计很多人都有类似需求。
Before you start writing a issue,Please make sure there have not the same issue.
可以在业务层覆盖组件内的样式吗?
Before you start writing a issue,Please make sure there have not the same issue.
弹出的内容区域只有设置 width 值的一半。
使用通用 demo 就可以复现。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.