weexteam / picker-for-apache-weex Goto Github PK
View Code? Open in Web Editor NEWpicker for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
picker for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
我们在微信上使用此插件,结果没有任何反应,后来通过调试发现报这个错误“document.body.append is not a function”。将其修改为“document.body.appendChild”就可以了。
能修复下,h5下的样式?或者weex-vue-render升级前,测试下向下兼容的问题??
当选项超过一个屏幕就会出现这种问题,默认勾选或者选择的都会出现好几个默认选中。
Error occured when i run npm run build:browser
in weex project which is clone from https://github.com/apache/incubator-weex
(node:9212) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: 'default' is not exported by node_modules\weex-picker\js\build\main.js (imported by html5\render\browser\extend\packer.js). For
help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
(node:9212) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
versions
# weex --version
v1.0.5
- weex-builder : v0.2.6
- weex-devtool : v0.2.79
- weex-previewer : v1.3.7
# node -v
v7.7.1
# weex project
latest@master
# OS
win10
在哪里引入
没有报错误,能正常出现选择框,按done后,界面上没有成功显示选择的内容!在iOS11之前是好用的!
需要三端同时支持 picker
,因此手动在组件内部引入了 weex-picker
。
引入方式 :
import '../../node_modules/@weex-project/weex-picker/js/build/index.js';
const picker = weex.requireModule('picker');
export default {
})
web 平台使用没有问题,在 native 上抛出错误如下:
18: 2018-07-31 16:22:44.209 WeexDemo <Weex>[exception]bundleJSType:Vue
instanceId:90 bundleUrl:http://x.x.x.x:8081/dist/index.js?random=-2083048737 errorCode:-9400 functionName: exception:[WX_KEY_EXCEPTION_WXBRIDGE] [undefined:3556:24] TypeError: Attempted to assign to readonly property.
exports
t
t
t
t
t
__webpack_require__
__webpack_require__
__webpack_require__
__webpack_require__
__webpack_require__
anonymous
native-bundle-main.js:1:40926
[email protected]:1:40937
native-bundle-main.js:1:255299 userInfo:{
jsMainBundleStringContentLength = 439986;
jsMainBundleStringContentMd5 = 410d77edc3e9df9242e748676ffe9dc5;
} jsfmVersion:0.24.4 sdkVersion:0.18.0 appVersion:2.2 osVersion:12.0 platform:iOS deviceModel:iPhone8,2
If you want to know more, please open weex MNT
去掉 import 后,无报错
weex-picker
的引入是否只能使用 script
?如果想在组件内部引入,如何操作?
步骤 2
你需要在引入weex-vue-render之后进行模块注册,具体可参考根目录下的./playground/browser/plugininstall.js
目前模块的注册加入了源码中,请保证在weex环境加载之后引入
<script src="../../../node_modules/vue/dist/vue.runtime.js"></script> <script src="../../../node_modules/weex-vue-render/dist/index.js"></script> <script src="../../../node_modules/@weex-project/weex-picker/build/index.js"></script>--这里有错,正确的是<script src="../../../node_modules/@weex-project/weex-picker/js/build/index.js"></script>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.