chaunjie / kai-ui Goto Github PK
View Code? Open in Web Editor NEW高颜值组件库,简单易用,同时支持原生和wepy框架
Home Page: https://chaunjie.github.io/kui/dist
高颜值组件库,简单易用,同时支持原生和wepy框架
Home Page: https://chaunjie.github.io/kui/dist
原生用法里,tab 激活后active样式没有添加,看wxml 与 js 里也没有相应的逻辑
<repeat> <popup :show.sync="true" :position.sync="'left'" :id.sync="'22'" :maskHide.sync="true"> <block slot="popContainer"> <view class="pop-inner pop-left"> <view class="pop-text">忆江南</view> <view class="pop-text">江南好</view> <view class="pop-text">风景旧曾谙</view> <view class="pop-text">日出江花红胜火</view> <view class="pop-text">春来江水绿如蓝</view> <view class="pop-text">能不忆江南</view> <button class="btn btn-kai margin-top20" catchtap="close()"> 关闭 </button> </view> </block> </popup> </repeat>
"wepy" "^1.7.2"
少了一个冒号
slide控件如果放在某个view中,如果这个view是通过动画出现的,比如初始位置是transform: translateX(100%),然后通过动画设成了transform: translateX(0),也就是从页面渐入,此时ready 方法里的startX计算就会有问题
wx.createSelectorQuery().in(this).select('.slider-stick__wrap').boundingClientRect((res) => {
const width = res.width
const startX = res.left //这里的计算会有问题
当前版本的input组件,定义config为sync后,value将无法输入。发现删除maxlength后,问题解决
// index.json
{
"usingComponents": {
"dialog": "/components/dialog-wxapp/dialog",
"k-toptips": "/components/toptips/index"
}
}
// index.wxml
<k-toptips id="toptips"/>
<view>
...
</view>
// index.js
import Toptips from '../../components/toptips/index';
Page({
...
})
Mon Mar 25 2019 16:07:12 GMT+0800 (**标准时间) Page 注册错误
VM2619:1 Please do not register multiple Pages in pages/index/index.js
console.error @ VM2619:1
T @ WAService.js:1
bt @ WAService.js:1
Rt @ WAService.js:1
(anonymous) @ index.js:3
require @ WAService.js:1
(anonymous) @ VM2634:20
scriptLoaded @ appservice?t=1553501232052:1217
script.onload @ appservice?t=1553501232052:1229
VM2619:1 thirdScriptError
sdk uncaught third Error
APP-SERVICE-Engine:Please do not register multiple Pages in pages/index/index.js
Error: APP-SERVICE-Engine:Please do not register multiple Pages in pages/index/index.js
at bt (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:993244)
at Rt (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:1007653)
at http://127.0.0.1:16390/appservice/pages/index/index.js:9:1
at require (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:1014710)
at <anonymous>:20:7
at HTMLScriptElement.scriptLoaded (http://127.0.0.1:16390/appservice/appservice?t=1553501232052:1217:21)
at HTMLScriptElement.script.onload (http://127.0.0.1:16390/appservice/appservice?t=1553501232052:1229:20)
console.error @ VM2619:1
(anonymous) @ WAService.js:1
(anonymous) @ WAService.js:1
e @ appservice?t=1553501232052:1176
window.onerror @ VM2619:1
scriptLoaded @ appservice?t=1553501232052:1217
script.onload @ appservice?t=1553501232052:1229
VM2619:1 jsEnginScriptError
Component is not found in path "components/toptips/index" (using by "pages/index/index");onAppRoute
Error: Component is not found in path "components/toptips/index" (using by "pages/index/index")
at e (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:884653)
at e (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:884839)
at http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:900292
at Object.t.addView (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:900838)
at Function.value (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:980225)
at kt (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:996594)
at It (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:1000072)
at Function.<anonymous> (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:1001080)
at Be.<anonymous> (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:973438)
at Be.emit (http://127.0.0.1:16390/appservice/__dev__/WAService.js:1:333476)
wepy版本,在引入组件的时候报错:报错的内容为:
[Error] TypeError: Cannot read property 'dir' of null
按照文档引入出错,代码如下
`
使用kai-ui组件库开始
报错如下
ERR! dependence Can not import a wepy component, please use "usingComponents" to declear a component [15:40:23] ERR! dependence File: [15:40:23] ERR! dependence E:\wspaces\vscode\myproj\node_modules\kai-ui\src\components\panel\index.wpy [15:40:23] ERR! dependence Snapshot: [15:40:23] ERR! dependence 3 | var _Panel = _interopRequireDefault(require("kai-ui/Panel")); [15:40:23] ERR! dependence 4 | [15:40:23] ERR! dependence > 5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } [15:40:23] ERR! dependence 6 | [15:40:23] ERR! dependence 7 | components = { [15:40:23] ERR! dependence 8 | 'k-panel': _Panel["default"]
@Chaunjie
选中状态的效果位置不正确,动态添加的会报width找不到?求指点
由于将export default class Popup extends wepy.component
写成export default class Popup extends wepy.page
导致组件属性传值不能正常使用
在使用wepy版本的popup的过程中,发现怎么设置显示位置也不好使,然后就开始看您的源码,感觉是不是源码出啥子问题了,怎么看怎么没问题,甚至把源码删减到只有一个props,只显示一行hello world还是不行,反复的比对是不是单词拼错了,一个单词一个单词的赋值粘贴,依旧没有发现任何问题,可是位置信息就是显示不过来,都已经准备放弃了,打算将四个方向设置为四个组件,设置默认值;突然一个单词映入我的眼帘
微笑,生活很美好
UI看起来不错,内容也齐全。
wepy 2.x也出来了,想了解下项目会继续维护么?
tab标签能不能增加当前高亮样式呢?
当前选中哪个标签就改变当前的颜色,这样的体验会更好。
无解啊亲爱的作者。。
this.triggerEvent('select', index); // 只返回了index
this.triggerEvent('select', tabData.list[index]); // 按文档描述 应返回当前对象
我用文档里面的方法引入了半天没有成功,然后提了Issues,得到了一个解决方法,将相关代码直接拷入项目,我是用的wepy
的版本
在使用的过程中会爆出can not read ** of undefined此类的错误,翻看源码后发现
分析可能的原因是没有考虑c可能为空的情况,因为wepy文档并没有描述组件的生命周期,考虑可能是由于组件初始化的时候props里面的先设置为空了,所以导致此异常
wepy版本的cell组件文档如下
小程序版本的cell组件文档如下:
源码如下:
之前的某项Issues如下:
猜测可能是由于听取了此项Issues中的建议对组件进行了修改,同事修改了小程序的文档,但是忘记修改wepy的文档了
运行run dev。 警告内容如下:Error: Cannot find module 'less'
和[WARNING] 找不到编译器:wepy-compiler-less
。
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.