Code Monkey home page Code Monkey logo

touchwx's Introduction

Touch WX

Touch WX部分组件

介绍

Touch WX是一套完全免费的微信小程序开发框架,包含丰富的UI控件用于官方组件的补充。特点如下:

1、组件扩充:

增加了30多种常用的组件用于官方组件的补充。

2、功能扩充:

兼容阿里的iconfont图标库,海量矢量图标随意使用;补充了常用样式库、支持less语法、支持全局配置主题色等

3、开发体验改善:

四文件方式改为单文件方式,通过VSCode编辑器+插件的方式开发,拥有web开发体验;

4、小程序转为H5应用:

可以与H5开发框架Touch UI工程相互转换,发布成webApp。开发一套代码,拥有两套应用。

这套框架的原理是:

将Touch WX工程中所写的代码进行编译,直接输出为微信小程序工程原始代码。扩充的30多种组件,完全是基于小程序官方的自定义组件机制实现(row&col除外)。

所以它支持小程序的全部语法,怎么开发小程序,就怎么开发Touch WX。

不过因为是单文件的开发方式,在文件的代码结构上稍有不同。请注意这一点。

这样好处在于:

1、开发者迁移成本很小。

可以轻松的将已有的小程序移植为Touch WX工程,来使用它的扩展能力;

2、便于排查错误。

当遇到问题时,开发者也可以随时查看输出的小程序原始代码来定位问题所在。不会搞不清楚到底是框架问题还是自己代码的问题;

3、按需编译

由于小程序对体积有限制,在使用框架开发时,只有使用到的组件才会编译输出为小程序源码。没用到的不会输出。

4、不会对框架产生依赖。

以后不想用了这套框架,可以直接对已经输出的小程序工程进行维护。

注意事项

如果已经之前已经使用过Touch WX,运行过基础工程,可以跳过1、2步骤,直接开始第3步。

1、在本地运行代码时,需要安装Touch WX插件。

2、全局安装touchui-wx-cli

npm install -g touchui-wx-cli

3、右键,将该项目识别为Touch WX工程。

4、右键,安装项目依赖。如果没有成功的安装项目依赖,会报如下错误。

详情可以参考下面的Touch WX文档。

环境安装:“入门 >> 起步 >> 环境安装”

第一个程序:“入门 >> 起步 >> 第一个程序”

文档

中文文档

Demo

讨论组

加下面的小助手微信进交流群。

相关项目

Touch UI

Touch UI是一套高质量移动端UI框架。基于vue.js框架,我们精心打造了上百种的移动端UI组件,几乎囊括了开发移动应用的所有细节,真正实现拿来即用,像搭积木一样开发移动应用。

touchwx's People

Contributors

da-hh avatar pangxiaodun avatar uileader 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  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

touchwx's Issues

脚手架安装错误

npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Support has ended for 9.x series. Upgrade to @latest
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npm.taobao.org/postcss-bem
npm ERR! 404
npm ERR! 404 'postcss-bem@^0.4.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'touchui-wx-cli'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

是否支持vuex

想问一下是否支持vuex?另外像flyio这类的网络请求框架支不支持呢?谢谢。

动态 images 打包不了

动态 images 打包不了,反正写在 js 中或者 html 里用变量的都无法打包到 dist 目录

node 版本过低

创建基础项目时,拓展提示 node 版本过低,本地环境:

Mac 10.13.4 + VS Code 1.23.1 + Node 10.2.1 + yarn 1.7.0 + touchui-wx-cli 1.1.6

win10 启动开发服务频繁报错

PS C:\Users\Mestc\source\repos\LoveU-background> tui dev

(node:4652) UnhandledPromiseRejectionWarning: Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\Mestc\source\repos\LoveU-background\dist\pages'
at Object.rmdirSync (fs.js:769:3)
at rmkidsSync (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\node_modules\fs-extra\lib\remove\rimraf.js:304:27)
at rmdirSync (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\node_modules\fs-extra\lib\remove\rimraf.js:281:7)
at Object.rimrafSync [as removeSync] (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\node_modules\fs-extra\lib\remove\rimraf.js:252:7)
at C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\node_modules\fs-extra\lib\empty\index.js:39:12
at Array.forEach ()
at Object.emptyDirSync (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\node_modules\fs-extra\lib\empty\index.js:37:9)
at Xcx. (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\lib\class\Xcx.js:33:20)
at Generator.next ()
at fulfilled (C:\Users\Mestc\AppData\Roaming\npm\node_modules\touchui-wx-cli\lib\class\Xcx.js:4:58)
(node:4652) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node
process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4652) [DEP0018] 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.

无法自定义组件??

我在项目的根目录下,创建了一个packages的文件夹,然后创建了一个cc-test.wxc,编译后看不到文件,也看不到控制台输出有编译信息??

