eoss-mobiles 0.4.0 → 0.4.2
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 +95 -0
- package/lib/button-group.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/cell.js +2 -2
- package/lib/checkbox.js +2 -2
- package/lib/circle.js +2 -2
- package/lib/count-down.js +2 -2
- package/lib/empty.js +2 -2
- package/lib/eoss-mobile.common.js +542 -93
- package/lib/field.js +2 -2
- package/lib/flow-btn.js +2 -2
- package/lib/flow.js +8 -8
- package/lib/form.js +593 -144
- package/lib/grid-item.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/index.js +1 -1
- package/lib/list.js +2 -2
- package/lib/loading.js +85 -85
- package/lib/nav-bar.js +2 -2
- package/lib/picker.js +12 -11
- package/lib/popover.js +2 -2
- package/lib/radio.js +8 -7
- package/lib/search.js +2 -2
- package/lib/selector.js +28 -28
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table-column.js +3 -2
- package/lib/tabs.js +2 -2
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/fonts/iconfont.scss +98 -98
- package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/uploader.js +3 -2
- package/package.json +1 -1
- package/packages/action-sheet/index.js +5 -5
- package/packages/action-sheet/src/main.vue +32 -32
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +15 -15
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +80 -80
- package/packages/calendar/index.js +5 -5
- package/packages/calendar/src/main.vue +34 -34
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +39 -39
- package/packages/cell/index.js +5 -5
- package/packages/cell/src/main.vue +77 -77
- package/packages/checkbox/index.js +5 -5
- package/packages/checkbox/src/main.vue +232 -232
- package/packages/circle/index.js +5 -5
- package/packages/circle/src/main.vue +27 -27
- package/packages/count-down/index.js +5 -5
- package/packages/count-down/src/main.vue +27 -27
- package/packages/date/index.js +5 -5
- package/packages/date/src/date-time.vue +290 -290
- package/packages/date/src/main.vue +401 -401
- package/packages/empty/index.js +5 -5
- package/packages/empty/src/main.vue +16 -16
- package/packages/esign/index.js +5 -5
- package/packages/esign/src/main.vue +144 -144
- package/packages/field/index.js +5 -5
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/components/Circulate.vue +595 -595
- package/packages/flow/src/components/Handle.vue +2404 -2404
- package/packages/flow/src/components/Message.vue +208 -208
- package/packages/flow/src/components/ProcessSettings.vue +342 -342
- package/packages/flow/src/components/TaskRead.vue +1 -1
- package/packages/flow/src/components/supervise.vue +139 -139
- package/packages/flow/src/flowMix.js +288 -288
- package/packages/flow/src/main.vue +116 -116
- package/packages/flow-btn/index.js +5 -5
- package/packages/flow-btn/src/main.vue +494 -494
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +248 -248
- package/packages/form/index.js +5 -5
- package/packages/form/src/CustomCard.vue +201 -0
- package/packages/form/src/main.vue +32 -19
- package/packages/grid/index.js +5 -5
- package/packages/grid/src/main.vue +486 -486
- package/packages/grid-item/index.js +5 -5
- package/packages/grid-item/src/main.vue +16 -16
- package/packages/image/index.js +5 -5
- package/packages/image/src/main.vue +12 -12
- package/packages/image-preview/index.js +5 -5
- package/packages/list/index.js +5 -5
- package/packages/list/src/main.vue +32 -32
- package/packages/loading/index.js +5 -5
- package/packages/loading/src/main.vue +19 -19
- package/packages/nav-bar/index.js +5 -5
- package/packages/nav-bar/src/main.vue +24 -24
- package/packages/notice-bar/index.js +5 -5
- package/packages/notice-bar/src/main.vue +15 -15
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +73 -73
- package/packages/picker/index.js +5 -5
- package/packages/picker/src/main.vue +604 -604
- package/packages/popover/index.js +5 -5
- package/packages/popover/src/main.vue +32 -32
- package/packages/popup/index.js +5 -5
- package/packages/popup/src/main.vue +27 -27
- package/packages/pull-refresh/index.js +5 -5
- package/packages/pull-refresh/src/main.vue +31 -31
- package/packages/radio/index.js +5 -5
- package/packages/radio/src/main.vue +179 -179
- package/packages/rate/index.js +5 -5
- package/packages/rate/src/main.vue +26 -26
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +257 -257
- package/packages/search/index.js +5 -5
- package/packages/search/src/main.vue +39 -39
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +186 -186
- package/packages/selector/src/selector-tree.vue +1117 -1117
- package/packages/selector/src/tree.vue +405 -405
- package/packages/skeleton/index.js +5 -5
- package/packages/skeleton/src/main.vue +17 -17
- package/packages/stepper/index.js +5 -5
- package/packages/stepper/src/main.vue +25 -25
- package/packages/swipe/index.js +5 -5
- package/packages/swipe/src/main.vue +42 -42
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +38 -38
- package/packages/tab/index.js +5 -5
- package/packages/tab/src/main.vue +16 -16
- package/packages/table/index.js +5 -5
- package/packages/table/src/main.vue +1006 -1006
- package/packages/table-column/index.js +5 -5
- package/packages/table-column/src/main.vue +931 -931
- package/packages/table-column/src/mixins/table.js +12 -12
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +34 -34
- package/packages/tag/index.js +5 -5
- package/packages/tag/src/main.vue +16 -16
- 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/esign.css +1 -0
- package/packages/theme-chalk/lib/field.css +1 -0
- package/packages/theme-chalk/lib/flow-btn.css +1 -0
- package/packages/theme-chalk/lib/flow-list-task-read.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.scss +98 -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/fonts/iconfont1.scss +90 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/grid-item.css +1 -0
- package/packages/theme-chalk/lib/grid.css +1 -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/image.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/notice-bar.css +0 -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/pull-refresh.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/retrial-auth.css +1 -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/swipe.css +0 -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/src/base.scss +195 -195
- package/packages/theme-chalk/src/button-group.scss +25 -25
- package/packages/theme-chalk/src/button.scss +2 -2
- package/packages/theme-chalk/src/calendar.scss +11 -11
- package/packages/theme-chalk/src/cascader.scss +11 -11
- package/packages/theme-chalk/src/cell.scss +14 -14
- package/packages/theme-chalk/src/checkbox.scss +9 -9
- package/packages/theme-chalk/src/circle.scss +6 -6
- package/packages/theme-chalk/src/common/var.scss +1525 -1525
- package/packages/theme-chalk/src/esign.scss +51 -51
- package/packages/theme-chalk/src/field.scss +98 -98
- package/packages/theme-chalk/src/flow-btn.scss +99 -99
- package/packages/theme-chalk/src/flow-list.scss +122 -122
- package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
- package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
- package/packages/theme-chalk/src/form.scss +107 -33
- package/packages/theme-chalk/src/grid-item.scss +16 -16
- package/packages/theme-chalk/src/grid.scss +46 -46
- package/packages/theme-chalk/src/icon.scss +1661 -1661
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/navbar.scss +5 -5
- package/packages/theme-chalk/src/pagination.scss +12 -12
- package/packages/theme-chalk/src/picker.scss +31 -31
- package/packages/theme-chalk/src/radio.scss +6 -6
- package/packages/theme-chalk/src/retrial-auth.scss +28 -28
- package/packages/theme-chalk/src/selector.scss +247 -247
- package/packages/theme-chalk/src/stepper.scss +9 -9
- package/packages/theme-chalk/src/switch.scss +5 -5
- package/packages/theme-chalk/src/table.scss +86 -86
- package/packages/theme-chalk/src/tabs.scss +31 -31
- package/packages/theme-chalk/src/tag.scss +12 -12
- package/packages/theme-chalk/src/theme.scss +1 -1
- package/packages/theme-chalk/src/tree.scss +127 -127
- package/packages/uploader/index.js +5 -5
- package/src/config/api.js +190 -190
- package/src/index.js +1 -1
- package/src/utils/axios.js +217 -217
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +106 -106
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/packages/theme-chalk/gulpfile.js +0 -25
package/lib/form.js
CHANGED
|
@@ -82,124 +82,19 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 18);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
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
|
-
/***/ 43:
|
|
90
|
+
/***/ 18:
|
|
196
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
92
|
|
|
198
93
|
"use strict";
|
|
199
94
|
// ESM COMPAT FLAG
|
|
200
95
|
__webpack_require__.r(__webpack_exports__);
|
|
201
96
|
|
|
202
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=
|
|
97
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=2cd80b57
|
|
203
98
|
var render = function () {
|
|
204
99
|
var _vm = this
|
|
205
100
|
var _h = _vm.$createElement
|
|
@@ -1079,35 +974,56 @@ var render = function () {
|
|
|
1079
974
|
)
|
|
1080
975
|
)
|
|
1081
976
|
: item.type == "table"
|
|
1082
|
-
?
|
|
1083
|
-
"
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
977
|
+
? [
|
|
978
|
+
item.presentType && item.presentType == "card"
|
|
979
|
+
? _c(
|
|
980
|
+
"custom-card",
|
|
981
|
+
_vm._b(
|
|
982
|
+
{
|
|
983
|
+
model: {
|
|
984
|
+
value: _vm.model[item.name],
|
|
985
|
+
callback: function ($$v) {
|
|
986
|
+
_vm.$set(_vm.model, item.name, $$v)
|
|
987
|
+
},
|
|
988
|
+
expression: "model[item.name]",
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
"custom-card",
|
|
992
|
+
Object.assign({}, _vm.$attrs, item),
|
|
993
|
+
false
|
|
994
|
+
)
|
|
995
|
+
)
|
|
996
|
+
: _c(
|
|
997
|
+
"em-table",
|
|
998
|
+
_vm._g(
|
|
999
|
+
_vm._b(
|
|
1000
|
+
{
|
|
1001
|
+
ref: "emFormTable",
|
|
1002
|
+
refInFor: true,
|
|
1003
|
+
staticClass: "em-form-table",
|
|
1004
|
+
style:
|
|
1005
|
+
"margin:" + (item.margin || 10) + "px 0px",
|
|
1006
|
+
attrs: {
|
|
1007
|
+
data: _vm.model[item.name],
|
|
1008
|
+
thead: item.tHead,
|
|
1009
|
+
isForm: "",
|
|
1010
|
+
form:
|
|
1011
|
+
!item.disabled &&
|
|
1012
|
+
!_vm.disabled &&
|
|
1013
|
+
!item.readonly &&
|
|
1014
|
+
!_vm.readonly &&
|
|
1015
|
+
item.form,
|
|
1016
|
+
},
|
|
1017
|
+
on: { "btn-click": _vm.handleBtnClick },
|
|
1018
|
+
},
|
|
1019
|
+
"em-table",
|
|
1020
|
+
Object.assign({}, _vm.$attrs, item),
|
|
1021
|
+
false
|
|
1022
|
+
),
|
|
1023
|
+
Object.assign({}, item.events)
|
|
1024
|
+
)
|
|
1025
|
+
),
|
|
1026
|
+
]
|
|
1111
1027
|
: item.type === "component"
|
|
1112
1028
|
? _c(
|
|
1113
1029
|
"van-cell",
|
|
@@ -1139,7 +1055,7 @@ var render = function () {
|
|
|
1139
1055
|
)
|
|
1140
1056
|
: _vm._e(),
|
|
1141
1057
|
],
|
|
1142
|
-
|
|
1058
|
+
2
|
|
1143
1059
|
)
|
|
1144
1060
|
}),
|
|
1145
1061
|
0
|
|
@@ -1206,8 +1122,426 @@ var staticRenderFns = []
|
|
|
1206
1122
|
render._withStripped = true
|
|
1207
1123
|
|
|
1208
1124
|
|
|
1209
|
-
// CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=
|
|
1125
|
+
// CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=2cd80b57
|
|
1126
|
+
|
|
1127
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/CustomCard.vue?vue&type=template&id=a568ae9a
|
|
1128
|
+
var CustomCardvue_type_template_id_a568ae9a_render = function () {
|
|
1129
|
+
var _vm = this
|
|
1130
|
+
var _h = _vm.$createElement
|
|
1131
|
+
var _c = _vm._self._c || _h
|
|
1132
|
+
return _c(
|
|
1133
|
+
"div",
|
|
1134
|
+
{ staticClass: "em-custom-card" },
|
|
1135
|
+
[
|
|
1136
|
+
_vm.cardList.length === 0
|
|
1137
|
+
? _c("div", { staticClass: "empty-tip" }, [_vm._v("暂无数据")])
|
|
1138
|
+
: _vm._e(),
|
|
1139
|
+
_vm._l(_vm.cardList, function (card, index) {
|
|
1140
|
+
return _c(
|
|
1141
|
+
"div",
|
|
1142
|
+
{ key: index, staticClass: "card-item" },
|
|
1143
|
+
[
|
|
1144
|
+
_c(
|
|
1145
|
+
"van-cell-group",
|
|
1146
|
+
{ staticClass: "card-content" },
|
|
1147
|
+
_vm._l(_vm.tHead, function (field, fieldIndex) {
|
|
1148
|
+
return _c(
|
|
1149
|
+
"div",
|
|
1150
|
+
{ key: fieldIndex, staticClass: "card-field" },
|
|
1151
|
+
[
|
|
1152
|
+
_c("div", { staticClass: "field-label" }, [
|
|
1153
|
+
_vm._v(_vm._s(field.title)),
|
|
1154
|
+
]),
|
|
1155
|
+
_c(
|
|
1156
|
+
"div",
|
|
1157
|
+
{ staticClass: "field-value" },
|
|
1158
|
+
[
|
|
1159
|
+
field.type === "text"
|
|
1160
|
+
? _c("em-input", {
|
|
1161
|
+
attrs: {
|
|
1162
|
+
placeholder: field.placeholder,
|
|
1163
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1164
|
+
"label-width": "0",
|
|
1165
|
+
},
|
|
1166
|
+
model: {
|
|
1167
|
+
value: card[field.key],
|
|
1168
|
+
callback: function ($$v) {
|
|
1169
|
+
_vm.$set(card, field.key, $$v)
|
|
1170
|
+
},
|
|
1171
|
+
expression: "card[field.key]",
|
|
1172
|
+
},
|
|
1173
|
+
})
|
|
1174
|
+
: field.type === "number" || field.type === "digit"
|
|
1175
|
+
? _c("em-input", {
|
|
1176
|
+
attrs: {
|
|
1177
|
+
type: "number",
|
|
1178
|
+
placeholder: field.placeholder,
|
|
1179
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1180
|
+
"label-width": "0",
|
|
1181
|
+
},
|
|
1182
|
+
model: {
|
|
1183
|
+
value: card[field.key],
|
|
1184
|
+
callback: function ($$v) {
|
|
1185
|
+
_vm.$set(card, field.key, $$v)
|
|
1186
|
+
},
|
|
1187
|
+
expression: "card[field.key]",
|
|
1188
|
+
},
|
|
1189
|
+
})
|
|
1190
|
+
: field.type === "textarea"
|
|
1191
|
+
? _c("em-input", {
|
|
1192
|
+
attrs: {
|
|
1193
|
+
type: "textarea",
|
|
1194
|
+
autosize: field.autosize || { minRows: 2 },
|
|
1195
|
+
placeholder: field.placeholder,
|
|
1196
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1197
|
+
"label-width": "0",
|
|
1198
|
+
},
|
|
1199
|
+
model: {
|
|
1200
|
+
value: card[field.key],
|
|
1201
|
+
callback: function ($$v) {
|
|
1202
|
+
_vm.$set(card, field.key, $$v)
|
|
1203
|
+
},
|
|
1204
|
+
expression: "card[field.key]",
|
|
1205
|
+
},
|
|
1206
|
+
})
|
|
1207
|
+
: field.type === "radio"
|
|
1208
|
+
? _c("em-radio-group", {
|
|
1209
|
+
attrs: {
|
|
1210
|
+
data: _vm.getOptions(field.field),
|
|
1211
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1212
|
+
},
|
|
1213
|
+
model: {
|
|
1214
|
+
value: card[field.key],
|
|
1215
|
+
callback: function ($$v) {
|
|
1216
|
+
_vm.$set(card, field.key, $$v)
|
|
1217
|
+
},
|
|
1218
|
+
expression: "card[field.key]",
|
|
1219
|
+
},
|
|
1220
|
+
})
|
|
1221
|
+
: field.type === "checkbox"
|
|
1222
|
+
? _c("em-checkbox-group", {
|
|
1223
|
+
attrs: {
|
|
1224
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1225
|
+
data: _vm.getOptions(field.field),
|
|
1226
|
+
},
|
|
1227
|
+
model: {
|
|
1228
|
+
value: card[field.key],
|
|
1229
|
+
callback: function ($$v) {
|
|
1230
|
+
_vm.$set(card, field.key, $$v)
|
|
1231
|
+
},
|
|
1232
|
+
expression: "card[field.key]",
|
|
1233
|
+
},
|
|
1234
|
+
})
|
|
1235
|
+
: field.type === "select"
|
|
1236
|
+
? _c("em-picker", {
|
|
1237
|
+
attrs: {
|
|
1238
|
+
columns: _vm.getOptions(field.field),
|
|
1239
|
+
placeholder: field.placeholder,
|
|
1240
|
+
disabled: _vm.disabled || _vm.readonly,
|
|
1241
|
+
"label-width": "0",
|
|
1242
|
+
},
|
|
1243
|
+
model: {
|
|
1244
|
+
value: card[field.key],
|
|
1245
|
+
callback: function ($$v) {
|
|
1246
|
+
_vm.$set(card, field.key, $$v)
|
|
1247
|
+
},
|
|
1248
|
+
expression: "card[field.key]",
|
|
1249
|
+
},
|
|
1250
|
+
})
|
|
1251
|
+
: _c("span", [_vm._v(_vm._s(card[field.key]))]),
|
|
1252
|
+
],
|
|
1253
|
+
1
|
|
1254
|
+
),
|
|
1255
|
+
]
|
|
1256
|
+
)
|
|
1257
|
+
}),
|
|
1258
|
+
0
|
|
1259
|
+
),
|
|
1260
|
+
_vm.editable && !_vm.disabled && !_vm.readonly
|
|
1261
|
+
? _c(
|
|
1262
|
+
"div",
|
|
1263
|
+
{ staticClass: "card-actions" },
|
|
1264
|
+
[
|
|
1265
|
+
_c(
|
|
1266
|
+
"em-button",
|
|
1267
|
+
{
|
|
1268
|
+
attrs: { size: "small", type: "danger", plain: "" },
|
|
1269
|
+
on: {
|
|
1270
|
+
click: function ($event) {
|
|
1271
|
+
_vm.handleDelete(index)
|
|
1272
|
+
},
|
|
1273
|
+
},
|
|
1274
|
+
},
|
|
1275
|
+
[_vm._v("\n 删除\n ")]
|
|
1276
|
+
),
|
|
1277
|
+
],
|
|
1278
|
+
1
|
|
1279
|
+
)
|
|
1280
|
+
: _vm._e(),
|
|
1281
|
+
],
|
|
1282
|
+
1
|
|
1283
|
+
)
|
|
1284
|
+
}),
|
|
1285
|
+
_vm.editable && !_vm.disabled && !_vm.readonly
|
|
1286
|
+
? _c(
|
|
1287
|
+
"div",
|
|
1288
|
+
{ staticClass: "add-btn-wrapper" },
|
|
1289
|
+
[
|
|
1290
|
+
_c(
|
|
1291
|
+
"em-button",
|
|
1292
|
+
{
|
|
1293
|
+
attrs: {
|
|
1294
|
+
block: "",
|
|
1295
|
+
type: "primary",
|
|
1296
|
+
plain: "",
|
|
1297
|
+
icon: "plus",
|
|
1298
|
+
},
|
|
1299
|
+
on: { click: _vm.handleAdd },
|
|
1300
|
+
},
|
|
1301
|
+
[_vm._v("\n 添加\n ")]
|
|
1302
|
+
),
|
|
1303
|
+
],
|
|
1304
|
+
1
|
|
1305
|
+
)
|
|
1306
|
+
: _vm._e(),
|
|
1307
|
+
],
|
|
1308
|
+
2
|
|
1309
|
+
)
|
|
1310
|
+
}
|
|
1311
|
+
var CustomCardvue_type_template_id_a568ae9a_staticRenderFns = []
|
|
1312
|
+
CustomCardvue_type_template_id_a568ae9a_render._withStripped = true
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
// CONCATENATED MODULE: ./packages/form/src/CustomCard.vue?vue&type=template&id=a568ae9a
|
|
1210
1316
|
|
|
1317
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/CustomCard.vue?vue&type=script&lang=js
|
|
1318
|
+
//
|
|
1319
|
+
//
|
|
1320
|
+
//
|
|
1321
|
+
//
|
|
1322
|
+
//
|
|
1323
|
+
//
|
|
1324
|
+
//
|
|
1325
|
+
//
|
|
1326
|
+
//
|
|
1327
|
+
//
|
|
1328
|
+
//
|
|
1329
|
+
//
|
|
1330
|
+
//
|
|
1331
|
+
//
|
|
1332
|
+
//
|
|
1333
|
+
//
|
|
1334
|
+
//
|
|
1335
|
+
//
|
|
1336
|
+
//
|
|
1337
|
+
//
|
|
1338
|
+
//
|
|
1339
|
+
//
|
|
1340
|
+
//
|
|
1341
|
+
//
|
|
1342
|
+
//
|
|
1343
|
+
//
|
|
1344
|
+
//
|
|
1345
|
+
//
|
|
1346
|
+
//
|
|
1347
|
+
//
|
|
1348
|
+
//
|
|
1349
|
+
//
|
|
1350
|
+
//
|
|
1351
|
+
//
|
|
1352
|
+
//
|
|
1353
|
+
//
|
|
1354
|
+
//
|
|
1355
|
+
//
|
|
1356
|
+
//
|
|
1357
|
+
//
|
|
1358
|
+
//
|
|
1359
|
+
//
|
|
1360
|
+
//
|
|
1361
|
+
//
|
|
1362
|
+
//
|
|
1363
|
+
//
|
|
1364
|
+
//
|
|
1365
|
+
//
|
|
1366
|
+
//
|
|
1367
|
+
//
|
|
1368
|
+
//
|
|
1369
|
+
//
|
|
1370
|
+
//
|
|
1371
|
+
//
|
|
1372
|
+
//
|
|
1373
|
+
//
|
|
1374
|
+
//
|
|
1375
|
+
//
|
|
1376
|
+
//
|
|
1377
|
+
//
|
|
1378
|
+
//
|
|
1379
|
+
//
|
|
1380
|
+
//
|
|
1381
|
+
//
|
|
1382
|
+
//
|
|
1383
|
+
//
|
|
1384
|
+
//
|
|
1385
|
+
//
|
|
1386
|
+
//
|
|
1387
|
+
//
|
|
1388
|
+
//
|
|
1389
|
+
//
|
|
1390
|
+
//
|
|
1391
|
+
//
|
|
1392
|
+
//
|
|
1393
|
+
//
|
|
1394
|
+
//
|
|
1395
|
+
//
|
|
1396
|
+
//
|
|
1397
|
+
//
|
|
1398
|
+
//
|
|
1399
|
+
//
|
|
1400
|
+
//
|
|
1401
|
+
//
|
|
1402
|
+
//
|
|
1403
|
+
//
|
|
1404
|
+
//
|
|
1405
|
+
//
|
|
1406
|
+
//
|
|
1407
|
+
//
|
|
1408
|
+
|
|
1409
|
+
/* harmony default export */ var CustomCardvue_type_script_lang_js = ({
|
|
1410
|
+
name: 'CustomCard',
|
|
1411
|
+
props: {
|
|
1412
|
+
value: {
|
|
1413
|
+
type: Array,
|
|
1414
|
+
default: function _default() {
|
|
1415
|
+
return [];
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
tHead: {
|
|
1419
|
+
type: Array,
|
|
1420
|
+
default: function _default() {
|
|
1421
|
+
return [];
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
optionData: {
|
|
1425
|
+
type: Object,
|
|
1426
|
+
default: function _default() {
|
|
1427
|
+
return {};
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
disabled: {
|
|
1431
|
+
type: Boolean,
|
|
1432
|
+
default: false
|
|
1433
|
+
},
|
|
1434
|
+
readonly: {
|
|
1435
|
+
type: Boolean,
|
|
1436
|
+
default: false
|
|
1437
|
+
},
|
|
1438
|
+
editable: {
|
|
1439
|
+
type: Boolean,
|
|
1440
|
+
default: false
|
|
1441
|
+
},
|
|
1442
|
+
maxCount: {
|
|
1443
|
+
type: Number,
|
|
1444
|
+
default: 0
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
data: function data() {
|
|
1448
|
+
return {
|
|
1449
|
+
cardList: [],
|
|
1450
|
+
isInternalUpdate: false
|
|
1451
|
+
};
|
|
1452
|
+
},
|
|
1453
|
+
|
|
1454
|
+
watch: {
|
|
1455
|
+
value: {
|
|
1456
|
+
handler: function handler(val) {
|
|
1457
|
+
var _this = this;
|
|
1458
|
+
|
|
1459
|
+
this.isInternalUpdate = true;
|
|
1460
|
+
if (val && Array.isArray(val)) {
|
|
1461
|
+
this.cardList = JSON.parse(JSON.stringify(val));
|
|
1462
|
+
} else {
|
|
1463
|
+
this.cardList = [];
|
|
1464
|
+
}
|
|
1465
|
+
this.$nextTick(function () {
|
|
1466
|
+
_this.isInternalUpdate = false;
|
|
1467
|
+
});
|
|
1468
|
+
},
|
|
1469
|
+
|
|
1470
|
+
immediate: true,
|
|
1471
|
+
deep: true
|
|
1472
|
+
},
|
|
1473
|
+
cardList: {
|
|
1474
|
+
handler: function handler(val) {
|
|
1475
|
+
if (!this.isInternalUpdate) {
|
|
1476
|
+
this.$emit('input', val);
|
|
1477
|
+
this.$emit('change', val);
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
|
|
1481
|
+
deep: true
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
methods: {
|
|
1485
|
+
getOptions: function getOptions(fieldName) {
|
|
1486
|
+
return this.optionData[fieldName].map(function (ele) {
|
|
1487
|
+
return { name: ele, value: ele };
|
|
1488
|
+
}) || [];
|
|
1489
|
+
},
|
|
1490
|
+
handleAdd: function handleAdd() {
|
|
1491
|
+
if (this.maxCount > 0 && this.cardList.length >= this.maxCount) {
|
|
1492
|
+
this.$toast('\u6700\u591A\u53EA\u80FD\u6DFB\u52A0' + this.maxCount + '\u6761');
|
|
1493
|
+
return;
|
|
1494
|
+
}
|
|
1495
|
+
var newCard = {};
|
|
1496
|
+
this.tHead.forEach(function (field) {
|
|
1497
|
+
newCard[field.key] = field.defaultValue !== undefined && field.defaultValue != '' ? field.defaultValue : field.type === 'checkbox' ? [] : '';
|
|
1498
|
+
});
|
|
1499
|
+
console.log('newCard', newCard);
|
|
1500
|
+
this.cardList.push(newCard);
|
|
1501
|
+
this.$emit('add', newCard, this.cardList.length - 1);
|
|
1502
|
+
},
|
|
1503
|
+
handleDelete: function handleDelete(index) {
|
|
1504
|
+
var _this2 = this;
|
|
1505
|
+
|
|
1506
|
+
this.$dialog.confirm({
|
|
1507
|
+
title: '提示',
|
|
1508
|
+
message: '确定要删除这条数据吗?'
|
|
1509
|
+
}).then(function () {
|
|
1510
|
+
_this2.cardList.splice(index, 1);
|
|
1511
|
+
_this2.$emit('delete', index);
|
|
1512
|
+
}).catch(function () {});
|
|
1513
|
+
},
|
|
1514
|
+
updateParentData: function updateParentData() {
|
|
1515
|
+
this.$emit('input', this.cardList);
|
|
1516
|
+
this.$emit('change', this.cardList);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
});
|
|
1520
|
+
// CONCATENATED MODULE: ./packages/form/src/CustomCard.vue?vue&type=script&lang=js
|
|
1521
|
+
/* harmony default export */ var src_CustomCardvue_type_script_lang_js = (CustomCardvue_type_script_lang_js);
|
|
1522
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1523
|
+
var componentNormalizer = __webpack_require__(2);
|
|
1524
|
+
|
|
1525
|
+
// CONCATENATED MODULE: ./packages/form/src/CustomCard.vue
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
/* normalize component */
|
|
1532
|
+
|
|
1533
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
1534
|
+
src_CustomCardvue_type_script_lang_js,
|
|
1535
|
+
CustomCardvue_type_template_id_a568ae9a_render,
|
|
1536
|
+
CustomCardvue_type_template_id_a568ae9a_staticRenderFns,
|
|
1537
|
+
false,
|
|
1538
|
+
null,
|
|
1539
|
+
null,
|
|
1540
|
+
null
|
|
1541
|
+
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1544
|
+
/* harmony default export */ var CustomCard = (component.exports);
|
|
1211
1545
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=script&lang=js
|
|
1212
1546
|
//
|
|
1213
1547
|
//
|
|
@@ -1646,6 +1980,18 @@ render._withStripped = true
|
|
|
1646
1980
|
//
|
|
1647
1981
|
//
|
|
1648
1982
|
//
|
|
1983
|
+
//
|
|
1984
|
+
//
|
|
1985
|
+
//
|
|
1986
|
+
//
|
|
1987
|
+
//
|
|
1988
|
+
//
|
|
1989
|
+
//
|
|
1990
|
+
//
|
|
1991
|
+
//
|
|
1992
|
+
//
|
|
1993
|
+
//
|
|
1994
|
+
|
|
1649
1995
|
|
|
1650
1996
|
/* harmony default export */ var mainvue_type_script_lang_js = ({
|
|
1651
1997
|
name: 'EmForm',
|
|
@@ -1681,6 +2027,7 @@ render._withStripped = true
|
|
|
1681
2027
|
default: 'left'
|
|
1682
2028
|
}
|
|
1683
2029
|
},
|
|
2030
|
+
components: { CustomCard: CustomCard },
|
|
1684
2031
|
computed: {
|
|
1685
2032
|
btnList: function btnList() {
|
|
1686
2033
|
return this.contents.filter(function (x) {
|
|
@@ -1762,9 +2109,6 @@ render._withStripped = true
|
|
|
1762
2109
|
});
|
|
1763
2110
|
// CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=script&lang=js
|
|
1764
2111
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
1765
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1766
|
-
var componentNormalizer = __webpack_require__(2);
|
|
1767
|
-
|
|
1768
2112
|
// CONCATENATED MODULE: ./packages/form/src/main.vue
|
|
1769
2113
|
|
|
1770
2114
|
|
|
@@ -1773,7 +2117,7 @@ var componentNormalizer = __webpack_require__(2);
|
|
|
1773
2117
|
|
|
1774
2118
|
/* normalize component */
|
|
1775
2119
|
|
|
1776
|
-
var
|
|
2120
|
+
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
1777
2121
|
src_mainvue_type_script_lang_js,
|
|
1778
2122
|
render,
|
|
1779
2123
|
staticRenderFns,
|
|
@@ -1784,7 +2128,7 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
1784
2128
|
|
|
1785
2129
|
)
|
|
1786
2130
|
|
|
1787
|
-
/* harmony default export */ var main = (
|
|
2131
|
+
/* harmony default export */ var main = (main_component.exports);
|
|
1788
2132
|
// CONCATENATED MODULE: ./packages/form/index.js
|
|
1789
2133
|
|
|
1790
2134
|
|
|
@@ -1794,6 +2138,111 @@ main.install = function (Vue) {
|
|
|
1794
2138
|
|
|
1795
2139
|
/* harmony default export */ var packages_form = __webpack_exports__["default"] = (main);
|
|
1796
2140
|
|
|
2141
|
+
/***/ }),
|
|
2142
|
+
|
|
2143
|
+
/***/ 2:
|
|
2144
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2145
|
+
|
|
2146
|
+
"use strict";
|
|
2147
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
2148
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
2149
|
+
|
|
2150
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
2151
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
2152
|
+
// be included in the final webpack user bundle.
|
|
2153
|
+
|
|
2154
|
+
function normalizeComponent(
|
|
2155
|
+
scriptExports,
|
|
2156
|
+
render,
|
|
2157
|
+
staticRenderFns,
|
|
2158
|
+
functionalTemplate,
|
|
2159
|
+
injectStyles,
|
|
2160
|
+
scopeId,
|
|
2161
|
+
moduleIdentifier /* server only */,
|
|
2162
|
+
shadowMode /* vue-cli only */
|
|
2163
|
+
) {
|
|
2164
|
+
// Vue.extend constructor export interop
|
|
2165
|
+
var options =
|
|
2166
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
2167
|
+
|
|
2168
|
+
// render functions
|
|
2169
|
+
if (render) {
|
|
2170
|
+
options.render = render
|
|
2171
|
+
options.staticRenderFns = staticRenderFns
|
|
2172
|
+
options._compiled = true
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
// functional template
|
|
2176
|
+
if (functionalTemplate) {
|
|
2177
|
+
options.functional = true
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
// scopedId
|
|
2181
|
+
if (scopeId) {
|
|
2182
|
+
options._scopeId = 'data-v-' + scopeId
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
var hook
|
|
2186
|
+
if (moduleIdentifier) {
|
|
2187
|
+
// server build
|
|
2188
|
+
hook = function (context) {
|
|
2189
|
+
// 2.3 injection
|
|
2190
|
+
context =
|
|
2191
|
+
context || // cached call
|
|
2192
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
2193
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
2194
|
+
// 2.2 with runInNewContext: true
|
|
2195
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
2196
|
+
context = __VUE_SSR_CONTEXT__
|
|
2197
|
+
}
|
|
2198
|
+
// inject component styles
|
|
2199
|
+
if (injectStyles) {
|
|
2200
|
+
injectStyles.call(this, context)
|
|
2201
|
+
}
|
|
2202
|
+
// register component module identifier for async chunk inferrence
|
|
2203
|
+
if (context && context._registeredComponents) {
|
|
2204
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
// used by ssr in case component is cached and beforeCreate
|
|
2208
|
+
// never gets called
|
|
2209
|
+
options._ssrRegister = hook
|
|
2210
|
+
} else if (injectStyles) {
|
|
2211
|
+
hook = shadowMode
|
|
2212
|
+
? function () {
|
|
2213
|
+
injectStyles.call(
|
|
2214
|
+
this,
|
|
2215
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
2216
|
+
)
|
|
2217
|
+
}
|
|
2218
|
+
: injectStyles
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
if (hook) {
|
|
2222
|
+
if (options.functional) {
|
|
2223
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
2224
|
+
// go through the normalizer
|
|
2225
|
+
options._injectStyles = hook
|
|
2226
|
+
// register for functional component in vue file
|
|
2227
|
+
var originalRender = options.render
|
|
2228
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
2229
|
+
hook.call(context)
|
|
2230
|
+
return originalRender(h, context)
|
|
2231
|
+
}
|
|
2232
|
+
} else {
|
|
2233
|
+
// inject component registration as beforeCreate hook
|
|
2234
|
+
var existing = options.beforeCreate
|
|
2235
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
return {
|
|
2240
|
+
exports: scriptExports,
|
|
2241
|
+
options: options
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
|
|
1797
2246
|
/***/ })
|
|
1798
2247
|
|
|
1799
2248
|
/******/ });
|