eoss-mobiles 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +28 -0
- package/lib/action-sheet.js +313 -0
- package/lib/button-group.js +421 -0
- package/lib/button.js +278 -0
- package/lib/calendar.js +301 -0
- package/lib/cascader.js +336 -0
- package/lib/cell.js +366 -0
- package/lib/checkbox.js +2170 -0
- package/lib/circle.js +299 -0
- package/lib/config/api.js +31 -0
- package/lib/count-down.js +299 -0
- package/lib/date.js +956 -0
- package/lib/empty.js +274 -0
- package/lib/eoss-mobile.common.js +15072 -0
- package/lib/field.js +440 -0
- package/lib/flow.js +5664 -0
- package/lib/form.js +714 -0
- package/lib/grid-item.js +274 -0
- package/lib/grid.js +317 -0
- package/lib/image-preview.js +325 -0
- package/lib/index.js +1 -0
- package/lib/list.js +315 -0
- package/lib/loading.js +279 -0
- package/lib/nav-bar.js +283 -0
- package/lib/pagination.js +323 -0
- package/lib/picker.js +2714 -0
- package/lib/popover.js +306 -0
- package/lib/popup.js +297 -0
- package/lib/radio.js +2137 -0
- package/lib/rate.js +300 -0
- package/lib/search.js +316 -0
- package/lib/selector.js +3496 -0
- package/lib/skeleton.js +277 -0
- package/lib/stepper.js +300 -0
- package/lib/switch.js +304 -0
- package/lib/tab.js +274 -0
- package/lib/table-column.js +2991 -0
- package/lib/table.js +2652 -0
- package/lib/tabs.js +315 -0
- package/lib/tag.js +281 -0
- package/lib/theme-chalk/action-sheet.css +0 -0
- package/lib/theme-chalk/base.css +1 -0
- package/lib/theme-chalk/button-group.css +1 -0
- package/lib/theme-chalk/button.css +1 -0
- package/lib/theme-chalk/calendar.css +1 -0
- package/lib/theme-chalk/cascader.css +1 -0
- package/lib/theme-chalk/cell.css +1 -0
- package/lib/theme-chalk/checkbox.css +1 -0
- package/lib/theme-chalk/circle.css +1 -0
- package/lib/theme-chalk/count-down.css +0 -0
- package/lib/theme-chalk/date.css +0 -0
- package/lib/theme-chalk/empty.css +0 -0
- package/lib/theme-chalk/field.css +1 -0
- package/lib/theme-chalk/flow.css +1 -0
- package/lib/theme-chalk/fonts/iconfont.scss +530 -0
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/form.css +0 -0
- package/lib/theme-chalk/grid-item.css +1 -0
- package/lib/theme-chalk/grid.css +0 -0
- package/lib/theme-chalk/icon.css +1 -0
- package/lib/theme-chalk/image-preview.css +0 -0
- package/lib/theme-chalk/index.css +1 -0
- package/lib/theme-chalk/list.css +0 -0
- package/lib/theme-chalk/loading.css +0 -0
- package/lib/theme-chalk/nav-bar.css +0 -0
- package/lib/theme-chalk/navbar.css +1 -0
- package/lib/theme-chalk/pagination.css +1 -0
- package/lib/theme-chalk/picker.css +1 -0
- package/lib/theme-chalk/popover.css +0 -0
- package/lib/theme-chalk/popup.css +0 -0
- package/lib/theme-chalk/radio.css +1 -0
- package/lib/theme-chalk/rate.css +0 -0
- package/lib/theme-chalk/search.css +0 -0
- package/lib/theme-chalk/selector.css +1 -0
- package/lib/theme-chalk/skeleton.css +0 -0
- package/lib/theme-chalk/stepper.css +1 -0
- package/lib/theme-chalk/switch.css +1 -0
- package/lib/theme-chalk/tab.css +0 -0
- package/lib/theme-chalk/table-column.css +0 -0
- package/lib/theme-chalk/table.css +1 -0
- package/lib/theme-chalk/tabs.css +1 -0
- package/lib/theme-chalk/tag.css +1 -0
- package/lib/theme-chalk/theme.css +0 -0
- package/lib/theme-chalk/tree.css +1 -0
- package/lib/theme-chalk/uploader.css +0 -0
- package/lib/uploader.js +307 -0
- package/lib/utils/axios.js +199 -0
- package/lib/utils/date-util.js +320 -0
- package/lib/utils/http.js +74 -0
- package/lib/utils/rules.js +21 -0
- package/lib/utils/store.js +24 -0
- package/lib/utils/util.js +1315 -0
- package/package.json +153 -0
- package/packages/action-sheet/index.js +5 -0
- package/packages/action-sheet/src/main.vue +32 -0
- package/packages/button/index.js +5 -0
- package/packages/button/src/main.vue +15 -0
- package/packages/button-group/index.js +5 -0
- package/packages/button-group/src/main.vue +80 -0
- package/packages/calendar/index.js +5 -0
- package/packages/calendar/src/main.vue +34 -0
- package/packages/cascader/index.js +5 -0
- package/packages/cascader/src/main.vue +40 -0
- package/packages/cell/index.js +5 -0
- package/packages/cell/src/main.vue +72 -0
- package/packages/checkbox/index.js +5 -0
- package/packages/checkbox/src/main.vue +149 -0
- package/packages/circle/index.js +5 -0
- package/packages/circle/src/main.vue +27 -0
- package/packages/count-down/index.js +5 -0
- package/packages/count-down/src/main.vue +27 -0
- package/packages/date/index.js +5 -0
- package/packages/date/src/date-time.vue +290 -0
- package/packages/date/src/main.vue +319 -0
- package/packages/empty/index.js +5 -0
- package/packages/empty/src/main.vue +16 -0
- package/packages/field/index.js +5 -0
- package/packages/field/src/main.vue +130 -0
- package/packages/flow/index.js +5 -0
- package/packages/flow/src/components/Handle.vue +1031 -0
- package/packages/flow/src/components/Message.vue +96 -0
- package/packages/flow/src/components/Opinion.vue +112 -0
- package/packages/flow/src/components/Reject.vue +202 -0
- package/packages/flow/src/components/StartFlow.vue +440 -0
- package/packages/flow/src/components/TaskRead.vue +237 -0
- package/packages/flow/src/main.vue +43 -0
- package/packages/form/index.js +5 -0
- package/packages/form/src/main.vue +158 -0
- package/packages/grid/index.js +5 -0
- package/packages/grid/src/main.vue +28 -0
- package/packages/grid-item/index.js +5 -0
- package/packages/grid-item/src/main.vue +16 -0
- package/packages/image-preview/index.js +5 -0
- package/packages/image-preview/src/main.vue +34 -0
- package/packages/list/index.js +5 -0
- package/packages/list/src/main.vue +32 -0
- package/packages/loading/index.js +5 -0
- package/packages/loading/src/main.vue +20 -0
- package/packages/nav-bar/index.js +5 -0
- package/packages/nav-bar/src/main.vue +16 -0
- package/packages/pagination/index.js +5 -0
- package/packages/pagination/src/main.vue +29 -0
- package/packages/picker/index.js +5 -0
- package/packages/picker/src/main.vue +500 -0
- package/packages/popover/index.js +5 -0
- package/packages/popover/src/main.vue +32 -0
- package/packages/popup/index.js +5 -0
- package/packages/popup/src/main.vue +27 -0
- package/packages/radio/index.js +5 -0
- package/packages/radio/src/main.vue +147 -0
- package/packages/rate/index.js +5 -0
- package/packages/rate/src/main.vue +27 -0
- package/packages/search/index.js +5 -0
- package/packages/search/src/main.vue +39 -0
- package/packages/selector/index.js +5 -0
- package/packages/selector/src/main.vue +77 -0
- package/packages/selector/src/selector-field.vue +225 -0
- package/packages/selector/src/selector-tree.vue +472 -0
- package/packages/selector/src/tree.vue +179 -0
- package/packages/skeleton/index.js +5 -0
- package/packages/skeleton/src/main.vue +17 -0
- package/packages/stepper/index.js +5 -0
- package/packages/stepper/src/main.vue +25 -0
- package/packages/switch/index.js +5 -0
- package/packages/switch/src/main.vue +29 -0
- package/packages/tab/index.js +5 -0
- package/packages/tab/src/main.vue +16 -0
- package/packages/table/index.js +5 -0
- package/packages/table/src/main.vue +830 -0
- package/packages/table-column/index.js +5 -0
- package/packages/table-column/src/main.vue +742 -0
- package/packages/table-column/src/mixins/table.js +12 -0
- package/packages/tabs/index.js +5 -0
- package/packages/tabs/src/main.vue +34 -0
- package/packages/tag/index.js +5 -0
- package/packages/tag/src/main.vue +16 -0
- package/packages/theme-chalk/README.md +33 -0
- package/packages/theme-chalk/lib/action-sheet.css +0 -0
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/calendar.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +1 -0
- package/packages/theme-chalk/lib/cell.css +1 -0
- package/packages/theme-chalk/lib/checkbox.css +1 -0
- package/packages/theme-chalk/lib/circle.css +1 -0
- package/packages/theme-chalk/lib/count-down.css +0 -0
- package/packages/theme-chalk/lib/date.css +0 -0
- package/packages/theme-chalk/lib/empty.css +0 -0
- package/packages/theme-chalk/lib/field.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.scss +530 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +0 -0
- package/packages/theme-chalk/lib/grid-item.css +1 -0
- package/packages/theme-chalk/lib/grid.css +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/image-preview.css +0 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/list.css +0 -0
- package/packages/theme-chalk/lib/loading.css +0 -0
- package/packages/theme-chalk/lib/nav-bar.css +0 -0
- package/packages/theme-chalk/lib/navbar.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/picker.css +1 -0
- package/packages/theme-chalk/lib/popover.css +0 -0
- package/packages/theme-chalk/lib/popup.css +0 -0
- package/packages/theme-chalk/lib/radio.css +1 -0
- package/packages/theme-chalk/lib/rate.css +0 -0
- package/packages/theme-chalk/lib/search.css +0 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/skeleton.css +0 -0
- package/packages/theme-chalk/lib/stepper.css +1 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/tab.css +0 -0
- package/packages/theme-chalk/lib/table-column.css +0 -0
- package/packages/theme-chalk/lib/table.css +1 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tag.css +1 -0
- package/packages/theme-chalk/lib/theme.css +0 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/uploader.css +0 -0
- package/packages/theme-chalk/package.json +35 -0
- package/packages/theme-chalk/src/action-sheet.scss +0 -0
- package/packages/theme-chalk/src/base.scss +182 -0
- package/packages/theme-chalk/src/button-group.scss +26 -0
- package/packages/theme-chalk/src/button.scss +3 -0
- package/packages/theme-chalk/src/calendar.scss +12 -0
- package/packages/theme-chalk/src/cascader.scss +12 -0
- package/packages/theme-chalk/src/cell.scss +14 -0
- package/packages/theme-chalk/src/checkbox.scss +10 -0
- package/packages/theme-chalk/src/circle.scss +7 -0
- package/packages/theme-chalk/src/common/var.scss +1525 -0
- package/packages/theme-chalk/src/count-down.scss +0 -0
- package/packages/theme-chalk/src/date.scss +0 -0
- package/packages/theme-chalk/src/empty.scss +0 -0
- package/packages/theme-chalk/src/field.scss +28 -0
- package/packages/theme-chalk/src/flow.scss +542 -0
- package/packages/theme-chalk/src/fonts/iconfont.scss +530 -0
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/form.scss +15 -0
- package/packages/theme-chalk/src/grid-item.scss +8 -0
- package/packages/theme-chalk/src/grid.scss +0 -0
- package/packages/theme-chalk/src/icon.scss +1661 -0
- package/packages/theme-chalk/src/image-preview.scss +0 -0
- package/packages/theme-chalk/src/index.scss +38 -0
- package/packages/theme-chalk/src/list.scss +0 -0
- package/packages/theme-chalk/src/loading.scss +0 -0
- package/packages/theme-chalk/src/mixins/color.scss +117 -0
- package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
- package/packages/theme-chalk/src/nav-bar.scss +0 -0
- package/packages/theme-chalk/src/navbar.scss +6 -0
- package/packages/theme-chalk/src/pagination.scss +10 -0
- package/packages/theme-chalk/src/picker.scss +27 -0
- package/packages/theme-chalk/src/popover.scss +0 -0
- package/packages/theme-chalk/src/popup.scss +0 -0
- package/packages/theme-chalk/src/radio.scss +7 -0
- package/packages/theme-chalk/src/rate.scss +0 -0
- package/packages/theme-chalk/src/search.scss +0 -0
- package/packages/theme-chalk/src/selector.scss +218 -0
- package/packages/theme-chalk/src/skeleton.scss +0 -0
- package/packages/theme-chalk/src/stepper.scss +10 -0
- package/packages/theme-chalk/src/switch.scss +6 -0
- package/packages/theme-chalk/src/tab.scss +0 -0
- package/packages/theme-chalk/src/table-column.scss +0 -0
- package/packages/theme-chalk/src/table.scss +42 -0
- package/packages/theme-chalk/src/tabs.scss +21 -0
- package/packages/theme-chalk/src/tag.scss +13 -0
- package/packages/theme-chalk/src/theme.scss +2 -0
- package/packages/theme-chalk/src/tree.scss +115 -0
- package/packages/theme-chalk/src/uploader.scss +0 -0
- package/packages/uploader/index.js +5 -0
- package/packages/uploader/src/main.vue +31 -0
- package/src/config/api.js +29 -0
- package/src/index.js +130 -0
- package/src/utils/axios.js +198 -0
- package/src/utils/date-util.js +312 -0
- package/src/utils/http.js +66 -0
- package/src/utils/rules.js +18 -0
- package/src/utils/store.js +21 -0
- package/src/utils/util.js +1346 -0
package/lib/field.js
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "/dist/";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 18);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 0:
|
|
91
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
"use strict";
|
|
94
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
95
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
96
|
+
|
|
97
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
98
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
99
|
+
// be included in the final webpack user bundle.
|
|
100
|
+
|
|
101
|
+
function normalizeComponent(
|
|
102
|
+
scriptExports,
|
|
103
|
+
render,
|
|
104
|
+
staticRenderFns,
|
|
105
|
+
functionalTemplate,
|
|
106
|
+
injectStyles,
|
|
107
|
+
scopeId,
|
|
108
|
+
moduleIdentifier /* server only */,
|
|
109
|
+
shadowMode /* vue-cli only */
|
|
110
|
+
) {
|
|
111
|
+
// Vue.extend constructor export interop
|
|
112
|
+
var options =
|
|
113
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
114
|
+
|
|
115
|
+
// render functions
|
|
116
|
+
if (render) {
|
|
117
|
+
options.render = render
|
|
118
|
+
options.staticRenderFns = staticRenderFns
|
|
119
|
+
options._compiled = true
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// functional template
|
|
123
|
+
if (functionalTemplate) {
|
|
124
|
+
options.functional = true
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// scopedId
|
|
128
|
+
if (scopeId) {
|
|
129
|
+
options._scopeId = 'data-v-' + scopeId
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
var hook
|
|
133
|
+
if (moduleIdentifier) {
|
|
134
|
+
// server build
|
|
135
|
+
hook = function (context) {
|
|
136
|
+
// 2.3 injection
|
|
137
|
+
context =
|
|
138
|
+
context || // cached call
|
|
139
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
140
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
141
|
+
// 2.2 with runInNewContext: true
|
|
142
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
143
|
+
context = __VUE_SSR_CONTEXT__
|
|
144
|
+
}
|
|
145
|
+
// inject component styles
|
|
146
|
+
if (injectStyles) {
|
|
147
|
+
injectStyles.call(this, context)
|
|
148
|
+
}
|
|
149
|
+
// register component module identifier for async chunk inferrence
|
|
150
|
+
if (context && context._registeredComponents) {
|
|
151
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// used by ssr in case component is cached and beforeCreate
|
|
155
|
+
// never gets called
|
|
156
|
+
options._ssrRegister = hook
|
|
157
|
+
} else if (injectStyles) {
|
|
158
|
+
hook = shadowMode
|
|
159
|
+
? function () {
|
|
160
|
+
injectStyles.call(
|
|
161
|
+
this,
|
|
162
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
: injectStyles
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (hook) {
|
|
169
|
+
if (options.functional) {
|
|
170
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
171
|
+
// go through the normalizer
|
|
172
|
+
options._injectStyles = hook
|
|
173
|
+
// register for functional component in vue file
|
|
174
|
+
var originalRender = options.render
|
|
175
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
176
|
+
hook.call(context)
|
|
177
|
+
return originalRender(h, context)
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
// inject component registration as beforeCreate hook
|
|
181
|
+
var existing = options.beforeCreate
|
|
182
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
exports: scriptExports,
|
|
188
|
+
options: options
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
/***/ }),
|
|
194
|
+
|
|
195
|
+
/***/ 18:
|
|
196
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
|
+
|
|
198
|
+
"use strict";
|
|
199
|
+
// ESM COMPAT FLAG
|
|
200
|
+
__webpack_require__.r(__webpack_exports__);
|
|
201
|
+
|
|
202
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/field/src/main.vue?vue&type=template&id=3d273344&
|
|
203
|
+
var render = function () {
|
|
204
|
+
var _vm = this
|
|
205
|
+
var _h = _vm.$createElement
|
|
206
|
+
var _c = _vm._self._c || _h
|
|
207
|
+
return _c(
|
|
208
|
+
"div",
|
|
209
|
+
{ staticClass: "em-input" },
|
|
210
|
+
[
|
|
211
|
+
_c(
|
|
212
|
+
"van-field",
|
|
213
|
+
_vm._g(
|
|
214
|
+
_vm._b(
|
|
215
|
+
{
|
|
216
|
+
class: { "hide-label": _vm.hideLabel },
|
|
217
|
+
attrs: {
|
|
218
|
+
autocomplete: "new-password",
|
|
219
|
+
"label-width": _vm.labelWidth,
|
|
220
|
+
placeholder: _vm.newPlaceholder
|
|
221
|
+
? _vm.newPlaceholder
|
|
222
|
+
: "请输入" + (_vm.$attrs.label || ""),
|
|
223
|
+
"error-message": _vm.newErrorMessage,
|
|
224
|
+
required:
|
|
225
|
+
_vm.required ||
|
|
226
|
+
(Array.isArray(_vm.rules)
|
|
227
|
+
? _vm.rules[0].required
|
|
228
|
+
: _vm.rules.required),
|
|
229
|
+
error:
|
|
230
|
+
(!_vm.newErrorMessage &&
|
|
231
|
+
!_vm.modelValue &&
|
|
232
|
+
_vm.rules.required) ||
|
|
233
|
+
_vm.$attrs.error,
|
|
234
|
+
rules: Array.isArray(_vm.rules) ? _vm.rules : [],
|
|
235
|
+
},
|
|
236
|
+
on: {
|
|
237
|
+
blur: function ($event) {
|
|
238
|
+
_vm.handleBlur(_vm.rules)
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
model: {
|
|
242
|
+
value: _vm.modelValue,
|
|
243
|
+
callback: function ($$v) {
|
|
244
|
+
_vm.modelValue = $$v
|
|
245
|
+
},
|
|
246
|
+
expression: "modelValue",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
"van-field",
|
|
250
|
+
_vm.$attrs,
|
|
251
|
+
false
|
|
252
|
+
),
|
|
253
|
+
_vm.$listeners
|
|
254
|
+
),
|
|
255
|
+
[
|
|
256
|
+
_vm._l(_vm.$slots, function (index, name) {
|
|
257
|
+
return _c("template", { slot: name }, [_vm._t(name)], 2)
|
|
258
|
+
}),
|
|
259
|
+
],
|
|
260
|
+
2
|
|
261
|
+
),
|
|
262
|
+
],
|
|
263
|
+
1
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
var staticRenderFns = []
|
|
267
|
+
render._withStripped = true
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
// CONCATENATED MODULE: ./packages/field/src/main.vue?vue&type=template&id=3d273344&
|
|
271
|
+
|
|
272
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/field/src/main.vue?vue&type=script&lang=js&
|
|
273
|
+
//
|
|
274
|
+
//
|
|
275
|
+
//
|
|
276
|
+
//
|
|
277
|
+
//
|
|
278
|
+
//
|
|
279
|
+
//
|
|
280
|
+
//
|
|
281
|
+
//
|
|
282
|
+
//
|
|
283
|
+
//
|
|
284
|
+
//
|
|
285
|
+
//
|
|
286
|
+
//
|
|
287
|
+
//
|
|
288
|
+
//
|
|
289
|
+
//
|
|
290
|
+
//
|
|
291
|
+
//
|
|
292
|
+
//
|
|
293
|
+
//
|
|
294
|
+
//
|
|
295
|
+
//
|
|
296
|
+
//
|
|
297
|
+
//
|
|
298
|
+
//
|
|
299
|
+
//
|
|
300
|
+
//
|
|
301
|
+
//
|
|
302
|
+
|
|
303
|
+
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
304
|
+
name: 'EmInput',
|
|
305
|
+
inheritAttrs: false,
|
|
306
|
+
props: {
|
|
307
|
+
value: {
|
|
308
|
+
type: [String, Array, Number],
|
|
309
|
+
default: ''
|
|
310
|
+
},
|
|
311
|
+
required: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
default: false
|
|
314
|
+
},
|
|
315
|
+
precision: {
|
|
316
|
+
type: Number,
|
|
317
|
+
default: null
|
|
318
|
+
},
|
|
319
|
+
labelWidth: {
|
|
320
|
+
type: [String, Number],
|
|
321
|
+
default: '4em'
|
|
322
|
+
},
|
|
323
|
+
hideLabel: {
|
|
324
|
+
type: Boolean,
|
|
325
|
+
default: false
|
|
326
|
+
},
|
|
327
|
+
rules: {
|
|
328
|
+
type: [Object, Array],
|
|
329
|
+
default: function _default() {
|
|
330
|
+
return {};
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
errorMessage: {
|
|
334
|
+
type: String,
|
|
335
|
+
default: ''
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
data: function data() {
|
|
339
|
+
return {
|
|
340
|
+
newPlaceholder: '',
|
|
341
|
+
newErrorMessage: ''
|
|
342
|
+
};
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
computed: {
|
|
346
|
+
modelValue: {
|
|
347
|
+
get: function get() {
|
|
348
|
+
var val = this.value;
|
|
349
|
+
|
|
350
|
+
return val;
|
|
351
|
+
},
|
|
352
|
+
set: function set(val) {
|
|
353
|
+
return val;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
mounted: function mounted() {
|
|
358
|
+
this.newPlaceholder = this.$attrs.placeholder;
|
|
359
|
+
this.newErrorMessage = this.errorMessage;
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
methods: {
|
|
363
|
+
handleBlur: function handleBlur(rules) {
|
|
364
|
+
var _this = this;
|
|
365
|
+
|
|
366
|
+
console.log(rules, 'rules');
|
|
367
|
+
var _that = this;
|
|
368
|
+
if (this.$attrs.type == 'number' && this.precision != null) {
|
|
369
|
+
this.$emit('input', Number(this.value).toFixed(Number(this.precision)));
|
|
370
|
+
}
|
|
371
|
+
if (Array.isArray(rules)) {
|
|
372
|
+
rules.map(function (x) {
|
|
373
|
+
_this.handleBlur(x);
|
|
374
|
+
});
|
|
375
|
+
} else {
|
|
376
|
+
if (rules && rules.required && !rules.validator && !this.value) {
|
|
377
|
+
this.newPlaceholder = '';
|
|
378
|
+
this.newErrorMessage = rules.message;
|
|
379
|
+
return { name: _that.$attrs.name, message: rules.message };
|
|
380
|
+
} else if (rules && rules.validator) {
|
|
381
|
+
rules.validator(this.value, this.valid);
|
|
382
|
+
} else {
|
|
383
|
+
this.newPlaceholder = '';
|
|
384
|
+
this.newErrorMessage = '';
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
valid: function valid(val) {
|
|
389
|
+
var _that = this;
|
|
390
|
+
if (!this.value) {
|
|
391
|
+
this.newPlaceholder = val;
|
|
392
|
+
this.newErrorMessage = '';
|
|
393
|
+
} else {
|
|
394
|
+
this.newPlaceholder = '';
|
|
395
|
+
this.newErrorMessage = val;
|
|
396
|
+
}
|
|
397
|
+
return {
|
|
398
|
+
name: _that.$attrs.name,
|
|
399
|
+
message: Array.isArray(_that.rules) ? _that.rules[0].message : _that.rules.message
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
// CONCATENATED MODULE: ./packages/field/src/main.vue?vue&type=script&lang=js&
|
|
405
|
+
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
|
|
406
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
407
|
+
var componentNormalizer = __webpack_require__(0);
|
|
408
|
+
|
|
409
|
+
// CONCATENATED MODULE: ./packages/field/src/main.vue
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
/* normalize component */
|
|
416
|
+
|
|
417
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
418
|
+
src_mainvue_type_script_lang_js_,
|
|
419
|
+
render,
|
|
420
|
+
staticRenderFns,
|
|
421
|
+
false,
|
|
422
|
+
null,
|
|
423
|
+
null,
|
|
424
|
+
null
|
|
425
|
+
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
/* harmony default export */ var main = (component.exports);
|
|
429
|
+
// CONCATENATED MODULE: ./packages/field/index.js
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
main.install = function (Vue) {
|
|
433
|
+
return Vue.component(main.name, main);
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
/* harmony default export */ var field = __webpack_exports__["default"] = (main);
|
|
437
|
+
|
|
438
|
+
/***/ })
|
|
439
|
+
|
|
440
|
+
/******/ });
|