级联选择器bug

设备:iphone6
微信版本:6.6.7
描述:级联选择打开状态下 能够上下随意拖动,是什么鬼?

如何使用云开发?

如题,云开发会在本地安装依赖。而有的时候出错需要删除整个dist,就要重新安装依赖了。

小程序原生转化成touchwx解决方案

我想问一下,我们现在用小程序原生已经开发成熟的微信小程序,想转化成touchwx进行后续的开发和迭代,不知道应该怎么操作,我看文档上只是说了一句可以转化,具体怎么操作没有说,请问大佬们可以给介绍一下吗。这么好的框架箱入手啊!!!!谢谢

ui-ruler has an error,when value="0" min="-200" max="200"

Error Code: at ui-ruler
ready () {
if (this.data.value) { //当 0 时,错误
this.data.selfValue = Number(this.data.value) - this.data.selfMin
} else {
this.data.selfValue = 0
}

this.data.leftForSure = this.data.selfValue * (this.data.selfLineWidth + this.data.selfStepWidth)

this.setData({
  selfValue : this.data.selfValue,
  leftForSure: this.data.leftForSure
})

},
Pass Code:
ready () {
if (this.data.value != null) {
this.data.selfValue = Number(this.data.value) - this.data.selfMin
} else {
this.data.selfValue = 0
}

this.data.leftForSure = this.data.selfValue * (this.data.selfLineWidth + this.data.selfStepWidth)

this.setData({
  selfValue : this.data.selfValue,
  leftForSure: this.data.leftForSure
})

},
attached () {
this.data.lineHeight = this.data.lineHeight || Number(this.data.height) / 4
this.data.keyLineHeight = this.data.keyLineHeight || Number(this.data.lineHeight) * 2

this.data.selfValueStyle = StyleHelper.getPlainStyle(this.data.valueStyle)

this.data.selfStepWidth = Number(this.data.stepWidth)
this.data.selfLineWidth = Number(this.data.lineWidth)
this.data.selfMin = Number(this.data.min)
this.data.selfMax = Number(this.data.max)
this.data.value = this.data.value
this.data.step = Number(this.data.step)
this.data.keyStep = Number(this.data.keyStep)
this.data.pointerWidth = Number(this.data.pointerWidth)
this.data.selfWidth = Number(this.data.width)
if (this.data.width) {
  this.data.selfWidth = Number(this.data.width)
} else {
  this.data.selfWidth = wx.getSystemInfoSync().windowWidth
}
this.data.padding = this.data.selfWidth / 2

if (!this.data.numberPadding) {
  this.setData({
    numberPadding: this.data.numberSize / 2,
  })
} else {
  this.setData({
    numberPadding: this.data.numberPadding,
  })
}
this.setData({
  lineHeight: this.data.lineHeight,
  keyLineHeight: this.data.keyLineHeight,
  selfValueStyle: this.data.selfValueStyle,
  selfStepWidth: this.data.selfStepWidth,
  selfLineWidth: this.data.selfLineWidth,
  selfMin: this.data.selfMin,
  selfMax: this.data.selfMax,
  value: this.data.value,
  step: this.data.step,
  keyStep: this.data.keyStep,
  pointerWidth: this.data.pointerWidth
})
this.setData({
  padding: this.data.padding,
  rulerWrapStyle: OTS(this.rulerWrapStyleObj()),
  rulerStyle: OTS(this.rulerStyleObj()),
  rulerPointerStyle: OTS(this.rulerPointerStyleObj()),
  scrollViewStyle: OTS(this.scrollViewStyleObj()),
  rulerPaddingStyle: OTS(this.rulerPaddingStyleObj()),
  numberPaddingStyle: OTS(this.numberPaddingStyleObj())
})

},

tui dev 不支持...?

export const uploadFile = (obj) => new Promise((resolve, reject) => {
  wx.uploadFile({
    ...obj,
    success(res) {
      resolve(res);
    },
    fail(e) {
      reject(e);
    }
  });
});

SyntaxError: unknown: Unexpected token (155:4)

ui-v-tabs 选中效果在真机上有问题,会报错

ui-v-tabs 选中效果在真机上有问题,会报错,在开发工具就正常。其实跟数据无关,只要一渲染就报错

image

<ui-v-tabs 
          height="{{tabHeight}}"
          tab-style="{{tabStyle}}"
          active-tab-style="{{activeTabStyle}}"
          class="tab-item"
          index="{{ current }}"
          data-key="current">
          <ui-v-tab wx:for="{{ tabItems }}" data-index="{{index}}" data-category="{{item.id}}" bindtap="handleChange">
            {{ item.name }}
          </ui-v-tab>
        </ui-v-tabs>

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.