omim - beautify finger demo

This commit is contained in:
dntzhang 2019-07-09 15:59:55 +08:00
parent b04be91448
commit 4ed08e12f3
3 changed files with 10 additions and 4 deletions

View File

@ -94,7 +94,7 @@
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__webpack_require__(/*! ../../src/finger/index.tsx */ \"./src/finger/index.tsx\");\nvar omi_1 = __webpack_require__(/*! omi */ \"./node_modules/_omi@6.6.7@omi/dist/omi.esm.js\");\nvar MyApp = /** @class */ (function (_super) {\n __extends(MyApp, _super);\n function MyApp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleTap = function (evt) {\n _this.data.wording += '\\r\\nTap';\n _this.update();\n };\n _this.handleSwipe = function (evt) {\n _this.data.wording += '\\r\\nSwipe-' + evt.detail.direction;\n _this.update();\n };\n return _this;\n }\n MyApp.prototype.install = function () {\n this.data.wording = 'Tap or Swipe Me!';\n };\n MyApp.prototype.render = function () {\n return (omi_1.h(\"div\", null,\n omi_1.h(\"m-finger\", { onTap: this.handleTap, onSwipe: this.handleSwipe },\n omi_1.h(\"div\", { class: \"touchArea\" }, this.data.wording))));\n };\n MyApp.css = \"\\n .touchArea{\\n background-color: green;\\n width: 200px;\\n min-height: 200px;\\n text-align: center;\\n color:white;\\n height:auto;\\n white-space: pre-line;\\n}\\n \";\n MyApp = __decorate([\n omi_1.tag('my-app')\n ], MyApp);\n return MyApp;\n}(omi_1.WeElement));\nomi_1.render(omi_1.h(\"my-app\", null), 'body');\n\n\n//# sourceURL=webpack:///./demos/finger/index.js?");
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__webpack_require__(/*! ../../src/finger/index.tsx */ \"./src/finger/index.tsx\");\nvar omi_1 = __webpack_require__(/*! omi */ \"./node_modules/_omi@6.6.7@omi/dist/omi.esm.js\");\nvar MyApp = /** @class */ (function (_super) {\n __extends(MyApp, _super);\n function MyApp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleTap = function (evt) {\n _this.data.wording += '\\r\\nTap';\n _this.update();\n };\n _this.handleSwipe = function (evt) {\n _this.data.wording += '\\r\\nSwipe-' + evt.detail.direction;\n _this.update();\n };\n return _this;\n }\n MyApp.prototype.install = function () {\n this.data.wording = 'Tap or Swipe Me!';\n };\n MyApp.prototype.render = function () {\n return (omi_1.h(\"div\", { id: 'app' },\n omi_1.h(\"m-finger\", { onTap: this.handleTap, onSwipe: this.handleSwipe },\n omi_1.h(\"div\", { class: \"touchArea\" }, this.data.wording))));\n };\n MyApp.css = \"\\n #app{\\n text-align: center;\\n margin-top: 80px;\\n }\\n\\n .touchArea{\\n background-color: #0072d9;\\n width: 200px;\\n min-height: 200px;\\n text-align: center;\\n color:white;\\n height:auto;\\n white-space: pre-line;\\n padding: 10px; \\n}\\n \";\n MyApp = __decorate([\n omi_1.tag('my-app')\n ], MyApp);\n return MyApp;\n}(omi_1.WeElement));\nomi_1.render(omi_1.h(\"my-app\", null), 'body');\n\n\n//# sourceURL=webpack:///./demos/finger/index.js?");
/***/ }),

View File

@ -20,7 +20,7 @@ class MyApp extends WeElement {
render() {
return (
<div>
<div id='app'>
<m-finger onTap={this.handleTap} onSwipe={this.handleSwipe}>
<div class="touchArea">
{this.data.wording}
@ -31,14 +31,20 @@ class MyApp extends WeElement {
}
static css = `
#app{
text-align: center;
margin-top: 80px;
}
.touchArea{
background-color: green;
background-color: #0072d9;
width: 200px;
min-height: 200px;
text-align: center;
color:white;
height:auto;
white-space: pre-line;
padding: 10px;
}
`
}

View File

@ -1,6 +1,6 @@
{
"name": "omim",
"version": "0.1.16",
"version": "0.1.17",
"description": "Material Design for Omi.",
"main": "index.js",
"scripts": {