Commit cc240d47 authored by JingChao's avatar JingChao

h-field

parent f25b6b08
......@@ -545,9 +545,9 @@ showActionSheetButton() {
### Note
hls-easy-ui#0.0.6
[时间组件 DateFiled](/packages/components/DataFiled/README.md)
[时间组件 DateField](/packages/components/DataField/README.md)
[下拉框组建 SelectFiled](/packages/components/Select/README.md)
[下拉框组建 SelectField](/packages/components/Select/README.md)
[添加进度条 h-progress](/packages/components/Progress/README.md)
......
......@@ -9,8 +9,6 @@
<!-- safari私有meta标签 允许全屏模式浏览 指定safari顶部状态栏样式(黑色) -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script type="text/javascript" src="./static/vuePlatform.js"></script>
<script type="text/javascript" src="../../cordova.js"></script>
<title>车租易</title>
</head>
<body>
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg width="750" height="1334" xmlns="http://www.w3.org/2000/svg">
<g>
<rect fill="#fff" id="canvas_background" height="1334" width="750" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<rect opacity="0.7" stroke="#000" id="svg_1" height="200" width="656" y="89" x="46" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_3" cy="408" cx="93" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_4" cy="408" cx="284" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_8" cy="408" cx="469" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_9" cy="408" cx="651" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_10" cy="576" cx="93" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_11" cy="576" cx="284" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_12" cy="576" cx="469" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<ellipse opacity="0.7" stroke="#000" ry="50" rx="50" id="svg_13" cy="576" cx="651" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_14" height="80" width="656" y="689" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect id="svg_16" height="28.000015" width="0" y="839" x="375" fill-opacity="null" stroke-opacity="null" stroke-width="0" stroke="#000" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_17" height="30" width="656" y="805" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_18" height="30" width="656" y="867" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_19" height="30" width="656" y="927" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_20" height="30" width="656" y="987" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_21" height="30" width="656" y="1047" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_22" height="30" width="656" y="1107" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_23" height="30" width="656" y="1167" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
<rect stroke="#000" opacity="0.7" id="svg_24" height="30" width="656" y="1227" x="46" fill-opacity="null" stroke-opacity="null" stroke-width="0" fill="#DDDDDD"/>
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
webpackJsonpeasyUI([19],{
/***/ 221:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(404);
/* empty harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(405);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_template_compiler_index_id_data_v_bf08a214_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vux_loader_src_before_template_compiler_loader_js_node_modules_vux_loader_src_template_loader_js_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(406);
function injectStyle (ssrContext) {
__webpack_require__(403)
}
var normalizeComponent = __webpack_require__(3)
/* script */
/* template */
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__WEBPACK_IMPORTED_MODULE_1__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__["a" /* default */],
__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_template_compiler_index_id_data_v_bf08a214_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vux_loader_src_before_template_compiler_loader_js_node_modules_vux_loader_src_template_loader_js_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ __webpack_exports__["default"] = (Component.exports);
/***/ }),
/***/ 3:
/***/ (function(module, exports) {
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file.
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
module.exports = function normalizeComponent (
rawScriptExports,
compiledTemplate,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier /* server only */
) {
var esModule
var scriptExports = rawScriptExports = rawScriptExports || {}
// ES6 modules interop
var type = typeof rawScriptExports.default
if (type === 'object' || type === 'function') {
esModule = rawScriptExports
scriptExports = rawScriptExports.default
}
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (compiledTemplate) {
options.render = compiledTemplate.render
options.staticRenderFns = compiledTemplate.staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = injectStyles
}
if (hook) {
var functional = options.functional
var existing = functional
? options.render
: options.beforeCreate
if (!functional) {
// inject component registration as beforeCreate hook
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
} else {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return existing(h, context)
}
}
}
return {
esModule: esModule,
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 403:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 404:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* unused harmony default export */ var _unused_webpack_default_export = ({
name: 'HHeader',
props: {
proportion: {
// slot left/center/right 横向面积比例
type: Array,
default: function _default() {
return [1, 2, 1];
}
},
hasBorder: {
type: Boolean,
default: true
},
cusClass: {
type: String,
default: ''
}
},
computed: {
borderCss: function borderCss() {
return this.hasBorder === true ? 'vue-1px-b' : '';
}
}
});
/***/ }),
/***/ 405:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
name: 'HHeader',
props: {
proportion: {
// slot left/center/right 横向面积比例
type: Array,
default: function _default() {
return [1, 2, 1];
}
},
hasBorder: {
type: Boolean,
default: true
},
cusClass: {
type: String,
default: ''
}
},
computed: {
borderCss: function borderCss() {
return this.hasBorder === true ? 'vue-1px-b' : '';
}
}
});
/***/ }),
/***/ 406:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"h-header",class:[_vm.borderCss,_vm.cusClass]},[_c('section',{staticClass:"h-header-left",style:({'flex':_vm.proportion[0] })},[_vm._t("left")],2),_vm._v(" "),_c('h1',{staticClass:"h-header-center",style:({'flex':_vm.proportion[1] })},[_vm._t("center")],2),_vm._v(" "),_c('section',{staticClass:"h-header-right",style:({'flex':_vm.proportion[2] })},[_vm._t("right")],2)])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
/***/ })
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
webpackJsonpeasyUI([31],{
/***/ 236:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ })
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
webpackJsonpeasyUI([21],{
/***/ 217:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(384);
/* empty harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(385);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_template_compiler_index_id_data_v_69863a25_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vux_loader_src_before_template_compiler_loader_js_node_modules_vux_loader_src_template_loader_js_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(386);
function injectStyle (ssrContext) {
__webpack_require__(383)
}
var normalizeComponent = __webpack_require__(3)
/* script */
/* template */
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__WEBPACK_IMPORTED_MODULE_1__babel_loader_node_modules_vux_loader_src_script_loader_js_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__["a" /* default */],
__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_template_compiler_index_id_data_v_69863a25_hasScoped_false_transformToRequire_video_src_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vux_loader_src_before_template_compiler_loader_js_node_modules_vux_loader_src_template_loader_js_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ __webpack_exports__["default"] = (Component.exports);
/***/ }),
/***/ 3:
/***/ (function(module, exports) {
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file.
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
module.exports = function normalizeComponent (
rawScriptExports,
compiledTemplate,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier /* server only */
) {
var esModule
var scriptExports = rawScriptExports = rawScriptExports || {}
// ES6 modules interop
var type = typeof rawScriptExports.default
if (type === 'object' || type === 'function') {
esModule = rawScriptExports
scriptExports = rawScriptExports.default
}
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (compiledTemplate) {
options.render = compiledTemplate.render
options.staticRenderFns = compiledTemplate.staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = injectStyles
}
if (hook) {
var functional = options.functional
var existing = functional
? options.render
: options.beforeCreate
if (!functional) {
// inject component registration as beforeCreate hook
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
} else {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return existing(h, context)
}
}
}
return {
esModule: esModule,
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 383:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 384:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
//
//
//
//
//
//
//
//
//
//
//
//
//
/* unused harmony default export */ var _unused_webpack_default_export = ({
name: 'CheckBox',
props: {
value: {
type: Boolean,
default: false
},
disable: {
type: Boolean,
default: false
}
/* checkedColor: {
type: String,
default: '#5D98F6',
}, */
},
data: function data() {
return {};
},
watch: {},
methods: {
checked: function checked() {
if (!this.disable) {
this.$emit('input', !this.value);
this.$emit('checkClick', !this.value);
}
}
}
});
/***/ }),
/***/ 385:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
name: 'CheckBox',
props: {
value: {
type: Boolean,
default: false
},
disable: {
type: Boolean,
default: false
}
/* checkedColor: {
type: String,
default: '#5D98F6',
}, */
},
data: function data() {
return {};
},
watch: {},
methods: {
checked: function checked() {
if (!this.disable) {
this.$emit('input', !this.value);
this.$emit('checkClick', !this.value);
}
}
}
});
/***/ }),
/***/ 386:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{staticClass:"h-checkbox",on:{"click":_vm.checked}},[_c('label',{staticClass:"checkbox"},[_c('input',{attrs:{"disabled":_vm.disable,"type":"checkbox"},domProps:{"checked":_vm.value}})])])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);
/***/ })
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -50,7 +50,7 @@
results = regex.exec(location.search)
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '))
}
var WEIXIN = 'weixin'
var IOS = 'ios'
var ANDROID = 'android'
var WINDOWS_PHONE = 'windowsphone'
......@@ -261,6 +261,13 @@
isWebView: function () {
return !(!window.cordova && !window.PhoneGap && !window.phonegap && window.forge !== 'object')
},
/**
*
* @returns {*|boolean}
*/
isWeiXin: function () {
return self.is(WEIXIN)
},
/**
* @ngdoc method
* @name vum.Platform#isIPad
......@@ -332,6 +339,8 @@
platformName = EDGE
} else if (self.ua.indexOf('Windows Phone') > -1) {
platformName = WINDOWS_PHONE
} else if(/MicroMessenger/i.test(self.ua)) {
platformName = WEIXIN
} else if (self.ua.indexOf('Android') > 0) {
platformName = ANDROID
} else if (/iPhone|iPad|iPod/.test(self.ua)) {
......
......@@ -50,3 +50,73 @@ export function detectOS () {
return 'other'
}
}
export function range (num, min, max) {
return Math.min(Math.max(num, min), max)
}
function trimExtraChar (value, char, regExp) {
const index = value.indexOf(char)
if (index === -1) {
return value
}
if (char === '-' && index !== 0) {
return value.slice(0, index)
}
return value.slice(0, index + 1) + value.slice(index).replace(regExp, '')
}
export function formatNumber (value, allowDot) {
if (value) {
if (allowDot) {
value = trimExtraChar(value, '.', /\./g)
} else {
value = value.split('.')[0]
}
value = trimExtraChar(value, '-', /-/g)
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g
return value.replace(regExp, '')
}
}
export function isDef (val) {
return val !== undefined && val !== null && val !== ''
}
export function isUndefined (value) {
return Object.prototype.toString.call(value) === '[object Undefined]'
}
export function isString (value) {
return Object.prototype.toString.call(value) === '[object String]'
}
export function isNumber (value) {
return Object.prototype.toString.call(value) === '[object Number]'
}
export function isBoolean (value) {
return Object.prototype.toString.call(value) === '[object Boolean]'
}
export function isNull (value) {
return Object.prototype.toString.call(value) === '[object Null]'
}
export function isObject (value) {
return Object.prototype.toString.call(value) === '[object Object]'
}
export function isFunction (value) {
return Object.prototype.toString.call(value) === '[object Function]'
}
export function isArray (value) {
return Object.prototype.toString.call(value) === '[object Array]'
}
export function isDate (value) {
return Object.prototype.toString.call(value) === '[object Date]'
}
export function isRegExp (value) {
return Object.prototype.toString.call(value) === '[object RegExp]'
}
This diff is collapsed.
DateFiled 日期组建
DateField 日期组建
```html
<DateFiled
<DateField
v-model="nowDate" :required="true" label="时间"
@onSelect="select"/>
......
This diff is collapsed.
......@@ -101,7 +101,7 @@ export default {
this.$refs.input.value = ''
}
},
change ($event) {
change (event) {
let vm = this
let { files } = event.target
if (vm.disabled || !files.length) {
......
......@@ -42,6 +42,7 @@ export default {
},
created () {
this.fullScreen && detectOS() === 'ios' && (this.isIos = true)
document.body.classList.add('platform-' + detectOS())
},
}
</script>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment