feat(admin): create a simple form page using omiu
This commit is contained in:
parent
cd14d64d1f
commit
63ad7cdebc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/checkbox",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.9",
|
||||
"description": "Omi UI Components.",
|
||||
"main": "src/index.js",
|
||||
"module": "src/index.esm.js",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
.o-checkbox {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
line-height: 18px;
|
||||
white-space: nowrap; }
|
||||
.o-checkbox:hover {
|
||||
cursor: pointer; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/checkbox v0.0.7 http://omijs.org
|
||||
* @omiu/checkbox v0.0.9 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -9,18 +9,18 @@
|
|||
import { h, extractClass, tag, WeElement } from 'omi';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
|
@ -65,7 +65,7 @@ var css = `:host {
|
|||
.o-checkbox {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
line-height: 18px;
|
||||
white-space: nowrap; }
|
||||
.o-checkbox:hover {
|
||||
cursor: pointer; }
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -96,29 +96,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!****************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************/
|
||||
/***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!*************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\*************************************************************************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js */ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js")(false);
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
|
||||
// imports
|
||||
|
||||
|
||||
// module
|
||||
exports.push([module.i, ":host {\n display: inline-block; }\n\n* {\n box-sizing: border-box; }\n\n.o-checkbox {\n position: relative;\n font-size: 14px;\n color: rgba(0, 0, 0, 0.87);\n white-space: nowrap; }\n .o-checkbox:hover {\n cursor: pointer; }\n\n.o-checkbox__native-control:enabled:checked ~ .o-checkbox__background,\n.o-checkbox__native-control:enabled:indeterminate ~ .o-checkbox__background {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160);\n opacity: 1; }\n\n.o-checkbox__indeterminate .o-checkbox__checkmark {\n opacity: 0; }\n\n.o-checkbox__checkmark {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n opacity: 1;\n transition: opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);\n color: #ffffff; }\n\n.o-checkbox__checkmark-path {\n transition: stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);\n stroke: currentColor;\n stroke-width: 3.12px;\n stroke-dashoffset: 29.78334;\n stroke-dasharray: 29.78334; }\n\n.o-checkbox__native-control:checked ~ .o-checkbox__background .o-checkbox__checkmark-path,\n.o-checkbox__native-control:indeterminate ~ .o-checkbox__background .o-checkbox__checkmark-path {\n stroke-dashoffset: 0; }\n\n.o-checkbox__background {\n position: relative;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 45%;\n height: 45%;\n border: 2px solid currentColor;\n border-radius: 2px;\n background-color: transparent;\n pointer-events: none;\n will-change: background-color, border-color;\n transition: background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1); }\n\n.o-checkbox__background,\n.o-checkbox__label {\n display: inline-block;\n height: 18px;\n vertical-align: middle; }\n\n.o-checkbox__background {\n width: 18px; }\n\n.o-checkbox__label {\n margin-left: 10px; }\n\n.o-checkbox__native-control:indeterminate ~ .o-checkbox__background .o-checkbox__mixedmark {\n transform: scaleX(1) rotate(0deg);\n opacity: 1; }\n\n.o-checkbox__mixedmark {\n width: 100%;\n height: 0;\n transform: scaleX(0) rotate(0deg);\n border: 1px solid white;\n top: 50%;\n position: relative;\n margin-top: -1px;\n opacity: 0;\n transition: opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1); }\n\n.o-checkbox__native-control {\n appearance: none;\n -webkit-appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n opacity: 0;\n cursor: inherit; }\n\n.o-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .o-checkbox__background {\n background-color: transparent;\n border: 1px solid rgba(0, 0, 0, 0.54);\n color: white; }\n\n.o-checkbox__native-control:disabled:checked ~ .o-checkbox__background,\n.o-checkbox__native-control:disabled:indeterminate ~ .o-checkbox__background {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160);\n opacity: 0.5; }\n\n.o-checkbox__native-control:disabled:not(:checked):not(:indeterminate) ~ .o-checkbox__background {\n background-color: transparent;\n border: 1px solid rgba(0, 0, 0, 0.34);\n color: white; }\n\n.o-checkbox__disabled .o-checkbox__label {\n color: #888; }\n\n.o-checkbox__disabled:hover {\n cursor: not-allowed; }\n", ""]);
|
||||
exports.push([module.i, ":host {\n display: inline-block; }\n\n* {\n box-sizing: border-box; }\n\n.o-checkbox {\n position: relative;\n font-size: 14px;\n line-height: 18px;\n white-space: nowrap; }\n .o-checkbox:hover {\n cursor: pointer; }\n\n.o-checkbox__native-control:enabled:checked ~ .o-checkbox__background,\n.o-checkbox__native-control:enabled:indeterminate ~ .o-checkbox__background {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160);\n opacity: 1; }\n\n.o-checkbox__indeterminate .o-checkbox__checkmark {\n opacity: 0; }\n\n.o-checkbox__checkmark {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n opacity: 1;\n transition: opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);\n color: #ffffff; }\n\n.o-checkbox__checkmark-path {\n transition: stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);\n stroke: currentColor;\n stroke-width: 3.12px;\n stroke-dashoffset: 29.78334;\n stroke-dasharray: 29.78334; }\n\n.o-checkbox__native-control:checked ~ .o-checkbox__background .o-checkbox__checkmark-path,\n.o-checkbox__native-control:indeterminate ~ .o-checkbox__background .o-checkbox__checkmark-path {\n stroke-dashoffset: 0; }\n\n.o-checkbox__background {\n position: relative;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 45%;\n height: 45%;\n border: 2px solid currentColor;\n border-radius: 2px;\n background-color: transparent;\n pointer-events: none;\n will-change: background-color, border-color;\n transition: background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1); }\n\n.o-checkbox__background,\n.o-checkbox__label {\n display: inline-block;\n height: 18px;\n vertical-align: middle; }\n\n.o-checkbox__background {\n width: 18px; }\n\n.o-checkbox__label {\n margin-left: 10px; }\n\n.o-checkbox__native-control:indeterminate ~ .o-checkbox__background .o-checkbox__mixedmark {\n transform: scaleX(1) rotate(0deg);\n opacity: 1; }\n\n.o-checkbox__mixedmark {\n width: 100%;\n height: 0;\n transform: scaleX(0) rotate(0deg);\n border: 1px solid white;\n top: 50%;\n position: relative;\n margin-top: -1px;\n opacity: 0;\n transition: opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1); }\n\n.o-checkbox__native-control {\n appearance: none;\n -webkit-appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n opacity: 0;\n cursor: inherit; }\n\n.o-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .o-checkbox__background {\n background-color: transparent;\n border: 1px solid rgba(0, 0, 0, 0.54);\n color: white; }\n\n.o-checkbox__native-control:disabled:checked ~ .o-checkbox__background,\n.o-checkbox__native-control:disabled:indeterminate ~ .o-checkbox__background {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160);\n opacity: 0.5; }\n\n.o-checkbox__native-control:disabled:not(:checked):not(:indeterminate) ~ .o-checkbox__background {\n background-color: transparent;\n border: 1px solid rgba(0, 0, 0, 0.34);\n color: white; }\n\n.o-checkbox__disabled .o-checkbox__label {\n color: #888; }\n\n.o-checkbox__disabled:hover {\n cursor: not-allowed; }\n", ""]);
|
||||
|
||||
// exports
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js":
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js ***!
|
||||
\*******************************************************************/
|
||||
/***/ "./node_modules/css-loader/lib/css-base.js":
|
||||
/*!*************************************************!*\
|
||||
!*** ./node_modules/css-loader/lib/css-base.js ***!
|
||||
\*************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
@ -210,7 +210,7 @@ function toComment(sourceMap) {
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
|
||||
var result = __webpack_require__(/*! !../node_modules/_css-loader@1.0.1@css-loader!../node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!../node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
var result = __webpack_require__(/*! !../node_modules/css-loader!../node_modules/resolve-url-loader!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
|
||||
if (typeof result === "string") {
|
||||
module.exports = result;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,7 +11,7 @@
|
|||
.o-checkbox {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
o-input {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div>
|
||||
|
@ -59,6 +58,9 @@
|
|||
</div>
|
||||
|
||||
<o-input block placeholder="Enter User Name"></o-input>
|
||||
|
||||
|
||||
<o-input type="textarea" placeholder="Enter User Name"></o-input>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/input",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "Generally used to input information and submit it to the server.",
|
||||
"docsExtend": {
|
||||
"cnName": "输入框",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/input v0.0.6 http://omijs.org
|
||||
* @omiu/input v0.0.7 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -9,29 +9,31 @@
|
|||
import { h, extractClass, tag, WeElement } from 'omi';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
|
@ -514,8 +516,9 @@ var Input = /** @class */ (function (_super) {
|
|||
};
|
||||
Input.prototype.render = function (props) {
|
||||
var _a;
|
||||
var type = props.type, size = props.size, suffixIcon = props.suffixIcon, prefixIcon = props.prefixIcon, autoComplete = props.autoComplete, validating = props.validating, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, trim = props.trim, otherProps = __rest(props, ["type", "size", "suffixIcon", "prefixIcon", "autoComplete", "validating", "onMouseEnter", "onMouseLeave", "trim"]);
|
||||
var type = props.type, size = props.size, suffixIcon = props.suffixIcon, prefixIcon = props.prefixIcon, autoComplete = props.autoComplete; props.validating; var onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave; props.trim; var otherProps = __rest(props, ["type", "size", "suffixIcon", "prefixIcon", "autoComplete", "validating", "onMouseEnter", "onMouseLeave", "trim"]);
|
||||
this._tempTagName = 'o-icon-' + (suffixIcon || prefixIcon);
|
||||
this._tempInputTagName = type === 'textarea' ? 'textarea' : 'input';
|
||||
return (h("div", __assign({}, extractClass(props, 'o-input', (_a = {},
|
||||
_a["o-input--" + size] = props.size,
|
||||
_a['is-disabled'] = this.props.disabled,
|
||||
|
@ -527,9 +530,9 @@ var Input = /** @class */ (function (_super) {
|
|||
'is-prefix': prefixIcon,
|
||||
'is-suffix': suffixIcon
|
||||
}))),
|
||||
h("input", __assign({}, otherProps, {
|
||||
h(this._tempInputTagName, __assign({}, otherProps, {
|
||||
// ref="input"
|
||||
type: type, className: "o-input__inner", autocomplete: autoComplete, maxLength: props.maxLength, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleInput })),
|
||||
type: type, class: "o-" + this._tempInputTagName + "__inner", autocomplete: autoComplete, maxLength: props.maxLength, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleInput })),
|
||||
props.clearable && h("svg", { onClick: this.clearInput, class: "o-icon-clear", fill: "currentColor", width: "1em", height: "1em", focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" },
|
||||
h("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })),
|
||||
props.maxLength && h("span", { class: "o-input__count" },
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -96,14 +96,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!****************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************/
|
||||
/***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!*************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\*************************************************************************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js */ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js")(false);
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
|
||||
// imports
|
||||
|
||||
|
||||
|
@ -115,10 +115,10 @@ exports.push([module.i, ":host {\n display: inline-block; }\n\n:host([block]) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js":
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js ***!
|
||||
\*******************************************************************/
|
||||
/***/ "./node_modules/css-loader/lib/css-base.js":
|
||||
/*!*************************************************!*\
|
||||
!*** ./node_modules/css-loader/lib/css-base.js ***!
|
||||
\*************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
@ -210,7 +210,7 @@ function toComment(sourceMap) {
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
|
||||
var result = __webpack_require__(/*! !../node_modules/_css-loader@1.0.1@css-loader!../node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!../node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
var result = __webpack_require__(/*! !../node_modules/css-loader!../node_modules/resolve-url-loader!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
|
||||
if (typeof result === "string") {
|
||||
module.exports = result;
|
||||
|
@ -315,6 +315,7 @@ var Input = /** @class */ (function (_super) {
|
|||
var _a;
|
||||
var type = props.type, size = props.size, suffixIcon = props.suffixIcon, prefixIcon = props.prefixIcon, autoComplete = props.autoComplete, validating = props.validating, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, trim = props.trim, otherProps = __rest(props, ["type", "size", "suffixIcon", "prefixIcon", "autoComplete", "validating", "onMouseEnter", "onMouseLeave", "trim"]);
|
||||
this._tempTagName = 'o-icon-' + (suffixIcon || prefixIcon);
|
||||
this._tempInputTagName = type === 'textarea' ? 'textarea' : 'input';
|
||||
return (omi_1.h("div", __assign({}, omi_1.extractClass(props, 'o-input', (_a = {},
|
||||
_a["o-input--" + size] = props.size,
|
||||
_a['is-disabled'] = this.props.disabled,
|
||||
|
@ -326,9 +327,9 @@ var Input = /** @class */ (function (_super) {
|
|||
'is-prefix': prefixIcon,
|
||||
'is-suffix': suffixIcon
|
||||
}))),
|
||||
omi_1.h("input", __assign({}, otherProps, {
|
||||
omi_1.h(this._tempInputTagName, __assign({}, otherProps, {
|
||||
// ref="input"
|
||||
type: type, className: "o-input__inner", autocomplete: autoComplete, maxLength: props.maxLength, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleInput })),
|
||||
type: type, class: "o-" + this._tempInputTagName + "__inner", autocomplete: autoComplete, maxLength: props.maxLength, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleInput })),
|
||||
props.clearable && omi_1.h("svg", { onClick: this.clearInput, class: "o-icon-clear", fill: "currentColor", width: "1em", height: "1em", focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" },
|
||||
omi_1.h("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })),
|
||||
props.maxLength && omi_1.h("span", { class: "o-input__count" },
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -91,6 +91,7 @@ export default class Input extends WeElement<Props>{
|
|||
|
||||
this._tempTagName = 'o-icon-' + (suffixIcon || prefixIcon)
|
||||
|
||||
this._tempInputTagName = type ==='textarea'?'textarea' :'input'
|
||||
return (
|
||||
<div {
|
||||
...extractClass(props, 'o-input',
|
||||
|
@ -120,10 +121,10 @@ export default class Input extends WeElement<Props>{
|
|||
// onClick={this.handleIconClick.bind(this)}
|
||||
/>}
|
||||
|
||||
<input {...otherProps}
|
||||
<this._tempInputTagName {...otherProps}
|
||||
// ref="input"
|
||||
type={type}
|
||||
className="o-input__inner"
|
||||
class={`o-${this._tempInputTagName}__inner`}
|
||||
autocomplete={autoComplete}
|
||||
maxLength={props.maxLength}
|
||||
onChange={this.handleChange}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/select",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "Mobile pop-up options list",
|
||||
"docsExtend": {
|
||||
"cnName": "下拉菜单",
|
||||
|
|
|
@ -21,13 +21,13 @@ export default {
|
|||
},
|
||||
plugins: [
|
||||
nodeResolve({
|
||||
main: true
|
||||
main: true
|
||||
}),
|
||||
scss({
|
||||
//output: false,
|
||||
output: function (styles, styleNodes) {
|
||||
fs.writeFileSync('./src/index.css', styles)
|
||||
},
|
||||
output: false,
|
||||
// output: function (styles, styleNodes) {
|
||||
// fs.writeFileSync('./src/index.css', styles)
|
||||
// },
|
||||
}),
|
||||
typescript(),
|
||||
commonjs(),
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
const fs = require('fs')
|
||||
|
||||
const css = fs.readFileSync('./src/index.css')
|
||||
|
||||
const js = fs.readFileSync('./src/index.esm.js', 'utf-8')
|
||||
|
||||
let js = fs.readFileSync('./src/index.esm.js', 'utf-8')
|
||||
|
||||
fs.writeFileSync('./src/index.esm.js',
|
||||
js.replace(`var css = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null
|
||||
});`, `
|
||||
var css = \`${css}\`
|
||||
`)
|
||||
js.replace(`var css = /*#__PURE__*/Object.freeze({`, `var css = index;Object.freeze({`)
|
||||
)
|
||||
|
||||
js = fs.readFileSync('./src/index.js', 'utf-8')
|
||||
|
||||
fs.writeFileSync('./src/index.js',
|
||||
js.replace(`var css = /*#__PURE__*/Object.freeze({`, `var css = index;Object.freeze({`)
|
||||
)
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2377,7 +2377,7 @@ var Select = /** @class */ (function (_super) {
|
|||
omi_1.h("span", null, item.label));
|
||||
}))))));
|
||||
};
|
||||
Select.css = css;
|
||||
Select.css = css.default ? css.default : css;
|
||||
Select.defaultProps = {
|
||||
value: ''
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -22,7 +22,7 @@ const topMap = {
|
|||
|
||||
@tag('o-select')
|
||||
export default class Select extends WeElement<Props> {
|
||||
static css = css
|
||||
static css = css.default ? css.default : css
|
||||
|
||||
static defaultProps = {
|
||||
value: ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/switch",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "Switch button",
|
||||
"docsExtend": {
|
||||
"cnName": "开关",
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
margin: 0;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.weui-switch {
|
||||
.o-switch {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
display: inline-block; }
|
||||
|
||||
.weui-switch-cp {
|
||||
.o-switch-cp {
|
||||
display: inline-block; }
|
||||
|
||||
.weui-switch,
|
||||
.weui-switch-cp__box {
|
||||
.o-switch,
|
||||
.o-switch-cp__box {
|
||||
position: relative;
|
||||
width: 52px;
|
||||
height: 32px;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
border: 1px solid #DFDFDF;
|
||||
outline: 0;
|
||||
border-radius: 16px;
|
||||
|
@ -27,14 +27,14 @@
|
|||
-webkit-transition: background-color 0.1s, border 0.1s;
|
||||
transition: background-color 0.1s, border 0.1s; }
|
||||
|
||||
.weui-switch:before,
|
||||
.weui-switch-cp__box:before {
|
||||
.o-switch:before,
|
||||
.o-switch-cp__box:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
width: 38px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FDFDFD;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
|
@ -42,14 +42,14 @@
|
|||
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1); }
|
||||
|
||||
.weui-switch:after,
|
||||
.weui-switch-cp__box:after {
|
||||
.o-switch:after,
|
||||
.o-switch-cp__box:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||
|
@ -58,26 +58,26 @@
|
|||
transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
|
||||
transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35); }
|
||||
|
||||
.weui-switch:checked,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box {
|
||||
.o-switch:checked,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box {
|
||||
border-color: #07c160;
|
||||
border-color: var(--o-primary, #07c160);
|
||||
background-color: #07c160;
|
||||
background-color: var(--o-primary, #07c160); }
|
||||
|
||||
.weui-switch:checked:before,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box:before {
|
||||
.o-switch:checked:before,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box:before {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
|
||||
.weui-switch:checked:after,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box:after {
|
||||
.o-switch:checked:after,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box:after {
|
||||
-webkit-transform: translateX(20px);
|
||||
transform: translateX(20px); }
|
||||
|
||||
.weui-switch-cp__input {
|
||||
.o-switch-cp__input {
|
||||
position: absolute;
|
||||
left: -9999px; }
|
||||
|
||||
.weui-switch-cp__box {
|
||||
.o-switch-cp__box {
|
||||
display: block; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/switch v0.0.1 http://omijs.org
|
||||
* @omiu/switch v0.0.2 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -9,29 +9,31 @@
|
|||
import { h, extractClass, tag, WeElement } from 'omi';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
|
@ -64,19 +66,19 @@ var css = `:host {
|
|||
margin: 0;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.weui-switch {
|
||||
.o-switch {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
display: inline-block; }
|
||||
|
||||
.weui-switch-cp {
|
||||
.o-switch-cp {
|
||||
display: inline-block; }
|
||||
|
||||
.weui-switch,
|
||||
.weui-switch-cp__box {
|
||||
.o-switch,
|
||||
.o-switch-cp__box {
|
||||
position: relative;
|
||||
width: 52px;
|
||||
height: 32px;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
border: 1px solid #DFDFDF;
|
||||
outline: 0;
|
||||
border-radius: 16px;
|
||||
|
@ -85,14 +87,14 @@ var css = `:host {
|
|||
-webkit-transition: background-color 0.1s, border 0.1s;
|
||||
transition: background-color 0.1s, border 0.1s; }
|
||||
|
||||
.weui-switch:before,
|
||||
.weui-switch-cp__box:before {
|
||||
.o-switch:before,
|
||||
.o-switch-cp__box:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
width: 38px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FDFDFD;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
|
@ -100,14 +102,14 @@ var css = `:host {
|
|||
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1); }
|
||||
|
||||
.weui-switch:after,
|
||||
.weui-switch-cp__box:after {
|
||||
.o-switch:after,
|
||||
.o-switch-cp__box:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||
|
@ -116,28 +118,28 @@ var css = `:host {
|
|||
transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
|
||||
transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35); }
|
||||
|
||||
.weui-switch:checked,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box {
|
||||
.o-switch:checked,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box {
|
||||
border-color: #07c160;
|
||||
border-color: var(--o-primary, #07c160);
|
||||
background-color: #07c160;
|
||||
background-color: var(--o-primary, #07c160); }
|
||||
|
||||
.weui-switch:checked:before,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box:before {
|
||||
.o-switch:checked:before,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box:before {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
|
||||
.weui-switch:checked:after,
|
||||
.weui-switch-cp__input:checked ~ .weui-switch-cp__box:after {
|
||||
.o-switch:checked:after,
|
||||
.o-switch-cp__input:checked ~ .o-switch-cp__box:after {
|
||||
-webkit-transform: translateX(20px);
|
||||
transform: translateX(20px); }
|
||||
|
||||
.weui-switch-cp__input {
|
||||
.o-switch-cp__input {
|
||||
position: absolute;
|
||||
left: -9999px; }
|
||||
|
||||
.weui-switch-cp__box {
|
||||
.o-switch-cp__box {
|
||||
display: block; }
|
||||
`
|
||||
|
||||
|
@ -154,13 +156,13 @@ var Switch = /** @class */ (function (_super) {
|
|||
Switch.prototype.render = function (props) {
|
||||
var _this = this;
|
||||
if (props.checked) {
|
||||
return (h("label", __assign({ for: "x_" + this.elementId }, extractClass(props, 'weui-switch-cp')),
|
||||
return (h("label", __assign({ for: "x_" + this.elementId }, extractClass(props, 'o-switch-cp')),
|
||||
h("input", { id: "x_" + this.elementId, ref: function (e) {
|
||||
_this._ele = e;
|
||||
}, class: "weui-switch-cp__input", type: "checkbox", onChange: this.onChange, checked: true }),
|
||||
h("div", { class: "weui-switch-cp__box" })));
|
||||
}, class: "o-switch-cp__input", type: "checkbox", onChange: this.onChange, checked: true }),
|
||||
h("div", { class: "o-switch-cp__box" })));
|
||||
}
|
||||
return (h("input", __assign({}, extractClass(props, 'weui-switch'), { type: "checkbox", ref: function (e) {
|
||||
return (h("input", __assign({}, extractClass(props, 'o-switch'), { type: "checkbox", ref: function (e) {
|
||||
_this._ele = e;
|
||||
}, onChange: this.onChange })));
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -96,29 +96,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!****************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************/
|
||||
/***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss":
|
||||
/*!*************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/index.scss ***!
|
||||
\*************************************************************************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js */ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js")(false);
|
||||
exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
|
||||
// imports
|
||||
|
||||
|
||||
// module
|
||||
exports.push([module.i, ":host {\n display: inline-block; }\n\n* {\n padding: 0;\n margin: 0;\n box-sizing: border-box; }\n\n.weui-switch {\n -webkit-appearance: none;\n appearance: none;\n display: inline-block; }\n\n.weui-switch-cp {\n display: inline-block; }\n\n.weui-switch,\n.weui-switch-cp__box {\n position: relative;\n width: 52px;\n height: 32px;\n border: 1px solid #DFDFDF;\n outline: 0;\n border-radius: 16px;\n box-sizing: border-box;\n background-color: #DFDFDF;\n -webkit-transition: background-color 0.1s, border 0.1s;\n transition: background-color 0.1s, border 0.1s; }\n\n.weui-switch:before,\n.weui-switch-cp__box:before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n width: 50px;\n height: 30px;\n border-radius: 15px;\n background-color: #FDFDFD;\n -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1); }\n\n.weui-switch:after,\n.weui-switch-cp__box:after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n width: 30px;\n height: 30px;\n border-radius: 15px;\n background-color: #FFFFFF;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35); }\n\n.weui-switch:checked,\n.weui-switch-cp__input:checked ~ .weui-switch-cp__box {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160); }\n\n.weui-switch:checked:before,\n.weui-switch-cp__input:checked ~ .weui-switch-cp__box:before {\n -webkit-transform: scale(0);\n transform: scale(0); }\n\n.weui-switch:checked:after,\n.weui-switch-cp__input:checked ~ .weui-switch-cp__box:after {\n -webkit-transform: translateX(20px);\n transform: translateX(20px); }\n\n.weui-switch-cp__input {\n position: absolute;\n left: -9999px; }\n\n.weui-switch-cp__box {\n display: block; }\n", ""]);
|
||||
exports.push([module.i, ":host {\n display: inline-block; }\n\n* {\n padding: 0;\n margin: 0;\n box-sizing: border-box; }\n\n.o-switch {\n -webkit-appearance: none;\n appearance: none;\n display: inline-block; }\n\n.o-switch-cp {\n display: inline-block; }\n\n.o-switch,\n.o-switch-cp__box {\n position: relative;\n width: 40px;\n height: 20px;\n border: 1px solid #DFDFDF;\n outline: 0;\n border-radius: 16px;\n box-sizing: border-box;\n background-color: #DFDFDF;\n -webkit-transition: background-color 0.1s, border 0.1s;\n transition: background-color 0.1s, border 0.1s; }\n\n.o-switch:before,\n.o-switch-cp__box:before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n width: 38px;\n height: 18px;\n border-radius: 15px;\n background-color: #FDFDFD;\n -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);\n transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1); }\n\n.o-switch:after,\n.o-switch-cp__box:after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n width: 18px;\n height: 18px;\n border-radius: 15px;\n background-color: #FFFFFF;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);\n transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35); }\n\n.o-switch:checked,\n.o-switch-cp__input:checked ~ .o-switch-cp__box {\n border-color: #07c160;\n border-color: var(--o-primary, #07c160);\n background-color: #07c160;\n background-color: var(--o-primary, #07c160); }\n\n.o-switch:checked:before,\n.o-switch-cp__input:checked ~ .o-switch-cp__box:before {\n -webkit-transform: scale(0);\n transform: scale(0); }\n\n.o-switch:checked:after,\n.o-switch-cp__input:checked ~ .o-switch-cp__box:after {\n -webkit-transform: translateX(20px);\n transform: translateX(20px); }\n\n.o-switch-cp__input {\n position: absolute;\n left: -9999px; }\n\n.o-switch-cp__box {\n display: block; }\n", ""]);
|
||||
|
||||
// exports
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js":
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js ***!
|
||||
\*******************************************************************/
|
||||
/***/ "./node_modules/css-loader/lib/css-base.js":
|
||||
/*!*************************************************!*\
|
||||
!*** ./node_modules/css-loader/lib/css-base.js ***!
|
||||
\*************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
@ -210,7 +210,7 @@ function toComment(sourceMap) {
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
|
||||
var result = __webpack_require__(/*! !../node_modules/_css-loader@1.0.1@css-loader!../node_modules/_resolve-url-loader@3.1.1@resolve-url-loader!../node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!./node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
var result = __webpack_require__(/*! !../node_modules/css-loader!../node_modules/resolve-url-loader!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/index.scss");
|
||||
|
||||
if (typeof result === "string") {
|
||||
module.exports = result;
|
||||
|
@ -275,13 +275,13 @@ var Switch = /** @class */ (function (_super) {
|
|||
Switch.prototype.render = function (props) {
|
||||
var _this = this;
|
||||
if (props.checked) {
|
||||
return (omi_1.h("label", __assign({ for: "x_" + this.elementId }, omi_1.extractClass(props, 'weui-switch-cp')),
|
||||
return (omi_1.h("label", __assign({ for: "x_" + this.elementId }, omi_1.extractClass(props, 'o-switch-cp')),
|
||||
omi_1.h("input", { id: "x_" + this.elementId, ref: function (e) {
|
||||
_this._ele = e;
|
||||
}, class: "weui-switch-cp__input", type: "checkbox", onChange: this.onChange, checked: true }),
|
||||
omi_1.h("div", { class: "weui-switch-cp__box" })));
|
||||
}, class: "o-switch-cp__input", type: "checkbox", onChange: this.onChange, checked: true }),
|
||||
omi_1.h("div", { class: "o-switch-cp__box" })));
|
||||
}
|
||||
return (omi_1.h("input", __assign({}, omi_1.extractClass(props, 'weui-switch'), { type: "checkbox", ref: function (e) {
|
||||
return (omi_1.h("input", __assign({}, omi_1.extractClass(props, 'o-switch'), { type: "checkbox", ref: function (e) {
|
||||
_this._ele = e;
|
||||
}, onChange: this.onChange })));
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,21 +10,21 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.weui-switch {
|
||||
.o-switch {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.weui-switch-cp {
|
||||
.o-switch-cp {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.weui-switch,
|
||||
.weui-switch-cp__box {
|
||||
.o-switch,
|
||||
.o-switch-cp__box {
|
||||
position: relative;
|
||||
width: 52px;
|
||||
height: 32px;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
border: 1px solid #DFDFDF;
|
||||
outline: 0;
|
||||
border-radius: 16px;
|
||||
|
@ -34,14 +34,14 @@
|
|||
transition: background-color 0.1s, border 0.1s;
|
||||
}
|
||||
|
||||
.weui-switch:before,
|
||||
.weui-switch-cp__box:before {
|
||||
.o-switch:before,
|
||||
.o-switch-cp__box:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
width: 38px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FDFDFD;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
|
@ -50,14 +50,14 @@
|
|||
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
|
||||
}
|
||||
|
||||
.weui-switch:after,
|
||||
.weui-switch-cp__box:after {
|
||||
.o-switch:after,
|
||||
.o-switch-cp__box:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 15px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||
|
@ -67,31 +67,31 @@
|
|||
transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
|
||||
}
|
||||
|
||||
.weui-switch:checked,
|
||||
.weui-switch-cp__input:checked~.weui-switch-cp__box {
|
||||
.o-switch:checked,
|
||||
.o-switch-cp__input:checked~.o-switch-cp__box {
|
||||
border-color: $o-primary;
|
||||
border-color: var(--o-primary, $o-primary);
|
||||
background-color: $o-primary;
|
||||
background-color: var(--o-primary, $o-primary);
|
||||
}
|
||||
|
||||
.weui-switch:checked:before,
|
||||
.weui-switch-cp__input:checked~.weui-switch-cp__box:before {
|
||||
.o-switch:checked:before,
|
||||
.o-switch-cp__input:checked~.o-switch-cp__box:before {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.weui-switch:checked:after,
|
||||
.weui-switch-cp__input:checked~.weui-switch-cp__box:after {
|
||||
.o-switch:checked:after,
|
||||
.o-switch-cp__input:checked~.o-switch-cp__box:after {
|
||||
-webkit-transform: translateX(20px);
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.weui-switch-cp__input {
|
||||
.o-switch-cp__input {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
.weui-switch-cp__box {
|
||||
.o-switch-cp__box {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -22,25 +22,25 @@ export default class Switch extends WeElement<Props> {
|
|||
render(props) {
|
||||
if (props.checked) {
|
||||
return (
|
||||
<label for={`x_${this.elementId}`} {...extractClass(props, 'weui-switch-cp')}>
|
||||
<label for={`x_${this.elementId}`} {...extractClass(props, 'o-switch-cp')}>
|
||||
<input
|
||||
id={`x_${this.elementId}`}
|
||||
ref={e => {
|
||||
this._ele = e
|
||||
}}
|
||||
class="weui-switch-cp__input"
|
||||
class="o-switch-cp__input"
|
||||
type="checkbox"
|
||||
onChange={this.onChange}
|
||||
checked={true}
|
||||
/>
|
||||
<div class="weui-switch-cp__box" />
|
||||
<div class="o-switch-cp__box" />
|
||||
</label>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<input
|
||||
{...extractClass(props, 'weui-switch')}
|
||||
{...extractClass(props, 'o-switch')}
|
||||
type="checkbox"
|
||||
ref={e => {
|
||||
this._ele = e
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/tree",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.16",
|
||||
"description": "Components that show tree nested data structures.",
|
||||
"docsExtend": {
|
||||
"cnName": "树形控件",
|
||||
|
|
|
@ -25,6 +25,7 @@ export default class Tree extends WeElement<Props> {
|
|||
editInput: any;
|
||||
prevBlurSelectedNode: any;
|
||||
installed(): void;
|
||||
_nodeTagName: string;
|
||||
renderNode(node: any, level: any): JSX.Element;
|
||||
render(props: any): JSX.Element;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/tree v0.0.15 http://omijs.org
|
||||
* @omiu/tree v0.0.16 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -9,29 +9,31 @@
|
|||
import { h, extractClass, tag, WeElement } from 'omi';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
|
@ -709,29 +711,27 @@ var Tree = /** @class */ (function (_super) {
|
|||
// this.prevSelectedNode.selected = false
|
||||
// this.prevSelectedNode.selectedBlur = true
|
||||
// this.prevBlurSelectedNode = this.prevSelectedNode
|
||||
var _this = this;
|
||||
// this.prevSelectedNode = null
|
||||
// this.forceUpdate()
|
||||
// })
|
||||
window.addEventListener('keydown', function (evt) {
|
||||
//enter
|
||||
if (evt.keyCode === 13) {
|
||||
if (_this.prevSelectedNode) {
|
||||
if (_this.prevSelectedNode.editing) {
|
||||
_this.prevSelectedNode.editing = false;
|
||||
_this.prevSelectedNode.label = _this.editInput.value;
|
||||
//防止这个错误 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
|
||||
_this.editInput.blur();
|
||||
_this.forceUpdate();
|
||||
}
|
||||
else {
|
||||
_this.prevSelectedNode.editing = true;
|
||||
_this.forceUpdate();
|
||||
_this.editInput.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// window.addEventListener('keydown', (evt) => {
|
||||
// //enter
|
||||
// if (evt.keyCode === 13) {
|
||||
// if (this.prevSelectedNode) {
|
||||
// if (this.prevSelectedNode.editing) {
|
||||
// this.prevSelectedNode.editing = false
|
||||
// this.prevSelectedNode.label = this.editInput.value
|
||||
// //防止这个错误 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
|
||||
// this.editInput.blur()
|
||||
// this.forceUpdate()
|
||||
// } else {
|
||||
// this.prevSelectedNode.editing = true
|
||||
// this.forceUpdate()
|
||||
// this.editInput.focus()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
};
|
||||
Tree.prototype.renderNode = function (node, level) {
|
||||
var _this = this;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -103,30 +103,30 @@ export default class Tree extends WeElement<Props>{
|
|||
// this.forceUpdate()
|
||||
// })
|
||||
|
||||
window.addEventListener('keydown', (evt) => {
|
||||
//enter
|
||||
if (evt.keyCode === 13) {
|
||||
if (this.prevSelectedNode) {
|
||||
if (this.prevSelectedNode.editing) {
|
||||
this.prevSelectedNode.editing = false
|
||||
// window.addEventListener('keydown', (evt) => {
|
||||
// //enter
|
||||
// if (evt.keyCode === 13) {
|
||||
// if (this.prevSelectedNode) {
|
||||
// if (this.prevSelectedNode.editing) {
|
||||
// this.prevSelectedNode.editing = false
|
||||
|
||||
this.prevSelectedNode.label = this.editInput.value
|
||||
// this.prevSelectedNode.label = this.editInput.value
|
||||
|
||||
//防止这个错误 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
|
||||
this.editInput.blur()
|
||||
// //防止这个错误 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
|
||||
// this.editInput.blur()
|
||||
|
||||
this.forceUpdate()
|
||||
// this.forceUpdate()
|
||||
|
||||
|
||||
} else {
|
||||
this.prevSelectedNode.editing = true
|
||||
this.forceUpdate()
|
||||
// } else {
|
||||
// this.prevSelectedNode.editing = true
|
||||
// this.forceUpdate()
|
||||
|
||||
this.editInput.focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// this.editInput.focus()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
_nodeTagName: string
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{g as getDefaultExportFromCjs,d as require$$0,f as commonjsGlobal}from"./vendor.7a9e4b1c.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
||||
import{g as getDefaultExportFromCjs,d as require$$0,f as commonjsGlobal}from"./vendor.858b8f49.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as s,s as a,a as c}from"./vendor.7a9e4b1c.js";import"./index.esm.43724461.js";var r=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let o=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{console.log(Number(e.currentTarget.dataset.itemId)),this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(e){return t("div",null,t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带复选框"),t("o-table",{checkbox:!0,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};o.css=a.target,o=((e,t,s,a)=>{for(var c,o=a>1?void 0:a?d(t,s):t,i=e.length-1;i>=0;i--)(c=e[i])&&(o=(a?c(t,s,o):c(o))||o);return a&&o&&r(t,s,o),o})([c("basic-table")],o);export default o;
|
||||
import{W as e,h as t,t as s,s as a,a as c}from"./vendor.858b8f49.js";import"./index.esm.4785d520.js";var r=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let o=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{console.log(Number(e.currentTarget.dataset.itemId)),this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(e){return t("div",null,t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带复选框"),t("o-table",{checkbox:!0,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};o.css=a.target,o=((e,t,s,a)=>{for(var c,o=a>1?void 0:a?d(t,s):t,i=e.length-1;i>=0;i--)(c=e[i])&&(o=(a?c(t,s,o):c(o))||o);return a&&o&&r(t,s,o),o})([c("basic-table")],o);export default o;
|
|
@ -1 +1 @@
|
|||
import{g as getDefaultExportFromCjs,d as require$$0,f as commonjsGlobal}from"./vendor.7a9e4b1c.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
||||
import{g as getDefaultExportFromCjs,d as require$$0,f as commonjsGlobal}from"./vendor.858b8f49.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import{h as t,e,a as n,W as a,t as r,s as i}from"./vendor.7a9e4b1c.js";import"./index.esm.43724461.js";
|
||||
import{h as t,e,a as n,W as a,t as r,s as i}from"./vendor.858b8f49.js";import"./index.esm.4785d520.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@ -1 +1 @@
|
|||
import{W as r,h as e,t,s,a}from"./vendor.7a9e4b1c.js";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?n(e,t):e,c=r.length-1;c>=0;c--)(a=r[c])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&o(e,t,d),d})([a("status-error")],d);export default d;
|
||||
import{W as r,h as e,t,s,a}from"./vendor.858b8f49.js";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?n(e,t):e,c=r.length-1;c>=0;c--)(a=r[c])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&o(e,t,d),d})([a("status-error")],d);export default d;
|
|
@ -1 +0,0 @@
|
|||
import{W as e,h as r,t,s as a,a as s}from"./vendor.7a9e4b1c.js";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor;let d=class extends e{render(){return r("div",{class:t``},"Admin Warning Page")}};d.css=a.target,d=((e,r,t,a)=>{for(var s,d=a>1?void 0:a?o(r,t):r,i=e.length-1;i>=0;i--)(s=e[i])&&(d=(a?s(r,t,d):s(d))||d);return a&&d&&n(r,t,d),d})([s("status-warning")],d);export default d;
|
|
@ -0,0 +1 @@
|
|||
import{W as r,h as e,t,s,a}from"./vendor.858b8f49.js";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Warning Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?o(e,t):e,i=r.length-1;i>=0;i--)(a=r[i])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&n(e,t,d),d})([a("status-warning")],d);export default d;
|
File diff suppressed because one or more lines are too long
|
@ -6,8 +6,8 @@
|
|||
<link rel="icon" type="image/svg+xml" href="./assets/favicon.974a6ddb.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OMI ADMIN</title>
|
||||
<script type="module" crossorigin src="./assets/index.cfcf0dcb.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.7a9e4b1c.js">
|
||||
<script type="module" crossorigin src="./assets/index.d9161a47.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.858b8f49.js">
|
||||
<link rel="stylesheet" href="./assets/index.36baf30a.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -13,12 +13,17 @@
|
|||
"dependencies": {
|
||||
"@omiu/avatar": "^0.0.1",
|
||||
"@omiu/button": "^0.0.8",
|
||||
"@omiu/checkbox": "^0.0.9",
|
||||
"@omiu/icon": "^0.0.3",
|
||||
"@omiu/input": "^0.0.7",
|
||||
"@omiu/pagination": "^0.0.2",
|
||||
"@omiu/radio": "^0.0.6",
|
||||
"@omiu/select": "^0.0.2",
|
||||
"@omiu/switch": "^0.0.2",
|
||||
"@omiu/table": "^0.0.5",
|
||||
"@omiu/tabs": "^0.0.15",
|
||||
"@omiu/tooltip": "0.0.1",
|
||||
"@omiu/tree": "^0.0.15",
|
||||
"@omiu/tree": "^0.0.16",
|
||||
"omi": "^6.19.16",
|
||||
"omi-router": "^3.0.0",
|
||||
"omi-twind": "^0.0.1"
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
import { WeElement, h, tag } from 'omi'
|
||||
import { tw, sheet } from 'omi-twind'
|
||||
import '@omiu/input'
|
||||
import '@omiu/select'
|
||||
import '@omiu/switch'
|
||||
import '@omiu/radio'
|
||||
import '@omiu/checkbox'
|
||||
|
||||
|
||||
interface Props { }
|
||||
|
||||
const tagName = 'admin-form'
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[tagName]: Omi.Props & Props
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@tag(tagName)
|
||||
export default class extends WeElement<Props> {
|
||||
static css = sheet.target
|
||||
|
||||
items = [{ label: '广东省-深圳市', value: 1 }, { label: '江西省-抚州市', value: 2 }, { label: '河北省-石家庄', value: 3 }]
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div style={{ width: '480px' }} class={tw`text-sm px-10 py-10 text-gray-500`}>
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >用户姓名</label>
|
||||
<div class={tw`leading-8 ml-16`}>
|
||||
<o-input size="small" block></o-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >出生地址</label>
|
||||
<div class={tw`leading-8 ml-16`}>
|
||||
<o-select css={`
|
||||
.o-select .o-input__inner {
|
||||
width: 337px;
|
||||
`} size="small" placeholder="选择一个出生地"
|
||||
items={this.items}
|
||||
></o-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >是否结婚</label>
|
||||
<div class={tw`leading-8 ml-16 pt-1`}>
|
||||
<o-switch id="switchA" checked="0">
|
||||
</o-switch>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >喜爱水果</label>
|
||||
<div class={tw`leading-8 ml-10`}>
|
||||
<o-checkbox class={tw``} label='苹果🍎'> </o-checkbox>
|
||||
<o-checkbox class={tw` ml-6`} label='草莓🍓'> </o-checkbox>
|
||||
<o-checkbox class={tw` ml-6`} label='葡萄🍇'> </o-checkbox>
|
||||
<o-checkbox class={tw` ml-6`} label='香蕉🍌'> </o-checkbox>
|
||||
<o-checkbox class={tw` ml-6`} label='梨子🍐'> </o-checkbox>
|
||||
<o-checkbox class={tw` ml-6`} label='橘子🍊'> </o-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >用户性别</label>
|
||||
<div class={tw`leading-8 ml-16`}>
|
||||
<o-radio name="sex" checked value="0">男</o-radio>
|
||||
<o-radio name="sex" value="1" class={tw`ml-2`}>女</o-radio>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} >个性签名</label>
|
||||
<div class={tw`leading-8 ml-16`}>
|
||||
<o-input type="textarea" block></o-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class={tw`leading-8 mb-6`}>
|
||||
<label class={tw`w-16 float-left align-middle`} ></label>
|
||||
<div class={tw`leading-8 ml-16`}>
|
||||
<o-button size="small" type="primary">创建</o-button>
|
||||
|
||||
<o-button size="small" class={tw`ml-6`}>重置</o-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -44,6 +44,14 @@ export default class extends WeElement {
|
|||
this.update()
|
||||
})
|
||||
|
||||
route('/form', () => {
|
||||
//lazy load
|
||||
import('./components/admin-form')
|
||||
this.data.tagName = 'admin-form'
|
||||
this.update()
|
||||
})
|
||||
|
||||
|
||||
route('/error', () => {
|
||||
//lazy load
|
||||
import('./components/status/status-error')
|
||||
|
|
|
@ -27,26 +27,27 @@ class Store {
|
|||
href: '#/welcome',
|
||||
id: 2
|
||||
},
|
||||
|
||||
{
|
||||
label: '表格展示',
|
||||
sign: '●',
|
||||
label: '基础表格',
|
||||
icon: 'ballot',
|
||||
href: '#/table/basic',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
label: '分页表格',
|
||||
icon: 'ballot',
|
||||
href: '#/table/pagination',
|
||||
id: 5,
|
||||
},
|
||||
|
||||
{
|
||||
label: '表单',
|
||||
expanded: true,
|
||||
id: 3,
|
||||
icon: 'ac-unit-outlined',
|
||||
children: [
|
||||
{
|
||||
label: '基础表格',
|
||||
icon: 'ballot',
|
||||
href: '#/table/basic',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
label: '分页表格',
|
||||
icon: 'ballot',
|
||||
href: '#/table/pagination',
|
||||
id: 5,
|
||||
}
|
||||
]
|
||||
id: 9,
|
||||
href: '#/form',
|
||||
icon: 'ballot'
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue