jsy-avue 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +16 -19
- package/lib/avue.js +131 -131
- package/lib/avue.min.js +4 -4
- package/package.json +1 -1
package/lib/avue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
*
|
3
|
-
* (c) 2017-2024
|
2
|
+
* @bellacocool/avue.js v0.1.0
|
3
|
+
* (c) 2017-2024 xuexingwei
|
4
4
|
* Released under the MIT License.
|
5
5
|
*
|
6
6
|
*/
|
@@ -110,7 +110,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
110
110
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
111
111
|
|
112
112
|
"use strict";
|
113
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n data
|
113
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n data() {\n return {\n opt: {},\n disabled: false,\n callback: null,\n visible: false,\n dialog: {\n closeOnClickModal: false\n },\n isDrawer: false,\n option: {\n submitText: '提交',\n emptyText: '关闭',\n submitIcon: 'el-icon-check',\n emptyIcon: 'el-icon-close',\n column: []\n },\n data: {}\n };\n },\n computed: {\n dialogType() {\n return this.isDrawer ? 'elDrawer' : 'elDialog';\n },\n menuPosition() {\n return this.opt.menuPosition || 'center';\n }\n },\n methods: {\n submit() {\n this.$refs.form.submit();\n },\n reset() {\n this.$refs.form.resetForm();\n },\n beforeClose(done) {\n done();\n this.close();\n },\n show(opt) {\n this.opt = opt;\n this.callback = opt.callback;\n let dialog = this.deepClone(opt);\n ['callback', 'option', 'data'].forEach(ele => delete dialog[ele]);\n this.dialog = Object.assign(this.dialog, dialog);\n this.dialog.size = this.dialog.width;\n this.isDrawer = this.dialog.type === 'drawer';\n this.option = Object.assign(this.option, opt.option);\n this.data = opt.data;\n this.visible = true;\n },\n close() {\n const callback = () => {\n this.visible = false;\n this.$destroy();\n this.$el.remove();\n };\n if (typeof this.dialog.beforeClose === 'function') {\n this.dialog.beforeClose(callback);\n } else {\n callback();\n }\n },\n handleSubmit(data, done) {\n this.callback && this.callback({\n data: data,\n close: this.close,\n done: done\n });\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/dialog-form/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
114
114
|
|
115
115
|
/***/ }),
|
116
116
|
|
@@ -122,7 +122,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
122
122
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
123
123
|
|
124
124
|
"use strict";
|
125
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'form-temp',\n mixins: [core_slot__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n value: {},\n uploadBefore: Function,\n uploadDelete: Function,\n uploadAfter: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n boxType: String,\n columnSlot: {\n type: Array,\n
|
125
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'form-temp',\n mixins: [core_slot__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n value: {},\n uploadBefore: Function,\n uploadDelete: Function,\n uploadAfter: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n boxType: String,\n columnSlot: {\n type: Array,\n default: () => {\n return [];\n }\n },\n tableData: {\n type: Object,\n default: () => {\n return {};\n }\n },\n clearable: {\n type: Boolean\n },\n enter: {\n type: Boolean,\n default: false\n },\n type: {\n type: String\n },\n propsHttp: {\n type: Object,\n default: () => {\n return {};\n }\n },\n props: {\n type: Object\n },\n dic: {\n type: Array\n },\n placeholder: {\n type: String\n },\n size: {\n type: String\n },\n disabled: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n column: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n computed: {\n params() {\n return this.column.params || {};\n },\n event() {\n return this.column.event || {};\n },\n text: {\n get() {\n return this.value;\n },\n set(val) {\n this.$emit('input', val);\n this.$emit('change', val);\n }\n }\n },\n methods: {\n getComponent: core_dataformat__WEBPACK_IMPORTED_MODULE_0__[\"getComponent\"],\n getPlaceholder: core_dataformat__WEBPACK_IMPORTED_MODULE_0__[\"getPlaceholder\"],\n enterChange() {\n if (typeof this.column.enter === 'function') {\n this.column.enter({\n value: this.text,\n column: this.column\n });\n } else if (this.enter) {\n this.$emit('enter');\n }\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/form/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
126
126
|
|
127
127
|
/***/ }),
|
128
128
|
|
@@ -134,7 +134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
134
134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
135
135
|
|
136
136
|
"use strict";
|
137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'icon-temp',\n props: {\n small: Boolean,\n text: {\n type: String,\n
|
137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'icon-temp',\n props: {\n small: Boolean,\n text: {\n type: String,\n default: ''\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/icon/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
138
138
|
|
139
139
|
/***/ }),
|
140
140
|
|
@@ -146,7 +146,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
146
146
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
147
147
|
|
148
148
|
"use strict";
|
149
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var vue_cropper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-cropper */ \"./node_modules/.store/vue-cropper@0.5.11/node_modules/vue-cropper/dist/index.js\");\n/* harmony import */ var vue_cropper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue_cropper__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CropperImage\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n components: {\n VueCropper: vue_cropper__WEBPACK_IMPORTED_MODULE_2__[\"VueCropper\"]\n },\n data
|
149
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var vue_cropper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-cropper */ \"./node_modules/.store/vue-cropper@0.5.11/node_modules/vue-cropper/dist/index.js\");\n/* harmony import */ var vue_cropper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue_cropper__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CropperImage\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n components: {\n VueCropper: vue_cropper__WEBPACK_IMPORTED_MODULE_2__[\"VueCropper\"]\n },\n data() {\n return {\n visible: false,\n previews: {},\n option: {}\n };\n },\n methods: {\n show() {\n this.visible = true;\n },\n //图片缩放\n changeScale(num) {\n num = num || 1;\n this.$refs.cropper.changeScale(num);\n },\n //向左旋转\n rotateLeft() {\n this.$refs.cropper.rotateLeft();\n },\n //向右旋转\n rotateRight() {\n this.$refs.cropper.rotateRight();\n },\n //实时预览函数\n realTime(data) {\n this.previews = data;\n },\n submit() {\n this.visible = false;\n this.$refs.cropper.getCropData(data => {\n let result = data;\n if (this.option.type === 'file') {\n result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"dataURLtoFile\"])(data, `${new Date().getTime()}.${this.option.outputType}`);\n }\n this.option.callback && this.option.callback(result);\n });\n },\n cancel(done) {\n done && done();\n this.visible = false;\n this.option.cancel && this.option.cancel();\n if (typeof this.option.beforeClose == \"function\") {\n this.option.beforeClose();\n }\n this.$destroy();\n this.$el.remove();\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/image-cropper/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
150
150
|
|
151
151
|
/***/ }),
|
152
152
|
|
@@ -158,7 +158,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
158
158
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
159
159
|
|
160
160
|
"use strict";
|
161
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"image-preview\",\n data
|
161
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"image-preview\",\n data() {\n return {\n left: 0,\n top: 0,\n scale: 1,\n datas: [],\n rotate: 0,\n isShow: false,\n index: 0,\n isFile: false\n };\n },\n computed: {\n styleBoxName() {\n return {\n marginLeft: this.setPx(this.left),\n marginTop: this.setPx(this.top)\n };\n },\n styleName() {\n return {\n transform: `scale(${this.scale}) rotate(${this.rotate}deg)`,\n maxWidth: '100%',\n maxHeight: '100%'\n };\n },\n isRrrow() {\n return this.datas.length > 1;\n }\n },\n methods: {\n getName(url) {\n return url.substring(url.lastIndexOf('/') + 1);\n },\n handlePrint() {\n this.$Print(`#avue-image-preview__${this.index}`);\n },\n handlePrev() {\n this.$refs.carousel.prev();\n this.index = this.$refs.carousel.activeIndex;\n this.stopItem();\n },\n handleNext() {\n this.$refs.carousel.next();\n this.index = this.$refs.carousel.activeIndex;\n this.stopItem();\n },\n stopItem() {\n this.left = 0;\n this.top = 0;\n this.$refs.item.forEach(ele => {\n ele.pause && ele.pause();\n });\n },\n isMediaType(item) {\n let url = item.url;\n let type = item.type;\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"isMediaType\"])(item.url, item.type);\n },\n subScale() {\n if (this.scale != 0.2) {\n this.scale = parseFloat((this.scale - 0.2).toFixed(2));\n }\n },\n addScale() {\n this.scale = parseFloat((this.scale + 0.2).toFixed(2));\n },\n handleChange() {\n this.scale = 1;\n this.rotate = 0;\n },\n move(e) {\n //获取目标元素s\n //算出鼠标相对元素的位置\n let disX = e.clientX;\n let disY = e.clientY;\n let scale = 2;\n document.onmousemove = e => {\n //鼠标按下并移动的事件\n //用鼠标的位置减去鼠标相对元素的位置,得到元素的位置\n let left = e.clientX - disX;\n let top = e.clientY - disY;\n disX = e.clientX;\n disY = e.clientY;\n //移动当前元素\n this.left = this.left + left * scale;\n this.top = this.top + top * scale;\n };\n document.onmouseup = e => {\n document.onmousemove = null;\n document.onmouseup = null;\n };\n },\n handleClick(item, index, df = false) {\n if (typeof this.ops.click == \"function\") {\n this.ops.click(item, index);\n } else if (df) {\n window.open(item.url);\n }\n },\n open() {\n this.isShow = true;\n this.$nextTick(() => {\n this.$refs.item.forEach((ele, index) => {\n this.$refs.item[index].onwheel = e => {\n if (e.wheelDelta > 0) {\n this.addScale();\n } else {\n this.subScale();\n }\n };\n });\n });\n },\n close() {\n this.isShow = false;\n if (typeof this.ops.beforeClose == \"function\") {\n this.ops.beforeClose(this.datas, this.index);\n }\n this.$destroy();\n this.$el.remove();\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/core/components/image-preview/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
162
162
|
|
163
163
|
/***/ }),
|
164
164
|
|
@@ -170,7 +170,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var util
|
|
170
170
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
171
171
|
|
172
172
|
"use strict";
|
173
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-box\",\n data
|
173
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-box\",\n data() {\n return {};\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 8;\n },\n data() {\n return this.option.data || [];\n }\n },\n created() {},\n mounted() {},\n watch: {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/box/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
174
174
|
|
175
175
|
/***/ }),
|
176
176
|
|
@@ -182,7 +182,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
182
182
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
183
183
|
|
184
184
|
"use strict";
|
185
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-card\",\n data
|
185
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-card\",\n data() {\n return {};\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n computed: {\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n },\n colorText() {\n return this.option.colorText || \"#fff\";\n },\n bgText() {\n return this.option.bgText || \"#2e323f\";\n },\n borderColor() {\n return this.option.borderColor || \"#2e323f\";\n }\n },\n created() {},\n mounted() {},\n watch: {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/card/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
186
186
|
|
187
187
|
/***/ }),
|
188
188
|
|
@@ -194,7 +194,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
194
194
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
195
195
|
|
196
196
|
"use strict";
|
197
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-cardtext\",\n data
|
197
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-cardtext\",\n data() {\n return {};\n },\n computed: {\n icon() {\n return this.option.icon;\n },\n color() {\n return this.option.color || \"#333\";\n },\n span() {\n return this.option.span || 8;\n },\n data() {\n return this.option.data || [];\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/cardText/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
198
198
|
|
199
199
|
/***/ }),
|
200
200
|
|
@@ -206,7 +206,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
206
206
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
207
207
|
|
208
208
|
"use strict";
|
209
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-display\",\n data
|
209
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-display\",\n data() {\n return {};\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n },\n color() {\n return this.option.color || \"rgb(63, 161, 255)\";\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n created() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/display/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
210
210
|
|
211
211
|
/***/ }),
|
212
212
|
|
@@ -218,7 +218,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
218
218
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
219
219
|
|
220
220
|
"use strict";
|
221
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-icons\",\n data
|
221
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-icons\",\n data() {\n return {};\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 4;\n },\n data() {\n return this.option.data;\n },\n color() {\n return this.option.color || \"rgb(63, 161, 255)\";\n },\n discount() {\n return this.option.discount || false;\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/icons/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
222
222
|
|
223
223
|
/***/ }),
|
224
224
|
|
@@ -230,7 +230,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
230
230
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
231
231
|
|
232
232
|
"use strict";
|
233
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-imgtext\",\n data
|
233
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-imgtext\",\n data() {\n return {};\n },\n computed: {\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n },\n color() {\n return this.option.color || \"rgb(63, 161, 255)\";\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n created() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/imgText/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
234
234
|
|
235
235
|
/***/ }),
|
236
236
|
|
@@ -242,7 +242,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
242
242
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
243
243
|
|
244
244
|
"use strict";
|
245
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-operatext\",\n data
|
245
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-operatext\",\n data() {\n return {};\n },\n computed: {\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n created() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/operaText/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
246
246
|
|
247
247
|
/***/ }),
|
248
248
|
|
@@ -254,7 +254,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
254
254
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
255
255
|
|
256
256
|
"use strict";
|
257
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-panel\",\n data
|
257
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-panel\",\n data() {\n return {};\n },\n computed: {\n decimals() {\n return this.option.decimals || 0;\n },\n animation() {\n return this.option.animation;\n },\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n created() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/panel/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
258
258
|
|
259
259
|
/***/ }),
|
260
260
|
|
@@ -266,7 +266,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
266
266
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
267
267
|
|
268
268
|
"use strict";
|
269
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-pay\",\n props: {\n option: {\n type: Object,\n
|
269
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-pay\",\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data || [];\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/pay/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
270
270
|
|
271
271
|
/***/ }),
|
272
272
|
|
@@ -278,7 +278,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
278
278
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
279
279
|
|
280
280
|
"use strict";
|
281
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-price\",\n data
|
281
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-price\",\n data() {\n return {};\n },\n computed: {\n span() {\n return this.option.span || 6;\n },\n data() {\n return this.option.data;\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/price/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
282
282
|
|
283
283
|
/***/ }),
|
284
284
|
|
@@ -290,7 +290,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
290
290
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
291
291
|
|
292
292
|
"use strict";
|
293
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-progress\",\n data
|
293
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-progress\",\n data() {\n return {};\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 8;\n },\n data() {\n return this.option.data || [];\n }\n },\n created() {},\n mounted() {},\n watch: {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/progress/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
294
294
|
|
295
295
|
/***/ }),
|
296
296
|
|
@@ -302,7 +302,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
302
302
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
303
303
|
|
304
304
|
"use strict";
|
305
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-rotate\",\n data
|
305
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-rotate\",\n data() {\n return {};\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 8;\n },\n data() {\n return this.option.data || [];\n }\n },\n created() {},\n mounted() {},\n watch: {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/rotate/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
306
306
|
|
307
307
|
/***/ }),
|
308
308
|
|
@@ -314,7 +314,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
314
314
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
315
315
|
|
316
316
|
"use strict";
|
317
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-tabs\",\n data
|
317
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"data-tabs\",\n data() {\n return {};\n },\n computed: {\n animation() {\n return this.option.animation;\n },\n decimals() {\n return this.option.decimals || 0;\n },\n span() {\n return this.option.span || 8;\n },\n data() {\n return this.option.data || [];\n }\n },\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/data/tabs/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
318
318
|
|
319
319
|
/***/ }),
|
320
320
|
|
@@ -326,7 +326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
326
326
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
327
327
|
|
328
328
|
"use strict";
|
329
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"affix\",\n props: {\n target: String,\n offsetTop: {\n type: Number,\n
|
329
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"affix\",\n props: {\n target: String,\n offsetTop: {\n type: Number,\n default: 0\n },\n offsetBottom: {\n type: Number\n }\n },\n data() {\n return {\n container: null,\n affix: false,\n styles: {},\n slot: false,\n slotStyle: {}\n };\n },\n computed: {\n offsetType() {\n let type = \"top\";\n if (this.offsetBottom >= 0) {\n type = \"bottom\";\n }\n return type;\n }\n },\n mounted() {\n if (this.target) {\n this.container = document.querySelector(this.target);\n } else {\n this.container = document;\n }\n this.container.addEventListener(\"scroll\", this.handleScroll, false);\n this.container.addEventListener(\"resize\", this.handleScroll, false);\n },\n methods: {\n getScroll(target, top) {\n const prop = top ? \"pageYOffset\" : \"pageXOffset\";\n const method = top ? \"scrollTop\" : \"scrollLeft\";\n let ret = target[prop];\n if (typeof ret !== \"number\") {\n ret = document.documentElement[method];\n }\n return ret;\n },\n getOffset(element) {\n const rect = element.getBoundingClientRect();\n const scrollTop = this.getScroll(this.container, true);\n const scrollLeft = this.getScroll(this.container);\n const docEl = document.body;\n const clientTop = docEl.clientTop || 0;\n const clientLeft = docEl.clientLeft || 0;\n return {\n top: rect.top + scrollTop - clientTop,\n left: rect.left + scrollLeft - clientLeft\n };\n },\n handleScroll() {\n const affix = this.affix;\n const scrollTop = this.getScroll(this.container, true);\n const elOffset = this.getOffset(this.$el);\n const windowHeight = this.container.innerHeight;\n const elHeight = this.$el.getElementsByTagName('div')[0].offsetHeight;\n if (elOffset.top - this.offsetTop < scrollTop && this.offsetType == 'top' && !affix) {\n this.affix = true;\n this.slotStyle = {\n width: this.$refs.point.clientWidth + 'px',\n height: this.$refs.point.clientHeight + 'px'\n };\n this.slot = true;\n this.styles = {\n top: `${this.offsetTop}px`,\n left: `${elOffset.left}px`,\n width: `${this.$el.offsetWidth}px`\n };\n this.$emit('on-change', true);\n } else if (elOffset.top - this.offsetTop > scrollTop && this.offsetType == 'top' && affix) {\n this.slot = false;\n this.slotStyle = {};\n this.affix = false;\n this.styles = null;\n this.$emit('on-change', false);\n }\n if (elOffset.top + this.offsetBottom + elHeight > scrollTop + windowHeight && this.offsetType == 'bottom' && !affix) {\n this.affix = true;\n this.styles = {\n bottom: `${this.offsetBottom}px`,\n left: `${elOffset.left}px`,\n width: `${this.$el.offsetWidth}px`\n };\n this.$emit('on-change', true);\n } else if (elOffset.top + this.offsetBottom + elHeight < scrollTop + windowHeight && this.offsetType == 'bottom' && affix) {\n this.affix = false;\n this.styles = null;\n this.$emit('on-change', false);\n }\n }\n },\n beforeDestroy() {\n this.container.removeEventListener(\"scroll\", this.handleScroll, false);\n this.container.removeEventListener(\"resize\", this.handleScroll, false);\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/affix/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
330
330
|
|
331
331
|
/***/ }),
|
332
332
|
|
@@ -338,7 +338,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
338
338
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
339
339
|
|
340
340
|
"use strict";
|
341
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'array',\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n computed: {\n isLimit
|
341
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'array',\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n computed: {\n isLimit() {\n if (this.validatenull(this.limit)) return false;else if (this.textLen >= this.limit) return true;\n return false;\n },\n textLen() {\n return this.text.length;\n },\n isImg() {\n return this.type === 'img';\n },\n isUrl() {\n return this.type === 'url';\n }\n },\n props: {\n fileType: String,\n alone: Boolean,\n type: String,\n limit: Number\n },\n methods: {\n isMediaType(item) {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"isMediaType\"])(item, this.fileType);\n },\n add(index) {\n this.text.splice(index + 1, 0, '');\n },\n remove(index) {\n this.text.splice(index, 1);\n },\n openImg(index) {\n const list = this.text.map(ele => {\n return {\n thumbUrl: ele,\n url: ele,\n type: this.fileType\n };\n });\n this.$ImagePreview(list, index);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/array/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
342
342
|
|
343
343
|
/***/ }),
|
344
344
|
|
@@ -350,7 +350,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
350
350
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
351
351
|
|
352
352
|
"use strict";
|
353
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\
|
353
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\nconst propsDefault = {\n title: \"title\",\n meta: \"meta\",\n lead: \"lead\",\n body: \"body\"\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"article\",\n props: {\n data: {\n type: Object,\n default: () => {\n return {};\n }\n },\n props: {\n type: Object,\n default: () => {\n return propsDefault;\n }\n }\n },\n computed: {\n titleKey() {\n return this.props.title || propsDefault.title;\n },\n metaKey() {\n return this.props.meta || propsDefault.meta;\n },\n leadKey() {\n return this.props.lead || propsDefault.lead;\n },\n bodyKey() {\n return this.props.body || propsDefault.body;\n },\n title() {\n return this.data[this.titleKey];\n },\n meta() {\n return this.data[this.metaKey];\n },\n lead() {\n return this.data[this.leadKey];\n },\n body() {\n return this.data[this.bodyKey];\n }\n },\n mounted() {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/article/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
354
354
|
|
355
355
|
/***/ }),
|
356
356
|
|
@@ -362,7 +362,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
362
362
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
363
363
|
|
364
364
|
"use strict";
|
365
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\
|
365
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\nconst prefixCls = \"avue-avatar\";\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"avatar\",\n props: {\n src: String,\n shape: {\n validator: val => [\"circle\", \"square\"].includes(val),\n default: \"circle\"\n },\n shape: String,\n size: {\n validator: val => {\n return typeof val === \"number\" || [\"small\", \"large\", \"default\"].includes(val);\n },\n default: \"default\"\n },\n icon: String\n },\n data() {\n return {\n scale: 1\n };\n },\n updated() {\n this.$nextTick(() => {\n this.setScale();\n });\n },\n computed: {\n sizeChildrenStyle() {\n let childrenStyle = {};\n const childrenNode = this.$refs.avatarChildren;\n const transformString = `scale(${this.scale}) translateX(-50%)`;\n childrenStyle = {\n msTransform: transformString,\n WebkitTransform: transformString,\n transform: transformString\n };\n if (typeof size === \"number\") {\n childrenStyle.lineHeight = `${this.size}px`;\n }\n return childrenStyle;\n },\n sizeCls() {\n return {\n [`${prefixCls}--${this.shape}`]: this.shape,\n [`${prefixCls}--lg`]: this.size === \"large\",\n [`${prefixCls}--sm`]: this.size === \"small\"\n };\n },\n sizeStyle() {\n return typeof this.size === \"number\" ? {\n width: `${this.size}px`,\n height: `${this.size}px`,\n lineHeight: `${this.size}px`,\n fontSize: this.icon ? `${this.size / 2}px` : \"18px\"\n } : {};\n }\n },\n mounted() {\n this.$nextTick(() => {\n this.setScale();\n });\n },\n methods: {\n setScale() {\n const childrenNode = this.$refs.avatarChildren;\n if (childrenNode) {\n const childrenWidth = childrenNode.offsetWidth;\n const avatarWidth = this.$el.getBoundingClientRect().width;\n if (avatarWidth - 8 < childrenWidth) {\n this.scale = (avatarWidth - 8) / childrenWidth;\n } else {\n this.scale = 1;\n }\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/avatar/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
366
366
|
|
367
367
|
/***/ }),
|
368
368
|
|
@@ -374,7 +374,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
374
374
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
375
375
|
|
376
376
|
"use strict";
|
377
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\
|
377
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\nconst propsDefault = {\n img: \"img\",\n title: \"title\",\n info: \"info\"\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"card\",\n props: {\n props: {\n type: Object,\n default: () => {\n return propsDefault;\n }\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n },\n data: {\n type: Array,\n default: () => {\n return [];\n }\n }\n },\n data() {\n return {\n propsDefault: propsDefault\n };\n },\n computed: {\n imgKey: function () {\n return this.option.props.img || this.propsDefault.img;\n },\n titleKey: function () {\n return this.option.props.title || this.propsDefault.title;\n },\n infoKey: function () {\n return this.option.props.info || this.propsDefault.info;\n },\n span() {\n return this.option.span || 8;\n },\n gutter() {\n return this.option.gutter || 20;\n }\n },\n methods: {\n rowAdd() {\n this.$emit(\"row-add\");\n },\n rowClick(row, index) {\n this.$emit(\"row-click\", row, index);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/card/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
378
378
|
|
379
379
|
/***/ }),
|
380
380
|
|
@@ -386,7 +386,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
386
386
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
387
387
|
|
388
388
|
"use strict";
|
389
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"cascader\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n checkStrictly: {\n type: Boolean,\n
|
389
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"cascader\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n checkStrictly: {\n type: Boolean,\n default: false\n },\n emitPath: {\n type: Boolean,\n default: true\n },\n tags: {\n type: Boolean,\n default: false\n },\n expandTrigger: {\n type: String,\n default: \"hover\"\n },\n showAllLevels: {\n type: Boolean,\n default: true\n },\n lazy: {\n type: Boolean,\n default: false\n },\n lazyLoad: Function,\n filterable: {\n type: Boolean,\n default: false\n },\n separator: {\n type: String\n }\n },\n data() {\n return {};\n },\n computed: {\n allProps() {\n return {\n label: this.labelKey,\n value: this.valueKey,\n children: this.childrenKey,\n checkStrictly: this.checkStrictly,\n multiple: this.multiple,\n emitPath: this.emitPath,\n lazy: this.lazy,\n lazyLoad: (node, resolve) => {\n let callback = list => {\n let findDic = (list, value, children) => {\n list.forEach(ele => {\n if (ele[this.valueKey] == value) {\n ele[this.childrenKey] = children;\n } else if (ele[this.childrenKey]) {\n findDic(ele[this.childrenKey]);\n }\n });\n };\n findDic(this.dic, node[this.valueKey], list);\n resolve(list);\n };\n this.lazyLoad && this.lazyLoad(node, callback);\n },\n expandTrigger: this.expandTrigger\n };\n }\n },\n created() {},\n mounted() {},\n methods: {\n handleValueChange(val) {\n setTimeout(() => {\n let $parent = this.$parent.$parent;\n if (!this.validatenull(val) && $parent && this.rules) {\n $parent.clearValidate && $parent.clearValidate();\n }\n });\n },\n getCheckedNodes(leafOnly = false) {\n return this.$refs.cascader.getCheckedNodes(leafOnly);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/cascader/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
390
390
|
|
391
391
|
/***/ }),
|
392
392
|
|
@@ -398,7 +398,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
398
398
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
399
399
|
|
400
400
|
"use strict";
|
401
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"chat\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n data: function data() {\n return {\n upload: {\n box: false,\n src: \"\",\n type: '',\n title: ''\n },\n visible: false,\n imgSrc: '',\n videoSrc: '',\n audioSrc: '',\n keys: \"\",\n show: false\n };\n },\n props: {\n beforeOpen: Function,\n tools: {\n type: Object,\n \"default\": function _default() {\n return {\n img: true,\n video: true,\n file: true\n };\n }\n },\n placeholder: {\n type: String,\n \"default\": '请输入...'\n },\n width: {\n type: [String, Number],\n \"default\": 320\n },\n height: {\n type: [String, Number],\n \"default\": 520\n },\n value: {\n type: String\n },\n notice: {\n type: Boolean,\n \"default\": true\n },\n audio: {\n type: Array,\n \"default\": function _default() {\n return ['https://www.helloweba.net/demo/notifysound/notify.ogg', 'https://www.helloweba.net/demo/notifysound/notify.mp3', 'https://www.helloweba.net/demo/notifysound/notify.wav'];\n }\n },\n config: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n keylist: {\n type: Array,\n \"default\": function _default() {\n return [];\n }\n },\n list: {\n type: Array,\n \"default\": function _default() {\n return [];\n }\n }\n },\n computed: {\n msg: {\n get: function get() {\n return this.value;\n },\n set: function set(val) {\n this.$emit('input', val);\n this.$emit('change', val);\n }\n },\n heightStyleName: function heightStyleName() {\n return {\n height: this.setPx(this.height)\n };\n },\n widthStyleName: function widthStyleName() {\n return {\n width: this.setPx(this.width)\n };\n },\n msgActive: function msgActive() {\n return !this.validatenull(this.msg.replace(/[\\r\\n]/g, \"\"));\n }\n },\n methods: {\n uploadSubmit: function uploadSubmit() {\n var _this = this;\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this.upload.box = false;\n _this.$emit('submit', _this.getDetail(_this.upload));\n }\n });\n },\n handleUpload: function handleUpload(type) {\n this.upload.type = type;\n this.upload.src = '';\n if (type === 'img') {\n this.upload.title = \"图片上传\";\n } else if (type === 'video') {\n this.upload.title = \"视频上传\";\n } else if (type === 'file') {\n this.upload.title = \"文件上传\";\n }\n this.upload.box = true;\n },\n handleClose: function handleClose(done) {\n this.imgSrc = undefined;\n this.videoSrc = undefined;\n this.audioSrc = undefined;\n done();\n },\n addKey: function addKey() {\n if (this.keys !== '') {\n this.$emit('keyadd', this.keys);\n this.keys = '';\n }\n this.visible = false;\n },\n sendKey: function sendKey(key) {\n this.$emit('keysend', key);\n },\n getAudio: function getAudio() {\n this.$refs.chatAudio.play();\n },\n getNotification: function getNotification(text) {\n var safe = this;\n var NotificationInstance = Notification || window.Notification;\n if (!!NotificationInstance) {\n var setPermission = function setPermission() {\n //请求获取通知权限\n NotificationInstance.requestPermission(function (PERMISSION) {\n if (PERMISSION === 'granted') {\n CreatNotification();\n } else {\n console.log('用户无情残忍的拒绝了你!!!');\n }\n });\n };\n var CreatNotification = function CreatNotification() {\n var n = new Notification(safe.config.name, {\n body: text,\n icon: safe.config.img\n });\n n.onshow = function () {\n safe.getAudio();\n setTimeout(function () {\n n.close();\n }, 2500);\n };\n n.onclick = function (e) {\n n.close();\n };\n };\n var permissionNow = NotificationInstance.permission;\n if (permissionNow === 'granted') {\n //允许通知\n CreatNotification();\n } else if (permissionNow === 'denied') {\n console.log('用户拒绝了你!!!');\n } else {\n setPermission();\n }\n }\n },\n //mine为'我'的对话\n //text为内容\n pushMsg: function pushMsg() {\n var _this2 = this;\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var mine = params.mine === true ? true : false;\n var text = params.text || {};\n var date = params.date;\n var textObj = {\n date: date || dayjs__WEBPACK_IMPORTED_MODULE_2___default()().format('YYYY-MM-DD HH:mm:ss'),\n text: function () {\n if (_typeof(text) != 'object') {\n return {\n text: text\n };\n }\n return text;\n }(),\n mine: mine,\n img: mine ? this.config.myImg : this.config.img,\n name: mine ? this.config.myName : this.config.name\n };\n this.list.push(textObj);\n setTimeout(function () {\n _this2.setScroll();\n }, 50);\n },\n setScroll: function setScroll(count) {\n var _this3 = this;\n //滚动条一直处于下方\n this.$nextTick(function () {\n _this3.$refs.main.scrollTop = count || _this3.$refs.main.scrollHeight;\n });\n },\n //用户主动发送\n handleSend: function handleSend() {\n if (this.msgActive) {\n this.$emit('submit');\n }\n },\n //选择列表\n handleItemMsg: function handleItemMsg(item) {\n this.$emit('submit', item.ask);\n },\n //处理排版\n handleDetail: function handleDetail() {\n var _this4 = this;\n var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var result = html;\n setTimeout(function () {\n var list = _this4.$refs.content || [];\n list.forEach(function (ele) {\n var _loop = function _loop() {\n var child = ele.children[i];\n if (child.getAttribute('data-flag') != 0) {\n child.setAttribute('data-flag', 0);\n child.onclick = function () {\n _this4.handleEvent(child.dataset);\n };\n if (child.tagName === 'IMG') {\n child.className = 'web__msg--img';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'VIDEO') {\n child.className = 'web__msg--video';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'AUDIO') {\n child.className = 'web__msg--audio';\n child.controls = 'controls';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'FILE') {\n child.className = 'web__msg--file';\n child.innerHTML = \"<h2>File</h2><span>\".concat(child.getAttribute('data-name'), \"</span>\");\n } else if (child.tagName === 'MAP') {\n child.className = 'web__msg--file web__msg--map';\n child.innerHTML = \"<h2>Map</h2><span>\".concat(child.getAttribute('data-longitude'), \" , \").concat(child.getAttribute('data-latitude'), \"<br />\").concat(child.getAttribute('data-address'), \"</span>\");\n }\n _this4.setScroll();\n }\n };\n for (var i = 0; i < ele.children.length; i++) {\n _loop();\n }\n });\n }, 0);\n return result;\n },\n getDetail: function getDetail() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var type = params.type,\n src = params.src,\n name = params.name,\n longitude = params.longitude,\n latitude = params.latitude,\n address = params.address;\n if (type === 'img') {\n return \"<img data-type=\\\"IMG\\\" data-src=\\\"\".concat(src, \"\\\" />\");\n } else if (type === 'video') {\n return \"<video data-type=\\\"VIDEO\\\" data-src=\\\"\".concat(src, \"\\\"></video>\");\n } else if (type === 'audio') {\n return \"<audio data-type=\\\"AUDIO\\\" data-src=\\\"\".concat(src, \"\\\"></audio>\");\n } else if (type === 'file') {\n return \"<file data-type=\\\"FILE\\\" data-name=\\\"\".concat(name, \"\\\" data-src=\\\"\").concat(src, \"\\\"></file>\");\n } else if (type === 'map') {\n return \"<map data-type=\\\"MAP\\\" data-src=\\\"\".concat(src, \"\\\" data-address=\\\"\").concat(address, \" \\\"data-latitude=\\\"\").concat(latitude, \"\\\" data-longitude=\\\"\").concat(longitude, \"\\\"></map>\");\n }\n },\n //处理事件\n handleEvent: function handleEvent(params) {\n var _this5 = this;\n var callback = function callback() {\n if (params.type === 'IMG') {\n _this5.imgSrc = params.src;\n _this5.show = true;\n } else if (params.type === 'VIDEO') {\n _this5.videoSrc = params.src;\n _this5.show = true;\n } else if (params.type === 'AUDIO') {\n _this5.audioSrc = params.src;\n _this5.show = true;\n } else if (params.type === 'FILE') {\n window.open(params.src);\n }\n };\n if (typeof this.beforeOpen === 'function') {\n this.beforeOpen(params, callback);\n } else {\n callback();\n }\n },\n rootSendMsg: function rootSendMsg(msg) {\n this.pushMsg({\n text: msg\n });\n if (this.notice) {\n this.getNotification(msg.text || msg);\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/chat/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
401
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"chat\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n data() {\n return {\n upload: {\n box: false,\n src: \"\",\n type: '',\n title: ''\n },\n visible: false,\n imgSrc: '',\n videoSrc: '',\n audioSrc: '',\n keys: \"\",\n show: false\n };\n },\n props: {\n beforeOpen: Function,\n tools: {\n type: Object,\n default: () => {\n return {\n img: true,\n video: true,\n file: true\n };\n }\n },\n placeholder: {\n type: String,\n default: '请输入...'\n },\n width: {\n type: [String, Number],\n default: 320\n },\n height: {\n type: [String, Number],\n default: 520\n },\n value: {\n type: String\n },\n notice: {\n type: Boolean,\n default: true\n },\n audio: {\n type: Array,\n default: () => {\n return ['https://www.helloweba.net/demo/notifysound/notify.ogg', 'https://www.helloweba.net/demo/notifysound/notify.mp3', 'https://www.helloweba.net/demo/notifysound/notify.wav'];\n }\n },\n config: {\n type: Object,\n default: () => {\n return {};\n }\n },\n keylist: {\n type: Array,\n default: () => {\n return [];\n }\n },\n list: {\n type: Array,\n default: () => {\n return [];\n }\n }\n },\n computed: {\n msg: {\n get() {\n return this.value;\n },\n set(val) {\n this.$emit('input', val);\n this.$emit('change', val);\n }\n },\n heightStyleName() {\n return {\n height: this.setPx(this.height)\n };\n },\n widthStyleName() {\n return {\n width: this.setPx(this.width)\n };\n },\n msgActive() {\n return !this.validatenull(this.msg.replace(/[\\r\\n]/g, \"\"));\n }\n },\n methods: {\n uploadSubmit() {\n this.$refs.form.validate(valid => {\n if (valid) {\n this.upload.box = false;\n this.$emit('submit', this.getDetail(this.upload));\n }\n });\n },\n handleUpload(type) {\n this.upload.type = type;\n this.upload.src = '';\n if (type === 'img') {\n this.upload.title = \"图片上传\";\n } else if (type === 'video') {\n this.upload.title = \"视频上传\";\n } else if (type === 'file') {\n this.upload.title = \"文件上传\";\n }\n this.upload.box = true;\n },\n handleClose(done) {\n this.imgSrc = undefined;\n this.videoSrc = undefined;\n this.audioSrc = undefined;\n done();\n },\n addKey() {\n if (this.keys !== '') {\n this.$emit('keyadd', this.keys);\n this.keys = '';\n }\n this.visible = false;\n },\n sendKey(key) {\n this.$emit('keysend', key);\n },\n getAudio() {\n this.$refs.chatAudio.play();\n },\n getNotification(text) {\n const safe = this;\n const NotificationInstance = Notification || window.Notification;\n if (!!NotificationInstance) {\n const permissionNow = NotificationInstance.permission;\n if (permissionNow === 'granted') {\n //允许通知\n CreatNotification();\n } else if (permissionNow === 'denied') {\n console.log('用户拒绝了你!!!');\n } else {\n setPermission();\n }\n function setPermission() {\n //请求获取通知权限\n NotificationInstance.requestPermission(function (PERMISSION) {\n if (PERMISSION === 'granted') {\n CreatNotification();\n } else {\n console.log('用户无情残忍的拒绝了你!!!');\n }\n });\n }\n function CreatNotification() {\n const n = new Notification(safe.config.name, {\n body: text,\n icon: safe.config.img\n });\n n.onshow = function () {\n safe.getAudio();\n setTimeout(() => {\n n.close();\n }, 2500);\n };\n n.onclick = function (e) {\n n.close();\n };\n }\n }\n },\n //mine为'我'的对话\n //text为内容\n pushMsg(params = {}) {\n const mine = params.mine === true ? true : false;\n const text = params.text || {};\n const date = params.date;\n const textObj = {\n date: date || dayjs__WEBPACK_IMPORTED_MODULE_2___default()().format('YYYY-MM-DD HH:mm:ss'),\n text: (() => {\n if (typeof text != 'object') {\n return {\n text: text\n };\n }\n return text;\n })(),\n mine: mine,\n img: mine ? this.config.myImg : this.config.img,\n name: mine ? this.config.myName : this.config.name\n };\n this.list.push(textObj);\n setTimeout(() => {\n this.setScroll();\n }, 50);\n },\n setScroll(count) {\n //滚动条一直处于下方\n this.$nextTick(() => {\n this.$refs.main.scrollTop = count || this.$refs.main.scrollHeight;\n });\n },\n //用户主动发送\n handleSend() {\n if (this.msgActive) {\n this.$emit('submit');\n }\n },\n //选择列表\n handleItemMsg(item) {\n this.$emit('submit', item.ask);\n },\n //处理排版\n handleDetail(html = '') {\n let result = html;\n setTimeout(() => {\n const list = this.$refs.content || [];\n list.forEach(ele => {\n for (let i = 0; i < ele.children.length; i++) {\n const child = ele.children[i];\n if (child.getAttribute('data-flag') != 0) {\n child.setAttribute('data-flag', 0);\n child.onclick = () => {\n this.handleEvent(child.dataset);\n };\n if (child.tagName === 'IMG') {\n child.className = 'web__msg--img';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'VIDEO') {\n child.className = 'web__msg--video';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'AUDIO') {\n child.className = 'web__msg--audio';\n child.controls = 'controls';\n child.src = child.getAttribute('data-src');\n } else if (child.tagName === 'FILE') {\n child.className = 'web__msg--file';\n child.innerHTML = `<h2>File</h2><span>${child.getAttribute('data-name')}</span>`;\n } else if (child.tagName === 'MAP') {\n child.className = 'web__msg--file web__msg--map';\n child.innerHTML = `<h2>Map</h2><span>${child.getAttribute('data-longitude')} , ${child.getAttribute('data-latitude')}<br />${child.getAttribute('data-address')}</span>`;\n }\n this.setScroll();\n }\n }\n });\n }, 0);\n return result;\n },\n getDetail(params = {}) {\n const {\n type,\n src,\n name,\n longitude,\n latitude,\n address\n } = params;\n if (type === 'img') {\n return `<img data-type=\"IMG\" data-src=\"${src}\" />`;\n } else if (type === 'video') {\n return `<video data-type=\"VIDEO\" data-src=\"${src}\"></video>`;\n } else if (type === 'audio') {\n return `<audio data-type=\"AUDIO\" data-src=\"${src}\"></audio>`;\n } else if (type === 'file') {\n return `<file data-type=\"FILE\" data-name=\"${name}\" data-src=\"${src}\"></file>`;\n } else if (type === 'map') {\n return `<map data-type=\"MAP\" data-src=\"${src}\" data-address=\"${address} \"data-latitude=\"${latitude}\" data-longitude=\"${longitude}\"></map>`;\n }\n },\n //处理事件\n handleEvent(params) {\n const callback = () => {\n if (params.type === 'IMG') {\n this.imgSrc = params.src;\n this.show = true;\n } else if (params.type === 'VIDEO') {\n this.videoSrc = params.src;\n this.show = true;\n } else if (params.type === 'AUDIO') {\n this.audioSrc = params.src;\n this.show = true;\n } else if (params.type === 'FILE') {\n window.open(params.src);\n }\n };\n if (typeof this.beforeOpen === 'function') {\n this.beforeOpen(params, callback);\n } else {\n callback();\n }\n },\n rootSendMsg(msg) {\n this.pushMsg({\n text: msg\n });\n if (this.notice) {\n this.getNotification(msg.text || msg);\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/chat/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
402
402
|
|
403
403
|
/***/ }),
|
404
404
|
|
@@ -410,7 +410,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
410
410
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
411
411
|
|
412
412
|
"use strict";
|
413
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"checkbox\",\n props: {\n all: {\n type: Boolean,\n
|
413
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"checkbox\",\n props: {\n all: {\n type: Boolean,\n default: false\n }\n },\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n data() {\n return {\n checkAll: false,\n isIndeterminate: false,\n name: 'checkbox'\n };\n },\n watch: {\n dic() {\n this.handleCheckChange();\n },\n text: {\n handler(val) {\n this.handleCheckChange();\n }\n }\n },\n created() {},\n mounted() {},\n methods: {\n handleCheckAll(val) {\n if (!this.all) return;\n this.text = val ? this.dic.map(ele => ele[this.valueKey]) : [];\n this.isIndeterminate = false;\n },\n handleCheckChange() {\n let value = this.text;\n if (!this.all) return;\n let checkedCount = value.length;\n let dicLen = this.dic.length;\n this.checkAll = checkedCount === dicLen;\n this.isIndeterminate = checkedCount > 0 && checkedCount < dicLen;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/checkbox/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
414
414
|
|
415
415
|
/***/ }),
|
416
416
|
|
@@ -422,7 +422,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
422
422
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
423
423
|
|
424
424
|
"use strict";
|
425
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"code\",\n props: {\n height: {\n type: Number,\n
|
425
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"code\",\n props: {\n height: {\n type: Number,\n default: 200\n },\n syntax: {\n type: String,\n default: \"javascript\"\n }\n },\n computed: {\n styleName() {\n return {\n height: this.setPx(this.height)\n };\n }\n },\n mounted() {\n if (!window.hljs) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"hljs\");\n return;\n }\n if (window.hljs && typeof window.hljs.highlightBlock === \"function\") {\n window.hljs.highlightBlock(this.$refs[\"container\"]);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/code/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
426
426
|
|
427
427
|
/***/ }),
|
428
428
|
|
@@ -434,7 +434,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
434
434
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
435
435
|
|
436
436
|
"use strict";
|
437
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\
|
437
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\nconst propsDefault = {\n avatar: \"avatar\",\n author: \"author\",\n body: \"body\"\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"comment\",\n props: {\n reverse: {\n type: Boolean,\n default: false\n },\n data: {\n type: Object,\n default: () => {\n return {};\n }\n },\n props: {\n type: Object,\n default: () => {\n return propsDefault;\n }\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n computed: {\n avatarKey() {\n return this.props.avatar || propsDefault.avatar;\n },\n authorKey() {\n return this.props.author || propsDefault.author;\n },\n bodyKey() {\n return this.props.body || propsDefault.body;\n },\n avatar() {\n return this.data[this.avatarKey];\n },\n author() {\n return this.data[this.authorKey];\n },\n body() {\n return this.data[this.bodyKey];\n }\n },\n mounted() {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/comment/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
438
438
|
|
439
439
|
/***/ }),
|
440
440
|
|
@@ -446,7 +446,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
446
446
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
447
447
|
|
448
448
|
"use strict";
|
449
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var countup_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! countup.js */ \"./node_modules/.store/countup.js@1.9.3/node_modules/countup.js/dist/countUp.min.js\");\n/* harmony import */ var countup_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(countup_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"count-up\",\n props: {\n animation: {\n type: Boolean,\n
|
449
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var countup_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! countup.js */ \"./node_modules/.store/countup.js@1.9.3/node_modules/countup.js/dist/countUp.min.js\");\n/* harmony import */ var countup_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(countup_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"count-up\",\n props: {\n animation: {\n type: Boolean,\n default: true\n },\n start: {\n type: Number,\n required: false,\n default: 0\n },\n end: {\n required: true\n },\n decimals: {\n type: Number,\n required: false,\n default: 0\n },\n duration: {\n type: Number,\n required: false,\n default: 2\n },\n options: {\n type: Object,\n required: false,\n default() {\n return {};\n }\n },\n callback: {\n type: Function,\n required: false,\n default: () => {}\n }\n },\n data() {\n return {\n c: null\n };\n },\n watch: {\n decimals() {\n if (this.c && this.c.update) {\n this.c.update(this.end);\n }\n },\n end(value) {\n if (this.c && this.c.update) {\n this.c.update(value);\n }\n }\n },\n mounted() {\n if (this.animation) {\n this.init();\n }\n },\n methods: {\n init() {\n if (!this.c) {\n this.c = new countup_js__WEBPACK_IMPORTED_MODULE_0___default.a(this.$el, this.start, this.end, this.decimals, this.duration, this.options);\n this.c.start(() => {\n this.callback(this.c);\n });\n }\n },\n destroy() {\n this.c = null;\n }\n },\n beforeDestroy() {\n this.destroy();\n },\n start(callback) {\n if (this.c && this.c.start) {\n this.c.start(() => {\n callback && callback(this.c);\n });\n }\n },\n pauseResume() {\n if (this.c && this.c.pauseResume) {\n this.c.pauseResume();\n }\n },\n reset() {\n if (this.c && this.c.reset) {\n this.c.reset();\n }\n },\n update(newEndVal) {\n if (this.c && this.c.update) {\n this.c.update(newEndVal);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/count-up/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
450
450
|
|
451
451
|
/***/ }),
|
452
452
|
|
@@ -458,7 +458,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var coun
|
|
458
458
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
459
459
|
|
460
460
|
"use strict";
|
461
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data
|
461
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n };\n },\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n inject: [\"crud\"],\n mounted() {\n this.setSort();\n },\n methods: {\n indexMethod(index) {\n return index + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);\n },\n setSort() {\n this.rowDrop();\n this.columnDrop();\n },\n rowDrop() {\n const el = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];\n this.crud.tableDrop('row', el, evt => {\n const oldIndex = evt.oldIndex;\n const newIndex = evt.newIndex;\n const targetRow = this.crud.list.splice(oldIndex, 1)[0];\n this.crud.list.splice(newIndex, 0, targetRow);\n this.crud.$emit('sortable-change', oldIndex, newIndex);\n this.crud.refreshTable(() => this.rowDrop());\n });\n },\n columnDrop() {\n let el = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);\n let noIndexCount = 0;\n ['selection', 'index', 'expand'].forEach(ele => {\n if (this.crud.tableOption[ele]) {\n noIndexCount += 1;\n }\n });\n this.crud.tableDrop('column', el, evt => {\n this.crud.headerSort(evt.oldIndex - noIndexCount, evt.newIndex - noIndexCount);\n this.columnDrop();\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column-default.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
462
462
|
|
463
463
|
/***/ }),
|
464
464
|
|
@@ -470,7 +470,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
470
470
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
471
471
|
|
472
472
|
"use strict";
|
473
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _column_slot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./column-slot */ \"./packages/element-ui/crud/column-slot.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'column-dynamic',\n components: {\n columnSlot: _column_slot__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n },\n inject: [\"dynamic\", 'crud'],\n props: {\n columnOption: Object\n },\n created
|
473
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _column_slot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./column-slot */ \"./packages/element-ui/crud/column-slot.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'column-dynamic',\n components: {\n columnSlot: _column_slot__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n },\n inject: [\"dynamic\", 'crud'],\n props: {\n columnOption: Object\n },\n created() {\n const list = ['getColumnProp', \"handleFilterMethod\", \"handleFilters\"];\n Object.keys(this.dynamic).forEach(ele => {\n if (list.includes(ele)) {\n this[ele] = this.dynamic[ele];\n }\n });\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column-dynamic.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
474
474
|
|
475
475
|
/***/ }),
|
476
476
|
|
@@ -482,7 +482,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _col
|
|
482
482
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
483
483
|
|
484
484
|
"use strict";
|
485
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data
|
485
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n };\n },\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n inject: [\"crud\"],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n computed: {\n menuType() {\n return this.crud.tableOption.menuType || this.$AVUE.menuType || 'button';\n },\n isIconMenu() {\n return this.menuType === \"icon\";\n },\n isTextMenu() {\n return this.menuType === \"text\";\n },\n isMenu() {\n return this.menuType === \"menu\";\n }\n },\n methods: {\n menuText(value) {\n return ['text', 'menu'].includes(this.menuType) ? \"text\" : value;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column-menu.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
486
486
|
|
487
487
|
/***/ }),
|
488
488
|
|
@@ -494,7 +494,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
494
494
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
495
495
|
|
496
496
|
"use strict";
|
497
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var common_components_form_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/components/form/index */ \"./packages/core/components/form/index.vue\");\n/* harmony import */ var common_components_icon_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! common/components/icon/index */ \"./packages/core/components/icon/index.vue\");\
|
497
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var common_components_form_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/components/form/index */ \"./packages/core/components/form/index.vue\");\n/* harmony import */ var common_components_icon_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! common/components/icon/index */ \"./packages/core/components/icon/index.vue\");\nlet count = {};\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'column-slot',\n inject: [\"dynamic\", 'crud'],\n components: {\n formTemp: common_components_form_index__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n iconTemp: common_components_icon_index__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n },\n props: {\n column: Object,\n columnOption: Array\n },\n created() {\n const list = ['getColumnProp', \"handleFilterMethod\", \"handleFilters\"];\n Object.keys(this.dynamic).forEach(ele => {\n if (list.includes(ele)) {\n this[ele] = this.dynamic[ele];\n }\n });\n },\n methods: {\n isMediaType(item, fileType) {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"isMediaType\"])(item, fileType);\n },\n vaildLabel(column, row, val) {\n if (column.rules && row.$cellEdit) {\n return val;\n }\n },\n columnChange(row, column, index) {\n let key = `${index}-${column.prop}`;\n if (!count[key]) {\n this.handleChange(column, row);\n if (typeof column.change === 'function' && column.cell == true) {\n column.change({\n row,\n column,\n index,\n value: row[column.prop]\n });\n }\n }\n count[key] = true;\n this.$nextTick(() => count[key] = false);\n },\n handleChange(column, row) {\n if (!column.cascader) return;\n this.$nextTick(() => {\n const columnOption = [...this.crud.propOption];\n //本节点;\n const cascader = column.cascader;\n const str = cascader.join(\",\");\n cascader.forEach(item => {\n const columnNextProp = item;\n const value = row[column.prop];\n const rowIndex = row.$index;\n // 下一个节点\n const columnNext = this.findObject(this.columnOption, columnNextProp);\n if (this.validatenull(columnNext)) return;\n // 如果本节点没有字典则创建节点数组\n if (this.validatenull(this.crud.cascaderDIC[rowIndex])) {\n this.$set(this.crud.cascaderDIC, rowIndex, {});\n }\n if (this.crud.cascaderIndexList.includes(rowIndex)) {\n //清空子类字典\n cascader.forEach(ele => {\n this.$set(this.crud.cascaderDIC[rowIndex], ele, []);\n cascader.forEach(ele => {\n row[ele] = Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"blankVal\"])(row[ele]);\n });\n });\n }\n //最后一级\n if (this.validatenull(cascader) || this.validatenull(value) || this.validatenull(columnNext)) {\n return;\n }\n Object(core_dic__WEBPACK_IMPORTED_MODULE_2__[\"sendDic\"])({\n column: columnNext,\n value: value,\n form: row\n }).then(res => {\n const dic = res || [];\n //首次加载的放入队列记录\n if (!this.crud.cascaderIndexList.includes(rowIndex)) {\n this.crud.cascaderIndexList.push(rowIndex);\n }\n if (!this.crud.cascaderDicList[rowIndex]) {\n this.$set(this.crud.cascaderDicList, rowIndex, {});\n }\n if (!this.crud.cascaderDicList[rowIndex][columnNextProp]) {\n this.$set(this.crud.cascaderDicList[rowIndex], columnNextProp, dic);\n }\n // 修改字典\n this.$set(this.crud.cascaderDIC[rowIndex], columnNextProp, dic);\n if (!this.validatenull(dic[columnNext.cascaderIndex]) && !this.validatenull(dic) && !this.validatenull(columnNext.cascaderIndex)) {\n row[columnNextProp] = dic[columnNext.cascaderIndex][(columnNext.props || {}).value || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value];\n }\n });\n });\n });\n },\n handleDetail(row, column) {\n let result;\n let DIC = column.parentProp ? (this.crud.cascaderDIC[row.$index] || {})[column.prop] : this.crud.DIC[column.prop];\n result = Object(core_detail__WEBPACK_IMPORTED_MODULE_0__[\"detail\"])(row, column, this.crud.tableOption, DIC);\n if (!this.validatenull(DIC) && this.crud.tableOption.filterDic !== true) {\n row[\"$\" + column.prop] = result;\n }\n return result;\n },\n corArray(row, column) {\n let list = this.handleDetail(row, column);\n if (!Array.isArray(list)) {\n list = this.validatenull(list) ? [] : list.split(global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_SHOW_SPLIT\"]);\n }\n return this.deepClone(list);\n },\n openImg(row, column, index) {\n let list = this.getImgList(row, column);\n list = list.map(ele => {\n return {\n thumbUrl: ele,\n url: ele,\n type: column.fileType\n };\n });\n this.$ImagePreview(list, index);\n },\n getImgList(row, column) {\n var _column$propsHttp, _column$props;\n let url = ((_column$propsHttp = column.propsHttp) === null || _column$propsHttp === void 0 ? void 0 : _column$propsHttp.home) || '';\n let value = ((_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.value) || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value;\n let list = this.corArray(row, column);\n list.forEach((ele, index) => {\n list[index] = url + (ele[value] ? ele[value] : ele);\n });\n return list;\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column-slot.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
498
498
|
|
499
499
|
/***/ }),
|
500
500
|
|
@@ -506,7 +506,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
506
506
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
507
507
|
|
508
508
|
"use strict";
|
509
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _column_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-dynamic */ \"./packages/element-ui/crud/column-dynamic.vue\");\n/* harmony import */ var _column_slot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-slot */ \"./packages/element-ui/crud/column-slot.vue\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\
|
509
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _column_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-dynamic */ \"./packages/element-ui/crud/column-dynamic.vue\");\n/* harmony import */ var _column_slot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-slot */ \"./packages/element-ui/crud/column-slot.vue\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data() {\n return {};\n },\n components: {\n columnSlot: _column_slot__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n columnDynamic: _column_dynamic__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n inject: [\"crud\"],\n provide() {\n return {\n crud: this.crud,\n dynamic: this\n };\n },\n props: {\n columnOption: Array\n },\n computed: {\n list() {\n let result = [...this.columnOption];\n result = Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"arraySort\"])(result, 'index', (a, b) => {\n var _this$crud$objectOpti, _this$crud$objectOpti2;\n return ((_this$crud$objectOpti = this.crud.objectOption[a.prop]) === null || _this$crud$objectOpti === void 0 ? void 0 : _this$crud$objectOpti.index) - ((_this$crud$objectOpti2 = this.crud.objectOption[b.prop]) === null || _this$crud$objectOpti2 === void 0 ? void 0 : _this$crud$objectOpti2.index);\n });\n return result;\n }\n },\n methods: {\n //表格筛选逻辑\n handleFilterMethod(value, row, column) {\n const columnNew = this.columnOption.filter(ele => ele.prop === column.property)[0];\n if (typeof columnNew.filterMethod === \"function\") {\n return columnNew.filterMethod(value, row, columnNew);\n } else {\n return row[columnNew.prop] === value;\n }\n },\n //表格筛选字典\n handleFilters(column, flag) {\n if (flag !== true) return undefined;\n let DIC = this.crud.DIC[column.prop] || [];\n let list = [];\n if (!this.validatenull(DIC)) {\n DIC.forEach(ele => {\n const props = column.props || this.crud.tableOption.props || {};\n list.push({\n text: ele[props.label || global_variable__WEBPACK_IMPORTED_MODULE_4__[\"DIC_PROPS\"].label],\n value: ele[props.value || global_variable__WEBPACK_IMPORTED_MODULE_4__[\"DIC_PROPS\"].value]\n });\n });\n } else {\n this.crud.cellForm.list.forEach(ele => {\n if (!list.map(item => item.text).includes(ele[column.prop])) {\n list.push({\n text: ele[column.prop],\n value: ele[column.prop]\n });\n }\n });\n }\n return list;\n },\n getColumnProp(column, type) {\n let obj = this.crud.objectOption[column.prop] || {};\n if (type === 'filterMethod') return obj === null || obj === void 0 ? void 0 : obj.filters;\n if (this.crud.isMobile && ['fixed'].includes(type)) return false;\n let result = obj === null || obj === void 0 ? void 0 : obj[type];\n if (type == 'width' && result == 0) {\n return undefined;\n }\n if (type == 'filters') return this.handleFilters(column, result);\n if (type == 'hide') return (obj === null || obj === void 0 ? void 0 : obj.hide) !== true;else return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
510
510
|
|
511
511
|
/***/ }),
|
512
512
|
|
@@ -518,7 +518,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
518
518
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
519
519
|
|
520
520
|
"use strict";
|
521
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n inject: [\"crud\"],\n data
|
521
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n inject: [\"crud\"],\n data() {\n return {\n data: [],\n columnBox: false\n };\n },\n computed: {\n defaultColumn() {\n return [{\n label: this.t('crud.column.hide'),\n prop: 'hide'\n }, {\n label: this.t('crud.column.fixed'),\n prop: 'fixed'\n }, {\n label: this.t('crud.column.filters'),\n prop: 'filters'\n }, {\n label: this.t('crud.column.sortable'),\n prop: 'sortable'\n }, {\n label: this.t('crud.column.index'),\n prop: 'index',\n hide: true\n }, {\n label: this.t('crud.column.width'),\n prop: 'width',\n hide: true\n }];\n }\n },\n methods: {\n handleShow() {\n this.data = [];\n this.crud.propOption.forEach(column => {\n if (column.showColumn != false) this.data.push(column);\n });\n this.columnBox = true;\n this.$nextTick(() => this.rowDrop());\n },\n handleChange(prop) {\n if (['hide', 'filters'].includes(prop)) {\n this.crud.refreshTable();\n }\n },\n rowDrop() {\n const el = this.$refs.table.$el.querySelectorAll(_config_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].dropRowClass)[0];\n this.crud.tableDrop('column', el, evt => {\n const oldIndex = evt.oldIndex;\n const newIndex = evt.newIndex;\n this.crud.headerSort(oldIndex, newIndex);\n this.crud.refreshTable(() => this.rowDrop());\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog-column.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
522
522
|
|
523
523
|
/***/ }),
|
524
524
|
|
@@ -530,7 +530,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
530
530
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
531
531
|
|
532
532
|
"use strict";
|
533
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n inject: ['crud'],\n data
|
533
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n inject: ['crud'],\n data() {\n return {\n option: {},\n columnOption: {},\n box: false,\n form: {\n name: this.crud.tableOption.title\n }\n };\n },\n methods: {\n handleShow() {\n this.getColumnOption();\n this.getOption();\n this.box = true;\n },\n handleSubmit() {\n this.$Export.excel({\n title: this.form.name,\n columns: this.getColumn(),\n data: this.handleSum()\n });\n this.box = false;\n },\n //计算统计\n handleSum() {\n const option = this.crud.tableOption;\n const columnOption = this.crud.propOption;\n let list = this.form.type ? this.crud.list : this.crud.tableSelect;\n let data = [];\n if (this.form.params.includes('data')) {\n list.forEach(ele => {\n let row = this.deepClone(ele);\n columnOption.forEach(column => {\n let DIC = column.parentProp ? (this.crud.cascaderDIC[row.$index] || {})[column.prop] : this.crud.DIC[column.prop];\n row[column.prop] = Object(core_detail__WEBPACK_IMPORTED_MODULE_1__[\"detail\"])(row, column, option, DIC);\n });\n data.push(row);\n });\n }\n if (this.form.params.includes('sum') && option.showSummary) {\n data.push(this.crud.sumsList);\n }\n return data;\n },\n getOption() {\n this.option = {\n submitBtn: false,\n emptyBtn: false,\n column: [{\n label: this.t('crud.excel.name'),\n prop: 'name',\n span: 24\n }, {\n label: this.t('crud.excel.type'),\n prop: \"type\",\n span: 24,\n type: 'select',\n dicData: [{\n label: this.t('crud.excel.typeDic.true'),\n value: true\n }, {\n label: this.t('crud.excel.typeDic.false'),\n disabled: this.crud.tableOption.selection != true,\n value: false\n }]\n }, {\n label: this.t('crud.excel.prop'),\n prop: \"prop\",\n type: 'tree',\n multiple: true,\n checkStrictly: true,\n span: 24,\n props: {\n value: 'prop'\n },\n dicData: this.columnOption\n }, {\n label: this.t('crud.excel.params'),\n prop: 'params',\n type: 'checkbox',\n span: 24,\n value: ['header', 'data'].concat((() => {\n let result = [];\n if (this.crud.isHeader) result.push('headers');\n if (this.crud.isShowSummary) result.push('sum');\n return result;\n })()),\n dicData: [{\n label: this.t('crud.excel.paramsDic.header'),\n disabled: true,\n value: 'header'\n }, {\n label: this.t('crud.excel.paramsDic.data'),\n value: 'data'\n }].concat((() => {\n let result = [];\n result.push({\n label: this.t('crud.excel.paramsDic.headers'),\n value: 'headers',\n disabled: !this.crud.isHeader\n });\n result.push({\n label: this.t('crud.excel.paramsDic.sum'),\n value: 'sum',\n disabled: !this.crud.isShowSummary\n });\n return result;\n })())\n }]\n };\n this.form.type = this.crud.selectLen == 0;\n },\n getColumnOption() {\n let column = this.deepClone(this.crud.columnOption);\n let prop = [];\n const findProp = (list = []) => {\n let count = [];\n for (let i = 0; i < list.length; i++) {\n const ele = list[i],\n index = i,\n children = ele.children;\n if (children && !Array.isArray(children)) delete ele.children;else if (ele.showColumn === false) {\n list.splice(i, 1);\n i--;\n } else {\n ele.prop = ele.prop || Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"uuid\"])();\n prop.push(ele.prop);\n if (ele.children) findProp(children);\n }\n }\n };\n findProp(column);\n this.columnOption = column;\n this.form.prop = prop;\n },\n getColumn() {\n let columns = this.deepClone(this.columnOption);\n let props = this.$refs.form.getPropRef('prop').$refs.temp.getHalfList();\n if (!this.form.params) return [];\n if (this.form.params.includes('headers')) {\n const findProp = (list = []) => {\n list.forEach((ele, index) => {\n if (!props.includes(ele.prop)) {\n list.splice(index, 1);\n } else if (ele.children) {\n findProp(ele.children);\n }\n });\n };\n findProp(columns);\n return columns;\n } else {\n let result = [];\n const findProp = (list = []) => {\n list.forEach((ele, index) => {\n if (ele.children) {\n findProp(ele.children);\n } else if (props.includes(ele.prop)) {\n result.push(ele);\n }\n });\n };\n findProp(columns);\n return result;\n }\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog-excel.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
534
534
|
|
535
535
|
/***/ }),
|
536
536
|
|
@@ -542,7 +542,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
542
542
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
543
543
|
|
544
544
|
"use strict";
|
545
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n inject: [\"crud\"],\n data
|
545
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n inject: [\"crud\"],\n data() {\n return {\n box: false,\n columnObj: {},\n symbolDic: [{\n label: \"=\",\n value: \"=\"\n }, {\n label: \"≠\",\n value: \"≠\"\n }, {\n label: \"like\",\n value: \"like\"\n }, {\n label: \">\",\n value: \">\"\n }, {\n label: \"≥\",\n value: \"≥\"\n }, {\n label: \"<\",\n value: \"<\"\n }, {\n label: \"≤\",\n value: \"≤\"\n }, {\n label: \"∈\",\n value: \"∈\"\n }],\n list: [],\n columnOption: {}\n };\n },\n methods: {\n handleShow() {\n this.getColumnOption();\n this.box = true;\n },\n getColumnOption() {\n let result = [];\n let column = this.deepClone(this.crud.propOption);\n column.forEach(ele => {\n if (ele.showColumn !== false) result.push(Object.assign(ele, {\n value: ele.prop\n }));\n });\n this.columnOption = result;\n this.columnObj = this.columnOption[0];\n },\n handleDelete(index) {\n this.list.splice(index, 1);\n },\n handleClear() {\n this.list = [];\n },\n handleValueClear() {\n this.list.forEach((ele, index) => ele.value = '');\n },\n handleSubmit() {\n let result = [];\n this.list.forEach(ele => {\n result.push([ele.text, ele.symbol, ele.value]);\n });\n this.crud.$emit(\"filter\", result);\n this.box = false;\n },\n handleChange(index) {\n this.list[index].value = '';\n },\n handleAdd() {\n const prop = this.columnObj.prop;\n this.list.push({\n text: prop,\n value: '',\n symbol: this.symbolDic[0].value\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog-filter.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
546
546
|
|
547
547
|
/***/ }),
|
548
548
|
|
@@ -554,7 +554,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
554
554
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
555
555
|
|
556
556
|
"use strict";
|
557
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n data
|
557
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n data() {\n return {\n disabled: false,\n config: _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n boxType: \"\",\n fullscreen: false,\n size: null,\n boxVisible: false\n };\n },\n props: {\n value: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n computed: {\n option() {\n let option = this.deepClone(this.crud.tableOption);\n option.boxType = this.boxType;\n option.column = this.deepClone(this.crud.propOption);\n option.menuBtn = false;\n if (this.isAdd) {\n option.submitBtn = option.saveBtn;\n option.submitText = this.crud.menuIcon('saveBtn');\n option.submitIcon = this.crud.getBtnIcon('saveBtn');\n } else if (this.isEdit) {\n option.submitBtn = option.updateBtn;\n option.submitText = this.crud.menuIcon('updateBtn');\n option.submitIcon = this.crud.getBtnIcon('updateBtn');\n } else if (this.isView) {\n option.detail = true;\n }\n option.emptyBtn = option.cancelBtn;\n option.emptyText = this.crud.menuIcon('cancelBtn');\n option.emptyIcon = this.crud.getBtnIcon('cancelBtn');\n //不分组的表单不加载字典\n if (!this.crud.isGroup) {\n option.dicFlag = false;\n option.dicData = this.crud.DIC;\n }\n if (!this.validatenull(option.dicFlag)) {\n option.column.forEach(ele => {\n ele.boxType = this.boxType;\n ele.dicFlag = ele.dicFlag || option.dicFlag;\n });\n }\n return option;\n },\n isView() {\n return this.boxType === 'view';\n },\n isAdd() {\n return this.boxType === 'add';\n },\n isEdit() {\n return this.boxType === 'edit';\n },\n direction() {\n return this.crud.tableOption.dialogDirection;\n },\n width() {\n return this.vaildData(this.crud.tableOption.dialogWidth + '', this.crud.isMobile ? '100%' : _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].dialogWidth + '');\n },\n dialogType() {\n return this.isDrawer ? 'elDrawer' : 'elDialog';\n },\n dialogTop() {\n return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : '0';\n },\n isDrawer() {\n return this.crud.tableOption.dialogType === 'drawer';\n },\n params() {\n return this.isDrawer ? {\n size: this.fullscreen ? '100%' : this.setPx(this.width),\n direction: this.crud.tableOption.dialogDirection\n } : {\n width: this.setPx(this.width),\n fullscreen: this.fullscreen\n };\n },\n dialogTitle() {\n const key = `${this.boxType}`;\n if (!this.validatenull(this.boxType)) {\n return this.crud.tableOption[key + 'Title'] || this.t(`crud.${key}Title`);\n }\n },\n dialogMenuPosition() {\n return this.crud.option.dialogMenuPosition || 'right';\n }\n },\n methods: {\n submit() {\n this.$refs.tableForm.submit();\n },\n reset() {\n this.$refs.tableForm.resetForm(false);\n },\n getSlotName(item) {\n return item.replace('Form', '');\n },\n initFun() {\n ['clearValidate', 'validate', 'resetForm', 'validateField'].forEach(ele => {\n this.crud[ele] = this.$refs.tableForm[ele];\n });\n },\n handleChange() {\n this.crud.setVal();\n },\n handleTabClick(tab, event) {\n this.crud.$emit('tab-click', tab, event);\n },\n handleFullScreen() {\n if (this.isDrawer) {\n if (this.validatenull(this.size)) {\n this.size = '100%';\n } else {\n this.size = '';\n }\n }\n if (this.fullscreen) {\n this.fullscreen = false;\n } else {\n this.fullscreen = true;\n }\n },\n handleError(error) {\n this.crud.$emit('error', error);\n },\n handleSubmit(form, hide) {\n if (this.isAdd) {\n this.rowSave(hide);\n } else if (this.isEdit) {\n this.rowUpdate(hide);\n }\n },\n // 保存\n rowSave(hide) {\n this.crud.$emit(\"row-save\", Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"filterParams\"])(this.crud.tableForm, ['$']), this.closeDialog, hide);\n },\n // 更新\n rowUpdate(hide) {\n this.crud.$emit(\"row-update\", Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"filterParams\"])(this.crud.tableForm, ['$']), this.crud.tableIndex, this.closeDialog, hide);\n },\n closeDialog(row) {\n row = this.deepClone(row);\n const callback = () => {\n if (this.isEdit) {\n let {\n parentList,\n index\n } = this.crud.findData(row[this.crud.rowKey]);\n if (parentList) {\n const oldRow = parentList.splice(index, 1)[0];\n row[this.crud.childrenKey] = oldRow[this.crud.childrenKey];\n parentList.splice(index, 0, row);\n }\n } else if (this.isAdd) {\n let {\n item\n } = this.crud.findData(row[this.crud.rowParentKey]);\n if (item) {\n if (!item[this.crud.childrenKey]) {\n this.$set(item, this.crud.childrenKey, []);\n }\n if (this.crud.tableOption.lazy) {\n this.$set(item, this.crud.hasChildrenKey, true);\n }\n item[this.crud.childrenKey].push(row);\n } else {\n this.crud.list.push(row);\n }\n }\n };\n if (row) callback();\n this.hide();\n },\n // 隐藏表单\n hide(done) {\n const callback = () => {\n done && done();\n this.crud.tableIndex = -1;\n this.crud.tableForm = {};\n this.crud.setVal();\n this.boxVisible = false;\n };\n if (typeof this.crud.beforeClose === \"function\") {\n this.crud.beforeClose(callback, this.boxType);\n } else {\n callback();\n }\n },\n // 显示表单\n show(type) {\n this.boxType = type;\n const callback = () => {\n this.fullscreen = this.crud.tableOption.dialogFullscreen;\n this.boxVisible = true;\n this.$nextTick(() => {\n this.initFun();\n });\n };\n if (typeof this.crud.beforeOpen === \"function\") {\n this.crud.beforeOpen(callback, this.boxType);\n } else {\n callback();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog-form.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
558
558
|
|
559
559
|
/***/ }),
|
560
560
|
|
@@ -566,7 +566,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
566
566
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
567
567
|
|
568
568
|
"use strict";
|
569
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n inject: [\"crud\"],\n data
|
569
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n name: \"crud\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n inject: [\"crud\"],\n data() {\n return {\n dateCreate: false,\n pickerOptions: {\n shortcuts: [{\n text: '今日',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime());\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '昨日',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近一周',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近一个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近三个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);\n picker.$emit('pick', [start, end]);\n }\n }]\n },\n config: _config__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n };\n },\n created() {\n this.initFun();\n },\n methods: {\n //日期组件回调\n dateChange(val) {\n if (this.dateCreate) {\n this.crud.$emit(\"date-change\", val);\n } else {\n this.dateCreate = true;\n }\n },\n initFun() {\n this.vaildData = utils_util__WEBPACK_IMPORTED_MODULE_5__[\"vaildData\"];\n this.crud.rowExcel = this.rowExcel;\n this.crud.rowPrint = this.rowPrint;\n },\n rowExcel() {\n this.crud.$refs.dialogExcel.handleShow();\n },\n rowPrint() {\n this.$Print(this.crud.$refs.table);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/header-menu.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
570
570
|
|
571
571
|
/***/ }),
|
572
572
|
|
@@ -578,7 +578,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
578
578
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
579
579
|
|
580
580
|
"use strict";
|
581
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name:
|
581
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'crud__search',\n inject: ['crud'],\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"], core_slot__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n data() {\n return {\n show: false,\n searchIndex: 2,\n searchShow: true\n };\n },\n props: {\n search: Object\n },\n watch: {\n 'crud.propOption': {\n handler() {\n this.searchShow = Object(utils_util__WEBPACK_IMPORTED_MODULE_5__[\"vaildData\"])(this.crud.tableOption.searchShow, _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].searchShow);\n },\n deep: true\n },\n show() {\n this.crud.getTableHeight();\n },\n searchShow() {\n this.crud.getTableHeight();\n }\n },\n created() {\n this.initFun();\n },\n computed: {\n searchForm: {\n get() {\n return this.crud.search;\n },\n set(val) {\n this.crud.$emit('update:search', val);\n }\n },\n option() {\n const option = this.crud.option;\n this.searchIndex = option.searchIndex || 2;\n const detailColumn = (list = []) => {\n list = this.deepClone(list);\n let column = [];\n let count = 0;\n list = list.sort((a, b) => (b.searchOrder || 0) - (a.searchOrder || 0));\n list.forEach(ele => {\n if (ele.search) {\n let isCount = count < this.searchIndex;\n let obj = {};\n Object.keys(ele).forEach(item => {\n let key = 'search';\n if (item == 'searchProp') return;\n if (item.includes(key)) {\n let result = item.replace(key, '');\n if (result.length == 0) return;\n result = result.replace(result[0], result[0].toLowerCase());\n obj[result] = ele[item];\n }\n });\n ele = Object.assign(ele, obj, {\n type: Object(core_dataformat__WEBPACK_IMPORTED_MODULE_4__[\"getSearchType\"])(ele),\n detail: false,\n dicFlag: ele.cascader ? true : this.vaildData(ele.dicFlag, false),\n span: ele.searchSpan || option.searchSpan || _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].searchSpan,\n control: ele.searchControl,\n labelWidth: ele.searchLabelWidth || option.searchLabelWidth || _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].searchLabelWidth,\n labelPosition: ele.searchLabelPosition || option.searchLabelPosition,\n size: ele.searchSize || option.searchSize,\n value: ele.searchValue,\n rules: ele.searchRules,\n row: ele.searchRow,\n bind: ele.searchBin,\n disabled: ele.searchDisabled,\n readonly: ele.searchReadonly,\n display: this.isSearchIcon ? this.show ? true : isCount : true\n });\n column.push(ele);\n count = count + 1;\n }\n });\n return column;\n };\n const detailOption = list => {\n let result = this.deepClone(list);\n let obj = {};\n Object.keys(result).forEach(item => {\n let key = 'search';\n if (item.includes(key)) {\n let str = item.replace(key, '');\n if (str.length == 0) return;\n str = str.replace(str[0], str[0].toLowerCase());\n obj[str] = result[item];\n }\n });\n result.column = detailColumn(this.crud.propOption);\n result = Object.assign(result, obj, {\n rowKey: option.searchRowKey || 'null',\n tabs: false,\n group: false,\n printBtn: false,\n mockBtn: false,\n submitText: option.searchBtnText || this.t('crud.searchBtn'),\n submitBtn: this.vaildData(option.searchBtn, _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].searchSubBtn),\n submitIcon: this.crud.getBtnIcon('searchBtn'),\n emptyText: option.emptyBtnText || this.t('crud.emptyBtn'),\n emptyBtn: this.vaildData(option.emptyBtn, _config__WEBPACK_IMPORTED_MODULE_2__[\"default\"].emptyBtn),\n emptyIcon: this.crud.getBtnIcon('emptyBtn'),\n menuSpan: (() => {\n if (this.show || !this.isSearchIcon) {\n return option.searchMenuSpan;\n } else {\n return option.searchMenuSpan < 6 ? option.searchMenuSpan : 6;\n }\n })(),\n menuPosition: option.searchMenuPosition || 'center',\n dicFlag: false,\n dicData: this.crud.DIC\n });\n return result;\n };\n return detailOption(option);\n },\n isSearchIcon() {\n return this.vaildData(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;\n },\n searchLen() {\n let count = 0;\n this.crud.propOption.forEach(ele => {\n if (ele.search) count++;\n });\n return count;\n },\n searchFlag() {\n return !!this.crud.$scopedSlots.search || this.searchLen !== 0;\n }\n },\n methods: {\n initFun() {\n ;\n ['searchReset', 'searchChange'].forEach(ele => this.crud[ele] = this[ele]);\n },\n getSlotName(item) {\n return item.replace('Search', '');\n },\n // 搜索回调\n searchChange(form, done) {\n form = Object(utils_util__WEBPACK_IMPORTED_MODULE_5__[\"filterParams\"])(form);\n this.crud.propOption.forEach(ele => {\n if (ele.searchProp) {\n form[ele.searchProp] = form[ele.prop];\n delete form[ele.prop];\n }\n });\n this.crud.$emit('search-change', form, done);\n },\n // 搜索清空\n resetChange() {\n this.crud.$emit('search-reset', this.searchForm);\n },\n // 搜索清空\n searchReset() {\n this.$refs.form.resetForm();\n },\n handleSearchIconShow() {\n this.show = !this.show;\n this.crud.$emit('search-icon-change', this.show);\n },\n handleSearchShow() {\n this.searchShow = !this.searchShow;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/header-search.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
582
582
|
|
583
583
|
/***/ }),
|
584
584
|
|
@@ -590,7 +590,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
590
590
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
591
591
|
|
592
592
|
"use strict";
|
593
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n/* harmony import */ var _table_page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./table-page */ \"./packages/element-ui/crud/table-page.vue\");\n/* harmony import */ var _header_search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./header-search */ \"./packages/element-ui/crud/header-search.vue\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./column */ \"./packages/element-ui/crud/column.vue\");\n/* harmony import */ var _header_menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header-menu */ \"./packages/element-ui/crud/header-menu.vue\");\n/* harmony import */ var _dialog_column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dialog-column */ \"./packages/element-ui/crud/dialog-column.vue\");\n/* harmony import */ var _dialog_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dialog-filter */ \"./packages/element-ui/crud/dialog-filter.vue\");\n/* harmony import */ var _dialog_form__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./dialog-form */ \"./packages/element-ui/crud/dialog-form.vue\");\n/* harmony import */ var _dialog_excel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dialog-excel */ \"./packages/element-ui/crud/dialog-excel.vue\");\n/* harmony import */ var _column_menu__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./column-menu */ \"./packages/element-ui/crud/column-menu.vue\");\n/* harmony import */ var _column_default__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./column-default */ \"./packages/element-ui/crud/column-default.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_6__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n provide: function provide() {\n return {\n crud: this\n };\n },\n components: {\n column: _column__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n columnDefault: _column_default__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n //其它列,\n columnMenu: _column_menu__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n //操作栏,\n tablePage: _table_page__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n //分页\n headerSearch: _header_search__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n //搜索\n headerMenu: _header_menu__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n //菜单头部\n dialogColumn: _dialog_column__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n //显隐列\n dialogFilter: _dialog_filter__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n //过滤器\n dialogExcel: _dialog_excel__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n //导出数据\n dialogForm: _dialog_form__WEBPACK_IMPORTED_MODULE_11__[\"default\"] //分页,\n },\n data: function data() {\n return {\n reload: Math.random(),\n cellForm: {\n list: []\n },\n config: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n list: [],\n listError: {},\n tableForm: {},\n tableHeight: undefined,\n tableIndex: -1,\n tableSelect: [],\n sumsList: {},\n cascaderIndexList: [],\n cascaderDicList: {},\n cascaderFormList: {},\n btnDisabledList: {},\n btnDisabled: false,\n \"default\": {}\n };\n },\n mounted: function mounted() {\n this.dataInit();\n this.getTableHeight();\n this.refreshTable();\n },\n computed: {\n isSortable: function isSortable() {\n return this.tableOption.sortable;\n },\n isRowSort: function isRowSort() {\n return this.tableOption.rowSort;\n },\n isColumnSort: function isColumnSort() {\n return this.tableOption.columnSort;\n },\n rowParentKey: function rowParentKey() {\n return this.option.rowParentKey || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].rowParentKey;\n },\n childrenKey: function childrenKey() {\n return this.treeProps.children || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].children;\n },\n hasChildrenKey: function hasChildrenKey() {\n return this.treeProps.hasChildren || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].hasChildren;\n },\n treeProps: function treeProps() {\n return this.tableOption.treeProps || {};\n },\n isAutoHeight: function isAutoHeight() {\n return this.tableOption.height === \"auto\";\n },\n formSlot: function formSlot() {\n return this.getSlotList(['Error', 'Label', 'Type', 'Form', 'Header'], this.$scopedSlots, this.propOption);\n },\n searchSlot: function searchSlot() {\n return this.getSlotList(['Search'], this.$scopedSlots, this.propOption);\n },\n mainSlot: function mainSlot() {\n var _this = this;\n var result = [];\n this.propOption.forEach(function (item) {\n if (_this.$scopedSlots[item.prop]) result.push(item.prop);\n });\n return this.getSlotList(['Header', 'Form'], this.$scopedSlots, this.propOption).concat(result);\n },\n calcHeight: function calcHeight() {\n return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;\n },\n propOption: function propOption() {\n var result = [];\n function findProp() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n if (!Array.isArray(list)) return;\n list.forEach(function (ele) {\n if (Array.isArray(ele.children)) findProp(ele.children);else result.push(ele);\n });\n }\n findProp(this.columnOption);\n result = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__[\"calcCascader\"])(result);\n return result;\n },\n isShowSummary: function isShowSummary() {\n return this.option.showSummary;\n },\n isHeader: function isHeader() {\n var flag = false;\n this.columnOption.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isTree: function isTree() {\n var flag = false;\n this.data.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isCard: function isCard() {\n return this.option.card ? 'always' : 'never';\n },\n expandLevel: function expandLevel() {\n return this.parentOption.expandLevel || 0;\n },\n expandAll: function expandAll() {\n return this.parentOption.expandAll || false;\n },\n parentOption: function parentOption() {\n return this.tableOption || {};\n },\n columnOption: function columnOption() {\n var tableOption = this.deepClone(this.tableOption);\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_18__[\"getColumn\"])(tableOption.column);\n },\n sumColumnList: function sumColumnList() {\n return this.tableOption.sumColumnList || [];\n },\n selectLen: function selectLen() {\n return this.tableSelect ? this.tableSelect.length : 0;\n }\n },\n watch: {\n value: {\n handler: function handler() {\n this.tableForm = this.value;\n },\n immediate: true,\n deep: true\n },\n list: {\n handler: function handler() {\n this.cellForm.list = this.list;\n },\n deep: true\n },\n data: {\n handler: function handler() {\n this.dataInit();\n },\n deep: true\n }\n },\n props: {\n spanMethod: Function,\n summaryMethod: Function,\n rowStyle: Function,\n cellStyle: Function,\n beforeClose: Function,\n beforeOpen: Function,\n rowClassName: Function,\n cellClassName: Function,\n headerCellClassName: Function,\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n permission: {\n type: [Function, Object],\n \"default\": function _default() {\n return {};\n }\n },\n value: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n search: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n page: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n tableLoading: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n data: {\n type: Array,\n required: true,\n \"default\": function _default() {\n return [];\n }\n }\n },\n methods: {\n handleValidate: function handleValidate(prop, valid, msg) {\n if (!this.listError[prop]) this.$set(this.listError, prop, {\n valid: false,\n msg: ''\n });\n this.listError[prop].valid = !valid;\n this.listError[prop].msg = msg;\n },\n getPermission: function getPermission(key, row, index) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, row, index);\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n getTableHeight: function getTableHeight() {\n var _this2 = this;\n if (this.isAutoHeight) {\n this.$nextTick(function () {\n var tableRef = _this2.$refs.table;\n var tablePageRef = _this2.$refs.tablePage;\n if (!tableRef) return;\n var tableStyle = tableRef.$el;\n var pageStyle = tablePageRef.$el.offsetHeight || 20;\n _this2.tableHeight = document.documentElement.clientHeight - tableStyle.offsetTop - pageStyle - _this2.calcHeight;\n });\n } else {\n this.tableHeight = this.tableOption.height;\n }\n },\n doLayout: function doLayout() {\n this.$refs.table.doLayout();\n },\n refreshTable: function refreshTable(callback) {\n this.reload = Math.random();\n this.$nextTick(function () {\n callback && callback();\n });\n },\n //树懒加载\n treeLoad: function treeLoad(tree, treeNode, resolve) {\n this.$emit('tree-load', tree, treeNode, function (data) {\n tree.children = data;\n resolve(data);\n });\n },\n menuIcon: function menuIcon(value) {\n return this.vaildData(this.tableOption[value + 'Text'], this.t(\"crud.\" + value));\n },\n getBtnIcon: function getBtnIcon(value) {\n var name = value + 'Icon';\n return this.tableOption[name] || _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"][name];\n },\n //对部分表单字段进行校验的方法\n validateField: function validateField(val) {\n return this.$refs.dialogForm.$refs.tableForm.validateField(val);\n },\n clearSelection: function clearSelection() {\n this.$emit('selection-clear', this.deepClone(this.tableSelect));\n this.$refs.table.clearSelection();\n },\n toggleAllSelection: function toggleAllSelection() {\n this.$refs.table.toggleAllSelection();\n },\n toggleRowSelection: function toggleRowSelection(row, selected) {\n this.$refs.table.toggleRowSelection(row, selected);\n },\n toggleRowExpansion: function toggleRowExpansion(row, expanded) {\n this.$refs.table.toggleRowExpansion(row, expanded);\n },\n setCurrentRow: function setCurrentRow(row) {\n this.$refs.table.setCurrentRow(row);\n },\n dataInit: function dataInit() {\n var _this3 = this;\n this.list = this.data;\n this.list.forEach(function (ele, index) {\n if (ele.$cellEdit && !_this3.cascaderFormList[index]) {\n _this3.cascaderFormList[index] = _this3.deepClone(ele);\n }\n _this3.$set(ele, '$cellEdit', ele.$cellEdit || false);\n _this3.$set(ele, '$index', index);\n });\n },\n //拖动表头事件\n headerDragend: function headerDragend(newWidth, oldWidth, column, event) {\n var obj = this.objectOption[column.property];\n if (obj) this.$set(this.objectOption[column.property], 'width', newWidth);\n this.$emit(\"header-dragend\", newWidth, oldWidth, column, event);\n },\n headerSort: function headerSort(oldIndex, newIndex) {\n var column = this.columnOption;\n var targetRow = column.splice(oldIndex, 1)[0];\n column.splice(newIndex, 0, targetRow);\n this.refreshTable();\n },\n // 清除过滤器执行函数\n clearFilter: function clearFilter(name) {\n this.$refs.table.clearFilter(name);\n },\n //展开或则关闭\n expandChange: function expandChange(row, expand) {\n this.$emit(\"expand-change\", row, expand);\n },\n //设置单选\n currentRowChange: function currentRowChange(currentRow, oldCurrentRow) {\n this.$emit(\"current-row-change\", currentRow, oldCurrentRow);\n },\n //刷新事件\n refreshChange: function refreshChange() {\n this.$emit(\"refresh-change\");\n },\n // 选中实例\n toggleSelection: function toggleSelection(rows) {\n var _this4 = this;\n if (rows) {\n rows.forEach(function (row) {\n _this4.$refs.table.toggleRowSelection(row);\n });\n } else {\n this.$refs.table.clearSelection();\n }\n },\n // 选择回调\n selectionChange: function selectionChange(val) {\n this.tableSelect = val;\n this.$emit(\"selection-change\", this.tableSelect);\n },\n // 单个选择回调\n select: function select(selection, row) {\n this.$emit(\"select\", selection, row);\n },\n // 点击勾选全选 Checkbox\n selectAll: function selectAll(selection) {\n this.$emit(\"select-all\", selection);\n },\n //筛选回调用\n filterChange: function filterChange(filters) {\n this.$emit(\"filter-change\", filters);\n },\n // 排序回调\n sortChange: function sortChange(val) {\n this.$emit(\"sort-change\", val);\n },\n // 行双击\n rowDblclick: function rowDblclick(row, event) {\n this.$emit(\"row-dblclick\", row, event);\n },\n // 行单机\n rowClick: function rowClick(row, event, column) {\n this.$emit(\"row-click\", row, event, column);\n },\n //清空排序\n clearSort: function clearSort() {\n this.$refs.table.clearSort();\n },\n //当单元格 hover 进入时会触发该事件\n cellMouseEnter: function cellMouseEnter(row, column, cell, event) {\n this.$emit(\"cell-mouse-enter\", row, column, cell, event);\n },\n //当单元格 hover 退出时会触发该事件\n cellMouseLeave: function cellMouseLeave(row, column, cell, event) {\n this.$emit(\"cell-mouse-leave\", row, column, cell, event);\n },\n //当某个单元格被点击时会触发该事件\n cellClick: function cellClick(row, column, cell, event) {\n this.$emit(\"cell-click\", row, column, cell, event);\n },\n //\t当某一列的表头被点击时会触发该事件\n headerClick: function headerClick(column, event) {\n this.$emit(\"header-click\", column, event);\n },\n //当某一行被鼠标右键点击时会触发该事件\n rowContextmenu: function rowContextmenu(row, column, event) {\n this.$emit(\"row-contextmenu\", row, column, event);\n },\n //当某一列的表头被鼠标右键点击时触发该事件\n headerContextmenu: function headerContextmenu(column, event) {\n this.$emit(\"header-contextmenu\", column, event);\n },\n //当某个单元格被双击击时会触发该事件\n cellDblclick: function cellDblclick(row, column, cell, event) {\n this.$emit(\"cell-dblclick\", row, column, cell, event);\n },\n //单元格新增\n rowCellAdd: function rowCellAdd() {\n var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var len = this.list.length;\n var formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__[\"formInitVal\"])(this.propOption).tableForm;\n row = this.deepClone(Object.assign({\n $cellEdit: true,\n $index: len\n }, formDefault, row));\n this.list.push(row);\n },\n //行取消\n rowCancel: function rowCancel(row, index) {\n if (this.validatenull(row[this.rowKey])) {\n this.list.splice(index, 1);\n delete this.cascaderDIC[index];\n } else {\n this.cascaderFormList[index].$cellEdit = false;\n this.$set(this.cascaderDIC, index, this.cascaderDicList[index]);\n this.$set(this.list, index, this.cascaderFormList[index]);\n }\n delete this.cascaderDicList[index];\n delete this.cascaderFormList[index];\n this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);\n },\n //行编辑点击\n rowCell: function rowCell(row, index) {\n if (row.$cellEdit) {\n this.rowCellUpdate(row, index);\n } else {\n this.rowCellEdit(row, index);\n }\n },\n rowCellUpdate: function rowCellUpdate(row, index) {\n var _this5 = this;\n row = this.deepClone(row);\n var result = this.validateCellField(index);\n var done = function done() {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n _this5.list[index].$cellEdit = false;\n _this5.cascaderIndexList.splice(_this5.cascaderIndexList.indexOf(index), 1);\n delete _this5.cascaderFormList[index];\n };\n var loading = function loading() {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n };\n if (result) {\n this.btnDisabledList[index] = true;\n this.btnDisabled = true;\n if (this.validatenull(row[this.rowKey])) {\n this.$emit(\"row-save\", row, done, loading);\n } else {\n this.$emit(\"row-update\", row, index, done, loading);\n }\n }\n },\n // 单元格编辑\n rowCellEdit: function rowCellEdit(row, index) {\n row.$cellEdit = true;\n //缓冲行数据\n this.cascaderFormList[index] = this.deepClone(row);\n //缓冲级联字典\n this.cascaderDicList[index] = this.deepClone(this.cascaderDIC[index]);\n },\n // 对部分表单字段进行校验\n validateCellForm: function validateCellForm(cb) {\n var _this6 = this;\n return new Promise(function (resolve) {\n _this6.$refs.cellForm.validate(function (valid, msg) {\n resolve(msg);\n });\n });\n },\n validateCellField: function validateCellField(index) {\n var result = true;\n var _iterator = _createForOfIteratorHelper(this.$refs.cellForm.fields),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n if (item.prop.split('.')[1] == index) {\n this.$refs.cellForm.validateField(item.prop, function (error) {\n if (error) {\n result = false;\n }\n });\n }\n if (!result) break;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return result;\n },\n rowAdd: function rowAdd() {\n this.$refs.dialogForm.show(\"add\");\n },\n rowSave: function rowSave() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n rowUpdate: function rowUpdate() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n closeDialog: function closeDialog() {\n return this.$refs.dialogForm.closeDialog();\n },\n getPropRef: function getPropRef(prop) {\n return this.$refs.dialogForm.$refs.tableForm.getPropRef(prop);\n },\n setVal: function setVal() {\n this.$emit(\"input\", this.tableForm);\n this.$emit(\"change\", this.tableForm);\n },\n // 编辑\n rowEdit: function rowEdit(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"edit\");\n },\n //复制\n rowCopy: function rowCopy(row) {\n this.tableForm = this.deepClone(row);\n delete this.tableForm[this.rowKey];\n this.tableIndex = -1;\n this.setVal();\n this.$refs.dialogForm.show(\"add\");\n },\n //查看\n rowView: function rowView(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"view\");\n },\n // 删除\n rowDel: function rowDel(row, index) {\n var _this7 = this;\n this.$emit(\"row-del\", row, index, function () {\n var _this7$findData = _this7.findData(row[_this7.rowKey]),\n parentList = _this7$findData.parentList,\n index = _this7$findData.index;\n if (parentList) parentList.splice(index, 1);\n });\n },\n //合并行\n tableSpanMethod: function tableSpanMethod(param) {\n if (typeof this.spanMethod === \"function\") return this.spanMethod(param);\n },\n //合集统计逻辑\n tableSummaryMethod: function tableSummaryMethod(param) {\n var _this8 = this;\n var sumsList = {};\n var sums = [];\n var columns = param.columns,\n data = param.data;\n //如果自己写逻辑则调用summaryMethod方法\n if (typeof this.summaryMethod === \"function\") {\n sums = this.summaryMethod(param);\n columns.forEach(function (column, index) {\n sumsList[column.property] = sums[index];\n });\n this.sumsList = sumsList;\n } else {\n columns.forEach(function (column, index) {\n var currItem = _this8.sumColumnList.find(function (item) {\n return item.name === column.property;\n });\n if (currItem) {\n var decimals = currItem.decimals || 2;\n var label = currItem.label || '';\n switch (currItem.type) {\n case \"count\":\n sums[index] = label + data.length;\n break;\n case \"avg\":\n var avgValues = data.map(function (item) {\n return Number(item[column.property]);\n });\n var nowindex = 1;\n sums[index] = avgValues.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return (perv * (nowindex - 1) + curr) / nowindex++;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n case \"sum\":\n var values = data.map(function (item) {\n return Number(item[column.property]);\n });\n sums[index] = values.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return perv + curr;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n }\n sumsList[column.property] = sums[index];\n } else {\n sums[index] = \"\";\n }\n });\n }\n this.sumsList = sumsList;\n return sums;\n },\n tableDrop: function tableDrop(type, el, callback) {\n if (this.isSortable !== true) {\n if (type == 'row' && !this.isRowSort) {\n return;\n } else if (type == 'column' && !this.isColumnSort) {\n return;\n }\n }\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"Sortable\");\n return;\n }\n window.Sortable.create(el, {\n ghostClass: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"].ghostClass,\n chosenClass: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"].ghostClass,\n animation: 500,\n delay: 0,\n onEnd: function onEnd(evt) {\n return callback(evt);\n }\n });\n },\n findData: function findData(id) {\n var _this9 = this;\n var result = {};\n var callback = function callback(parentList, parent) {\n parentList.forEach(function (ele, index) {\n if (ele[_this9.rowKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[_this9.childrenKey]) {\n callback(ele[_this9.childrenKey], ele);\n }\n });\n };\n callback(this.list);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
593
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n/* harmony import */ var _table_page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./table-page */ \"./packages/element-ui/crud/table-page.vue\");\n/* harmony import */ var _header_search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./header-search */ \"./packages/element-ui/crud/header-search.vue\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./column */ \"./packages/element-ui/crud/column.vue\");\n/* harmony import */ var _header_menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header-menu */ \"./packages/element-ui/crud/header-menu.vue\");\n/* harmony import */ var _dialog_column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dialog-column */ \"./packages/element-ui/crud/dialog-column.vue\");\n/* harmony import */ var _dialog_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dialog-filter */ \"./packages/element-ui/crud/dialog-filter.vue\");\n/* harmony import */ var _dialog_form__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./dialog-form */ \"./packages/element-ui/crud/dialog-form.vue\");\n/* harmony import */ var _dialog_excel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dialog-excel */ \"./packages/element-ui/crud/dialog-excel.vue\");\n/* harmony import */ var _column_menu__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./column-menu */ \"./packages/element-ui/crud/column-menu.vue\");\n/* harmony import */ var _column_default__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./column-default */ \"./packages/element-ui/crud/column-default.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_6__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n provide() {\n return {\n crud: this\n };\n },\n components: {\n column: _column__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n columnDefault: _column_default__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n //其它列,\n columnMenu: _column_menu__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n //操作栏,\n tablePage: _table_page__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n //分页\n headerSearch: _header_search__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n //搜索\n headerMenu: _header_menu__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n //菜单头部\n dialogColumn: _dialog_column__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n //显隐列\n dialogFilter: _dialog_filter__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n //过滤器\n dialogExcel: _dialog_excel__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n //导出数据\n dialogForm: _dialog_form__WEBPACK_IMPORTED_MODULE_11__[\"default\"] //分页,\n },\n data() {\n return {\n reload: Math.random(),\n cellForm: {\n list: []\n },\n config: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n list: [],\n listError: {},\n tableForm: {},\n tableHeight: undefined,\n tableIndex: -1,\n tableSelect: [],\n sumsList: {},\n cascaderIndexList: [],\n cascaderDicList: {},\n cascaderFormList: {},\n btnDisabledList: {},\n btnDisabled: false,\n default: {}\n };\n },\n mounted() {\n this.dataInit();\n this.getTableHeight();\n this.refreshTable();\n },\n computed: {\n isSortable() {\n return this.tableOption.sortable;\n },\n isRowSort() {\n return this.tableOption.rowSort;\n },\n isColumnSort() {\n return this.tableOption.columnSort;\n },\n rowParentKey() {\n return this.option.rowParentKey || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].rowParentKey;\n },\n childrenKey() {\n return this.treeProps.children || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].children;\n },\n hasChildrenKey() {\n return this.treeProps.hasChildren || global_variable__WEBPACK_IMPORTED_MODULE_17__[\"DIC_PROPS\"].hasChildren;\n },\n treeProps() {\n return this.tableOption.treeProps || {};\n },\n isAutoHeight() {\n return this.tableOption.height === \"auto\";\n },\n formSlot() {\n return this.getSlotList(['Error', 'Label', 'Type', 'Form', 'Header'], this.$scopedSlots, this.propOption);\n },\n searchSlot() {\n return this.getSlotList(['Search'], this.$scopedSlots, this.propOption);\n },\n mainSlot() {\n let result = [];\n this.propOption.forEach(item => {\n if (this.$scopedSlots[item.prop]) result.push(item.prop);\n });\n return this.getSlotList(['Header', 'Form'], this.$scopedSlots, this.propOption).concat(result);\n },\n calcHeight() {\n return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;\n },\n propOption() {\n let result = [];\n function findProp(list = []) {\n if (!Array.isArray(list)) return;\n list.forEach(ele => {\n if (Array.isArray(ele.children)) findProp(ele.children);else result.push(ele);\n });\n }\n findProp(this.columnOption);\n result = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__[\"calcCascader\"])(result);\n return result;\n },\n isShowSummary() {\n return this.option.showSummary;\n },\n isHeader() {\n let flag = false;\n this.columnOption.forEach(ele => {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isTree() {\n let flag = false;\n this.data.forEach(ele => {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isCard() {\n return this.option.card ? 'always' : 'never';\n },\n expandLevel() {\n return this.parentOption.expandLevel || 0;\n },\n expandAll() {\n return this.parentOption.expandAll || false;\n },\n parentOption() {\n return this.tableOption || {};\n },\n columnOption() {\n let tableOption = this.deepClone(this.tableOption);\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_18__[\"getColumn\"])(tableOption.column);\n },\n sumColumnList() {\n return this.tableOption.sumColumnList || [];\n },\n selectLen() {\n return this.tableSelect ? this.tableSelect.length : 0;\n }\n },\n watch: {\n value: {\n handler() {\n this.tableForm = this.value;\n },\n immediate: true,\n deep: true\n },\n list: {\n handler() {\n this.cellForm.list = this.list;\n },\n deep: true\n },\n data: {\n handler() {\n this.dataInit();\n },\n deep: true\n }\n },\n props: {\n spanMethod: Function,\n summaryMethod: Function,\n rowStyle: Function,\n cellStyle: Function,\n beforeClose: Function,\n beforeOpen: Function,\n rowClassName: Function,\n cellClassName: Function,\n headerCellClassName: Function,\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n permission: {\n type: [Function, Object],\n default: () => {\n return {};\n }\n },\n value: {\n type: Object,\n default: () => {\n return {};\n }\n },\n search: {\n type: Object,\n default() {\n return {};\n }\n },\n page: {\n type: Object,\n default() {\n return {};\n }\n },\n tableLoading: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n data: {\n type: Array,\n required: true,\n default: () => {\n return [];\n }\n }\n },\n methods: {\n handleValidate(prop, valid, msg) {\n if (!this.listError[prop]) this.$set(this.listError, prop, {\n valid: false,\n msg: ''\n });\n this.listError[prop].valid = !valid;\n this.listError[prop].msg = msg;\n },\n getPermission(key, row, index) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, row, index);\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n getTableHeight() {\n if (this.isAutoHeight) {\n this.$nextTick(() => {\n const tableRef = this.$refs.table;\n const tablePageRef = this.$refs.tablePage;\n if (!tableRef) return;\n const tableStyle = tableRef.$el;\n const pageStyle = tablePageRef.$el.offsetHeight || 20;\n this.tableHeight = document.documentElement.clientHeight - tableStyle.offsetTop - pageStyle - this.calcHeight;\n });\n } else {\n this.tableHeight = this.tableOption.height;\n }\n },\n doLayout() {\n this.$refs.table.doLayout();\n },\n refreshTable(callback) {\n this.reload = Math.random();\n this.$nextTick(() => {\n callback && callback();\n });\n },\n //树懒加载\n treeLoad(tree, treeNode, resolve) {\n this.$emit('tree-load', tree, treeNode, data => {\n tree.children = data;\n resolve(data);\n });\n },\n menuIcon(value) {\n return this.vaildData(this.tableOption[value + 'Text'], this.t(\"crud.\" + value));\n },\n getBtnIcon(value) {\n const name = value + 'Icon';\n return this.tableOption[name] || _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"][name];\n },\n //对部分表单字段进行校验的方法\n validateField(val) {\n return this.$refs.dialogForm.$refs.tableForm.validateField(val);\n },\n clearSelection() {\n this.$emit('selection-clear', this.deepClone(this.tableSelect));\n this.$refs.table.clearSelection();\n },\n toggleAllSelection() {\n this.$refs.table.toggleAllSelection();\n },\n toggleRowSelection(row, selected) {\n this.$refs.table.toggleRowSelection(row, selected);\n },\n toggleRowExpansion(row, expanded) {\n this.$refs.table.toggleRowExpansion(row, expanded);\n },\n setCurrentRow(row) {\n this.$refs.table.setCurrentRow(row);\n },\n dataInit() {\n this.list = this.data;\n this.list.forEach((ele, index) => {\n if (ele.$cellEdit && !this.cascaderFormList[index]) {\n this.cascaderFormList[index] = this.deepClone(ele);\n }\n this.$set(ele, '$cellEdit', ele.$cellEdit || false);\n this.$set(ele, '$index', index);\n });\n },\n //拖动表头事件\n headerDragend(newWidth, oldWidth, column, event) {\n let obj = this.objectOption[column.property];\n if (obj) this.$set(this.objectOption[column.property], 'width', newWidth);\n this.$emit(\"header-dragend\", newWidth, oldWidth, column, event);\n },\n headerSort(oldIndex, newIndex) {\n let column = this.columnOption;\n let targetRow = column.splice(oldIndex, 1)[0];\n column.splice(newIndex, 0, targetRow);\n this.refreshTable();\n },\n // 清除过滤器执行函数\n clearFilter(name) {\n this.$refs.table.clearFilter(name);\n },\n //展开或则关闭\n expandChange(row, expand) {\n this.$emit(\"expand-change\", row, expand);\n },\n //设置单选\n currentRowChange(currentRow, oldCurrentRow) {\n this.$emit(\"current-row-change\", currentRow, oldCurrentRow);\n },\n //刷新事件\n refreshChange() {\n this.$emit(\"refresh-change\");\n },\n // 选中实例\n toggleSelection(rows) {\n if (rows) {\n rows.forEach(row => {\n this.$refs.table.toggleRowSelection(row);\n });\n } else {\n this.$refs.table.clearSelection();\n }\n },\n // 选择回调\n selectionChange(val) {\n this.tableSelect = val;\n this.$emit(\"selection-change\", this.tableSelect);\n },\n // 单个选择回调\n select(selection, row) {\n this.$emit(\"select\", selection, row);\n },\n // 点击勾选全选 Checkbox\n selectAll(selection) {\n this.$emit(\"select-all\", selection);\n },\n //筛选回调用\n filterChange(filters) {\n this.$emit(\"filter-change\", filters);\n },\n // 排序回调\n sortChange(val) {\n this.$emit(\"sort-change\", val);\n },\n // 行双击\n rowDblclick(row, event) {\n this.$emit(\"row-dblclick\", row, event);\n },\n // 行单机\n rowClick(row, event, column) {\n this.$emit(\"row-click\", row, event, column);\n },\n //清空排序\n clearSort() {\n this.$refs.table.clearSort();\n },\n //当单元格 hover 进入时会触发该事件\n cellMouseEnter(row, column, cell, event) {\n this.$emit(\"cell-mouse-enter\", row, column, cell, event);\n },\n //当单元格 hover 退出时会触发该事件\n cellMouseLeave(row, column, cell, event) {\n this.$emit(\"cell-mouse-leave\", row, column, cell, event);\n },\n //当某个单元格被点击时会触发该事件\n cellClick(row, column, cell, event) {\n this.$emit(\"cell-click\", row, column, cell, event);\n },\n //\t当某一列的表头被点击时会触发该事件\n headerClick(column, event) {\n this.$emit(\"header-click\", column, event);\n },\n //当某一行被鼠标右键点击时会触发该事件\n rowContextmenu(row, column, event) {\n this.$emit(\"row-contextmenu\", row, column, event);\n },\n //当某一列的表头被鼠标右键点击时触发该事件\n headerContextmenu(column, event) {\n this.$emit(\"header-contextmenu\", column, event);\n },\n //当某个单元格被双击击时会触发该事件\n cellDblclick(row, column, cell, event) {\n this.$emit(\"cell-dblclick\", row, column, cell, event);\n },\n //单元格新增\n rowCellAdd(row = {}) {\n let len = this.list.length;\n let formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__[\"formInitVal\"])(this.propOption).tableForm;\n row = this.deepClone(Object.assign({\n $cellEdit: true,\n $index: len\n }, formDefault, row));\n this.list.push(row);\n },\n //行取消\n rowCancel(row, index) {\n if (this.validatenull(row[this.rowKey])) {\n this.list.splice(index, 1);\n delete this.cascaderDIC[index];\n } else {\n this.cascaderFormList[index].$cellEdit = false;\n this.$set(this.cascaderDIC, index, this.cascaderDicList[index]);\n this.$set(this.list, index, this.cascaderFormList[index]);\n }\n delete this.cascaderDicList[index];\n delete this.cascaderFormList[index];\n this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);\n },\n //行编辑点击\n rowCell(row, index) {\n if (row.$cellEdit) {\n this.rowCellUpdate(row, index);\n } else {\n this.rowCellEdit(row, index);\n }\n },\n rowCellUpdate(row, index) {\n row = this.deepClone(row);\n var result = this.validateCellField(index);\n const done = () => {\n this.btnDisabledList[index] = false;\n this.btnDisabled = false;\n this.list[index].$cellEdit = false;\n this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);\n delete this.cascaderFormList[index];\n };\n const loading = () => {\n this.btnDisabledList[index] = false;\n this.btnDisabled = false;\n };\n if (result) {\n this.btnDisabledList[index] = true;\n this.btnDisabled = true;\n if (this.validatenull(row[this.rowKey])) {\n this.$emit(\"row-save\", row, done, loading);\n } else {\n this.$emit(\"row-update\", row, index, done, loading);\n }\n }\n },\n // 单元格编辑\n rowCellEdit(row, index) {\n row.$cellEdit = true;\n //缓冲行数据\n this.cascaderFormList[index] = this.deepClone(row);\n //缓冲级联字典\n this.cascaderDicList[index] = this.deepClone(this.cascaderDIC[index]);\n },\n // 对部分表单字段进行校验\n validateCellForm(cb) {\n return new Promise(resolve => {\n this.$refs.cellForm.validate((valid, msg) => {\n resolve(msg);\n });\n });\n },\n validateCellField(index) {\n let result = true;\n for (const item of this.$refs.cellForm.fields) {\n if (item.prop.split('.')[1] == index) {\n this.$refs.cellForm.validateField(item.prop, error => {\n if (error) {\n result = false;\n }\n });\n }\n if (!result) break;\n }\n return result;\n },\n rowAdd() {\n this.$refs.dialogForm.show(\"add\");\n },\n rowSave() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n rowUpdate() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n closeDialog() {\n return this.$refs.dialogForm.closeDialog();\n },\n getPropRef(prop) {\n return this.$refs.dialogForm.$refs.tableForm.getPropRef(prop);\n },\n setVal() {\n this.$emit(\"input\", this.tableForm);\n this.$emit(\"change\", this.tableForm);\n },\n // 编辑\n rowEdit(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"edit\");\n },\n //复制\n rowCopy(row) {\n this.tableForm = this.deepClone(row);\n delete this.tableForm[this.rowKey];\n this.tableIndex = -1;\n this.setVal();\n this.$refs.dialogForm.show(\"add\");\n },\n //查看\n rowView(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"view\");\n },\n // 删除\n rowDel(row, index) {\n this.$emit(\"row-del\", row, index, () => {\n let {\n parentList,\n index\n } = this.findData(row[this.rowKey]);\n if (parentList) parentList.splice(index, 1);\n });\n },\n //合并行\n tableSpanMethod(param) {\n if (typeof this.spanMethod === \"function\") return this.spanMethod(param);\n },\n //合集统计逻辑\n tableSummaryMethod(param) {\n let sumsList = {};\n let sums = [];\n const {\n columns,\n data\n } = param;\n //如果自己写逻辑则调用summaryMethod方法\n if (typeof this.summaryMethod === \"function\") {\n sums = this.summaryMethod(param);\n columns.forEach((column, index) => {\n sumsList[column.property] = sums[index];\n });\n this.sumsList = sumsList;\n } else {\n columns.forEach((column, index) => {\n let currItem = this.sumColumnList.find(item => item.name === column.property);\n if (currItem) {\n let decimals = currItem.decimals || 2;\n let label = currItem.label || '';\n switch (currItem.type) {\n case \"count\":\n sums[index] = label + data.length;\n break;\n case \"avg\":\n let avgValues = data.map(item => Number(item[column.property]));\n let nowindex = 1;\n sums[index] = avgValues.reduce((perv, curr) => {\n let value = Number(curr);\n if (!isNaN(value)) {\n return (perv * (nowindex - 1) + curr) / nowindex++;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n case \"sum\":\n let values = data.map(item => Number(item[column.property]));\n sums[index] = values.reduce((perv, curr) => {\n let value = Number(curr);\n if (!isNaN(value)) {\n return perv + curr;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n }\n sumsList[column.property] = sums[index];\n } else {\n sums[index] = \"\";\n }\n });\n }\n this.sumsList = sumsList;\n return sums;\n },\n tableDrop(type, el, callback) {\n if (this.isSortable !== true) {\n if (type == 'row' && !this.isRowSort) {\n return;\n } else if (type == 'column' && !this.isColumnSort) {\n return;\n }\n }\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"Sortable\");\n return;\n }\n window.Sortable.create(el, {\n ghostClass: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"].ghostClass,\n chosenClass: _config_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"].ghostClass,\n animation: 500,\n delay: 0,\n onEnd: evt => callback(evt)\n });\n },\n findData(id) {\n let result = {};\n const callback = (parentList, parent) => {\n parentList.forEach((ele, index) => {\n if (ele[this.rowKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[this.childrenKey]) {\n callback(ele[this.childrenKey], ele);\n }\n });\n };\n callback(this.list);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
594
594
|
|
595
595
|
/***/ }),
|
596
596
|
|
@@ -602,7 +602,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
602
602
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
603
603
|
|
604
604
|
"use strict";
|
605
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"crud\",\n inject: [\"crud\"],\n data
|
605
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"crud\",\n inject: [\"crud\"],\n data() {\n return {\n config: _config__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n defaultPage: {\n single: false,\n total: 0,\n // 总页数\n pagerCount: 7,\n //超过多少条隐藏\n currentPage: 1,\n // 当前页数\n pageSize: 10,\n // 每页显示多少条\n pageSizes: [10, 20, 30, 40, 50, 100],\n layout: 'total, sizes, prev, pager, next, jumper',\n background: true // 背景颜色\n }\n };\n },\n created() {\n if (this.crud.isMobile) {\n this.defaultPage.layout = 'total, sizes, prev, pager, next';\n }\n this.pageInit();\n this.crud.$emit(\"on-load\", this.defaultPage);\n },\n watch: {\n 'crud.page': {\n handler() {\n this.pageInit();\n },\n deep: true\n },\n pageFlag() {\n this.crud.getTableHeight();\n },\n //如果当前页面删除没数据了调用第一页\n 'defaultPage.total'(val) {\n if (this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && this.defaultPage.total != 0) {\n this.defaultPage.currentPage = this.defaultPage.currentPage - 1;\n this.currentChange(this.defaultPage.currentPage);\n }\n }\n },\n computed: {\n pageFlag() {\n return this.defaultPage.total != 0;\n }\n },\n methods: {\n pageInit() {\n this.defaultPage = Object.assign(this.defaultPage, this.crud.page);\n this.updateValue();\n },\n updateValue() {\n this.crud.$emit('update:page', this.defaultPage);\n },\n //下一页事件\n nextClick(val) {\n this.crud.$emit(\"next-click\", val);\n },\n //上一页事件\n prevClick(val) {\n this.crud.$emit(\"prev-click\", val);\n },\n // 页大小回调\n sizeChange(val) {\n this.defaultPage.currentPage = 1;\n this.defaultPage.pageSize = val;\n this.updateValue();\n this.crud.$emit(\"on-load\", this.defaultPage);\n this.crud.$emit(\"size-change\", val);\n },\n // 页码回调\n currentChange(val) {\n this.updateValue();\n this.crud.$emit(\"on-load\", this.defaultPage);\n this.crud.$emit(\"current-change\", val);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/table-page.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
606
606
|
|
607
607
|
/***/ }),
|
608
608
|
|
@@ -614,7 +614,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _con
|
|
614
614
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
615
615
|
|
616
616
|
"use strict";
|
617
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"date\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n props: {\n editable: Boolean,\n unlinkPanels: Boolean,\n startPlaceholder: String,\n endPlaceholder: String,\n rangeSeparator: String,\n defaultValue: [String, Array],\n defaultTime: [String, Array],\n pickerOptions: Object,\n type: {\n type: String,\n
|
617
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"date\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n props: {\n editable: Boolean,\n unlinkPanels: Boolean,\n startPlaceholder: String,\n endPlaceholder: String,\n rangeSeparator: String,\n defaultValue: [String, Array],\n defaultTime: [String, Array],\n pickerOptions: Object,\n type: {\n type: String,\n default: \"date\"\n },\n valueFormat: String,\n format: String\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/date/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
618
618
|
|
619
619
|
/***/ }),
|
620
620
|
|
@@ -626,7 +626,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
626
626
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
627
627
|
|
628
628
|
"use strict";
|
629
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"draggable\",\n props: {\n index: {\n type: [String, Number]\n },\n mask: {\n type: Boolean,\n \"default\": true\n },\n scale: {\n type: Number,\n \"default\": 1\n },\n readonly: {\n type: Boolean,\n \"default\": false\n },\n resize: {\n type: Boolean,\n \"default\": true\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n lock: {\n type: Boolean,\n \"default\": false\n },\n step: {\n type: Number,\n \"default\": 1\n },\n zIndex: {\n type: [Number, String],\n \"default\": 1\n },\n left: {\n type: Number,\n \"default\": 0\n },\n top: {\n type: Number,\n \"default\": 0\n },\n width: {\n type: Number\n },\n height: {\n type: Number\n }\n },\n data: function data() {\n return {\n first: true,\n value: '',\n baseWidth: 0,\n baseHeight: 0,\n baseLeft: 0,\n baseTop: 0,\n children: {},\n moveActive: false,\n overActive: false,\n rangeActive: false,\n active: false,\n keyDown: null,\n rangeList: [{\n classname: \"left\"\n }, {\n classname: \"right\"\n }, {\n classname: \"top\"\n }, {\n classname: \"bottom\"\n }, {\n classname: \"top-left\"\n }, {\n classname: \"top-right\"\n }, {\n classname: \"bottom-left\"\n }, {\n classname: \"bottom-right\"\n }]\n };\n },\n computed: {\n scaleVal: function scaleVal() {\n return this.scale;\n },\n styleMenuName: function styleMenuName() {\n return {\n transformOrigin: \"0 0\",\n transform: \"scale(\".concat(this.scaleVal, \")\")\n };\n },\n styleLineName: function styleLineName() {\n return {\n borderWidth: this.setPx(this.scaleVal)\n };\n },\n styleRangeName: function styleRangeName() {\n var calc = 10 * this.scaleVal;\n return {\n width: this.setPx(calc),\n height: this.setPx(calc)\n };\n },\n styleLabelName: function styleLabelName() {\n return {\n fontSize: this.setPx(18 * this.scaleVal)\n };\n },\n styleName: function styleName() {\n var _this = this;\n return Object.assign(function () {\n if (_this.active) {\n return Object.assign({\n zIndex: 9999\n }, _this.styleLineName);\n }\n return {\n zIndex: _this.zIndex\n };\n }(), {\n top: this.setPx(this.baseTop),\n left: this.setPx(this.baseLeft),\n width: this.setPx(this.baseWidth),\n height: this.setPx(this.baseHeight)\n });\n }\n },\n watch: {\n active: function active(val) {\n if (val) {\n this.handleKeydown();\n } else {\n document.onkeydown = this.keyDown;\n }\n },\n width: function width(val) {\n this.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val) || this.children.offsetWidth;\n },\n height: function height(val) {\n this.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val) || this.children.offsetHeight;\n },\n left: function left(val) {\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val);\n },\n top: function top(val) {\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val);\n },\n baseWidth: function baseWidth(val) {\n this.$refs.wrapper.style.width = this.setPx(val);\n if (this.resize && this.children.style) {\n this.children.style.width = this.setPx(val);\n }\n },\n baseHeight: function baseHeight(val) {\n this.$refs.wrapper.style.height = this.setPx(val);\n if (this.resize && this.children.style) {\n this.children.style.height = this.setPx(val);\n }\n },\n baseLeft: function baseLeft(n, o) {\n if (this.first) return;\n this.setMove(n - o, 0);\n },\n baseTop: function baseTop(n, o) {\n if (this.first) return;\n this.setMove(0, n - o);\n }\n },\n mounted: function mounted() {\n this.init();\n },\n methods: {\n init: function init() {\n var _this2 = this;\n this.children = this.$refs.item.firstChild;\n this.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.width) || this.children.offsetWidth;\n this.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.height) || this.children.offsetHeight;\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.left);\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.top);\n this.keyDown = document.onkeydown;\n this.$nextTick(function () {\n _this2.first = false;\n });\n },\n setMove: function setMove(left, top) {\n this.$emit('move', {\n index: this.index,\n left: left,\n top: top\n });\n },\n setLeft: function setLeft(left) {\n this.baseLeft = left;\n },\n setTop: function setTop(top) {\n this.baseTop = top;\n },\n getRangeStyle: function getRangeStyle(postion) {\n var _this3 = this;\n var calc = 10 * this.scaleVal / 2;\n var result = {};\n var list = postion.split(\"-\");\n list.forEach(function (ele) {\n result[ele] = _this3.setPx(-calc);\n });\n return result;\n },\n setOverActive: function setOverActive(val) {\n this.overActive = val;\n },\n setActive: function setActive(val) {\n this.active = val;\n },\n rangeMove: function rangeMove(e, position) {\n var _this4 = this;\n if (this.disabled || this.lock) return;\n //移动的方向\n var x, y;\n //移动的位置\n var xp, yp;\n //移动的正负\n var xc, yc;\n this.rangeActive = true;\n this.handleMouseDown();\n var disX = e.clientX;\n var disY = e.clientY;\n document.onmousemove = function (e) {\n _this4.moveActive = true;\n if (position === \"right\") {\n x = true;\n y = false;\n } else if (position === \"left\") {\n x = true;\n xp = true;\n xc = true;\n y = false;\n } else if (position === \"top\") {\n x = false;\n y = true;\n yp = true;\n yc = true;\n } else if (position === \"bottom\") {\n x = false;\n y = true;\n } else if (position === \"bottom-right\") {\n x = true;\n y = true;\n } else if (position === \"bottom-left\") {\n x = true;\n y = true;\n xp = true;\n xc = true;\n } else if (position === \"top-right\") {\n x = true;\n y = true;\n yp = true;\n yc = true;\n } else if (position === \"top-left\") {\n x = true;\n y = true;\n xp = true;\n xc = true;\n yp = true;\n yc = true;\n }\n var left = e.clientX - disX;\n var top = e.clientY - disY;\n disX = e.clientX;\n disY = e.clientY;\n if (x) {\n var calc = left * _this4.step;\n if (xc) calc = -calc;\n if (xp) _this4.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this4.baseLeft - calc);\n _this4.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this4.baseWidth + calc);\n }\n if (y) {\n var _calc = top * _this4.step;\n if (yc) _calc = -_calc;\n if (yp) _this4.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this4.baseTop - _calc);\n _this4.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this4.baseHeight + _calc);\n }\n };\n this.handleClear();\n },\n handleOut: function handleOut() {\n this.overActive = false;\n this.$emit(\"out\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleOver: function handleOver() {\n if (this.disabled) return;\n this.overActive = true;\n this.$emit(\"over\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleMove: function handleMove(e) {\n var _this5 = this;\n if (this.disabled || this.lock) return;\n setTimeout(function () {\n _this5.$refs.input.focus();\n });\n this.active = true;\n this.handleMouseDown();\n var disX = e.clientX;\n var disY = e.clientY;\n document.onmousemove = function (e) {\n var left = e.clientX - disX;\n var top = e.clientY - disY;\n disX = e.clientX;\n disY = e.clientY;\n _this5.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this5.baseLeft + left * _this5.step);\n _this5.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this5.baseTop + top * _this5.step);\n };\n this.handleClear();\n },\n handleClear: function handleClear() {\n var _this6 = this;\n document.onmouseup = function () {\n document.onmousemove = null;\n document.onmouseup = null;\n _this6.handleMouseUp();\n };\n },\n handleKeydown: function handleKeydown() {\n var _arguments = arguments,\n _this7 = this;\n document.onkeydown = function (event) {\n var e = event || window.event || _arguments.callee.caller.arguments[0];\n var step = 1 * _this7.step;\n if (_this7.$refs.input.focused) {\n if (e && e.keyCode == 38) {\n //上\n _this7.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this7.baseTop - step);\n } else if (e && e.keyCode == 37) {\n //左\n _this7.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this7.baseLeft - step);\n } else if (e && e.keyCode == 40) {\n //下\n _this7.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this7.baseTop + step);\n } else if (e && e.keyCode == 39) {\n //右\n _this7.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(_this7.baseLeft + step);\n }\n event.stopPropagation();\n event.preventDefault();\n _this7.$emit(\"blur\", {\n index: _this7.index,\n width: _this7.baseWidth,\n height: _this7.baseHeight,\n left: _this7.baseLeft,\n top: _this7.baseTop\n });\n _this7.keyDown && _this7.keyDown(event);\n }\n };\n },\n handleMouseDown: function handleMouseDown(e) {\n this.moveActive = true;\n this.$emit(\"focus\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleMouseUp: function handleMouseUp() {\n this.moveActive = false;\n this.rangeActive = false;\n this.$emit(\"blur\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/draggable/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
629
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"draggable\",\n props: {\n index: {\n type: [String, Number]\n },\n mask: {\n type: Boolean,\n default: true\n },\n scale: {\n type: Number,\n default: 1\n },\n readonly: {\n type: Boolean,\n default: false\n },\n resize: {\n type: Boolean,\n default: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n lock: {\n type: Boolean,\n default: false\n },\n step: {\n type: Number,\n default: 1\n },\n zIndex: {\n type: [Number, String],\n default: 1\n },\n left: {\n type: Number,\n default: 0\n },\n top: {\n type: Number,\n default: 0\n },\n width: {\n type: Number\n },\n height: {\n type: Number\n }\n },\n data() {\n return {\n first: true,\n value: '',\n baseWidth: 0,\n baseHeight: 0,\n baseLeft: 0,\n baseTop: 0,\n children: {},\n moveActive: false,\n overActive: false,\n rangeActive: false,\n active: false,\n keyDown: null,\n rangeList: [{\n classname: \"left\"\n }, {\n classname: \"right\"\n }, {\n classname: \"top\"\n }, {\n classname: \"bottom\"\n }, {\n classname: \"top-left\"\n }, {\n classname: \"top-right\"\n }, {\n classname: \"bottom-left\"\n }, {\n classname: \"bottom-right\"\n }]\n };\n },\n computed: {\n scaleVal() {\n return this.scale;\n },\n styleMenuName() {\n return {\n transformOrigin: \"0 0\",\n transform: `scale(${this.scaleVal})`\n };\n },\n styleLineName() {\n return {\n borderWidth: this.setPx(this.scaleVal)\n };\n },\n styleRangeName() {\n const calc = 10 * this.scaleVal;\n return {\n width: this.setPx(calc),\n height: this.setPx(calc)\n };\n },\n styleLabelName() {\n return {\n fontSize: this.setPx(18 * this.scaleVal)\n };\n },\n styleName() {\n return Object.assign((() => {\n if (this.active) {\n return Object.assign({\n zIndex: 9999\n }, this.styleLineName);\n }\n return {\n zIndex: this.zIndex\n };\n })(), {\n top: this.setPx(this.baseTop),\n left: this.setPx(this.baseLeft),\n width: this.setPx(this.baseWidth),\n height: this.setPx(this.baseHeight)\n });\n }\n },\n watch: {\n active(val) {\n if (val) {\n this.handleKeydown();\n } else {\n document.onkeydown = this.keyDown;\n }\n },\n width(val) {\n this.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val) || this.children.offsetWidth;\n },\n height(val) {\n this.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val) || this.children.offsetHeight;\n },\n left(val) {\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val);\n },\n top(val) {\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(val);\n },\n baseWidth(val) {\n this.$refs.wrapper.style.width = this.setPx(val);\n if (this.resize && this.children.style) {\n this.children.style.width = this.setPx(val);\n }\n },\n baseHeight(val) {\n this.$refs.wrapper.style.height = this.setPx(val);\n if (this.resize && this.children.style) {\n this.children.style.height = this.setPx(val);\n }\n },\n baseLeft(n, o) {\n if (this.first) return;\n this.setMove(n - o, 0);\n },\n baseTop(n, o) {\n if (this.first) return;\n this.setMove(0, n - o);\n }\n },\n mounted() {\n this.init();\n },\n methods: {\n init() {\n this.children = this.$refs.item.firstChild;\n this.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.width) || this.children.offsetWidth;\n this.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.height) || this.children.offsetHeight;\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.left);\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.top);\n this.keyDown = document.onkeydown;\n this.$nextTick(() => {\n this.first = false;\n });\n },\n setMove(left, top) {\n this.$emit('move', {\n index: this.index,\n left: left,\n top: top\n });\n },\n setLeft(left) {\n this.baseLeft = left;\n },\n setTop(top) {\n this.baseTop = top;\n },\n getRangeStyle(postion) {\n const calc = 10 * this.scaleVal / 2;\n let result = {};\n let list = postion.split(\"-\");\n list.forEach(ele => {\n result[ele] = this.setPx(-calc);\n });\n return result;\n },\n setOverActive(val) {\n this.overActive = val;\n },\n setActive(val) {\n this.active = val;\n },\n rangeMove(e, position) {\n if (this.disabled || this.lock) return;\n //移动的方向\n let x, y;\n //移动的位置\n let xp, yp;\n //移动的正负\n let xc, yc;\n this.rangeActive = true;\n this.handleMouseDown();\n let disX = e.clientX;\n let disY = e.clientY;\n document.onmousemove = e => {\n this.moveActive = true;\n if (position === \"right\") {\n x = true;\n y = false;\n } else if (position === \"left\") {\n x = true;\n xp = true;\n xc = true;\n y = false;\n } else if (position === \"top\") {\n x = false;\n y = true;\n yp = true;\n yc = true;\n } else if (position === \"bottom\") {\n x = false;\n y = true;\n } else if (position === \"bottom-right\") {\n x = true;\n y = true;\n } else if (position === \"bottom-left\") {\n x = true;\n y = true;\n xp = true;\n xc = true;\n } else if (position === \"top-right\") {\n x = true;\n y = true;\n yp = true;\n yc = true;\n } else if (position === \"top-left\") {\n x = true;\n y = true;\n xp = true;\n xc = true;\n yp = true;\n yc = true;\n }\n let left = e.clientX - disX;\n let top = e.clientY - disY;\n disX = e.clientX;\n disY = e.clientY;\n if (x) {\n let calc = left * this.step;\n if (xc) calc = -calc;\n if (xp) this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseLeft - calc);\n this.baseWidth = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseWidth + calc);\n }\n if (y) {\n let calc = top * this.step;\n if (yc) calc = -calc;\n if (yp) this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseTop - calc);\n this.baseHeight = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseHeight + calc);\n }\n };\n this.handleClear();\n },\n handleOut() {\n this.overActive = false;\n this.$emit(\"out\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleOver() {\n if (this.disabled) return;\n this.overActive = true;\n this.$emit(\"over\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleMove(e) {\n if (this.disabled || this.lock) return;\n setTimeout(() => {\n this.$refs.input.focus();\n });\n this.active = true;\n this.handleMouseDown();\n let disX = e.clientX;\n let disY = e.clientY;\n document.onmousemove = e => {\n let left = e.clientX - disX;\n let top = e.clientY - disY;\n disX = e.clientX;\n disY = e.clientY;\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseLeft + left * this.step);\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseTop + top * this.step);\n };\n this.handleClear();\n },\n handleClear() {\n document.onmouseup = () => {\n document.onmousemove = null;\n document.onmouseup = null;\n this.handleMouseUp();\n };\n },\n handleKeydown() {\n document.onkeydown = event => {\n var e = event || window.event || arguments.callee.caller.arguments[0];\n let step = 1 * this.step;\n if (this.$refs.input.focused) {\n if (e && e.keyCode == 38) {\n //上\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseTop - step);\n } else if (e && e.keyCode == 37) {\n //左\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseLeft - step);\n } else if (e && e.keyCode == 40) {\n //下\n this.baseTop = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseTop + step);\n } else if (e && e.keyCode == 39) {\n //右\n this.baseLeft = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getFixed\"])(this.baseLeft + step);\n }\n event.stopPropagation();\n event.preventDefault();\n this.$emit(\"blur\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n this.keyDown && this.keyDown(event);\n }\n };\n },\n handleMouseDown(e) {\n this.moveActive = true;\n this.$emit(\"focus\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n },\n handleMouseUp() {\n this.moveActive = false;\n this.rangeActive = false;\n this.$emit(\"blur\", {\n index: this.index,\n width: this.baseWidth,\n height: this.baseHeight,\n left: this.baseLeft,\n top: this.baseTop\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/draggable/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
630
630
|
|
631
631
|
/***/ }),
|
632
632
|
|
@@ -638,7 +638,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
638
638
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
639
639
|
|
640
640
|
"use strict";
|
641
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"dynamic\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data: function data() {\n return {\n reload: Math.random(),\n hoverList: []\n };\n },\n props: {\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n max: Number,\n boxType: String,\n columnSlot: {\n type: Array,\n \"default\": function _default() {\n return [];\n }\n },\n children: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n }\n },\n computed: {\n isAdd: function isAdd() {\n return this.boxType === \"add\";\n },\n isEdit: function isEdit() {\n return this.boxType === \"edit\";\n },\n isView: function isView() {\n return this.boxType === \"view\";\n },\n textLen: function textLen() {\n return this.text.length;\n },\n maxFlag: function maxFlag() {\n if (this.max) {\n return !(this.text.length == this.max);\n }\n return true;\n },\n showIndex: function showIndex() {\n return this.vaildData(this.children.index, true);\n },\n showType: function showType() {\n return this.children.type || 'crud';\n },\n isForm: function isForm() {\n return this.showType === 'form';\n },\n isCrud: function isCrud() {\n return this.showType === 'crud';\n },\n selectionChange: function selectionChange() {\n return this.children.selectionChange;\n },\n sortableChange: function sortableChange() {\n return this.children.sortableChange;\n },\n rowAdd: function rowAdd() {\n return this.children.rowAdd;\n },\n rowDel: function rowDel() {\n return this.children.rowDel;\n },\n viewBtn: function viewBtn() {\n return this.children.viewBtn === false;\n },\n addBtn: function addBtn() {\n return this.children.addBtn === false;\n },\n delBtn: function delBtn() {\n return this.children.delBtn === false;\n },\n valueOption: function valueOption() {\n var result = {};\n this.columnOption.forEach(function (ele) {\n if (ele.value) {\n result[ele.prop] = ele.value;\n }\n });\n return result;\n },\n rulesOption: function rulesOption() {\n var rules = {};\n this.columnOption.forEach(function (ele) {\n if (ele.rules) {\n rules[ele.prop] = ele.rules;\n }\n });\n return rules;\n },\n columnOption: function columnOption() {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"getColumn\"])(this.children.column);\n },\n option: function option() {\n var _this = this;\n return Object.assign({\n boxType: this.boxType,\n border: true,\n header: false,\n menu: false,\n size: this.size,\n disabled: this.disabled,\n readonly: this.readonly,\n emptyBtn: false,\n submitBtn: false\n }, function () {\n var option = _this.deepClone(_this.children);\n delete option.column;\n return option;\n }(), function () {\n var list = [{\n label: _this.children.indexLabel || '#',\n prop: '_index',\n display: _this.showIndex,\n hide: !_this.showIndex,\n fixed: true,\n align: 'center',\n headerAlign: 'center',\n span: 24,\n width: 50\n }];\n _this.columnOption.forEach(function (ele) {\n list.push(Object.assign(ele, {\n hide: _this.vaildData(ele.hide, !_this.vaildParams(ele, 'display', true)),\n disabled: _this.vaildParams(ele, 'disabled', false),\n detail: _this.vaildParams(ele, 'detail', false),\n cell: _this.vaildData(ele.cell, _this.isCrud)\n }));\n });\n return {\n column: list\n };\n }());\n }\n },\n mounted: function mounted() {\n this.initData();\n },\n watch: {\n text: function text() {\n this.initData();\n }\n },\n methods: {\n vaildParams: function vaildParams(column, type, value) {\n function replaceStr(str) {\n // 正则法\n str = str.toLowerCase();\n var reg = /\\b(\\w)|\\s(\\w)/g; // \\b判断边界\\s判断空格\n return str.replace(reg, function (m) {\n return m.toUpperCase();\n });\n }\n var key,\n caseKey = replaceStr(type);\n if (!this.validatenull(column[type])) {\n key = type;\n } else if (this.isAdd) {\n key = 'add' + caseKey;\n } else if (this.isEdit) {\n key = 'edit' + caseKey;\n } else if (this.isView) {\n key = 'view' + caseKey;\n }\n return this.vaildData(column[key], value);\n },\n handleSelectionChange: function handleSelectionChange(val) {\n this.selectionChange && this.selectionChange(val);\n },\n handleSortableChange: function handleSortableChange(oldindex, newindex, row, list) {\n this.sortableChange && this.sortableChange(oldindex, newindex, row, list);\n },\n cellMouseenter: function cellMouseenter(row) {\n var index = row.$index;\n this.mouseoverRow(index);\n },\n cellMouseLeave: function cellMouseLeave(row, column, cell, event) {\n var index = row.$index;\n this.mouseoutRow(index);\n },\n initData: function initData() {\n this.text.forEach(function (ele, index) {\n ele = Object.assign(ele, {\n $cellEdit: true,\n $index: index\n });\n });\n },\n mouseoverRow: function mouseoverRow(index) {\n if (this.delBtn) return;\n this.flagList();\n this.$set(this.hoverList, index, true);\n },\n mouseoutRow: function mouseoutRow(index) {\n if (this.delBtn) return;\n this.flagList();\n this.$set(this.hoverList, index, false);\n },\n flagList: function flagList() {\n this.hoverList.forEach(function (ele, index) {\n ele = false;\n });\n },\n delRow: function delRow(index) {\n var _this2 = this;\n var callback = function callback() {\n var list = _this2.deepClone(_this2.text);\n list.splice(index, 1);\n _this2.text = list;\n _this2.reload = Math.random();\n };\n if (typeof this.rowDel === 'function') {\n this.rowDel(this.text[index], callback);\n } else {\n callback();\n }\n },\n addRow: function addRow() {\n var _this3 = this;\n var callback = function callback() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var row = _this3.deepClone(_objectSpread(_objectSpread(_objectSpread({}, _this3.valueOption), obj), {\n $index: _this3.textLen\n }));\n if (_this3.isCrud) {\n _this3.$refs.main.rowCellAdd(row);\n } else if (_this3.isForm) {\n _this3.text.push(row);\n }\n };\n if (typeof this.rowAdd === 'function') {\n this.rowAdd(callback);\n } else {\n callback();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/dynamic/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
641
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"dynamic\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data() {\n return {\n reload: Math.random(),\n hoverList: []\n };\n },\n props: {\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n max: Number,\n boxType: String,\n columnSlot: {\n type: Array,\n default: () => {\n return [];\n }\n },\n children: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n computed: {\n isAdd() {\n return this.boxType === \"add\";\n },\n isEdit() {\n return this.boxType === \"edit\";\n },\n isView() {\n return this.boxType === \"view\";\n },\n textLen() {\n return this.text.length;\n },\n maxFlag() {\n if (this.max) {\n return !(this.text.length == this.max);\n }\n return true;\n },\n showIndex() {\n return this.vaildData(this.children.index, true);\n },\n showType() {\n return this.children.type || 'crud';\n },\n isForm() {\n return this.showType === 'form';\n },\n isCrud() {\n return this.showType === 'crud';\n },\n selectionChange() {\n return this.children.selectionChange;\n },\n sortableChange() {\n return this.children.sortableChange;\n },\n rowAdd() {\n return this.children.rowAdd;\n },\n rowDel() {\n return this.children.rowDel;\n },\n viewBtn() {\n return this.children.viewBtn === false;\n },\n addBtn() {\n return this.children.addBtn === false;\n },\n delBtn() {\n return this.children.delBtn === false;\n },\n valueOption() {\n let result = {};\n this.columnOption.forEach(ele => {\n if (ele.value) {\n result[ele.prop] = ele.value;\n }\n });\n return result;\n },\n rulesOption() {\n let rules = {};\n this.columnOption.forEach(ele => {\n if (ele.rules) {\n rules[ele.prop] = ele.rules;\n }\n });\n return rules;\n },\n columnOption() {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_3__[\"getColumn\"])(this.children.column);\n },\n option() {\n return Object.assign({\n boxType: this.boxType,\n border: true,\n header: false,\n menu: false,\n size: this.size,\n disabled: this.disabled,\n readonly: this.readonly,\n emptyBtn: false,\n submitBtn: false\n }, (() => {\n let option = this.deepClone(this.children);\n delete option.column;\n return option;\n })(), (() => {\n let list = [{\n label: this.children.indexLabel || '#',\n prop: '_index',\n display: this.showIndex,\n hide: !this.showIndex,\n fixed: true,\n align: 'center',\n headerAlign: 'center',\n span: 24,\n width: 50\n }];\n this.columnOption.forEach(ele => {\n list.push(Object.assign(ele, {\n hide: this.vaildData(ele.hide, !this.vaildParams(ele, 'display', true)),\n disabled: this.vaildParams(ele, 'disabled', false),\n detail: this.vaildParams(ele, 'detail', false),\n cell: this.vaildData(ele.cell, this.isCrud)\n }));\n });\n return {\n column: list\n };\n })());\n }\n },\n mounted() {\n this.initData();\n },\n watch: {\n text() {\n this.initData();\n }\n },\n methods: {\n vaildParams(column, type, value) {\n function replaceStr(str) {\n // 正则法\n str = str.toLowerCase();\n var reg = /\\b(\\w)|\\s(\\w)/g; // \\b判断边界\\s判断空格\n return str.replace(reg, function (m) {\n return m.toUpperCase();\n });\n }\n let key,\n caseKey = replaceStr(type);\n if (!this.validatenull(column[type])) {\n key = type;\n } else if (this.isAdd) {\n key = 'add' + caseKey;\n } else if (this.isEdit) {\n key = 'edit' + caseKey;\n } else if (this.isView) {\n key = 'view' + caseKey;\n }\n return this.vaildData(column[key], value);\n },\n handleSelectionChange(val) {\n this.selectionChange && this.selectionChange(val);\n },\n handleSortableChange(oldindex, newindex, row, list) {\n this.sortableChange && this.sortableChange(oldindex, newindex, row, list);\n },\n cellMouseenter(row) {\n let index = row.$index;\n this.mouseoverRow(index);\n },\n cellMouseLeave(row, column, cell, event) {\n let index = row.$index;\n this.mouseoutRow(index);\n },\n initData() {\n this.text.forEach((ele, index) => {\n ele = Object.assign(ele, {\n $cellEdit: true,\n $index: index\n });\n });\n },\n mouseoverRow(index) {\n if (this.delBtn) return;\n this.flagList();\n this.$set(this.hoverList, index, true);\n },\n mouseoutRow(index) {\n if (this.delBtn) return;\n this.flagList();\n this.$set(this.hoverList, index, false);\n },\n flagList() {\n this.hoverList.forEach((ele, index) => {\n ele = false;\n });\n },\n delRow(index) {\n const callback = () => {\n let list = this.deepClone(this.text);\n list.splice(index, 1);\n this.text = list;\n this.reload = Math.random();\n };\n if (typeof this.rowDel === 'function') {\n this.rowDel(this.text[index], callback);\n } else {\n callback();\n }\n },\n addRow() {\n const callback = (obj = {}) => {\n let row = this.deepClone({\n ...this.valueOption,\n ...obj,\n ...{\n $index: this.textLen\n }\n });\n if (this.isCrud) {\n this.$refs.main.rowCellAdd(row);\n } else if (this.isForm) {\n this.text.push(row);\n }\n };\n if (typeof this.rowAdd === 'function') {\n this.rowAdd(callback);\n } else {\n callback();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/dynamic/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
642
642
|
|
643
643
|
/***/ }),
|
644
644
|
|
@@ -650,7 +650,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
650
650
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
651
651
|
|
652
652
|
"use strict";
|
653
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node */ \"./packages/element-ui/flow/node.vue\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"flow\",\n components: {\n flowNode: _node__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n data
|
653
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node */ \"./packages/element-ui/flow/node.vue\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"flow\",\n components: {\n flowNode: _node__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n data() {\n return {\n jsPlumb: {},\n id: '',\n // 默认设置参数\n jsplumbSetting: {\n // 动态锚点、位置自适应\n Anchors: ['Top', 'TopCenter', 'TopRight', 'TopLeft', 'Right', 'RightMiddle', 'Bottom', 'BottomCenter', 'BottomRight', 'BottomLeft', 'Left', 'LeftMiddle'],\n Container: '',\n // 连线的样式 StateMachine、Flowchart\n Connector: 'Flowchart',\n // 鼠标不能拖动删除线\n ConnectionsDetachable: false,\n // 删除线的时候节点不删除\n DeleteEndpointsOnDetach: false,\n // 连线的端点\n // Endpoint: [\"Dot\", {radius: 5}],\n Endpoint: ['Rectangle', {\n height: 10,\n width: 10\n }],\n // 线端点的样式\n EndpointStyle: {\n fill: 'rgba(255,255,255,0)',\n outlineWidth: 1\n },\n LogEnabled: true,\n // 是否打开jsPlumb的内部日志记录\n // 绘制线\n PaintStyle: {\n stroke: 'black',\n strokeWidth: 3\n },\n // 绘制箭头\n Overlays: [['Arrow', {\n width: 12,\n length: 12,\n location: 1\n }]],\n RenderMode: 'svg'\n },\n // jsplumb连接参数\n jsplumbConnectOptions: {\n isSource: true,\n isTarget: true,\n // 动态锚点、提供了4个方向 Continuous、AutoDefault\n anchor: 'Continuous'\n },\n jsplumbSourceOptions: {\n filter: '.avue-flow__node-drag',\n /* \"span\"表示标签,\".className\"表示类,\"#id\"表示元素id*/\n filterExclude: false,\n anchor: 'Continuous',\n allowLoopback: false\n },\n jsplumbTargetOptions: {\n filter: '.avue-flow__node-drag',\n /*\"span\"表示标签,\".className\"表示类,\"#id\"表示元素id */\n filterExclude: false,\n anchor: 'Continuous',\n allowLoopback: false\n },\n loadEasyFlowFinish: false\n };\n },\n props: {\n value: {\n type: String\n },\n option: {\n type: Object\n },\n width: {\n type: [Number, String],\n default: '100%'\n },\n height: {\n type: [Number, String],\n default: '100%'\n }\n },\n created() {\n this.id = Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"randomId\"])();\n this.jsplumbSetting.Container = this.id;\n },\n mounted() {\n this.init();\n },\n computed: {\n active: {\n get() {\n return this.value;\n },\n set(val) {\n this.$emit('input', val);\n this.$emit('change', val);\n }\n },\n styleName() {\n return {\n position: 'relative',\n width: this.setPx(this.width),\n height: this.setPx(this.height)\n };\n }\n },\n methods: {\n init() {\n this.jsPlumb = jsPlumb.getInstance();\n this.$nextTick(() => {\n this.jsPlumbInit();\n });\n },\n handleClick(node) {\n this.$emit('click', node);\n },\n // 是否具有该线\n hasLine(from, to) {\n for (var i = 0; i < this.data.lineList.length; i++) {\n var line = this.data.lineList[i];\n if (line.from === from && line.to === to) {\n return true;\n }\n }\n return false;\n },\n // 是否含有相反的线\n hashOppositeLine(from, to) {\n return this.hasLine(to, from);\n },\n // 删除线\n deleteLine(from, to) {\n this.option.lineList = this.option.lineList.filter(function (line) {\n return line.from !== from && line.to !== to;\n });\n },\n // 改变连线\n changeLine(oldFrom, oldTo) {\n this.deleteLine(oldFrom, oldTo);\n },\n // 改变节点的位置\n changeNodeSite({\n index,\n left,\n top\n }) {\n for (var i = 0; i < this.option.nodeList.length; i++) {\n let node = this.option.nodeList[i];\n if (i === index) {\n this.$set(this.option.nodeList[i], 'left', left);\n this.$set(this.option.nodeList[i], 'top', top);\n }\n }\n },\n //删除节点\n deleteNode(nodeId) {\n this.$confirm('确定要删除节点' + nodeId + '?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n closeOnClickModal: false\n }).then(() => {\n this.option.nodeList.forEach(node => {\n if (node.id === nodeId) {\n node.display = true;\n }\n });\n this.$nextTick(function () {\n this.jsPlumb.removeAllEndpoints(nodeId);\n });\n }).catch(() => {});\n return true;\n },\n // 添加新的节点\n addNode(name) {\n const index = this.option.nodeList.length;\n let nodeId = 'node' + index;\n this.option.nodeList.push({\n id: 'node' + index,\n name: name,\n left: 0,\n top: 0\n });\n this.$nextTick(function () {\n this.jsPlumb.makeSource(nodeId, this.jsplumbSourceOptions);\n this.jsPlumb.makeTarget(nodeId, this.jsplumbTargetOptions);\n this.jsPlumb.draggable(nodeId, {\n containment: 'parent'\n });\n });\n },\n loadEasyFlow() {\n // 初始化节点\n for (var i = 0; i < this.option.nodeList.length; i++) {\n let node = this.option.nodeList[i];\n // 设置源点,可以拖出线连接其他节点\n this.jsPlumb.makeSource(node.id, this.jsplumbSourceOptions);\n // // 设置目标点,其他源点拖出的线可以连接该节点\n this.jsPlumb.makeTarget(node.id, this.jsplumbTargetOptions);\n this.jsPlumb.draggable(node.id);\n }\n\n // 初始化连线\n for (var i = 0; i < this.option.lineList.length; i++) {\n let line = this.option.lineList[i];\n this.jsPlumb.connect({\n source: line.from,\n target: line.to\n }, this.jsplumbConnectOptions);\n }\n this.$nextTick(function () {\n this.loadEasyFlowFinish = true;\n });\n },\n jsPlumbInit() {\n const _this = this;\n this.jsPlumb.ready(function () {\n // 导入默认配置\n _this.jsPlumb.importDefaults(_this.jsplumbSetting);\n // 会使整个jsPlumb立即重绘。\n _this.jsPlumb.setSuspendDrawing(false, true);\n // 初始化节点\n _this.loadEasyFlow();\n\n // 单点击了连接线,\n _this.jsPlumb.bind('click', function (conn, originalEvent) {\n console.log('click', conn);\n _this.$confirm('确定删除所点击的线吗?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n _this.jsPlumb.deleteConnection(conn);\n }).catch(() => {});\n });\n // 连线\n _this.jsPlumb.bind('connection', function (evt) {\n console.log('connection', evt);\n let from = evt.source.id;\n let to = evt.target.id;\n if (_this.loadEasyFlowFinish) {\n _this.option.lineList.push({\n from: from,\n to: to\n });\n }\n });\n\n // 删除连线\n _this.jsPlumb.bind('connectionDetached', function (evt) {\n console.log('connectionDetached', evt);\n _this.deleteLine(evt.sourceId, evt.targetId);\n });\n\n // 改变线的连接节点\n _this.jsPlumb.bind('connectionMoved', function (evt) {\n console.log('connectionMoved', evt);\n _this.changeLine(evt.originalSourceId, evt.originalTargetId);\n });\n\n // 单击endpoint\n // jsPlumb.bind(\"endpointClick\", function (evt) {\n // console.log('endpointClick', evt)\n // })\n //\n // // 双击endpoint\n // jsPlumb.bind(\"endpointDblClick\", function (evt) {\n // console.log('endpointDblClick', evt)\n // })\n\n // contextmenu\n _this.jsPlumb.bind('contextmenu', function (evt) {\n console.log('contextmenu', evt);\n });\n\n // beforeDrop\n _this.jsPlumb.bind('beforeDrop', function (evt) {\n console.log('beforeDrop', evt);\n let from = evt.sourceId;\n let to = evt.targetId;\n if (from === to) {\n _this.$message.error('不能连接自己');\n return false;\n }\n if (_this.hasLine(from, to)) {\n _this.$message.error('不能重复连线');\n return false;\n }\n if (_this.hashOppositeLine(from, to)) {\n _this.$message.error('不能回环哦');\n return false;\n }\n return true;\n });\n\n // beforeDetach\n _this.jsPlumb.bind('beforeDetach', function (evt) {\n console.log('beforeDetach', evt);\n });\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/flow/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
654
654
|
|
655
655
|
/***/ }),
|
656
656
|
|
@@ -662,7 +662,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
662
662
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
663
663
|
|
664
664
|
"use strict";
|
665
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'flow',\n props: {\n active: [String, Number],\n index: [String, Number],\n node: Object\n },\n data
|
665
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'flow',\n props: {\n active: [String, Number],\n index: [String, Number],\n node: Object\n },\n data() {\n return {\n // 控制节点操作显示\n mouseEnter: false\n };\n },\n computed: {\n // 节点容器样式\n flowNodeContainer: {\n get() {\n return {\n position: 'absolute',\n width: '200px',\n top: this.setPx(this.node.top),\n left: this.setPx(this.node.left),\n boxShadow: this.mouseEnter ? '#66a6e0 0px 0px 12px 0px' : '',\n backgroundColor: 'transparent'\n };\n }\n }\n },\n methods: {\n // 鼠标进入\n showDelete() {\n this.mouseEnter = true;\n },\n // 鼠标离开\n hideDelete() {\n this.mouseEnter = false;\n },\n // 鼠标移动后抬起\n changeNodeSite() {\n // 避免抖动\n if (this.node.left == this.$refs.node.style.left && this.node.top == this.$refs.node.style.top) {\n return;\n }\n this.$emit('changeNodeSite', {\n index: this.index,\n left: Number(this.$refs.node.style.left.replace('px', '')),\n top: Number(this.$refs.node.style.top.replace('px', ''))\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/flow/node.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
666
666
|
|
667
667
|
/***/ }),
|
668
668
|
|
@@ -674,7 +674,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
674
674
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
675
675
|
|
676
676
|
"use strict";
|
677
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/init */ \"./packages/core/common/init.js\");\n/* harmony import */ var common_components_form_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/components/form/index */ \"./packages/core/components/form/index.vue\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var utils_mock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! utils/mock */ \"./src/utils/mock.js\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu */ \"./packages/element-ui/form/menu.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/form/config.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar count = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"form\",\n mixins: [Object(common_common_init__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n components: {\n formTemp: common_components_form_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n formMenu: _menu__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n },\n props: {\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n status: {\n type: Boolean,\n \"default\": false\n },\n isCrud: {\n type: Boolean,\n \"default\": false\n },\n value: {\n type: Object,\n required: true,\n \"default\": function _default() {\n return {};\n }\n }\n },\n data: function data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n activeName: '',\n allDisabled: false,\n tableOption: {},\n form: {},\n formCreate: false,\n formList: [],\n formBind: {}\n };\n },\n provide: function provide() {\n return {\n formSafe: this\n };\n },\n watch: {\n value: {\n handler: function handler(val) {\n if (this.formCreate) {\n this.setForm();\n }\n },\n deep: true\n },\n form: {\n handler: function handler(val) {\n if (this.formCreate) {\n this.setLabel();\n this.setVal();\n }\n },\n deep: true\n },\n tabsActive: {\n handler: function handler(val) {\n this.activeName = this.tabsActive;\n },\n immediate: true\n },\n DIC: {\n handler: function handler() {\n this.setLabel();\n },\n deep: true,\n immediate: true\n },\n allDisabled: {\n handler: function handler(val) {\n this.$emit('update:status', val);\n },\n deep: true,\n immediate: true\n }\n },\n computed: {\n columnSlot: function columnSlot() {\n var _this = this;\n return Object.keys(this.$scopedSlots).filter(function (item) {\n return !_this.propOption.map(function (ele) {\n return ele.prop;\n }).includes(item);\n });\n },\n labelSuffix: function labelSuffix() {\n return this.parentOption.labelSuffix || ':';\n },\n isMenu: function isMenu() {\n return this.columnOption.length != 1;\n },\n isDetail: function isDetail() {\n return this.detail === true;\n },\n isTabs: function isTabs() {\n return this.parentOption.tabs === true;\n },\n isAdd: function isAdd() {\n return this.boxType === \"add\";\n },\n isEdit: function isEdit() {\n return this.boxType === \"edit\";\n },\n isView: function isView() {\n return this.boxType === \"view\";\n },\n detail: function detail() {\n return this.parentOption.detail;\n },\n disabled: function disabled() {\n return this.parentOption.disabled;\n },\n readonly: function readonly() {\n return this.parentOption.readonly;\n },\n tabsType: function tabsType() {\n return this.parentOption.tabsType;\n },\n columnLen: function columnLen() {\n return this.columnOption.length;\n },\n dynamicOption: function dynamicOption() {\n var _this2 = this;\n var list = [];\n this.propOption.forEach(function (ele) {\n if (ele.type == 'dynamic' && _this2.vaildDisplay(ele)) {\n list.push(ele);\n }\n });\n return list;\n },\n propOption: function propOption() {\n var list = [];\n this.columnOption.forEach(function (option) {\n if (option.display !== false) {\n option.column.forEach(function (column) {\n list.push(column);\n });\n }\n });\n return list;\n },\n parentOption: function parentOption() {\n return this.tableOption || {};\n },\n columnOption: function columnOption() {\n var _this3 = this;\n var tableOption = this.deepClone(this.tableOption);\n var column = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getColumn\"])(tableOption.column);\n var group = tableOption.group || [];\n var footer = tableOption.footer || [];\n group.unshift({\n header: false,\n column: column\n });\n if (footer.length !== 0) {\n group.push({\n header: false,\n column: footer\n });\n }\n group.forEach(function (ele, index) {\n ele.column = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getColumn\"])(ele.column);\n // 循环列的全部属性\n ele.column.forEach(function (column, cindex) {\n //动态计算列的位置,如果为隐藏状态则或则手机状态不计算\n if (column.display !== false && !_this3.isMobile) {\n column = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"calcCount\"])(column, _this3.config.span, cindex === 0);\n }\n });\n //处理级联属性\n ele.column = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"calcCascader\"])(ele.column);\n //根据order排序\n ele.column = ele.column.sort(function (a, b) {\n return (b.order || 0) - (a.order || 0);\n });\n });\n return group;\n },\n menuPosition: function menuPosition() {\n if (this.parentOption.menuPosition) {\n return this.parentOption.menuPosition;\n } else {\n return \"center\";\n }\n },\n boxType: function boxType() {\n return this.parentOption.boxType;\n },\n isPrint: function isPrint() {\n return this.vaildData(this.parentOption.printBtn, false);\n },\n tabsActive: function tabsActive() {\n return this.vaildData(this.tableOption.tabsActive + '', '1');\n },\n isMock: function isMock() {\n return this.vaildData(this.parentOption.mockBtn, false);\n }\n },\n mounted: function mounted() {\n var _this4 = this;\n setTimeout(function () {\n _this4.dataFormat();\n });\n },\n methods: {\n getComponent: core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"getComponent\"],\n getPlaceholder: core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"getPlaceholder\"],\n getDisabled: function getDisabled(column) {\n return this.vaildDetail(column) || this.isDetail || this.vaildDisabled(column) || this.allDisabled;\n },\n isGroupShow: function isGroupShow(item, index) {\n if (this.isTabs) {\n return index == this.activeName || index == 0;\n } else {\n return true;\n }\n },\n //初始化表单\n dataFormat: function dataFormat() {\n var _this5 = this;\n var formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"formInitVal\"])(this.propOption).tableForm;\n var formValue = this.value;\n var form = {};\n Object.entries(Object.assign(formDefault, formValue)).forEach(function (ele) {\n var key = ele[0],\n value = ele[1];\n if (_this5.validatenull(formValue[key])) {\n form[key] = value;\n } else {\n form[key] = formValue[key];\n }\n });\n this.$set(this, 'form', form);\n this.setLabel();\n this.setControl();\n this.setVal();\n setTimeout(function () {\n _this5.formCreate = true;\n _this5.clearValidate();\n });\n },\n setControl: function setControl() {\n var _this6 = this;\n this.propOption.forEach(function (column) {\n var prop = column.prop;\n var bind = column.bind;\n var control = column.control;\n var value = _this6.form;\n if (!_this6.formBind[prop]) {\n var bindList = [];\n if (bind) {\n var formProp = _this6.$watch('form.' + prop, function (n, o) {\n if (n != o) Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"setAsVal\"])(_this6.form, bind, n);\n });\n var formDeep = _this6.$watch('form.' + bind, function (n, o) {\n if (n != o) _this6.$set(_this6.form, prop, n);\n });\n bindList.push(formProp);\n bindList.push(formDeep);\n _this6.$set(_this6.form, prop, Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getAsVal\"])(_this6.form, bind));\n }\n if (control) {\n var callback = function callback() {\n var controlList = control(_this6.form[column.prop], _this6.form) || {};\n Object.keys(controlList).forEach(function (item) {\n var ele = Object.assign(_this6.objectOption[item] || {}, controlList[item]);\n _this6.$set(_this6.objectOption, item, ele);\n if (controlList[item].dicData) _this6.DIC[item] = controlList[item].dicData;\n });\n };\n var formControl = _this6.$watch('form.' + prop, function (n, o) {\n callback();\n });\n bindList.push(formControl);\n callback();\n }\n _this6.formBind[prop] = bindList;\n }\n });\n },\n setForm: function setForm() {\n var _this7 = this;\n Object.keys(this.value).forEach(function (ele) {\n _this7.$set(_this7.form, ele, _this7.value[ele]);\n });\n },\n setVal: function setVal() {\n this.$emit('input', this.form);\n this.$emit('change', this.form);\n },\n setLabel: function setLabel() {\n var _this8 = this;\n if (this.tableOption.filterNull === true) {\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(this.form, [''], false);\n }\n if (this.tableOption.filterDic == true) {\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(this.form, ['$'], false);\n } else {\n this.propOption.forEach(function (column) {\n var result;\n var DIC = _this8.DIC[column.prop];\n if (_this8.validatenull(DIC)) return;\n result = Object(core_detail__WEBPACK_IMPORTED_MODULE_0__[\"detail\"])(_this8.form, column, _this8.tableOption, DIC);\n if (result) {\n _this8.$set(_this8.form, \"$\".concat(column.prop), result);\n } else {\n _this8.$delete(_this8.form, \"$\".concat(column.prop));\n }\n });\n }\n },\n handleGroupClick: function handleGroupClick(activeNames) {\n this.$emit('tab-click', activeNames);\n },\n handleTabClick: function handleTabClick(tab, event) {\n this.$emit('tab-click', tab, event);\n },\n getItemParams: function getItemParams(column, item, type, isPx) {\n var result;\n if (!this.validatenull(column[type])) {\n result = column[type];\n } else if (!this.validatenull(item[type])) {\n result = item[type];\n } else {\n result = this.parentOption[type];\n }\n result = this.vaildData(result, this.config[type]);\n return isPx ? this.setPx(result) : result;\n },\n //对部分表单字段进行校验的方法\n validateField: function validateField(val) {\n return this.$refs.form.validateField(val);\n },\n validTip: function validTip(column) {\n return !column.tip || column.type === 'upload';\n },\n getPropRef: function getPropRef(prop) {\n return this.$refs[prop][0];\n },\n handleChange: function handleChange(list, column) {\n var _this9 = this;\n this.$nextTick(function () {\n var cascader = column.cascader;\n var str = cascader.join(\",\");\n cascader.forEach(function (item) {\n var columnNextProp = item;\n var value = _this9.form[column.prop];\n // 下一个节点\n var columnNext = _this9.findObject(list, columnNextProp);\n if (_this9.validatenull(columnNext)) return;\n // 如果不是首次加载则清空全部关联节点的属性值和字典值\n if (_this9.formList.includes(str)) {\n //清空子类字典列表和值\n cascader.forEach(function (ele) {\n _this9.form[ele] = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"blankVal\"])(_this9.form[ele]);\n _this9.$set(_this9.DIC, ele, []);\n });\n }\n /**\n * 1.判断当前节点是否有下级节点\n * 2.判断当前节点是否有值\n */\n if (_this9.validatenull(cascader) || _this9.validatenull(value) || _this9.validatenull(columnNext)) {\n return;\n }\n // 根据当前节点值获取下一个节点的字典\n Object(core_dic__WEBPACK_IMPORTED_MODULE_6__[\"sendDic\"])({\n column: columnNext,\n value: value,\n form: _this9.form\n }).then(function (res) {\n //首次加载的放入队列记录\n if (!_this9.formList.includes(str)) _this9.formList.push(str);\n // 修改字典\n var dic = res || [];\n _this9.$set(_this9.DIC, columnNextProp, dic);\n if (!_this9.validatenull(dic) && !_this9.validatenull(dic) && !_this9.validatenull(columnNext.cascaderIndex) && _this9.validatenull(_this9.form[columnNextProp])) {\n _this9.form[columnNextProp] = dic[columnNext.cascaderIndex][(columnNext.props || {}).value || global_variable__WEBPACK_IMPORTED_MODULE_4__[\"DIC_PROPS\"].value];\n }\n });\n });\n });\n },\n handlePrint: function handlePrint() {\n this.$Print(this.$el);\n },\n propChange: function propChange(option, column) {\n var key = column.prop;\n if (!count[key]) {\n if (column.cascader) this.handleChange(option, column);\n }\n count[key] = true;\n this.$nextTick(function () {\n return count[key] = false;\n });\n },\n handleMock: function handleMock() {\n var _this10 = this;\n if (!this.isMock) return;\n this.columnOption.forEach(function (column) {\n var form = Object(utils_mock__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(column.column, _this10.DIC, _this10.form, _this10.isMock);\n if (!_this10.validatenull(form)) {\n Object.keys(form).forEach(function (ele) {\n _this10.form[ele] = form[ele];\n });\n }\n });\n this.$nextTick(function () {\n _this10.clearValidate();\n _this10.$emit('mock-change', _this10.form);\n });\n },\n vaildDetail: function vaildDetail(column) {\n var key;\n if (this.detail) return false;\n if (!this.validatenull(column.detail)) {\n key = 'detail';\n } else if (this.isAdd) {\n key = 'addDetail';\n } else if (this.isEdit) {\n key = 'editDetail';\n } else if (this.isView) {\n return false;\n }\n return this.vaildData(column[key], false);\n },\n // 验证表单是否禁止\n vaildDisabled: function vaildDisabled(column) {\n var key;\n if (this.disabled) return true;\n if (!this.validatenull(column.disabled)) {\n key = 'disabled';\n } else if (this.isAdd) {\n key = 'addDisabled';\n } else if (this.isEdit) {\n key = 'editDisabled';\n } else if (this.isView) {\n return true;\n }\n return this.vaildData(column[key], false);\n },\n // 验证表单是否显隐\n vaildDisplay: function vaildDisplay(column) {\n var key;\n if (!this.validatenull(column.display)) {\n key = 'display';\n } else if (this.isAdd) {\n key = 'addDisplay';\n } else if (this.isEdit) {\n key = 'editDisplay';\n } else if (this.isView) {\n key = 'viewDisplay';\n }\n return this.vaildData(column[key], true);\n },\n clearValidate: function clearValidate(list) {\n if (this.$refs.form) this.$refs.form.clearValidate(list);\n },\n validateCellForm: function validateCellForm() {\n var _this11 = this;\n return new Promise(function (resolve) {\n _this11.$refs.form.validate(function (valid, msg) {\n resolve(msg);\n });\n });\n },\n validate: function validate(callback) {\n var _this12 = this;\n this.$refs.form.validate(function (valid, msg) {\n var dynamicList = [];\n var dynamicName = [];\n var dynamicError = {};\n _this12.dynamicOption.forEach(function (ele) {\n var isForm = ele.children.type === 'form';\n dynamicName.push(ele.prop);\n if (isForm) {\n if (!_this12.validatenull(_this12.$refs[ele.prop][0].$refs.temp.$refs.main)) {\n _this12.$refs[ele.prop][0].$refs.temp.$refs.main.forEach(function (ele) {\n dynamicList.push(ele.validateCellForm());\n });\n }\n } else {\n dynamicList.push(_this12.$refs[ele.prop][0].$refs.temp.$refs.main.validateCellForm());\n }\n });\n Promise.all(dynamicList).then(function (res) {\n var count = 0;\n res.forEach(function (error, index) {\n if (!_this12.validatenull(error)) {\n dynamicError[dynamicName[index]] = error;\n }\n });\n var result = Object.assign(dynamicError, msg);\n if (_this12.validatenull(result)) {\n _this12.show();\n callback && callback(true, _this12.hide, result);\n } else {\n callback && callback(false, _this12.hide, result);\n }\n });\n });\n },\n resetForm: function resetForm() {\n var _this13 = this;\n var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n if (reset) {\n var propList = this.propOption.map(function (ele) {\n return ele.prop;\n });\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"clearVal\"])(this.form, propList, (this.tableOption.filterParams || []).concat([this.rowKey]));\n }\n this.$nextTick(function () {\n _this13.clearValidate();\n _this13.$emit(\"reset-change\");\n });\n },\n resetFields: function resetFields() {\n this.$refs.form.resetFields();\n },\n show: function show() {\n this.allDisabled = true;\n },\n hide: function hide() {\n this.allDisabled = false;\n },\n submit: function submit() {\n var _this14 = this;\n this.validate(function (valid, hide, msg) {\n if (valid) {\n _this14.$emit(\"submit\", Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(_this14.form, ['$']), _this14.hide);\n } else {\n _this14.$emit(\"error\", msg);\n }\n });\n }\n },\n beforeDestroy: function beforeDestroy() {\n var _this15 = this;\n Object.keys(this.formBind).forEach(function (ele) {\n _this15.formBind[ele].forEach(function (unWatch) {\n unWatch();\n });\n });\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
677
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_detail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/detail */ \"./src/core/detail.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/init */ \"./packages/core/common/init.js\");\n/* harmony import */ var common_components_form_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/components/form/index */ \"./packages/core/components/form/index.vue\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var utils_mock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! utils/mock */ \"./src/utils/mock.js\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu */ \"./packages/element-ui/form/menu.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/form/config.js\");\n\n\n\n\n\n\n\n\n\n\n\nlet count = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"form\",\n mixins: [Object(common_common_init__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n components: {\n formTemp: common_components_form_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n formMenu: _menu__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n },\n props: {\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n status: {\n type: Boolean,\n default: false\n },\n isCrud: {\n type: Boolean,\n default: false\n },\n value: {\n type: Object,\n required: true,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n activeName: \"\",\n allDisabled: false,\n tableOption: {},\n form: {},\n formCreate: false,\n formList: [],\n formBind: {}\n };\n },\n provide() {\n return {\n formSafe: this\n };\n },\n watch: {\n value: {\n handler(val) {\n if (this.formCreate) {\n this.setForm();\n }\n },\n deep: true\n },\n form: {\n handler(val) {\n if (this.formCreate) {\n this.setLabel();\n this.setVal();\n }\n },\n deep: true\n },\n tabsActive: {\n handler(val) {\n this.activeName = this.tabsActive;\n },\n immediate: true\n },\n DIC: {\n handler() {\n this.setLabel();\n },\n deep: true,\n immediate: true\n },\n allDisabled: {\n handler(val) {\n this.$emit(\"update:status\", val);\n },\n deep: true,\n immediate: true\n }\n },\n computed: {\n columnSlot() {\n return Object.keys(this.$scopedSlots).filter(item => !this.propOption.map(ele => ele.prop).includes(item));\n },\n labelSuffix() {\n return this.parentOption.labelSuffix || \":\";\n },\n isMenu() {\n return this.columnOption.length != 1;\n },\n isDetail() {\n return this.detail === true;\n },\n isTabs() {\n return this.parentOption.tabs === true;\n },\n isAdd() {\n return this.boxType === \"add\";\n },\n isEdit() {\n return this.boxType === \"edit\";\n },\n isView() {\n return this.boxType === \"view\";\n },\n detail() {\n return this.parentOption.detail;\n },\n disabled() {\n return this.parentOption.disabled;\n },\n readonly() {\n return this.parentOption.readonly;\n },\n tabsType() {\n return this.parentOption.tabsType;\n },\n columnLen() {\n return this.columnOption.length;\n },\n dynamicOption() {\n let list = [];\n this.propOption.forEach(ele => {\n if (ele.type == \"dynamic\" && this.vaildDisplay(ele)) {\n list.push(ele);\n }\n });\n return list;\n },\n propOption() {\n let list = [];\n this.columnOption.forEach(option => {\n if (option.display !== false) {\n option.column.forEach(column => {\n list.push(column);\n });\n }\n });\n return list;\n },\n parentOption() {\n return this.tableOption || {};\n },\n columnOption() {\n let tableOption = this.deepClone(this.tableOption);\n let column = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getColumn\"])(tableOption.column);\n let group = tableOption.group || [];\n let footer = tableOption.footer || [];\n group.unshift({\n header: false,\n column: column\n });\n if (footer.length !== 0) {\n group.push({\n header: false,\n column: footer\n });\n }\n group.forEach((ele, index) => {\n ele.column = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getColumn\"])(ele.column);\n // 循环列的全部属性\n ele.column.forEach((column, cindex) => {\n //动态计算列的位置,如果为隐藏状态则或则手机状态不计算\n if (column.display !== false && !this.isMobile) {\n column = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"calcCount\"])(column, this.config.span, cindex === 0);\n }\n });\n //处理级联属性\n ele.column = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"calcCascader\"])(ele.column);\n //根据order排序\n ele.column = ele.column.sort((a, b) => (b.order || 0) - (a.order || 0));\n });\n return group;\n },\n menuPosition: function () {\n if (this.parentOption.menuPosition) {\n return this.parentOption.menuPosition;\n } else {\n return \"center\";\n }\n },\n boxType: function () {\n return this.parentOption.boxType;\n },\n isPrint() {\n return this.vaildData(this.parentOption.printBtn, false);\n },\n tabsActive() {\n return this.vaildData(this.tableOption.tabsActive + \"\", \"1\");\n },\n isMock() {\n return this.vaildData(this.parentOption.mockBtn, false);\n }\n },\n mounted() {\n setTimeout(() => {\n this.dataFormat();\n });\n },\n methods: {\n getComponent: core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"getComponent\"],\n getPlaceholder: core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"getPlaceholder\"],\n getDisabled(column) {\n return this.vaildDetail(column) || this.isDetail || this.vaildDisabled(column) || this.allDisabled;\n },\n isGroupShow(item, index) {\n if (this.isTabs) {\n return index == this.activeName || index == 0;\n } else {\n return true;\n }\n },\n //初始化表单\n dataFormat() {\n let formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__[\"formInitVal\"])(this.propOption).tableForm;\n let formValue = this.value;\n let form = {};\n Object.entries(Object.assign(formDefault, formValue)).forEach(ele => {\n let key = ele[0],\n value = ele[1];\n if (this.validatenull(formValue[key])) {\n form[key] = value;\n } else {\n form[key] = formValue[key];\n }\n });\n this.$set(this, \"form\", form);\n this.setLabel();\n this.setControl();\n this.setVal();\n setTimeout(() => {\n this.formCreate = true;\n this.clearValidate();\n });\n },\n setControl() {\n this.propOption.forEach(column => {\n let prop = column.prop;\n let bind = column.bind;\n let control = column.control;\n let value = this.form;\n if (!this.formBind[prop]) {\n let bindList = [];\n if (bind) {\n let formProp = this.$watch(\"form.\" + prop, (n, o) => {\n if (n != o) Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"setAsVal\"])(this.form, bind, n);\n });\n let formDeep = this.$watch(\"form.\" + bind, (n, o) => {\n if (n != o) this.$set(this.form, prop, n);\n });\n bindList.push(formProp);\n bindList.push(formDeep);\n this.$set(this.form, prop, Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"getAsVal\"])(this.form, bind));\n }\n if (control) {\n const callback = () => {\n let controlList = control(this.form[column.prop], this.form) || {};\n Object.keys(controlList).forEach(item => {\n let ele = Object.assign(this.objectOption[item] || {}, controlList[item]);\n this.$set(this.objectOption, item, ele);\n if (controlList[item].dicData) this.DIC[item] = controlList[item].dicData;\n });\n };\n let formControl = this.$watch(\"form.\" + prop, (n, o) => {\n callback();\n });\n bindList.push(formControl);\n callback();\n }\n this.formBind[prop] = bindList;\n }\n });\n },\n setForm() {\n Object.keys(this.value).forEach(ele => {\n this.$set(this.form, ele, this.value[ele]);\n });\n },\n setVal() {\n this.$emit(\"input\", this.form);\n this.$emit(\"change\", this.form);\n },\n setLabel() {\n if (this.tableOption.filterNull === true) {\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(this.form, [\"\"], false);\n }\n if (this.tableOption.filterDic == true) {\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(this.form, [\"$\"], false);\n } else {\n this.propOption.forEach(column => {\n let result;\n let DIC = this.DIC[column.prop];\n if (this.validatenull(DIC)) return;\n result = Object(core_detail__WEBPACK_IMPORTED_MODULE_0__[\"detail\"])(this.form, column, this.tableOption, DIC);\n if (result) {\n this.$set(this.form, `$${column.prop}`, result);\n } else {\n this.$delete(this.form, `$${column.prop}`);\n }\n });\n }\n },\n handleGroupClick(activeNames) {\n this.$emit(\"tab-click\", activeNames);\n },\n handleTabClick(tab, event) {\n this.$emit(\"tab-click\", tab, event);\n },\n getItemParams(column, item, type, isPx) {\n let result;\n if (!this.validatenull(column[type])) {\n result = column[type];\n } else if (!this.validatenull(item[type])) {\n result = item[type];\n } else {\n result = this.parentOption[type];\n }\n result = this.vaildData(result, this.config[type]);\n return isPx ? this.setPx(result) : result;\n },\n //对部分表单字段进行校验的方法\n validateField(val) {\n return this.$refs.form.validateField(val);\n },\n validTip(column) {\n return !column.tip || column.type === \"upload\";\n },\n getPropRef(prop) {\n return this.$refs[prop][0];\n },\n handleChange(list, column) {\n this.$nextTick(() => {\n const cascader = column.cascader;\n const str = cascader.join(\",\");\n cascader.forEach(item => {\n const columnNextProp = item;\n const value = this.form[column.prop];\n // 下一个节点\n const columnNext = this.findObject(list, columnNextProp);\n if (this.validatenull(columnNext)) return;\n // 如果不是首次加载则清空全部关联节点的属性值和字典值\n if (this.formList.includes(str)) {\n //清空子类字典列表和值\n cascader.forEach(ele => {\n this.form[ele] = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"blankVal\"])(this.form[ele]);\n this.$set(this.DIC, ele, []);\n });\n }\n /**\n * 1.判断当前节点是否有下级节点\n * 2.判断当前节点是否有值\n */\n if (this.validatenull(cascader) || this.validatenull(value) || this.validatenull(columnNext)) {\n return;\n }\n // 根据当前节点值获取下一个节点的字典\n Object(core_dic__WEBPACK_IMPORTED_MODULE_6__[\"sendDic\"])({\n column: columnNext,\n value: value,\n form: this.form\n }).then(res => {\n //首次加载的放入队列记录\n if (!this.formList.includes(str)) this.formList.push(str);\n // 修改字典\n const dic = res || [];\n this.$set(this.DIC, columnNextProp, dic);\n if (!this.validatenull(dic) && !this.validatenull(dic) && !this.validatenull(columnNext.cascaderIndex) && this.validatenull(this.form[columnNextProp])) {\n this.form[columnNextProp] = dic[columnNext.cascaderIndex][(columnNext.props || {}).value || global_variable__WEBPACK_IMPORTED_MODULE_4__[\"DIC_PROPS\"].value];\n }\n });\n });\n });\n },\n handlePrint() {\n this.$Print(this.$el);\n },\n propChange(option, column) {\n let key = column.prop;\n if (!count[key]) {\n if (column.cascader) this.handleChange(option, column);\n }\n count[key] = true;\n this.$nextTick(() => count[key] = false);\n },\n handleMock() {\n if (!this.isMock) return;\n this.columnOption.forEach(column => {\n const form = Object(utils_mock__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(column.column, this.DIC, this.form, this.isMock);\n if (!this.validatenull(form)) {\n Object.keys(form).forEach(ele => {\n this.form[ele] = form[ele];\n });\n }\n });\n this.$nextTick(() => {\n this.clearValidate();\n this.$emit(\"mock-change\", this.form);\n });\n },\n vaildDetail(column) {\n let key;\n if (this.detail) return false;\n if (!this.validatenull(column.detail)) {\n key = \"detail\";\n } else if (this.isAdd) {\n key = \"addDetail\";\n } else if (this.isEdit) {\n key = \"editDetail\";\n } else if (this.isView) {\n return false;\n }\n return this.vaildData(column[key], false);\n },\n // 验证表单是否禁止\n vaildDisabled(column) {\n let key;\n if (this.disabled) return true;\n if (!this.validatenull(column.disabled)) {\n key = \"disabled\";\n } else if (this.isAdd) {\n key = \"addDisabled\";\n } else if (this.isEdit) {\n key = \"editDisabled\";\n } else if (this.isView) {\n return true;\n }\n return this.vaildData(column[key], false);\n },\n // 验证表单是否显隐\n vaildDisplay(column) {\n let key;\n if (!this.validatenull(column.display)) {\n key = \"display\";\n } else if (this.isAdd) {\n key = \"addDisplay\";\n } else if (this.isEdit) {\n key = \"editDisplay\";\n } else if (this.isView) {\n key = \"viewDisplay\";\n }\n return this.vaildData(column[key], true);\n },\n clearValidate(list) {\n if (this.$refs.form) this.$refs.form.clearValidate(list);\n },\n validateCellForm() {\n return new Promise(resolve => {\n this.$refs.form.validate((valid, msg) => {\n resolve(msg);\n });\n });\n },\n validate(callback) {\n return new Promise(resolve => {\n this.$refs.form.validate((valid, msg) => {\n let dynamicList = [];\n let dynamicName = [];\n let dynamicError = {};\n this.dynamicOption.forEach(ele => {\n let isForm = ele.children.type === \"form\";\n dynamicName.push(ele.prop);\n if (isForm) {\n if (!this.validatenull(this.$refs[ele.prop][0].$refs.temp.$refs.main)) {\n this.$refs[ele.prop][0].$refs.temp.$refs.main.forEach(ele => {\n dynamicList.push(ele.validateCellForm());\n });\n }\n } else {\n dynamicList.push(this.$refs[ele.prop][0].$refs.temp.$refs.main.validateCellForm());\n }\n });\n Promise.all(dynamicList).then(res => {\n let count = 0;\n res.forEach((error, index) => {\n if (!this.validatenull(error)) {\n dynamicError[dynamicName[index]] = error;\n }\n });\n let result = Object.assign(dynamicError, msg);\n if (this.validatenull(result)) {\n this.show();\n if (callback) {\n callback(true, this.hide, result);\n }\n resolve({\n valid: true,\n done: this.hide,\n msg: result\n });\n } else {\n if (callback) {\n callback(false, this.hide, result);\n }\n resolve({\n valid: false,\n done: this.hide,\n msg: result\n });\n }\n });\n });\n });\n },\n resetForm(reset = true) {\n if (reset) {\n let propList = this.propOption.map(ele => ele.prop);\n this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"clearVal\"])(this.form, propList, (this.tableOption.filterParams || []).concat([this.rowKey]));\n }\n this.$nextTick(() => {\n this.clearValidate();\n this.$emit(\"reset-change\");\n });\n },\n resetFields() {\n this.$refs.form.resetFields();\n },\n show() {\n this.allDisabled = true;\n },\n hide() {\n this.allDisabled = false;\n },\n submit() {\n this.validate((valid, hide, msg) => {\n if (valid) {\n this.$emit(\"submit\", Object(utils_util__WEBPACK_IMPORTED_MODULE_7__[\"filterParams\"])(this.form, [\"$\"]), this.hide);\n } else {\n this.$emit(\"error\", msg);\n }\n });\n }\n },\n beforeDestroy() {\n Object.keys(this.formBind).forEach(ele => {\n this.formBind[ele].forEach(unWatch => {\n unWatch();\n });\n });\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
678
678
|
|
679
679
|
/***/ }),
|
680
680
|
|
@@ -686,7 +686,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
686
686
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
687
687
|
|
688
688
|
"use strict";
|
689
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n inject: [\"formSafe\"],\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n computed: {\n menuXsSpan
|
689
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n inject: [\"formSafe\"],\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]],\n computed: {\n menuXsSpan() {\n return this.formSafe.parentOption.menuXsSpan || this.formSafe.config.xsSpan;\n },\n menuSpan() {\n return this.formSafe.parentOption.menuSpan || this.formSafe.config.xsSpan;\n },\n styleName() {\n if (this.menuSpan !== 24) {\n return {\n padding: 0\n };\n }\n return {};\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/menu.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
690
690
|
|
691
691
|
/***/ }),
|
692
692
|
|
@@ -698,7 +698,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
698
698
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
699
699
|
|
700
700
|
"use strict";
|
701
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"group\",\n data
|
701
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"group\",\n data() {\n return {\n activeName: ''\n };\n },\n props: {\n arrow: {\n type: Boolean,\n default: true\n },\n collapse: {\n type: Boolean,\n default: true\n },\n header: {\n type: Boolean,\n default: true\n },\n icon: {\n type: String\n },\n display: {\n type: Boolean,\n default: true\n },\n card: {\n type: Boolean,\n default: false\n },\n label: {\n type: String\n }\n },\n watch: {\n text(val) {\n this.activeName = [val];\n }\n },\n computed: {\n text() {\n return this.collapse ? 1 : 0;\n },\n isHeader() {\n return this.$slots.header && this.header || (this.label || this.icon) && this.header;\n }\n },\n created() {\n this.activeName = [this.text];\n },\n methods: {\n handleChange(activeNames) {\n this.$emit('change', activeNames);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/group/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
702
702
|
|
703
703
|
/***/ }),
|
704
704
|
|
@@ -710,7 +710,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
710
710
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
711
711
|
|
712
712
|
"use strict";
|
713
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-color\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n colorFormat: String,\n predefine: {\n type: Array,\n
|
713
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-color\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n colorFormat: String,\n predefine: {\n type: Array,\n default: () => {\n return [\"#ff4500\", \"#ff8c00\", \"#ffd700\", \"#90ee90\", \"#00ced1\", \"#1e90ff\", \"#c71585\", \"rgba(255, 69, 0, 0.68)\", \"rgb(255, 120, 0)\", \"hsv(51, 100, 98)\", \"hsva(120, 40, 94, 0.5)\", \"hsl(181, 100%, 37%)\", \"hsla(209, 100%, 56%, 0.73)\"];\n }\n },\n showAlpha: {\n type: Boolean,\n default: true\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-color/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
714
714
|
|
715
715
|
/***/ }),
|
716
716
|
|
@@ -722,7 +722,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
722
722
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
723
723
|
|
724
724
|
"use strict";
|
725
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_components_icon_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/components/icon/index */ \"./packages/core/components/icon/index.vue\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-icon\",\n components: {\n iconTemp: common_components_icon_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n dialogWidth: {\n type: String,\n
|
725
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_components_icon_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/components/icon/index */ \"./packages/core/components/icon/index.vue\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-icon\",\n components: {\n iconTemp: common_components_icon_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n dialogWidth: {\n type: String,\n default: '80%'\n },\n iconList: {\n type: Array,\n default: () => {\n return [];\n }\n }\n },\n data() {\n return {\n filterText: '',\n box: false,\n tabs: {}\n };\n },\n computed: {\n list() {\n let list = this.tabs.list.map(ele => {\n if (!ele.value && !ele.label) {\n return {\n label: ele,\n value: ele\n };\n }\n return ele;\n });\n if (this.filterText) {\n list = list.filter(ele => ele.label.indexOf(this.filterText) !== -1);\n }\n return list;\n },\n option() {\n return {\n column: this.iconList\n };\n }\n },\n created() {\n this.tabs = this.iconList[0];\n },\n methods: {\n handleTabs(tabs) {\n this.tabs = tabs;\n },\n handleSubmit(item) {\n this.box = false;\n this.text = item;\n this.handleChange(item);\n },\n handleShow() {\n this.$refs.main.blur();\n if (this.disabled || this.readonly) return;\n this.tabs = this.iconList[0];\n this.box = true;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-icon/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
726
726
|
|
727
727
|
/***/ }),
|
728
728
|
|
@@ -734,7 +734,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
734
734
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
735
735
|
|
736
736
|
"use strict";
|
737
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"input-map\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n dialogWidth: {\n type: String,\n
|
737
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"input-map\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n dialogWidth: {\n type: String,\n default: '80%'\n },\n rows: Number,\n minRows: {\n type: Number,\n default: 1\n },\n maxRows: {\n type: Number\n }\n },\n data() {\n return {\n formattedAddress: '',\n address: '',\n poi: {},\n marker: null,\n map: null,\n box: false\n };\n },\n watch: {\n poi(val) {\n this.formattedAddress = val.formattedAddress;\n },\n value(val) {\n if (this.validatenull(val)) {\n this.poi = {};\n this.address = '';\n }\n },\n text(val) {\n if (!this.validatenull(val)) {\n this.poi = {\n longitude: val[0],\n latitude: val[1],\n formattedAddress: val[2]\n };\n this.address = val[2];\n }\n },\n box: {\n handler() {\n if (this.box) {\n this.$nextTick(() => this.init(() => {\n if (this.longitude && this.latitude) {\n this.addMarker(this.longitude, this.latitude);\n this.getAddress(this.longitude, this.latitude);\n }\n }));\n }\n },\n immediate: true\n }\n },\n computed: {\n longitude() {\n return this.text[0];\n },\n latitude() {\n return this.text[1];\n },\n title() {\n return this.disabled || this.readonly ? \"查看\" : '选择';\n }\n },\n methods: {\n clear() {\n this.poi = {};\n this.clearMarker();\n },\n handleSubmit() {\n this.setVal();\n this.box = false;\n },\n handleClear() {\n this.text = [];\n this.poi = {};\n this.handleChange(this.text);\n },\n setVal() {\n this.text = [this.poi.longitude, this.poi.latitude, this.poi.formattedAddress];\n this.handleChange(this.text);\n },\n handleShow() {\n this.$refs.main.blur();\n this.box = true;\n },\n //新增坐标\n addMarker(R, P) {\n this.clearMarker();\n this.marker = new window.AMap.Marker({\n position: [R, P]\n });\n this.marker.setMap(this.map);\n },\n //清空坐标\n clearMarker() {\n if (this.marker) {\n this.marker.setMap(null);\n this.marker = null;\n }\n },\n //获取坐标\n getAddress(R, P) {\n new window.AMap.service(\"AMap.Geocoder\", () => {\n //回调函数\n let geocoder = new window.AMap.Geocoder({});\n geocoder.getAddress([R, P], (status, result) => {\n if (status === \"complete\" && result.info === \"OK\") {\n const regeocode = result.regeocode;\n this.poi = Object.assign(regeocode, {\n longitude: R,\n latitude: P\n });\n // 自定义点标记内容\n var markerContent = document.createElement(\"div\");\n\n // 点标记中的图标\n var markerImg = document.createElement(\"img\");\n markerImg.src = \"//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png\";\n markerContent.appendChild(markerImg);\n\n // 点标记中的文本\n var markerSpan = document.createElement(\"span\");\n markerSpan.className = \"avue-input-map__marker\";\n markerSpan.innerHTML = this.poi.formattedAddress;\n markerContent.appendChild(markerSpan);\n this.marker.setContent(markerContent); //更新点标记内容\n }\n });\n });\n },\n handleClose() {\n window.poiPicker.clearSearchResults();\n },\n addClick() {\n this.map.on(\"click\", e => {\n if (this.disabled || this.readonly) return;\n const lnglat = e.lnglat;\n const P = lnglat.lat;\n const R = lnglat.lng;\n this.addMarker(R, P);\n this.getAddress(R, P);\n });\n },\n init(callback) {\n if (!window.AMap) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs('Map');\n return;\n }\n this.map = new window.AMap.Map(\"map__container\", Object.assign({\n zoom: 13,\n center: (() => {\n if (this.longitude && this.latitude) return [this.longitude, this.latitude];\n })()\n }, this.params));\n this.initPoip();\n this.addClick();\n callback();\n },\n initPoip() {\n if (!window.AMapUI) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs('MapUi');\n return;\n }\n window.AMapUI.loadUI([\"misc/PoiPicker\"], PoiPicker => {\n var poiPicker = new PoiPicker({\n input: \"map__input\",\n placeSearchOptions: {\n map: this.map,\n pageSize: 10\n },\n searchResultsContainer: \"map__result\"\n });\n //初始化poiPicker\n this.poiPickerReady(poiPicker);\n });\n },\n poiPickerReady(poiPicker) {\n window.poiPicker = poiPicker;\n //选取了某个POI\n poiPicker.on(\"poiPicked\", poiResult => {\n this.clearMarker();\n var source = poiResult.source,\n poi = poiResult.item;\n console.log(poi);\n this.poi = Object.assign(poi, {\n formattedAddress: poi.name,\n longitude: poi.location.lng,\n latitude: poi.location.lat\n });\n if (source !== \"search\") {\n poiPicker.searchByKeyword(poi.name);\n }\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-map/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
738
738
|
|
739
739
|
/***/ }),
|
740
740
|
|
@@ -746,7 +746,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
746
746
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
747
747
|
|
748
748
|
"use strict";
|
749
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-number\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data
|
749
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-number\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data() {\n return {};\n },\n props: {\n stepStrictly: {\n type: Boolean,\n default: false\n },\n controls: {\n type: Boolean,\n default: true\n },\n step: {\n type: Number,\n default: 1\n },\n controlsPosition: {\n type: String,\n default: \"right\"\n },\n precision: {\n type: Number\n },\n min: {\n type: Number,\n default: -Infinity\n },\n max: {\n type: Number,\n default: Infinity\n }\n },\n created() {},\n mounted() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-number/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
750
750
|
|
751
751
|
/***/ }),
|
752
752
|
|
@@ -758,7 +758,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
758
758
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
759
759
|
|
760
760
|
"use strict";
|
761
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-table\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data
|
761
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-table\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data() {\n return {\n object: [],\n active: [],\n search: {},\n page: {},\n loading: false,\n box: false,\n created: false,\n data: []\n };\n },\n props: {\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n formatter: Function,\n onLoad: Function,\n children: {\n type: Object,\n default: () => {\n return {};\n }\n },\n dialogWidth: {\n type: String,\n default: '80%'\n }\n },\n watch: {\n value(val) {\n if (this.validatenull(val)) {\n this.active = [];\n this.object = [];\n }\n },\n text(val) {\n if (this.created || this.validatenull(val)) return;\n if (typeof this.onLoad == 'function') {\n this.onLoad({\n value: this.text\n }, data => {\n let result = Array.isArray(data) ? data : [data];\n this.active = result;\n this.object = result;\n this.created = true;\n });\n }\n }\n },\n computed: {\n isMultiple() {\n return this.multiple;\n },\n title() {\n return this.disabled || this.readonly ? \"查看\" : '选择';\n },\n labelShow() {\n if (typeof this.formatter == 'function') {\n return this.formatter(this.isMultiple ? this.object : this.object[0] || {});\n }\n return this.object.map(ele => ele[this.labelKey]).join(',');\n },\n option() {\n return Object.assign({\n menu: false,\n header: false,\n size: this.size,\n headerAlign: 'center',\n align: 'center',\n highlightCurrentRow: !this.isMultiple,\n reserveSelection: this.isMultiple,\n selection: this.isMultiple,\n selectable: (row, index) => {\n return !row.disabled;\n }\n }, this.children);\n }\n },\n methods: {\n handleSelectionChange(val) {\n this.active = val;\n },\n handleClear() {\n this.active = [];\n this.setVal();\n },\n handleShow() {\n this.$refs.main.blur();\n if (this.disabled || this.readonly) return;\n this.search = {};\n this.page = {\n currentPage: 1,\n total: 0\n };\n this.data = [];\n this.box = true;\n },\n setVal() {\n this.object = this.active;\n this.text = this.active.map(ele => ele[this.valueKey]);\n this.box = false;\n },\n handleRowClassName({\n row,\n rowIndex\n }) {\n if (row[this.disabledKey]) return 'disabled';\n },\n handleCurrentRowChange(val) {\n if (this.isMultiple) {\n this.$refs.crud.setCurrentRow(null);\n } else {\n if (val[this.disabledKey]) {\n this.$refs.crud.setCurrentRow(this.active[0]);\n } else {\n this.active = [val];\n }\n }\n },\n handleSearchChange(form, done) {\n this.page.page = 1;\n this.onList();\n done && done();\n },\n onList() {\n this.loading = true;\n if (typeof this.onLoad == 'function') {\n this.onLoad({\n page: this.page,\n data: this.search\n }, data => {\n this.page.total = data.total;\n this.data = data.data;\n this.loading = false;\n if (this.isMultiple) {\n let ids = this.object.map(ele => ele[this.valueKey]);\n let data = this.data.filter(ele => ids.includes(ele[this.valueKey]));\n console.log(data);\n this.$nextTick(() => {\n this.$refs.crud.toggleSelection(data);\n });\n } else {\n let active = this.data.find(ele => ele[this.valueKey] == this.text);\n setTimeout(() => this.$refs.crud.setCurrentRow(active));\n }\n });\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-table/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
762
762
|
|
763
763
|
/***/ }),
|
764
764
|
|
@@ -770,7 +770,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
770
770
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
771
771
|
|
772
772
|
"use strict";
|
773
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-tree\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data
|
773
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input-tree\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data() {\n return {\n node: [],\n filterValue: \"\",\n box: false,\n dicList: []\n };\n },\n props: {\n indent: Number,\n filterNodeMethod: Function,\n nodeClick: Function,\n treeLoad: Function,\n checked: Function,\n lazy: {\n type: Boolean,\n default: false\n },\n leafOnly: {\n type: Boolean,\n default: true\n },\n tags: {\n type: Boolean,\n default: false\n },\n limit: {\n type: Number,\n default: 0\n },\n filter: {\n type: Boolean,\n default: true\n },\n filterText: {\n type: String,\n default: ''\n },\n checkStrictly: {\n type: Boolean,\n default: false\n },\n accordion: {\n type: Boolean,\n default: false\n },\n parent: {\n type: Boolean,\n default: true\n },\n iconClass: String,\n defaultExpandedKeys: Array,\n checkOnClickNode: Boolean,\n expandOnClickNode: Boolean,\n defaultExpandAll: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: true\n }\n },\n watch: {\n text(val) {\n this.init();\n },\n dic: {\n handler(val) {\n this.dicList = val;\n },\n immediate: true\n },\n dicList: {\n handler() {\n this.init();\n },\n immediate: true\n },\n filterValue(val) {\n this.$refs.tree.filter(val);\n }\n },\n computed: {\n treeProps() {\n return Object.assign(this.props, {\n isLeaf: this.leafKey\n });\n },\n currentNodeKey() {\n return this.multiple ? '' : this.text;\n },\n keysList() {\n return this.multiple ? this.text : [this.text || ''];\n },\n labelShow() {\n let result = [];\n this.keysList.forEach(ele => {\n let node = this.node.find(node => node[this.valueKey] == ele);\n if (!node) {\n node = {};\n node[this.labelKey] = ele;\n node[this.valueKey] = ele;\n }\n result.push(this.getLabelText(node));\n });\n return result;\n }\n },\n methods: {\n removeTag(val) {\n let index = this.node.findIndex(ele => ele[this.labelKey] == val);\n if (index != -1) {\n this.$refs.tree.setChecked(this.node[index][this.valueKey]);\n this.text.splice(index, 1);\n }\n },\n handleClear() {\n this.text = this.multiple ? [] : '';\n this.node = [];\n this.filterValue = '';\n this.$refs.tree.setCurrentKey(null);\n this.$refs.tree.setCheckedKeys([]);\n },\n handleTreeLoad(node, resolve) {\n let callback = list => {\n let findDic = (list, value, children) => {\n list.forEach(ele => {\n if (ele[this.valueKey] == value) {\n ele[this.childrenKey] = children;\n } else if (ele[this.childrenKey]) {\n findDic(ele[this.childrenKey]);\n }\n });\n };\n findDic(this.dicList, node.key, list);\n resolve(list);\n };\n this.treeLoad && this.treeLoad(node, callback);\n },\n filterNode(value, data) {\n if (typeof this.filterNodeMethod === 'function') {\n return this.filterNodeMethod(value, data);\n }\n if (!value) return true;\n return data[this.labelKey].toLowerCase().indexOf(value.toLowerCase()) !== -1;\n },\n checkChange(checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys) {\n this.text.splice(0, this.text.length);\n const leafOnly = this.checkStrictly ? false : this.leafOnly;\n const list = this.$refs.tree.getCheckedNodes(leafOnly, false);\n list.forEach(node => this.text.push(node[this.valueKey]));\n if (typeof this.checked === \"function\") this.checked(checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys);\n },\n getHalfList() {\n let list = this.$refs.tree.getCheckedNodes(false, true);\n list = list.map(ele => ele[this.valueKey]);\n return list;\n },\n init() {\n this.$nextTick(() => {\n this.node = [];\n if (this.multiple) {\n if (this.validatenull(this.text)) {\n this.$refs.tree.setCheckedKeys([]);\n } else {\n const leafOnly = this.checkStrictly ? false : this.leafOnly;\n let list = this.$refs.tree.getCheckedNodes(leafOnly, false);\n list.forEach(ele => {\n this.node.push(ele);\n });\n }\n } else {\n let node = this.$refs.tree.getNode(this.text);\n if (node) {\n let data = node.data;\n this.$refs.tree.setCurrentKey(data[this.valueKey]);\n this.node.push(data);\n }\n }\n });\n //是否禁止父类\n this.disabledParentNode(this.dic, this.parent);\n },\n disabledParentNode(dic, parent) {\n dic.forEach(ele => {\n const children = ele[this.childrenKey];\n if (!this.validatenull(children)) {\n if (!parent) {\n ele.disabled = true;\n }\n this.disabledParentNode(children, parent);\n }\n });\n },\n handleNodeClick(data, node, nodeComp) {\n if (data.disabled) return;\n if (typeof this.nodeClick === \"function\") this.nodeClick(data, node, nodeComp);\n if (this.multiple) return;\n if (this.validatenull(data[this.childrenKey]) && !this.multiple || this.parent) {\n this.text = data[this.valueKey];\n this.$refs.main.blur();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input-tree/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
774
774
|
|
775
775
|
/***/ }),
|
776
776
|
|
@@ -782,7 +782,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
782
782
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
783
783
|
|
784
784
|
"use strict";
|
785
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\
|
785
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"input\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n maxlength: \"\",\n minlength: \"\",\n showPassword: {\n type: Boolean,\n default: true\n },\n showWordLimit: {\n type: Boolean,\n default: false\n },\n target: {\n type: String,\n default: ' _blank'\n },\n prefixIcon: {\n type: String\n },\n suffixIcon: {\n type: String\n },\n prependClick: {\n type: Function,\n default: () => {}\n },\n prepend: {\n type: String\n },\n appendClick: {\n type: Function,\n default: () => {}\n },\n append: {\n type: String\n },\n minlength: {\n type: Number\n },\n maxlength: {\n type: Number\n },\n rows: Number,\n minRows: {\n type: Number,\n default: 5\n },\n maxRows: {\n type: Number,\n default: 10\n },\n autocomplete: {\n type: String\n }\n },\n computed: {\n isSearch() {\n return this.type == 'search';\n },\n typeParam: function () {\n if (this.type === \"textarea\") {\n return \"textarea\";\n } else if (this.type === \"password\") {\n return \"password\";\n } else {\n return \"text\";\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/input/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
786
786
|
|
787
787
|
/***/ }),
|
788
788
|
|
@@ -794,7 +794,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
794
794
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
795
795
|
|
796
796
|
"use strict";
|
797
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plugin_keyboard_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! plugin/keyboard/index */ \"./src/plugin/keyboard/index.js\");\n/* harmony import */ var plugin_keyboard_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! plugin/keyboard/number */ \"./src/plugin/keyboard/number.js\");\n/* harmony import */ var plugin_keyboard_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! plugin/keyboard/mobile */ \"./src/plugin/keyboard/mobile.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n name: 'keyboard',\n props: {\n ele: {\n type: String,\n required: true\n },\n keys: Array,\n theme: {\n type: String,\n
|
797
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plugin_keyboard_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! plugin/keyboard/index */ \"./src/plugin/keyboard/index.js\");\n/* harmony import */ var plugin_keyboard_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! plugin/keyboard/number */ \"./src/plugin/keyboard/number.js\");\n/* harmony import */ var plugin_keyboard_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! plugin/keyboard/mobile */ \"./src/plugin/keyboard/mobile.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n name: 'keyboard',\n props: {\n ele: {\n type: String,\n required: true\n },\n keys: Array,\n theme: {\n type: String,\n default: 'default',\n validator: value => {\n return ['default', 'dark', 'green', 'classic'].includes(value);\n }\n },\n type: {\n type: String,\n default: 'default',\n validator: value => {\n return ['default', 'number', 'mobile'].includes(value);\n }\n },\n fixedBottomCenter: {\n type: Boolean,\n default: false\n },\n rebind: {\n type: Boolean,\n default: true\n }\n },\n watch: {\n ele() {\n this.init();\n }\n },\n data() {\n return {\n customClick: {}\n };\n },\n computed: {\n className() {\n return `avue-keyboard--${this.theme}`;\n }\n },\n mounted() {\n this.init();\n },\n methods: {\n init() {\n if (!this.ele) return;\n let keyboard;\n const config = {\n el: '#keyboard',\n style: {},\n keys: this.keys,\n fixedBottomCenter: this.fixedBottomCenter\n };\n if (this.type == 'default') keyboard = new plugin_keyboard_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"](config);else if (this.type == 'number') keyboard = new plugin_keyboard_number__WEBPACK_IMPORTED_MODULE_1__[\"default\"](config);else if (this.type == 'mobile') keyboard = new MobileKeyBoard(config);\n const ele = this.ele.indexOf(\"#\") == 0 ? this.ele.substring(1) : this.ele;\n keyboard.inputOn(`#${ele}`, 'value', (e, val) => {\n this.$emit('click', e, val);\n }, this.rebind ? this.customClick : null);\n this.keyboard = keyboard;\n },\n bindClick(btn, fn) {\n this.keyboard.onclick(btn, fn);\n this.customClick[btn] = fn;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/keyboard/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
798
798
|
|
799
799
|
/***/ }),
|
800
800
|
|
@@ -806,7 +806,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plug
|
|
806
806
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
807
807
|
|
808
808
|
"use strict";
|
809
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'license',\n props: {\n id: {\n type: String,\n
|
809
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'license',\n props: {\n id: {\n type: String,\n default: ''\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n watch: {\n option: {\n handler() {\n this.init();\n },\n deep: true\n }\n },\n data() {\n return {\n base64: '',\n draw: false,\n canvas: '',\n context: ''\n };\n },\n computed: {\n img() {\n return this.option.img;\n },\n list() {\n return this.option.list || [];\n }\n },\n mounted() {\n this.canvas = document.getElementById(\"canvas\" + this.id);\n this.context = this.canvas.getContext(\"2d\");\n this.init();\n },\n methods: {\n init() {\n this.draw = false;\n const beauty = new Image();\n beauty.src = this.img;\n beauty.onload = () => {\n const width = this.option.width || beauty.width;\n ;\n const height = this.option.width ? beauty.height / beauty.width * this.option.width : beauty.height;\n this.$refs.canvas.width = width;\n this.$refs.canvas.height = height;\n this.context.clearRect(0, 0, width, height);\n this.context.drawImage(beauty, 0, 0, width, height);\n this.list.forEach((ele, index) => {\n const callback = () => {\n if (index == this.list.length - 1) {\n setTimeout(() => {\n this.draw = true;\n }, 0);\n }\n };\n if (ele.img) {\n const img = new Image();\n img.src = ele.img;\n img.onload = () => {\n const widths = ele.width || img.width;\n ;\n const heights = ele.width ? img.height / img.width * ele.width : img.height;\n this.context.drawImage(img, ele.left, ele.top, widths, heights);\n callback();\n };\n } else {\n if (ele.bold) {\n this.context.font = `bold ${ele.size}px ${ele.style}`;\n } else {\n this.context.font = `${ele.size}px ${ele.style}`;\n }\n this.context.fillStyle = ele.color;\n this.context.fillText(ele.text, ele.left, ele.top);\n this.context.stroke();\n callback();\n }\n });\n };\n },\n getFile(name = new Date().getTime()) {\n return new Promise(resolve => {\n const time = setInterval(() => {\n if (this.draw) {\n const data = this.canvas.toDataURL('image/jpeg', 1.0);\n const file = this.dataURLtoFile(data, name);\n clearInterval(time);\n resolve(file);\n }\n }, 1000);\n });\n return file;\n },\n downFile(filename = new Date().getTime()) {\n Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"downFile\"])(this.base64, filename);\n },\n getBase64() {\n return new Promise(resolve => {\n const time = setInterval(() => {\n if (this.draw) {\n const data = this.canvas.toDataURL('image/jpeg', 1.0);\n this.base64 = data;\n clearInterval(time);\n resolve(data);\n }\n }, 100);\n });\n },\n getPdf(name = new Date().getTime()) {\n const contentWidth = this.canvas.width;\n const contentHeight = this.canvas.height;\n const pageHeight = contentWidth / 592.28 * 841.89;\n let leftHeight = contentHeight;\n let position = 0;\n const imgWidth = 595.28;\n const imgHeight = 592.28 / contentWidth * contentHeight;\n const pageData = this.canvas.toDataURL('image/jpeg', 1.0);\n const PDF = new window.jsPDF('', 'pt', 'a4');\n if (leftHeight < pageHeight) {\n PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight);\n } else {\n while (leftHeight > 0) {\n PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight);\n leftHeight -= pageHeight;\n position -= 841.89;\n if (leftHeight > 0) {\n PDF.addPage();\n }\n }\n }\n PDF.save(`${name}.pdf`);\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/license/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
810
810
|
|
811
811
|
/***/ }),
|
812
812
|
|
@@ -818,7 +818,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
818
818
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
819
819
|
|
820
820
|
"use strict";
|
821
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\
|
821
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\nconst INIT_TEXT = '发送验证码';\nconst TIP_TEXT = '{{time}}s后重获取';\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'login',\n props: {\n value: {\n type: Object,\n default: () => {\n return {};\n }\n },\n codesrc: {\n type: String\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n computed: {\n form: {\n get() {\n return this.value;\n },\n set(val) {\n this.$emit('input', val);\n this.$emit('change', val);\n }\n },\n labelWidth() {\n return this.option.labelWidth || 80;\n },\n time() {\n return this.option.time || 60;\n },\n isImg() {\n return this.codeType === 'img';\n },\n isPhone() {\n return this.codeType === 'phone';\n },\n codeType() {\n return this.option.codeType || 'img';\n },\n width() {\n return this.option.width || '100%';\n },\n username() {\n return this.column.username || {};\n },\n password() {\n return this.column.password || {};\n },\n code() {\n return this.column.code || {};\n },\n column() {\n return this.option.column || {};\n },\n sendDisabled() {\n return !this.validatenull(this.check);\n }\n },\n data() {\n return {\n text: INIT_TEXT,\n nowtime: '',\n check: {},\n flag: false\n };\n },\n methods: {\n onSend() {\n const callback = () => {\n this.nowtime = this.time;\n this.text = TIP_TEXT.replace('{{time}}', this.nowtime);\n this.check = setInterval(() => {\n this.nowtime--;\n if (this.nowtime === 0) {\n this.text = INIT_TEXT;\n clearInterval(this.check);\n this.check = null;\n } else {\n this.text = TIP_TEXT.replace('{{time}}', this.nowtime);\n }\n }, 1000);\n };\n if (this.sendDisabled) return;\n this.$emit('send', callback);\n },\n onRefresh() {\n this.$emit('refresh');\n },\n onSubmit() {\n const onCover = () => {\n const form = {};\n for (let o in this.form) {\n let key = o;\n if (this[o].prop) {\n key = this[o].prop;\n }\n form[key] = this.form[o];\n }\n return form;\n };\n this.$refs.form.validate(valid => {\n if (valid) {\n this.$emit('submit', onCover());\n }\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/login/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
822
822
|
|
823
823
|
/***/ }),
|
824
824
|
|
@@ -830,7 +830,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
830
830
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
831
831
|
|
832
832
|
"use strict";
|
833
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\
|
833
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\nconst propsDefault = {\n img: 'img',\n title: 'title',\n subtile: 'title',\n tag: 'tag',\n status: 'status'\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'notice',\n props: {\n finish: {\n type: Boolean,\n default: false\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n },\n data: {\n type: Array,\n default: () => {\n return [];\n }\n }\n },\n data() {\n return {\n page: 1,\n loading: false\n };\n },\n computed: {\n props() {\n return this.option.props || propsDefault;\n },\n imgKey() {\n return this.props.img || propsDefault.img;\n },\n titleKey() {\n return this.props.title || propsDefault.title;\n },\n subtitleKey() {\n return this.props.subtitle || propsDefault.subtitle;\n },\n tagKey() {\n return this.props.tag || propsDefault.tag;\n },\n statusKey() {\n return this.props.status || propsDefault.status;\n }\n },\n methods: {\n click(item) {\n this.$emit('click', item);\n },\n handleClick() {\n this.loading = true;\n const done = () => {\n this.loading = false;\n };\n this.page++;\n this.$emit('page-change', this.page, done);\n },\n getType(status = 0) {\n if (status == 0) {\n return 'info';\n } else if (status == 1) {\n return '';\n } else if (status == 2) {\n return 'warning';\n } else if (status == 3) {\n return 'danger';\n } else if (status == 4) {\n return 'success';\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/notice/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
834
834
|
|
835
835
|
/***/ }),
|
836
836
|
|
@@ -854,7 +854,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
854
854
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
855
855
|
|
856
856
|
"use strict";
|
857
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"radio\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data
|
857
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"radio\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n data() {\n return {\n name: 'radio'\n };\n },\n props: {\n value: {}\n },\n watch: {},\n created() {},\n mounted() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/radio/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
858
858
|
|
859
859
|
/***/ }),
|
860
860
|
|
@@ -866,7 +866,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
866
866
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
867
867
|
|
868
868
|
"use strict";
|
869
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"rate\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n allowHalf: Boolean,\n lowThreshold: Number,\n highThreshold: Number,\n disabledVoidColor: String,\n disabledVoidIconClass: String,\n value: {\n type: Number,\n
|
869
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"rate\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n allowHalf: Boolean,\n lowThreshold: Number,\n highThreshold: Number,\n disabledVoidColor: String,\n disabledVoidIconClass: String,\n value: {\n type: Number,\n default: 0\n },\n colors: {\n type: Array\n },\n max: {\n type: Number,\n default: 5\n },\n iconClasses: {\n type: Array\n },\n texts: {\n type: Array\n },\n scoreTemplate: String,\n showScore: {\n type: Boolean,\n default: false\n },\n showText: {\n type: Boolean,\n default: false\n },\n voidIconClass: {\n type: String\n }\n },\n data() {\n return {};\n },\n watch: {},\n created() {},\n mounted() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/rate/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
870
870
|
|
871
871
|
/***/ }),
|
872
872
|
|
@@ -878,7 +878,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
878
878
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
879
879
|
|
880
880
|
"use strict";
|
881
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"search\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n value: {}\n },\n watch: {\n value: {\n handler
|
881
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"search\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n value: {}\n },\n watch: {\n value: {\n handler(val) {\n this.setVal(val);\n },\n deep: true\n }\n },\n computed: {\n form: {\n get() {\n return this.value;\n },\n set(val) {\n this.setVal(val);\n }\n },\n props() {\n return this.parentOption.props || {};\n },\n labelKey() {\n return global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].label;\n },\n valueKey() {\n return global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value;\n },\n mainSlot() {\n let result = [];\n this.propOption.forEach(item => {\n if (this.$scopedSlots[item.prop]) result.push(item.prop);\n });\n return result;\n },\n isCard() {\n return this.parentOption.card;\n },\n parentOption() {\n return this.tableOption;\n },\n propOption() {\n return this.columnOption;\n },\n columnOption() {\n return this.parentOption.column;\n }\n },\n created() {\n this.dataFormat();\n },\n methods: {\n setVal(val) {\n this.$emit('input', val);\n this.$emit(\"change\", val);\n },\n getKey(item = {}, props = {}, key) {\n return item[props[key] || this.props[key] || key];\n },\n dataFormat() {\n this.propOption.forEach(ele => {\n const prop = ele.prop;\n if (this.validatenull(this.form[prop])) {\n this.$set(this.form, prop, ele.multiple === false ? \"\" : []);\n }\n });\n },\n getActive(item, column) {\n const value = this.getKey(item, column.props, this.valueKey);\n if (column.multiple === false) {\n return this.form[column.prop] === value;\n } else {\n return this.form[column.prop].includes(value);\n }\n },\n handleClick(column, item) {\n const value = this.getKey(item, column.props, this.valueKey);\n //单选\n if (column.multiple === false) {\n this.form[column.prop] = value;\n } else {\n // 多选\n const index = this.form[column.prop].indexOf(value);\n if (index === -1) {\n this.form[column.prop].push(value);\n } else {\n this.form[column.prop].splice(index, 1);\n }\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/search/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
882
882
|
|
883
883
|
/***/ }),
|
884
884
|
|
@@ -890,7 +890,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
890
890
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
891
891
|
|
892
892
|
"use strict";
|
893
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"select\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()],\n data
|
893
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"select\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()],\n data() {\n return {\n checked: false,\n indeterminate: false,\n created: false,\n netDic: [],\n loading: false\n };\n },\n props: {\n loadingText: {\n type: String\n },\n noMatchText: {\n type: String\n },\n noDataText: {\n type: String\n },\n drag: {\n type: Boolean,\n default: false\n },\n remote: {\n type: Boolean,\n default: false\n },\n tags: {\n type: Boolean,\n default: false\n },\n limit: {\n type: Number,\n default: 0\n },\n filterable: {\n type: Boolean,\n default: false\n },\n allowCreate: {\n type: Boolean,\n default: false\n },\n defaultFirstOption: {\n type: Boolean,\n default: false\n },\n all: {\n type: Boolean,\n default: false\n },\n popperAppendToBody: {\n type: Boolean,\n default: true\n }\n },\n computed: {\n classNameKey() {\n return this.props.className || 'className';\n }\n },\n watch: {\n text(val) {\n if (!this.validatenull(val)) {\n if (this.remote && !this.created) {\n this.created = true;\n this.handleRemoteMethod(this.multiple ? this.text.join(global_variable__WEBPACK_IMPORTED_MODULE_5__[\"DIC_SPLIT\"]) : this.text);\n }\n }\n if (this.multiple) {\n if (this.text.length == 0) {\n this.checked = false;\n this.indeterminate = false;\n } else if (this.text.length == this.netDic.length) {\n this.checked = true;\n this.indeterminate = false;\n } else {\n this.checked = false;\n this.indeterminate = true;\n }\n }\n },\n dic: {\n handler(val) {\n this.netDic = val;\n },\n immediate: true\n }\n },\n mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n setSort() {\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs('Sortable');\n return;\n }\n const el = this.$refs.main.$el.querySelectorAll('.el-select__tags > span')[0];\n window.Sortable.create(el, {\n animation: 100,\n onEnd: evt => {\n const targetRow = this.value.splice(evt.oldIndex, 1)[0];\n this.value.splice(evt.newIndex, 0, targetRow);\n }\n });\n },\n handleRemoteMethod(query) {\n this.loading = true;\n Object(core_dic__WEBPACK_IMPORTED_MODULE_4__[\"sendDic\"])({\n column: this.column,\n value: query\n }).then(res => {\n this.loading = false;\n this.netDic = res;\n });\n },\n checkChange(val) {\n this.text = [];\n this.checked = val;\n this.indeterminate = false;\n if (val) {\n this.text = this.netDic.map(ele => ele[this.valueKey]);\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/select/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
894
894
|
|
895
895
|
/***/ }),
|
896
896
|
|
@@ -902,7 +902,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
902
902
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
903
903
|
|
904
904
|
"use strict";
|
905
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n//绘制五角星 \n/** \n * 创建一个五角星形状. 该五角星的中心坐标为(sx,sy),中心到顶点的距离为radius,rotate=0时一个顶点在对称轴上 \n * rotate:绕对称轴旋转rotate弧度 \n */\nfunction create5star(context, sx, sy, radius, color, rotato) {\n context.save();\n context.fillStyle = color;\n context.translate(sx, sy); //移动坐标原点 \n context.rotate(Math.PI + rotato); //旋转 \n context.beginPath(); //创建路径 \n var x = Math.sin(0);\n var y = Math.cos(0);\n var dig = Math.PI / 5 * 4;\n for (var i = 0; i < 5; i++) {\n //画五角星的五条边 \n var x = Math.sin(i * dig);\n var y = Math.cos(i * dig);\n context.lineTo(x * radius, y * radius);\n }\n context.closePath();\n context.stroke();\n context.fill();\n context.restore();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"sign\",\n props: {\n width: {\n type: Number,\n
|
905
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n//绘制五角星 \n/** \n * 创建一个五角星形状. 该五角星的中心坐标为(sx,sy),中心到顶点的距离为radius,rotate=0时一个顶点在对称轴上 \n * rotate:绕对称轴旋转rotate弧度 \n */\nfunction create5star(context, sx, sy, radius, color, rotato) {\n context.save();\n context.fillStyle = color;\n context.translate(sx, sy); //移动坐标原点 \n context.rotate(Math.PI + rotato); //旋转 \n context.beginPath(); //创建路径 \n var x = Math.sin(0);\n var y = Math.cos(0);\n var dig = Math.PI / 5 * 4;\n for (var i = 0; i < 5; i++) {\n //画五角星的五条边 \n var x = Math.sin(i * dig);\n var y = Math.cos(i * dig);\n context.lineTo(x * radius, y * radius);\n }\n context.closePath();\n context.stroke();\n context.fill();\n context.restore();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"sign\",\n props: {\n width: {\n type: Number,\n default: 600\n },\n height: {\n type: Number,\n default: 400\n }\n },\n data() {\n return {\n disabled: false,\n linex: [],\n liney: [],\n linen: [],\n canvas: {},\n context: {}\n };\n },\n computed: {\n styleName() {\n return {\n width: this.setPx(this.width),\n height: this.setPx(this.height)\n };\n }\n },\n mounted() {\n this.init();\n },\n methods: {\n getStar(text, text1, text2) {\n var canvas = this.canvas;\n var context = this.context;\n // 绘制印章边框 \n var width = canvas.width / 2;\n var height = canvas.height / 2;\n context.lineWidth = 7;\n context.strokeStyle = \"#f00\";\n context.beginPath();\n context.arc(width, height, 110, 0, Math.PI * 2);\n context.stroke();\n\n //画五角星\n create5star(context, width, height, 20, \"#f00\", 0);\n\n // 绘制印章名称 \n context.font = '18px 黑体';\n context.textBaseline = 'middle'; //设置文本的垂直对齐方式\n context.textAlign = 'center'; //设置文本的水平对对齐方式\n context.lineWidth = 1;\n context.strokeStyle = '#f00';\n context.strokeText(text, width, height + 50);\n\n // 绘制印章副属性名称 \n context.font = '14px 黑体';\n context.textBaseline = 'middle'; //设置文本的垂直对齐方式\n context.textAlign = 'center'; //设置文本的水平对对齐方式\n context.lineWidth = 1;\n context.strokeStyle = '#f00';\n context.strokeText(text2, width, height + 80);\n\n // 绘制印章单位 \n context.translate(width, height); // 平移到此位置,\n context.font = '22px 黑体';\n var count = text1.length; // 字数 \n var angle = 4 * Math.PI / (3 * (count - 1)); // 字间角度 \n var chars = text1.split(\"\");\n var c;\n for (var i = 0; i < count; i++) {\n c = chars[i]; // 需要绘制的字符 \n if (i == 0) context.rotate(5 * Math.PI / 6);else context.rotate(angle); // \n context.save();\n context.translate(90, 0); // 平移到此位置,此时字和x轴垂直 \n context.rotate(Math.PI / 2); // 旋转90度,让字平行于x轴 \n context.strokeText(c, 0, 0); // 此点为字的中心点 \n context.restore();\n context.save(); //锁画布(为了保存之前的画布状态) \n }\n this.disabled = true;\n },\n submit(width, height) {\n if (!width) width = this.width;\n if (!height) height = this.height;\n return this.canvas.toDataURL(\"i/png\");\n },\n clear() {\n this.linex = new Array();\n this.liney = new Array();\n this.linen = new Array();\n this.disabled = false;\n this.canvas.width = this.canvas.width;\n },\n init() {\n this.canvas = this.$refs.canvas;\n var canvas = this.canvas;\n var _safe = this;\n //注册相关事件\n if (typeof document.ontouchstart != \"undefined\") {\n //适配移动设备\n canvas.addEventListener('touchmove', onMouseMove, false);\n canvas.addEventListener('touchstart', onMouseDown, false);\n canvas.addEventListener('touchend', onMouseUp, false);\n } else {\n //适配电脑\n canvas.addEventListener('mousemove', onMouseMove, false);\n canvas.addEventListener('mousedown', onMouseDown, false);\n canvas.addEventListener('mouseup', onMouseUp, false);\n canvas.addEventListener('mouseleave', onMouseUp, false);\n }\n //初始化上下文和参数\n this.context = canvas.getContext('2d');\n var context = this.context;\n this.linex = new Array();\n this.liney = new Array();\n this.linen = new Array();\n var lastX = 1;\n var lastY = 30;\n var flag = 0;\n //根据鼠标坐标获取绘图坐标\n function getCanvasPos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n var x, y;\n if (evt.targetTouches) {\n x = evt.targetTouches[0].clientX;\n y = evt.targetTouches[0].clientY;\n } else {\n x = evt.clientX;\n y = evt.clientY;\n }\n return {\n x: (x - rect.left) * (canvas.width / rect.width),\n y: (y - rect.top) * (canvas.height / rect.height)\n };\n }\n\n //鼠标移动的时候\n function onMouseMove(evt) {\n if (_safe.disabled) return;\n var x = getCanvasPos(canvas, evt).x,\n y = getCanvasPos(canvas, evt).y;\n\n //判断是否处于按下状态\n if (flag == 1) {\n //如果是则画图\n _safe.linex.push(x);\n _safe.liney.push(y);\n _safe.linen.push(1);\n context.save();\n context.translate(context.canvas.width / 2, context.canvas.height / 2);\n context.translate(-context.canvas.width / 2, -context.canvas.height / 2);\n context.beginPath();\n context.lineWidth = 2;\n for (var i = 1; i < _safe.linex.length; i++) {\n lastX = _safe.linex[i];\n lastY = _safe.liney[i];\n if (_safe.linen[i] == 0) context.moveTo(lastX, lastY);else context.lineTo(lastX, lastY);\n }\n context.shadowBlur = 10;\n context.stroke();\n context.restore();\n }\n evt.preventDefault();\n }\n\n //当鼠标按下的时候修改按下标志,并开始记录坐标\n function onMouseDown(evt) {\n if (_safe.disabled) return;\n var x = getCanvasPos(canvas, evt).x,\n y = getCanvasPos(canvas, evt).y;\n flag = 1;\n _safe.linex.push(x);\n _safe.liney.push(y);\n _safe.linen.push(0);\n }\n\n //鼠标松开清除标志\n function onMouseUp() {\n if (_safe.disabled) return;\n flag = 0;\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/sign/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
906
906
|
|
907
907
|
/***/ }),
|
908
908
|
|
@@ -914,7 +914,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
914
914
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
915
915
|
|
916
916
|
"use strict";
|
917
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\
|
917
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\nconst prefixCls = \"avue-skeleton\";\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"skeleton\",\n props: {\n loading: {\n type: Boolean,\n default: true\n },\n avatar: Boolean,\n active: {\n type: Boolean,\n default: true\n },\n block: Boolean,\n number: {\n type: Number,\n default: 1\n },\n rows: {\n type: Number,\n default: 3\n }\n },\n computed: {\n styleName() {\n if (this.block) {\n return {\n width: \"100%\"\n };\n }\n return {};\n },\n className() {\n let {\n active\n } = this;\n return {\n [`${prefixCls}__loading`]: active\n };\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/skeleton/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
918
918
|
|
919
919
|
/***/ }),
|
920
920
|
|
@@ -938,7 +938,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
938
938
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
939
939
|
|
940
940
|
"use strict";
|
941
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"switch\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n value: {},\n activeIconClass: String,\n inactiveIconClass: String,\n activeColor: String,\n inactiveColor: String,\n len: Number\n },\n data
|
941
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"switch\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n value: {},\n activeIconClass: String,\n inactiveIconClass: String,\n activeColor: String,\n inactiveColor: String,\n len: Number\n },\n data() {\n return {};\n },\n watch: {},\n created() {},\n mounted() {},\n computed: {\n active() {\n return this.dic[1] || {};\n },\n inactive() {\n return this.dic[0] || {};\n }\n },\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/switch/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
942
942
|
|
943
943
|
/***/ }),
|
944
944
|
|
@@ -950,7 +950,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
950
950
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
951
951
|
|
952
952
|
"use strict";
|
953
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"tabs\",\n props: {\n option: {\n type: Object,\n required: true,\n
|
953
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"tabs\",\n props: {\n option: {\n type: Object,\n required: true,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n active: \"0\"\n };\n },\n watch: {\n active() {\n this.$emit(\"change\", this.tabsObj);\n }\n },\n computed: {\n tabsObj() {\n return this.columnOption[this.active];\n },\n parentOption() {\n return this.option;\n },\n columnOption() {\n return this.parentOption.column || [];\n }\n },\n methods: {\n changeTabs(active) {\n this.active = active + \"\";\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/tabs/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
954
954
|
|
955
955
|
/***/ }),
|
956
956
|
|
@@ -962,7 +962,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
962
962
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
963
963
|
|
964
964
|
"use strict";
|
965
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"text-ellipsis\",\n props: {\n text: String,\n height: Number,\n width: Number,\n isLimitHeight: {\n type: Boolean,\n
|
965
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"text-ellipsis\",\n props: {\n text: String,\n height: Number,\n width: Number,\n isLimitHeight: {\n type: Boolean,\n default: true\n },\n useTooltip: {\n type: Boolean,\n default: false\n },\n placement: String\n },\n data() {\n return {\n keyIndex: 0,\n isHide: false\n };\n },\n watch: {\n isLimitHeight() {\n this.init();\n },\n text() {\n this.init();\n },\n height() {\n this.init();\n }\n },\n mounted() {\n this.init();\n },\n methods: {\n init() {\n this.keyIndex += 1;\n let more = this.$refs.more;\n more.style.display = \"none\";\n if (this.isLimitHeight) {\n this.limitShow();\n }\n },\n limitShow() {\n this.$nextTick(() => {\n let textDom = this.$refs.text;\n let title = this.$el;\n let more = this.$refs.more;\n let n = 1000;\n if (textDom) {\n if (title.offsetHeight > this.height) {\n more.style.display = \"inline-block\";\n let text = this.text;\n while (title.offsetHeight > this.height && n > 0) {\n if (title.offsetHeight > this.height * 3) {\n textDom.innerText = text = text.substring(0, Math.floor(text.length / 2));\n } else {\n textDom.innerText = text = text.substring(0, text.length - 1);\n }\n n--;\n }\n this.$emit(\"hide\");\n this.isHide = true;\n } else {\n this.$emit(\"show\");\n this.isHide = false;\n }\n }\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/text-ellipsis/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
966
966
|
|
967
967
|
/***/ }),
|
968
968
|
|
@@ -974,7 +974,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
974
974
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
975
975
|
|
976
976
|
"use strict";
|
977
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"time\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n props: {\n editable: Boolean,\n startPlaceholder: String,\n endPlaceholder: String,\n rangeSeparator: String,\n defaultValue: [String, Array],\n pickerOptions: Object,\n valueFormat: String,\n arrowControl: Boolean,\n type: String,\n format: String\n },\n watch: {\n text
|
977
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"time\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n props: {\n editable: Boolean,\n startPlaceholder: String,\n endPlaceholder: String,\n rangeSeparator: String,\n defaultValue: [String, Array],\n pickerOptions: Object,\n valueFormat: String,\n arrowControl: Boolean,\n type: String,\n format: String\n },\n watch: {\n text() {\n if (this.validatenull(this.text)) {\n this.text = null;\n }\n }\n },\n computed: {\n componentName() {\n let pickerOptions = this.pickerOptions || {};\n if (pickerOptions.start || pickerOptions.end || pickerOptions.step) {\n return \"elTimeSelect\";\n } else {\n return \"elTimePicker\";\n }\n },\n isRange() {\n return this.type === \"timerange\";\n }\n },\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/time/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
978
978
|
|
979
979
|
/***/ }),
|
980
980
|
|
@@ -986,7 +986,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
986
986
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
987
987
|
|
988
988
|
"use strict";
|
989
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'title',\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n styles: {\n type: Object,\n
|
989
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'title',\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()],\n props: {\n styles: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n mounted() {},\n methods: {}\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/title/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
990
990
|
|
991
991
|
/***/ }),
|
992
992
|
|
@@ -998,7 +998,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
998
998
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
999
999
|
|
1000
1000
|
"use strict";
|
1001
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n name: \"tree\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n props: {\n indent: Number,\n filterNodeMethod: Function,\n checkOnClickNode: Boolean,\n beforeClose: Function,\n beforeOpen: Function,\n permission: {\n type: [Function, Object],\n \"default\": function _default() {\n return {};\n }\n },\n iconClass: {\n type: String\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n expandOnClickNode: {\n type: Boolean,\n \"default\": false\n },\n option: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n data: {\n type: Array,\n \"default\": function _default() {\n return [];\n }\n },\n value: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n }\n },\n data: function data() {\n return {\n filterValue: \"\",\n client: {\n x: 0,\n y: 0,\n show: false\n },\n box: false,\n type: \"\",\n node: {},\n form: {}\n };\n },\n computed: {\n draggable: function draggable() {\n return this.option.draggable;\n },\n styleName: function styleName() {\n return {\n top: this.setPx(this.client.y - 10),\n left: this.setPx(this.client.x - 10)\n };\n },\n treeProps: function treeProps() {\n return Object.assign(this.props, {\n isLeaf: this.leafKey\n });\n },\n menu: function menu() {\n return this.vaildData(this.option.menu, true);\n },\n title: function title() {\n return this.option.title || this.t(\"crud.addTitle\");\n },\n treeLoad: function treeLoad() {\n return this.option.treeLoad;\n },\n checkStrictly: function checkStrictly() {\n return this.option.checkStrictly;\n },\n accordion: function accordion() {\n return this.option.accordion;\n },\n multiple: function multiple() {\n return this.option.multiple;\n },\n lazy: function lazy() {\n return this.option.lazy;\n },\n addText: function addText() {\n return this.addFlag ? this.menuIcon('addBtn') : this.menuIcon('updateBtn');\n },\n addFlag: function addFlag() {\n return [\"add\", \"parentAdd\"].includes(this.type);\n },\n size: function size() {\n return this.option.size || \"small\";\n },\n props: function props() {\n return this.option.props || {};\n },\n leafKey: function leafKey() {\n return this.props.leaf || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].leaf;\n },\n valueKey: function valueKey() {\n return this.props.value || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].value;\n },\n labelKey: function labelKey() {\n return this.props.label || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].label;\n },\n childrenKey: function childrenKey() {\n return this.props.children || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].children;\n },\n nodeKey: function nodeKey() {\n return this.option.nodeKey || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].nodeKey;\n },\n defaultExpandAll: function defaultExpandAll() {\n return this.option.defaultExpandAll;\n },\n defaultExpandedKeys: function defaultExpandedKeys() {\n return this.option.defaultExpandedKeys;\n },\n formOption: function formOption() {\n return Object.assign(this.option.formOption || {}, {\n submitText: this.addText\n });\n }\n },\n mounted: function mounted() {\n var _this = this;\n document.addEventListener('click', function (e) {\n if (!_this.$el.contains(e.target)) _this.client.show = false;\n });\n this.initFun();\n },\n watch: {\n filterValue: function filterValue(val) {\n this.$refs.tree.filter(val);\n },\n value: function value(val) {\n this.form = val;\n },\n form: function form(val) {\n this.$emit(\"input\", val);\n this.$emit(\"change\", val);\n }\n },\n methods: {\n handleDragStart: function handleDragStart(node, ev) {\n this.$emit('node-drag-start', node, ev);\n },\n handleDragEnter: function handleDragEnter(draggingNode, dropNode, ev) {\n this.$emit('node-drag-enter', draggingNode, dropNode, ev);\n },\n handleDragLeave: function handleDragLeave(draggingNode, dropNode, ev) {\n this.$emit('node-drag-leave', draggingNode, dropNode, ev);\n },\n handleDragOver: function handleDragOver(draggingNode, dropNode, ev) {\n this.$emit('node-drag-over', draggingNode, dropNode, ev);\n },\n handleDragEnd: function handleDragEnd(draggingNode, dropNode, dropType, ev) {\n this.$emit('node-drag-end', draggingNode, dropNode, dropType, ev);\n },\n handleDrop: function handleDrop(draggingNode, dropNode, dropType, ev) {\n this.$emit('node-drop', draggingNode, dropNode, dropType, ev);\n },\n menuIcon: function menuIcon(value) {\n return this.vaildData(this.option[value + 'Text'], this.t(\"crud.\" + value));\n },\n getPermission: function getPermission(key) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, this.node.data || {});\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n initFun: function initFun() {\n var _this2 = this;\n ['filter', 'updateKeyChildren', 'getCheckedNodes', 'setCheckedNodes', 'getCheckedKeys', 'setCheckedKeys', 'setChecked', 'getHalfCheckedNodes', 'getHalfCheckedKeys', 'getCurrentKey', 'getCurrentNode', 'setCurrentKey', 'setCurrentNode', 'getNode', 'remove', 'append', 'insertBefore', 'insertAfter'].forEach(function (ele) {\n _this2[ele] = _this2.$refs.tree[ele];\n });\n },\n nodeContextmenu: function nodeContextmenu(e, data, node, obj) {\n this.node = node;\n this.client.x = e.clientX;\n this.client.y = e.clientY;\n this.client.show = true;\n this.$emit('node-contextmenu', data, node, obj);\n },\n handleCheckChange: function handleCheckChange(data, checked, indeterminate) {\n this.$emit('check-change', data, checked, indeterminate);\n },\n handleSubmit: function handleSubmit(form, done) {\n this.addFlag ? this.save(form, done) : this.update(form, done);\n },\n nodeClick: function nodeClick(data, node, nodeComp) {\n this.client.show = false;\n this.$emit(\"node-click\", data, node, nodeComp);\n },\n filterNode: function filterNode(value, data) {\n if (typeof this.filterNodeMethod === 'function') {\n return this.filterNodeMethod(value, data);\n }\n if (!value) return true;\n return data[this.labelKey].indexOf(value) !== -1;\n },\n hide: function hide(done) {\n var _this3 = this;\n var callback = function callback() {\n done && done();\n _this3.node = {};\n _this3.form = {};\n _this3.box = false;\n };\n if (typeof this.beforeClose === \"function\") {\n this.beforeClose(callback, this.type);\n } else {\n callback();\n }\n },\n save: function save(data, done) {\n var _this4 = this;\n var callback = function callback(form) {\n form = form || _this4.form;\n if (_this4.type === \"add\") {\n _this4.$refs.tree.append(form, _this4.node.data[_this4.valueKey]);\n } else if (_this4.type === \"parentAdd\") {\n _this4.$refs.tree.append(form);\n }\n _this4.hide();\n done();\n };\n this.$emit(\"save\", this.node, data, callback, done);\n },\n update: function update(data, done) {\n var _this5 = this;\n var callback = function callback(form) {\n form = form || _this5.form;\n var rowKey = form[_this5.valueKey];\n _this5.node.data = _this5.form;\n var _this5$findData = _this5.findData(rowKey),\n parentList = _this5$findData.parentList,\n index = _this5$findData.index;\n if (parentList) {\n var oldRow = parentList.splice(index, 1)[0];\n form[_this5.childrenKey] = oldRow[_this5.childrenKey];\n parentList.splice(index, 0, form);\n }\n _this5.hide();\n done();\n };\n this.$emit(\"update\", this.node, data, callback, done);\n },\n rowEdit: function rowEdit(a) {\n this.type = \"edit\";\n this.form = this.node.data;\n this.show();\n },\n parentAdd: function parentAdd() {\n this.type = \"parentAdd\";\n this.show();\n },\n rowAdd: function rowAdd() {\n this.type = \"add\";\n this.show();\n },\n show: function show() {\n var _this6 = this;\n var callback = function callback() {\n _this6.client.show = false;\n _this6.box = true;\n };\n if (typeof this.beforeOpen === \"function\") {\n this.beforeOpen(callback, this.type);\n } else {\n callback();\n }\n },\n rowRemove: function rowRemove() {\n var _this7 = this;\n this.client.show = false;\n var callback = function callback() {\n _this7.$refs.tree.remove(_this7.node.data[_this7.valueKey]);\n };\n this.$emit(\"del\", this.node, callback);\n },\n findData: function findData(id) {\n var _this8 = this;\n var result = {};\n var callback = function callback(parentList, parent) {\n parentList.forEach(function (ele, index) {\n if (ele[_this8.valueKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[_this8.childrenKey]) {\n callback(ele[_this8.childrenKey], ele);\n }\n });\n };\n callback(this.data);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/tree/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1001
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n name: \"tree\",\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n props: {\n indent: Number,\n filterNodeMethod: Function,\n checkOnClickNode: Boolean,\n beforeClose: Function,\n beforeOpen: Function,\n permission: {\n type: [Function, Object],\n default: () => {\n return {};\n }\n },\n iconClass: {\n type: String\n },\n loading: {\n type: Boolean,\n default: false\n },\n expandOnClickNode: {\n type: Boolean,\n default: false\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n },\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n value: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n filterValue: \"\",\n client: {\n x: 0,\n y: 0,\n show: false\n },\n box: false,\n type: \"\",\n node: {},\n form: {}\n };\n },\n computed: {\n draggable() {\n return this.option.draggable;\n },\n styleName() {\n return {\n top: this.setPx(this.client.y - 10),\n left: this.setPx(this.client.x - 10)\n };\n },\n treeProps() {\n return Object.assign(this.props, {\n isLeaf: this.leafKey\n });\n },\n menu() {\n return this.vaildData(this.option.menu, true);\n },\n title() {\n return this.option.title || this.t(`crud.addTitle`);\n },\n treeLoad() {\n return this.option.treeLoad;\n },\n checkStrictly() {\n return this.option.checkStrictly;\n },\n accordion() {\n return this.option.accordion;\n },\n multiple() {\n return this.option.multiple;\n },\n lazy() {\n return this.option.lazy;\n },\n addText() {\n return this.addFlag ? this.menuIcon('addBtn') : this.menuIcon('updateBtn');\n },\n addFlag() {\n return [\"add\", \"parentAdd\"].includes(this.type);\n },\n size() {\n return this.option.size || \"small\";\n },\n props() {\n return this.option.props || {};\n },\n leafKey() {\n return this.props.leaf || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].leaf;\n },\n valueKey() {\n return this.props.value || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].value;\n },\n labelKey() {\n return this.props.label || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].label;\n },\n childrenKey() {\n return this.props.children || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].children;\n },\n nodeKey() {\n return this.option.nodeKey || global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"].nodeKey;\n },\n defaultExpandAll() {\n return this.option.defaultExpandAll;\n },\n defaultExpandedKeys() {\n return this.option.defaultExpandedKeys;\n },\n formOption() {\n return Object.assign(this.option.formOption || {}, {\n submitText: this.addText\n });\n }\n },\n mounted() {\n document.addEventListener('click', e => {\n if (!this.$el.contains(e.target)) this.client.show = false;\n });\n this.initFun();\n },\n watch: {\n filterValue(val) {\n this.$refs.tree.filter(val);\n },\n value(val) {\n this.form = val;\n },\n form(val) {\n this.$emit(\"input\", val);\n this.$emit(\"change\", val);\n }\n },\n methods: {\n handleDragStart(node, ev) {\n this.$emit('node-drag-start', node, ev);\n },\n handleDragEnter(draggingNode, dropNode, ev) {\n this.$emit('node-drag-enter', draggingNode, dropNode, ev);\n },\n handleDragLeave(draggingNode, dropNode, ev) {\n this.$emit('node-drag-leave', draggingNode, dropNode, ev);\n },\n handleDragOver(draggingNode, dropNode, ev) {\n this.$emit('node-drag-over', draggingNode, dropNode, ev);\n },\n handleDragEnd(draggingNode, dropNode, dropType, ev) {\n this.$emit('node-drag-end', draggingNode, dropNode, dropType, ev);\n },\n handleDrop(draggingNode, dropNode, dropType, ev) {\n this.$emit('node-drop', draggingNode, dropNode, dropType, ev);\n },\n menuIcon(value) {\n return this.vaildData(this.option[value + 'Text'], this.t(\"crud.\" + value));\n },\n getPermission(key) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, this.node.data || {});\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n initFun() {\n ['filter', 'updateKeyChildren', 'getCheckedNodes', 'setCheckedNodes', 'getCheckedKeys', 'setCheckedKeys', 'setChecked', 'getHalfCheckedNodes', 'getHalfCheckedKeys', 'getCurrentKey', 'getCurrentNode', 'setCurrentKey', 'setCurrentNode', 'getNode', 'remove', 'append', 'insertBefore', 'insertAfter'].forEach(ele => {\n this[ele] = this.$refs.tree[ele];\n });\n },\n nodeContextmenu(e, data, node, obj) {\n this.node = node;\n this.client.x = e.clientX;\n this.client.y = e.clientY;\n this.client.show = true;\n this.$emit('node-contextmenu', data, node, obj);\n },\n handleCheckChange(data, checked, indeterminate) {\n this.$emit('check-change', data, checked, indeterminate);\n },\n handleSubmit(form, done) {\n this.addFlag ? this.save(form, done) : this.update(form, done);\n },\n nodeClick(data, node, nodeComp) {\n this.client.show = false;\n this.$emit(\"node-click\", data, node, nodeComp);\n },\n filterNode(value, data) {\n if (typeof this.filterNodeMethod === 'function') {\n return this.filterNodeMethod(value, data);\n }\n if (!value) return true;\n return data[this.labelKey].indexOf(value) !== -1;\n },\n hide(done) {\n const callback = () => {\n done && done();\n this.node = {};\n this.form = {};\n this.box = false;\n };\n if (typeof this.beforeClose === \"function\") {\n this.beforeClose(callback, this.type);\n } else {\n callback();\n }\n },\n save(data, done) {\n const callback = form => {\n form = form || this.form;\n if (this.type === \"add\") {\n this.$refs.tree.append(form, this.node.data[this.valueKey]);\n } else if (this.type === \"parentAdd\") {\n this.$refs.tree.append(form);\n }\n this.hide();\n done();\n };\n this.$emit(\"save\", this.node, data, callback, done);\n },\n update(data, done) {\n const callback = form => {\n form = form || this.form;\n const rowKey = form[this.valueKey];\n this.node.data = this.form;\n let {\n parentList,\n index\n } = this.findData(rowKey);\n if (parentList) {\n const oldRow = parentList.splice(index, 1)[0];\n form[this.childrenKey] = oldRow[this.childrenKey];\n parentList.splice(index, 0, form);\n }\n this.hide();\n done();\n };\n this.$emit(\"update\", this.node, data, callback, done);\n },\n rowEdit(a) {\n this.type = \"edit\";\n this.form = this.node.data;\n this.show();\n },\n parentAdd() {\n this.type = \"parentAdd\";\n this.show();\n },\n rowAdd() {\n this.type = \"add\";\n this.show();\n },\n show() {\n const callback = () => {\n this.client.show = false;\n this.box = true;\n };\n if (typeof this.beforeOpen === \"function\") {\n this.beforeOpen(callback, this.type);\n } else {\n callback();\n }\n },\n rowRemove() {\n this.client.show = false;\n const callback = () => {\n this.$refs.tree.remove(this.node.data[this.valueKey]);\n };\n this.$emit(\"del\", this.node, callback);\n },\n findData(id) {\n let result = {};\n const callback = (parentList, parent) => {\n parentList.forEach((ele, index) => {\n if (ele[this.valueKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[this.childrenKey]) {\n callback(ele[this.childrenKey], ele);\n }\n });\n };\n callback(this.data);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/tree/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1002
1002
|
|
1003
1003
|
/***/ }),
|
1004
1004
|
|
@@ -1010,7 +1010,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var glob
|
|
1010
1010
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1011
1011
|
|
1012
1012
|
"use strict";
|
1013
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/qiniu/ */ \"./src/plugin/qiniu/index.js\");\n/* harmony import */ var plugin_ali___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/ali/ */ \"./src/plugin/ali/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n\n\n\n\n\n\nfunction getFileUrl(home) {\n var uri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n return uri.match(/(^http:\\/\\/|^https:\\/\\/|^\\/\\/|data:image\\/)/) ? uri : home + uri;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"upload\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data: function data() {\n return {\n res: \"\",\n loading: false,\n menu: false,\n reload: Math.random()\n };\n },\n props: {\n qiniu: Object,\n ali: Object,\n data: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n showFileList: {\n type: Boolean,\n \"default\": true\n },\n fileText: String,\n fileType: {\n type: String\n },\n oss: {\n type: String\n },\n limit: {\n type: Number\n },\n headers: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n accept: {\n type: [String, Array],\n \"default\": \"\"\n },\n canvasOption: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n cropperOption: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n fileSize: {\n type: Number\n },\n dragFile: {\n type: Boolean,\n \"default\": false\n },\n drag: {\n type: Boolean,\n \"default\": false\n },\n loadText: {\n type: String,\n \"default\": \"Loading...\"\n },\n action: {\n type: String,\n \"default\": \"\"\n },\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n httpRequest: Function\n },\n computed: {\n isObject: function isObject() {\n var obj = this.text[0];\n return _typeof(obj) === \"object\" || this.dataType == \"object\";\n },\n acceptList: function acceptList() {\n if (Array.isArray(this.accept)) {\n return this.accept.join(\",\");\n }\n return this.accept;\n },\n homeUrl: function homeUrl() {\n return this.propsHttp.home || \"\";\n },\n fileName: function fileName() {\n return this.propsHttp.fileName || \"file\";\n },\n isCosOss: function isCosOss() {\n return this.oss === \"cos\";\n },\n isAliOss: function isAliOss() {\n return this.oss === \"ali\";\n },\n isQiniuOss: function isQiniuOss() {\n return this.oss === \"qiniu\";\n },\n isPictureImg: function isPictureImg() {\n return this.listType === \"picture-img\";\n },\n //单个头像图片\n imgUrl: function imgUrl() {\n if (!this.validatenull(this.text)) {\n return getFileUrl(this.homeUrl, this.text[0]);\n }\n },\n fileList: function fileList() {\n var _this = this;\n var list = [];\n (this.text || []).forEach(function (ele, index) {\n if (ele) {\n var name = _this.isObject ? ele[_this.labelKey] : ele.substring(ele.lastIndexOf(\"/\") + 1);\n var url = _this.isObject ? ele[_this.valueKey] : ele;\n url = getFileUrl(_this.homeUrl, url);\n list.push({\n uid: index + \"\",\n status: \"done\",\n type: _this.isMediaType(url),\n name: name,\n url: url\n });\n }\n });\n return list;\n }\n },\n mounted: function mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n isMediaType: function isMediaType(url) {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isMediaType\"])(url, this.fileType);\n },\n setSort: function setSort() {\n var _this2 = this;\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"Sortable\");\n return;\n }\n var el = this.$el.querySelectorAll(\".avue-upload > ul\")[0];\n window.Sortable.create(el, {\n animation: 100,\n onEnd: function onEnd(evt) {\n var targetRow = _this2.text.splice(evt.oldIndex, 1)[0];\n _this2.text.splice(evt.newIndex, 0, targetRow);\n _this2.reload = Math.random();\n _this2.$nextTick(function () {\n return _this2.setSort();\n });\n }\n });\n },\n handleSuccess: function handleSuccess(file) {\n if (this.isPictureImg) {\n this.text.splice(0, 1, file[this.urlKey]);\n } else if (this.isObject) {\n var obj = {};\n obj[this.labelKey] = file[this.nameKey];\n obj[this.valueKey] = file[this.urlKey];\n this.text.push(obj);\n } else {\n this.text.push(file[this.urlKey]);\n }\n },\n handleRemove: function handleRemove(file, fileList) {\n var _this3 = this;\n this.beforeRemove(file).then(function () {\n _this3[\"delete\"](file);\n });\n },\n handleError: function handleError(error) {\n this.uploadError && this.uploadError(error, this.column);\n },\n \"delete\": function _delete(file) {\n var _this4 = this;\n (this.text || []).forEach(function (ele, index) {\n var url = _this4.isObject ? ele[_this4.valueKey] : ele;\n if (getFileUrl(_this4.homeUrl, url) === file.url) {\n _this4.text.splice(index, 1);\n }\n });\n },\n show: function show(data) {\n this.loading = false;\n this.res = data || this.res;\n this.handleSuccess(this.res);\n },\n hide: function hide(msg) {\n this.loading = false;\n if (msg) this.handleError(msg);\n },\n handleFileChange: function handleFileChange(file, fileList) {\n fileList.splice(fileList.length - 1, 1);\n },\n httpUpload: function httpUpload(config) {\n var _this5 = this;\n if (typeof this.httpRequest === \"function\") {\n this.httpRequest(config);\n return;\n }\n this.loading = true;\n var file = config.file;\n var fileSize = file.size / 1024;\n if (!this.validatenull(fileSize) && fileSize > this.fileSize) {\n this.hide(\"文件太大不符合\");\n return;\n }\n var headers = Object.assign(this.headers, {\n \"Content-Type\": \"multipart/form-data\"\n });\n //oss配置属性\n var oss,\n oss_config = {};\n var client = {};\n var param = new FormData();\n var done = function done() {\n var callback = function callback(newFile) {\n var url = _this5.action;\n //附加属性\n for (var o in _this5.data) {\n param.append(o, _this5.data[o]);\n }\n var uploadFile = newFile || file;\n param.append(_this5.fileName, uploadFile);\n //腾讯云oss存储\n if (_this5.isCosOss) {\n if (!window.COS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"COS\");\n _this5.hide();\n return;\n }\n oss_config = _this5.cos || _this5.$AVUE.cos;\n oss = new COS({\n SecretId: oss_config.SecretId,\n SecretKey: oss_config.SecretKey\n });\n } //七牛云oss存储\n else if (_this5.isQiniuOss) {\n if (!window.CryptoJS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"CryptoJS\");\n _this5.hide();\n return;\n }\n oss_config = _this5.qiniu || _this5.$AVUE.qiniu;\n var token = Object(plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__[\"getToken\"])(oss_config.AK, oss_config.SK, {\n scope: oss_config.scope,\n deadline: new Date().getTime() + oss_config.deadline * 3600\n });\n param.append(\"token\", token);\n url = oss_config.bucket;\n } else if (_this5.isAliOss) {\n if (!window.OSS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"AliOSS\");\n _this5.hide();\n return;\n }\n oss_config = _this5.ali || _this5.$AVUE.ali;\n client = Object(plugin_ali___WEBPACK_IMPORTED_MODULE_7__[\"getClient\"])(oss_config);\n }\n (function () {\n if (_this5.isCosOss) {\n return new Promise(function (resolve, reject) {\n oss.uploadFile({\n Bucket: oss_config.Bucket,\n Region: oss_config.Region,\n Key: uploadFile.name,\n Body: uploadFile\n }, function (err, data) {\n resolve({\n data: {\n name: data.ETag,\n url: location.protocol + \"//\" + data.Location\n }\n });\n });\n });\n } else if (_this5.isAliOss) {\n return client.put(uploadFile.name, uploadFile, {\n // headers: this.headers\n });\n } else {\n return _this5.$axios.post(url, param, {\n headers: headers\n });\n }\n })().then(function (res) {\n _this5.res = {};\n if (_this5.isQiniuOss) {\n var key = res.data.key;\n res.data.url = oss_config.url + key;\n res.data.name = key;\n }\n _this5.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(_this5.isAliOss ? res : res.data, _this5.resKey);\n if (typeof _this5.uploadAfter === \"function\") {\n _this5.uploadAfter(_this5.res, _this5.show, _this5.hide, _this5.column);\n } else {\n _this5.show();\n }\n })[\"catch\"](function (error) {\n _this5.hide(error);\n });\n };\n if (typeof _this5.uploadBefore === \"function\") {\n _this5.uploadBefore(file, callback, _this5.hide, _this5.column);\n } else {\n callback();\n }\n };\n if (Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isMediaType\"])(file.name) != \"img\") {\n done();\n return;\n }\n //处理水印图片\n var canvasDone = function canvasDone() {\n if (!_this5.validatenull(_this5.canvasOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"detailImg\"])(file, _this5.canvasOption, function (res) {\n file = res;\n done();\n });\n } else {\n done();\n }\n };\n //处理图片剪裁\n if (!this.validatenull(this.cropperOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"fileToBase64\"])(file, function (res) {\n var option = Object.assign(_this5.cropperOption, {\n img: res,\n type: \"file\",\n callback: function callback(res) {\n file = res;\n canvasDone();\n },\n cancel: function cancel() {\n _this5.loading = false;\n }\n });\n _this5.$ImageCropper(option);\n });\n } else {\n canvasDone();\n }\n },\n handleExceed: function handleExceed(files, fileList) {\n this.uploadExceed && this.uploadExceed(this.limit, files, fileList, this.column);\n },\n handlePreview: function handlePreview(file) {\n var _this6 = this;\n var callback = function callback() {\n var index = _this6.fileList.findIndex(function (ele) {\n return ele.url === file.url;\n });\n _this6.$ImagePreview(_this6.fileList, index);\n };\n if (typeof this.uploadPreview === \"function\") {\n this.uploadPreview(file, this.column, callback);\n } else {\n callback();\n }\n },\n handleDelete: function handleDelete(file) {\n var _this7 = this;\n this.beforeRemove(file).then(function () {\n _this7.text = [];\n _this7.menu = false;\n });\n },\n beforeRemove: function beforeRemove(file) {\n if (typeof this.uploadDelete === \"function\") {\n return this.uploadDelete(file, this.column);\n } else {\n return Promise.resolve();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1013
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/qiniu/ */ \"./src/plugin/qiniu/index.js\");\n/* harmony import */ var plugin_ali___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/ali/ */ \"./src/plugin/ali/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n\n\n\n\n\n\n\n\nfunction getFileUrl(home, uri = \"\") {\n return uri.match(/(^http:\\/\\/|^https:\\/\\/|^\\/\\/|data:image\\/)/) ? uri : home + uri;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"upload\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), core_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data() {\n return {\n res: \"\",\n loading: false,\n menu: false,\n reload: Math.random()\n };\n },\n props: {\n qiniu: Object,\n ali: Object,\n data: {\n type: Object,\n default: () => {\n return {};\n }\n },\n showFileList: {\n type: Boolean,\n default: true\n },\n fileText: String,\n fileType: {\n type: String\n },\n oss: {\n type: String\n },\n limit: {\n type: Number\n },\n headers: {\n type: Object,\n default: () => {\n return {};\n }\n },\n accept: {\n type: [String, Array],\n default: \"\"\n },\n canvasOption: {\n type: Object,\n default: () => {\n return {};\n }\n },\n cropperOption: {\n type: Object,\n default: () => {\n return {};\n }\n },\n fileSize: {\n type: Number\n },\n dragFile: {\n type: Boolean,\n default: false\n },\n drag: {\n type: Boolean,\n default: false\n },\n loadText: {\n type: String,\n default: \"Loading...\"\n },\n action: {\n type: String,\n default: \"\"\n },\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n httpRequest: Function\n },\n computed: {\n isObject() {\n let obj = this.text[0];\n return typeof obj === \"object\" || this.dataType == \"object\";\n },\n acceptList() {\n if (Array.isArray(this.accept)) {\n return this.accept.join(\",\");\n }\n return this.accept;\n },\n homeUrl() {\n return this.propsHttp.home || \"\";\n },\n fileName() {\n return this.propsHttp.fileName || \"file\";\n },\n isCosOss() {\n return this.oss === \"cos\";\n },\n isAliOss() {\n return this.oss === \"ali\";\n },\n isQiniuOss() {\n return this.oss === \"qiniu\";\n },\n isPictureImg() {\n return this.listType === \"picture-img\";\n },\n //单个头像图片\n imgUrl() {\n if (!this.validatenull(this.text)) {\n return getFileUrl(this.homeUrl, this.text[0]);\n }\n },\n fileList() {\n let list = [];\n (this.text || []).forEach((ele, index) => {\n if (ele) {\n let name = this.isObject ? ele[this.labelKey] : ele.substring(ele.lastIndexOf(\"/\") + 1);\n let url = this.isObject ? ele[this.valueKey] : ele;\n url = getFileUrl(this.homeUrl, url);\n list.push({\n uid: index + \"\",\n status: \"done\",\n type: this.isMediaType(url),\n name: name,\n url: url\n });\n }\n });\n return list;\n }\n },\n mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n isMediaType(url) {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isMediaType\"])(url, this.fileType);\n },\n setSort() {\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"Sortable\");\n return;\n }\n const el = this.$el.querySelectorAll(\".avue-upload > ul\")[0];\n window.Sortable.create(el, {\n animation: 100,\n onEnd: evt => {\n const targetRow = this.text.splice(evt.oldIndex, 1)[0];\n this.text.splice(evt.newIndex, 0, targetRow);\n this.reload = Math.random();\n this.$nextTick(() => this.setSort());\n }\n });\n },\n handleSuccess(file) {\n if (this.isPictureImg) {\n this.text.splice(0, 1, file[this.urlKey]);\n } else if (this.isObject) {\n let obj = {};\n obj[this.labelKey] = file[this.nameKey];\n obj[this.valueKey] = file[this.urlKey];\n this.text.push(obj);\n } else {\n this.text.push(file[this.urlKey]);\n }\n },\n handleRemove(file, fileList) {\n this.beforeRemove(file).then(() => {\n this.delete(file);\n });\n },\n handleError(error) {\n this.uploadError && this.uploadError(error, this.column);\n },\n delete(file) {\n (this.text || []).forEach((ele, index) => {\n let url = this.isObject ? ele[this.valueKey] : ele;\n if (getFileUrl(this.homeUrl, url) === file.url) {\n this.text.splice(index, 1);\n }\n });\n },\n show(data) {\n this.loading = false;\n this.res = data || this.res;\n this.handleSuccess(this.res);\n },\n hide(msg) {\n this.loading = false;\n if (msg) this.handleError(msg);\n },\n handleFileChange(file, fileList) {\n fileList.splice(fileList.length - 1, 1);\n },\n httpUpload(config) {\n if (typeof this.httpRequest === \"function\") {\n this.httpRequest(config);\n return;\n }\n this.loading = true;\n let file = config.file;\n const fileSize = file.size / 1024;\n if (!this.validatenull(fileSize) && fileSize > this.fileSize) {\n this.hide(\"文件太大不符合\");\n return;\n }\n const headers = Object.assign(this.headers, {\n \"Content-Type\": \"multipart/form-data\"\n });\n //oss配置属性\n let oss,\n oss_config = {};\n let client = {};\n let param = new FormData();\n const done = () => {\n const callback = newFile => {\n let url = this.action;\n //附加属性\n for (let o in this.data) {\n param.append(o, this.data[o]);\n }\n const uploadFile = newFile || file;\n param.append(this.fileName, uploadFile);\n //腾讯云oss存储\n if (this.isCosOss) {\n if (!window.COS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"COS\");\n this.hide();\n return;\n }\n oss_config = this.cos || this.$AVUE.cos;\n oss = new COS({\n SecretId: oss_config.SecretId,\n SecretKey: oss_config.SecretKey\n });\n } //七牛云oss存储\n else if (this.isQiniuOss) {\n if (!window.CryptoJS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"CryptoJS\");\n this.hide();\n return;\n }\n oss_config = this.qiniu || this.$AVUE.qiniu;\n const token = Object(plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__[\"getToken\"])(oss_config.AK, oss_config.SK, {\n scope: oss_config.scope,\n deadline: new Date().getTime() + oss_config.deadline * 3600\n });\n param.append(\"token\", token);\n url = oss_config.bucket;\n } else if (this.isAliOss) {\n if (!window.OSS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"AliOSS\");\n this.hide();\n return;\n }\n oss_config = this.ali || this.$AVUE.ali;\n client = Object(plugin_ali___WEBPACK_IMPORTED_MODULE_7__[\"getClient\"])(oss_config);\n }\n (() => {\n if (this.isCosOss) {\n return new Promise((resolve, reject) => {\n oss.uploadFile({\n Bucket: oss_config.Bucket,\n Region: oss_config.Region,\n Key: uploadFile.name,\n Body: uploadFile\n }, function (err, data) {\n resolve({\n data: {\n name: data.ETag,\n url: location.protocol + \"//\" + data.Location\n }\n });\n });\n });\n } else if (this.isAliOss) {\n return client.put(uploadFile.name, uploadFile, {\n // headers: this.headers\n });\n } else {\n return this.$axios.post(url, param, {\n headers\n });\n }\n })().then(res => {\n this.res = {};\n if (this.isQiniuOss) {\n let key = res.data.key;\n res.data.url = oss_config.url + key;\n res.data.name = key;\n }\n this.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(this.isAliOss ? res : res.data, this.resKey);\n if (typeof this.uploadAfter === \"function\") {\n this.uploadAfter(this.res, this.show, this.hide, this.column);\n } else {\n this.show();\n }\n }).catch(error => {\n this.hide(error);\n });\n };\n if (typeof this.uploadBefore === \"function\") {\n this.uploadBefore(file, callback, this.hide, this.column);\n } else {\n callback();\n }\n };\n if (Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isMediaType\"])(file.name) != \"img\") {\n done();\n return;\n }\n //处理水印图片\n const canvasDone = () => {\n if (!this.validatenull(this.canvasOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"detailImg\"])(file, this.canvasOption, res => {\n file = res;\n done();\n });\n } else {\n done();\n }\n };\n //处理图片剪裁\n if (!this.validatenull(this.cropperOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"fileToBase64\"])(file, res => {\n let option = Object.assign(this.cropperOption, {\n img: res,\n type: \"file\",\n callback: res => {\n file = res;\n canvasDone();\n },\n cancel: () => {\n this.loading = false;\n }\n });\n this.$ImageCropper(option);\n });\n } else {\n canvasDone();\n }\n },\n handleExceed(files, fileList) {\n this.uploadExceed && this.uploadExceed(this.limit, files, fileList, this.column);\n },\n handlePreview(file) {\n const callback = () => {\n let index = this.fileList.findIndex(ele => {\n return ele.url === file.url;\n });\n this.$ImagePreview(this.fileList, index);\n };\n if (typeof this.uploadPreview === \"function\") {\n this.uploadPreview(file, this.column, callback);\n } else {\n callback();\n }\n },\n handleDelete(file) {\n this.beforeRemove(file).then(() => {\n this.text = [];\n this.menu = false;\n });\n },\n beforeRemove(file) {\n if (typeof this.uploadDelete === \"function\") {\n return this.uploadDelete(file, this.column);\n } else {\n return Promise.resolve();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1014
1014
|
|
1015
1015
|
/***/ }),
|
1016
1016
|
|
@@ -1022,7 +1022,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
1022
1022
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1023
1023
|
|
1024
1024
|
"use strict";
|
1025
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'verify',\n props: {\n size: {\n type: [Number, String],\n
|
1025
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'verify',\n props: {\n size: {\n type: [Number, String],\n default: 50\n },\n value: [Number, String],\n len: {\n type: [Number, String],\n default: 6\n }\n },\n computed: {\n data: {\n get() {\n return this.value || '';\n },\n set(val) {\n let value = val + '';\n this.$emit('input', value);\n this.$emit('change', value);\n }\n },\n styleName() {\n return {\n padding: `${this.setPx(this.size / 7)} ${this.setPx(this.size / 4)}`,\n fontSize: this.setPx(this.size)\n };\n },\n list() {\n return this.data.split('');\n }\n },\n created() {\n this.randomn();\n },\n methods: {\n randomn() {\n var n = this.len;\n if (n > 21) return null;\n var re = new RegExp(\"(\\\\d{\" + n + \"})(\\\\.|$)\");\n var num = (Array(n - 1).join(0) + Math.pow(10, n) * Math.random()).match(re)[1];\n this.data = num;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/verify/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1026
1026
|
|
1027
1027
|
/***/ }),
|
1028
1028
|
|
@@ -1034,7 +1034,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
1034
1034
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1035
1035
|
|
1036
1036
|
"use strict";
|
1037
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var plugin_video___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! plugin/video/ */ \"./src/plugin/video/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'video',\n props: {\n background: {\n type: String\n },\n width: {\n type: [String, Number],\n
|
1037
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var plugin_video___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! plugin/video/ */ \"./src/plugin/video/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'video',\n props: {\n background: {\n type: String\n },\n width: {\n type: [String, Number],\n default: 500\n }\n },\n computed: {\n styleName() {\n return {\n width: this.setPx(this.width)\n };\n },\n imgStyleName() {\n return {\n width: this.setPx(this.width / 2)\n };\n },\n borderStyleName() {\n return {\n width: this.setPx(this.width / 15),\n height: this.setPx(this.width / 15),\n borderWidth: this.setPx(5)\n };\n }\n },\n data() {\n return {\n videoObj: null\n };\n },\n mounted() {\n this.init();\n },\n methods: {\n init() {\n this.videoObj = new plugin_video___WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.$refs.main);\n const videoPromise = this.videoObj.init();\n videoPromise.then(() => {\n this.videoObj.mediaRecorder.addEventListener('stop', this.getData, false);\n });\n },\n startRecord() {\n this.videoObj.startRecord();\n },\n stopRecord() {\n this.videoObj.stopRecord();\n },\n getData() {\n const blob = new Blob(this.videoObj.chunks, {\n type: 'video/mp4'\n });\n const reader = new FileReader();\n reader.readAsDataURL(blob);\n reader.addEventListener('loadend', () => {\n var video_base64 = reader.result;\n this.$emit('data-change', video_base64);\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/video/index.vue?./node_modules/.store/babel-loader@8.3.0/node_modules/babel-loader/lib!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1038
1038
|
|
1039
1039
|
/***/ }),
|
1040
1040
|
|
@@ -1550,15 +1550,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
1550
1550
|
|
1551
1551
|
/***/ }),
|
1552
1552
|
|
1553
|
-
/***/ "./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/crud/header-search.vue?vue&type=template&id=
|
1553
|
+
/***/ "./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa":
|
1554
1554
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************!*\
|
1555
|
-
!*** ./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/crud/header-search.vue?vue&type=template&id=
|
1555
|
+
!*** ./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa ***!
|
1556
1556
|
\**********************************************************************************************************************************************************************************************************************************************************************************/
|
1557
1557
|
/*! exports provided: render, staticRenderFns */
|
1558
1558
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1559
1559
|
|
1560
1560
|
"use strict";
|
1561
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.searchFlag)?_c('el-card',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.searchShow && _vm.searchFlag),expression:\"searchShow && searchFlag\"}],class:_vm.b(),attrs:{\"shadow\":_vm.crud.isCard}},[_vm._t(\"search\",null,{\"row\":_vm.searchForm,\"search\":_vm.searchForm,\"size\":_vm.crud.controlSize}),_vm._v(\" \"),_c('avue-form',{ref:\"form\",attrs:{\"option\":_vm.option},on:{\"submit\":_vm.searchChange,\"reset-change\":_vm.resetChange},scopedSlots:_vm._u([{key:\"menuForm\",fn:function(scope){return [_vm._t(\"searchMenu\",null,null
|
1561
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.searchFlag)?_c('el-card',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.searchShow && _vm.searchFlag),expression:\"searchShow && searchFlag\"}],class:_vm.b(),attrs:{\"shadow\":_vm.crud.isCard}},[_vm._t(\"search\",null,{\"row\":_vm.searchForm,\"search\":_vm.searchForm,\"size\":_vm.crud.controlSize}),_vm._v(\" \"),_c('avue-form',{ref:\"form\",attrs:{\"option\":_vm.option},on:{\"submit\":_vm.searchChange,\"reset-change\":_vm.resetChange},scopedSlots:_vm._u([{key:\"menuForm\",fn:function(scope){return [_vm._t(\"searchMenu\",null,null,\n Object.assign(scope, {\n search: _vm.searchForm,\n row: _vm.searchForm,\n })\n ),_vm._v(\" \"),(_vm.isSearchIcon)?[(_vm.show === false)?_c('el-button',{attrs:{\"type\":\"text\",\"icon\":\"el-icon-arrow-down\"},on:{\"click\":_vm.handleSearchIconShow}},[_vm._v(_vm._s(_vm.t('crud.open')))]):_vm._e(),_vm._v(\" \"),(_vm.show === true)?_c('el-button',{attrs:{\"type\":\"text\",\"icon\":\"el-icon-arrow-up\"},on:{\"click\":_vm.handleSearchIconShow}},[_vm._v(_vm._s(_vm.t('crud.shrink')))]):_vm._e()]:_vm._e()]}},_vm._l((_vm.crud.searchSlot),function(item){return {key:_vm.getSlotName(item),fn:function(scope){return [_vm._t(item,null,null,\n Object.assign(scope, {\n search: _vm.searchForm,\n row: _vm.searchForm,\n })\n )]}}})],null,true),model:{value:(_vm.searchForm),callback:function ($$v) {_vm.searchForm=$$v},expression:\"searchForm\"}})],2):_vm._e()\n}\nvar staticRenderFns = []\n\n\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/header-search.vue?./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1562
1562
|
|
1563
1563
|
/***/ }),
|
1564
1564
|
|
@@ -1646,15 +1646,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
1646
1646
|
|
1647
1647
|
/***/ }),
|
1648
1648
|
|
1649
|
-
/***/ "./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/form/index.vue?vue&type=template&id=
|
1649
|
+
/***/ "./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3":
|
1650
1650
|
/*!**************************************************************************************************************************************************************************************************************************************************************************!*\
|
1651
|
-
!*** ./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/form/index.vue?vue&type=template&id=
|
1651
|
+
!*** ./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3 ***!
|
1652
1652
|
\**************************************************************************************************************************************************************************************************************************************************************************/
|
1653
1653
|
/*! exports provided: render, staticRenderFns */
|
1654
1654
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1655
1655
|
|
1656
1656
|
"use strict";
|
1657
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{class:[_vm.b(),{'avue--detail':_vm.isDetail}],style:({width:_vm.setPx(_vm.parentOption.formWidth,'100%')})},[_c('el-form',{ref:\"form\",attrs:{\"status-icon\":_vm.parentOption.statusIcon,\"model\":_vm.form,\"label-suffix\":_vm.labelSuffix,\"hide-required-asterisk\":_vm.parentOption.hideRequiredAsterisk,\"size\":_vm.$AVUE.formSize || _vm.controlSize,\"label-position\":_vm.parentOption.labelPosition,\"label-width\":_vm.setPx(_vm.parentOption.labelWidth,_vm.config.labelWidth)},nativeOn:{\"submit\":function($event){$event.preventDefault();}}},[_c('el-row',{class:{'avue-form__tabs':_vm.isTabs},attrs:{\"span\":24,\"gutter\":_vm.parentOption.gutter}},[_vm._l((_vm.columnOption),function(item,index){return _c('avue-group',{key:item.prop,attrs:{\"tabs\":_vm.isTabs,\"arrow\":item.arrow,\"collapse\":item.collapse,\"display\":_vm.vaildDisplay(item),\"icon\":item.icon,\"index\":index,\"header\":!_vm.isTabs,\"active\":_vm.activeName,\"label\":item.label},on:{\"change\":_vm.handleGroupClick}},[(_vm.isTabs&&index == 1)?_c('el-tabs',{class:_vm.b('tabs'),attrs:{\"slot\":\"tabs\",\"type\":_vm.tabsType},on:{\"tab-click\":_vm.handleTabClick},slot:\"tabs\",model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:\"activeName\"}},[_vm._l((_vm.columnOption),function(tabs,index){return [(_vm.vaildDisplay(tabs) && index!=0)?_c('el-tab-pane',{key:index,attrs:{\"name\":index+''}},[_c('span',{attrs:{\"slot\":\"label\"},slot:\"label\"},[(_vm.getSlotName(tabs,'H',_vm.$scopedSlots))?_vm._t(_vm.getSlotName(tabs,'H'),null,{\"column\":_vm.column}):[_c('i',{class:tabs.icon},[_vm._v(\" \")]),_vm._v(\"\\n \"+_vm._s(tabs.label)+\"\\n \")]],2)]):_vm._e()]})],2):_vm._e(),_vm._v(\" \"),(_vm.getSlotName(item,'H',_vm.$scopedSlots))?_c('template',{slot:\"header\"},[_vm._t(_vm.getSlotName(item,'H'),null,{\"column\":item})],2):_vm._e(),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isGroupShow(item,index)),expression:\"isGroupShow(item,index)\"}],class:_vm.b('group',{
|
1657
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{class:[_vm.b(), { 'avue--detail': _vm.isDetail }],style:({ width: _vm.setPx(_vm.parentOption.formWidth, '100%') })},[_c('el-form',{ref:\"form\",attrs:{\"status-icon\":_vm.parentOption.statusIcon,\"model\":_vm.form,\"label-suffix\":_vm.labelSuffix,\"hide-required-asterisk\":_vm.parentOption.hideRequiredAsterisk,\"size\":_vm.$AVUE.formSize || _vm.controlSize,\"label-position\":_vm.parentOption.labelPosition,\"label-width\":_vm.setPx(_vm.parentOption.labelWidth, _vm.config.labelWidth)},nativeOn:{\"submit\":function($event){$event.preventDefault();}}},[_c('el-row',{class:{ 'avue-form__tabs': _vm.isTabs },attrs:{\"span\":24,\"gutter\":_vm.parentOption.gutter}},[_vm._l((_vm.columnOption),function(item,index){return _c('avue-group',{key:item.prop,attrs:{\"tabs\":_vm.isTabs,\"arrow\":item.arrow,\"collapse\":item.collapse,\"display\":_vm.vaildDisplay(item),\"icon\":item.icon,\"index\":index,\"header\":!_vm.isTabs,\"active\":_vm.activeName,\"label\":item.label},on:{\"change\":_vm.handleGroupClick}},[(_vm.isTabs && index == 1)?_c('el-tabs',{class:_vm.b('tabs'),attrs:{\"slot\":\"tabs\",\"type\":_vm.tabsType},on:{\"tab-click\":_vm.handleTabClick},slot:\"tabs\",model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:\"activeName\"}},[_vm._l((_vm.columnOption),function(tabs,index){return [(_vm.vaildDisplay(tabs) && index != 0)?_c('el-tab-pane',{key:index,attrs:{\"name\":index + ''}},[_c('span',{attrs:{\"slot\":\"label\"},slot:\"label\"},[(_vm.getSlotName(tabs, 'H', _vm.$scopedSlots))?_vm._t(_vm.getSlotName(tabs, 'H'),null,{\"column\":_vm.column}):[_c('i',{class:tabs.icon},[_vm._v(\" \")]),_vm._v(\"\\n \"+_vm._s(tabs.label)+\"\\n \")]],2)]):_vm._e()]})],2):_vm._e(),_vm._v(\" \"),(_vm.getSlotName(item, 'H', _vm.$scopedSlots))?_c('template',{slot:\"header\"},[_vm._t(_vm.getSlotName(item, 'H'),null,{\"column\":item})],2):_vm._e(),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isGroupShow(item, index)),expression:\"isGroupShow(item, index)\"}],class:_vm.b('group', { flex: _vm.vaildData(item.flex, true) })},[_vm._l((item.column),function(column,cindex){return [(_vm.vaildDisplay(column))?_c('el-col',{key:cindex,class:[\n _vm.b('row'),\n { 'avue--detail avue--detail__column': _vm.vaildDetail(column) },\n column.className,\n ],attrs:{\"span\":_vm.getItemParams(column, item, 'span'),\"md\":_vm.getItemParams(column, item, 'span'),\"sm\":_vm.getItemParams(column, item, 'span'),\"xs\":_vm.getItemParams(column, item, 'xsSpan'),\"offset\":_vm.getItemParams(column, item, 'offset'),\"push\":_vm.getItemParams(column, item, 'push'),\"pull\":_vm.getItemParams(column, item, 'pull')}},[_c('el-form-item',{class:_vm.b(\n 'item--' +\n (column.labelPosition || item.labelPosition || '')\n ),attrs:{\"prop\":column.prop,\"label\":column.label,\"rules\":column.rules,\"label-position\":column.labelPosition ||\n item.labelPosition ||\n _vm.parentOption.labelPosition,\"label-width\":_vm.getItemParams(column, item, 'labelWidth', true)},scopedSlots:_vm._u([{key:\"error\",fn:function(scope){return (_vm.getSlotName(column, 'E', _vm.$scopedSlots))?[_vm._t(_vm.getSlotName(column, 'E'),null,null,\n Object.assign(scope, {\n column,\n value: _vm.form[column.prop],\n readonly: _vm.readonly || column.readonly,\n disabled: _vm.getDisabled(column),\n size: column.size || _vm.controlSize,\n dic: _vm.DIC[column.prop],\n })\n )]:undefined}}],null,true)},[(_vm.getSlotName(column, 'L', _vm.$scopedSlots))?_c('template',{slot:\"label\"},[_vm._t(_vm.getSlotName(column, 'L'),null,{\"column\":column,\"value\":_vm.form[column.prop],\"readonly\":column.readonly || _vm.readonly,\"disabled\":_vm.getDisabled(column),\"size\":column.size || _vm.controlSize,\"dic\":_vm.DIC[column.prop]})],2):(column.labelTip)?_c('template',{slot:\"label\"},[_c('el-tooltip',{staticClass:\"item\",attrs:{\"effect\":\"dark\",\"placement\":column.labelTipPlacement || 'top-start'}},[_c('div',{attrs:{\"slot\":\"content\"},domProps:{\"innerHTML\":_vm._s(column.labelTip)},slot:\"content\"}),_vm._v(\" \"),_c('i',{staticClass:\"el-icon-info\"})]),_vm._v(\" \"),_c('span',[_vm._v(\" \"+_vm._s(column.label)+_vm._s(_vm.labelSuffix))])],1):_vm._e(),_vm._v(\" \"),_vm._v(\" \"),_c(_vm.validTip(column) ? 'div' : 'elTooltip',{tag:\"component\",attrs:{\"disabled\":_vm.validTip(column),\"content\":_vm.vaildData(column.tip, _vm.getPlaceholder(column)),\"placement\":column.tipPlacement}},[(_vm.$scopedSlots[column.prop])?_vm._t(column.prop,null,{\"value\":_vm.form[column.prop],\"column\":column,\"label\":_vm.form['$' + column.prop],\"size\":column.size || _vm.controlSize,\"readonly\":_vm.readonly || column.readonly,\"disabled\":_vm.getDisabled(column),\"dic\":_vm.DIC[column.prop]}):_c('form-temp',_vm._b({ref:column.prop,refInFor:true,attrs:{\"column\":column,\"box-type\":_vm.boxType,\"dic\":_vm.DIC[column.prop],\"props\":_vm.parentOption.props,\"propsHttp\":_vm.parentOption.propsHttp,\"disabled\":_vm.getDisabled(column),\"readonly\":column.readonly || _vm.readonly,\"enter\":_vm.parentOption.enter,\"size\":_vm.size,\"column-slot\":_vm.columnSlot},on:{\"enter\":_vm.submit,\"change\":function($event){return _vm.propChange(item.column, column)}},scopedSlots:_vm._u([_vm._l((_vm.getSlotName(column, 'T', _vm.$scopedSlots)\n ? [column]\n : []),function(item){return {key:_vm.getSlotName(column, 'T'),fn:function(scope){return [_vm._t(_vm.getSlotName(item, 'T'),null,null,scope)]}}}),_vm._l((_vm.columnSlot),function(item){return {key:item,fn:function(scope){return [_vm._t(item,null,null,scope)]}}})],null,true),model:{value:(_vm.form[column.prop]),callback:function ($$v) {_vm.$set(_vm.form, column.prop, $$v)},expression:\"form[column.prop]\"}},'form-temp',_vm.$uploadFun(column),false))],2)],2)],1):_vm._e(),_vm._v(\" \"),(\n _vm.vaildDisplay(column) &&\n column.row &&\n column.span !== 24 &&\n column.count\n )?_c('div',{key:`line${cindex}`,class:_vm.b('line'),style:({ width: (column.count / 24) * 100 + '%' })}):_vm._e()]}),_vm._v(\" \"),(!_vm.isDetail && !_vm.isMenu)?_c('form-menu',{scopedSlots:_vm._u([{key:\"menuForm\",fn:function(scope){return [_vm._t(\"menuForm\",null,null,scope)]}}],null,true)}):_vm._e()],2)],2)}),_vm._v(\" \"),(!_vm.isDetail && _vm.isMenu)?_c('form-menu',{scopedSlots:_vm._u([{key:\"menuForm\",fn:function(scope){return [_vm._t(\"menuForm\",null,null,scope)]}}],null,true)}):_vm._e()],2)],1)],1)\n}\nvar staticRenderFns = []\n\n\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/index.vue?./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options");
|
1658
1658
|
|
1659
1659
|
/***/ }),
|
1660
1660
|
|
@@ -2038,7 +2038,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
2038
2038
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2039
2039
|
|
2040
2040
|
"use strict";
|
2041
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return {\n methods: {\n bindEvent
|
2041
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return {\n methods: {\n bindEvent(name, params) {\n let item = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"findNode\"])(this.dic, this.props, this.text);\n params = Object.assign(params, {\n column: this.column,\n dic: this.dic,\n item\n }, this.tableData);\n if (typeof this[name] === 'function') {\n if (name == 'change') {\n if (this.column.cell != true) {\n this[name](params);\n }\n } else {\n this[name](params);\n }\n }\n this.$emit(name, params);\n },\n initVal() {\n this.stringMode = typeof this.value == 'string';\n this.text = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_0__[\"initVal\"])(this.value, this);\n },\n getLabelText(item) {\n if (this.validatenull(item)) return '';\n if (typeof this.typeformat === 'function') {\n return this.typeformat(item, this.labelKey, this.valueKey);\n }\n return item[this.labelKey];\n },\n handleFocus(event) {\n this.bindEvent('focus', {\n value: this.value,\n event\n });\n },\n handleBlur(event) {\n this.bindEvent('blur', {\n value: this.value,\n event\n });\n },\n handleClick(event) {\n this.bindEvent('click', {\n value: this.value,\n event\n });\n },\n handleChange(value) {\n let result = value;\n let flag = this.isString || this.isNumber || this.stringMode || this.listType === \"picture-img\";\n if (flag && Array.isArray(value)) {\n result = value.join(this.separator);\n }\n this.bindEvent('change', {\n value: result\n });\n this.$emit('input', result);\n }\n }\n };\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/common/event.js?");
|
2042
2042
|
|
2043
2043
|
/***/ }),
|
2044
2044
|
|
@@ -2050,7 +2050,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
2050
2050
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2051
2051
|
|
2052
2052
|
"use strict";
|
2053
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\
|
2053
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return {\n mixins: [core_slot__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n props: {\n defaults: {\n type: Object,\n default() {\n return {};\n }\n },\n option: {\n type: Object,\n required: true,\n default: () => {\n return {};\n }\n }\n },\n watch: {\n defaults: {\n handler(val) {\n this.objectOption = val;\n },\n deep: true\n },\n objectOption: {\n handler(val) {\n this.$emit('update:defaults', val);\n },\n deep: true\n },\n propOption: {\n handler(list) {\n let result = {};\n list.forEach(ele => {\n result[ele.prop] = ele;\n });\n this.$set(this, 'objectOption', result);\n },\n deep: true\n },\n option: {\n handler() {\n this.init(false);\n },\n deep: true\n }\n },\n data() {\n return {\n DIC: {},\n cascaderDIC: {},\n tableOption: {},\n isMobile: '',\n objectOption: {}\n };\n },\n created() {\n this.init();\n },\n computed: {\n resultOption() {\n return {\n ...this.tableOption,\n ...{\n column: this.propOption\n }\n };\n },\n rowKey() {\n return this.tableOption.rowKey || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].rowKey;\n },\n formRules() {\n let result = {};\n this.propOption.forEach(ele => {\n if (ele.rules && ele.display !== false) result[ele.prop] = ele.rules;\n });\n return result;\n },\n isMediumSize() {\n return this.controlSize;\n },\n controlSize() {\n return this.tableOption.size || this.$AVUE.size;\n }\n },\n methods: {\n init(type) {\n this.tableOption = this.option;\n this.getIsMobile();\n this.handleLocalDic();\n if (type !== false) this.handleLoadDic();\n },\n dicInit(type) {\n if (type === 'cascader') {\n this.handleLoadCascaderDic();\n } else {\n this.handleLoadDic();\n }\n },\n getIsMobile() {\n this.isMobile = document.body.clientWidth <= 768;\n },\n updateDic(prop, list) {\n let column = this.findObject(this.propOption, prop);\n if (this.validatenull(list) && this.validatenull(prop)) {\n this.handleLoadDic();\n } else if (this.validatenull(list) && !this.validatenull(column.dicUrl)) {\n Object(core_dic__WEBPACK_IMPORTED_MODULE_0__[\"sendDic\"])({\n column: column\n }).then(list => {\n this.$set(this.DIC, prop, list);\n });\n } else {\n this.$set(this.DIC, prop, list);\n }\n },\n //本地字典\n handleLocalDic() {\n Object(core_dic__WEBPACK_IMPORTED_MODULE_0__[\"loadLocalDic\"])(this.resultOption, this);\n },\n // 网络字典加载\n handleLoadDic() {\n Object(core_dic__WEBPACK_IMPORTED_MODULE_0__[\"loadDic\"])(this.resultOption, this);\n },\n //级联字典加载\n handleLoadCascaderDic() {\n Object(core_dic__WEBPACK_IMPORTED_MODULE_0__[\"loadCascaderDic\"])(this.propOption, this);\n }\n }\n };\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/common/init.js?");
|
2054
2054
|
|
2055
2055
|
/***/ }),
|
2056
2056
|
|
@@ -2062,7 +2062,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
2062
2062
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2063
2063
|
|
2064
2064
|
"use strict";
|
2065
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return {\n mixins: [core_slot__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n data
|
2065
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var core_slot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/slot */ \"./src/core/slot.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return {\n mixins: [core_slot__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n data() {\n return {\n stringMode: false,\n name: '',\n text: undefined,\n propsHttpDefault: global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_HTTP_PROPS\"],\n propsDefault: global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"]\n };\n },\n props: {\n blur: Function,\n focus: Function,\n change: Function,\n click: Function,\n typeformat: Function,\n control: Function,\n separator: {\n type: String,\n default: global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_SPLIT\"]\n },\n params: {\n type: Object,\n default: () => {\n return {};\n }\n },\n listType: {\n type: String\n },\n tableData: {\n type: Object\n },\n value: {},\n column: {\n type: Object,\n default: () => {\n return {};\n }\n },\n label: {\n type: String,\n default: ''\n },\n readonly: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n default: ''\n },\n tip: {\n type: String,\n default: ''\n },\n disabled: {\n type: Boolean,\n default: false\n },\n dataType: {\n type: String\n },\n clearable: {\n type: Boolean,\n default: true\n },\n type: {\n type: String,\n default: ''\n },\n dicUrl: {\n type: String,\n default: ''\n },\n dicMethod: {\n type: String,\n default: ''\n },\n dicFormatter: Function,\n dicQuery: {\n type: Object,\n default: () => {\n return {};\n }\n },\n dic: {\n type: Array,\n default: () => {\n return [];\n }\n },\n placeholder: {\n type: String,\n default: ''\n },\n rules: {\n type: Array\n },\n min: {\n type: Number\n },\n max: {\n type: Number\n },\n multiple: {\n type: Boolean,\n default: false\n },\n button: {\n type: Boolean,\n default: false\n },\n group: {\n type: Boolean,\n default: false\n },\n row: {\n type: Boolean,\n default: false\n },\n prop: {\n type: String,\n default: ''\n },\n border: {\n type: Boolean,\n default: false\n },\n popperClass: {\n type: String\n },\n propsHttp: {\n type: Object,\n default: () => global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_HTTP_PROPS\"]\n },\n props: {\n type: Object,\n default: () => global_variable__WEBPACK_IMPORTED_MODULE_0__[\"DIC_PROPS\"]\n }\n },\n watch: {\n text: {\n handler(n) {\n this.handleChange(n);\n }\n },\n value: {\n handler() {\n this.initVal();\n }\n }\n },\n computed: {\n clearableVal() {\n return this.disabled ? false : this.clearable;\n },\n componentName() {\n const type = 'el';\n const result = `${type}-${this.name}${this.button ? '-button' : ''}`;\n return result;\n },\n required() {\n return !this.validatenull(this.rules);\n },\n isArray() {\n return this.dataType === 'array';\n },\n isString() {\n return this.dataType === 'string';\n },\n isNumber() {\n return this.dataType === 'number';\n },\n nameKey() {\n return this.propsHttp.name || this.propsHttpDefault.name;\n },\n urlKey() {\n return this.propsHttp.url || this.propsHttpDefault.url;\n },\n resKey() {\n return this.propsHttp.res || this.propsHttpDefault.res;\n },\n groupsKey() {\n return this.props.groups || this.propsDefault.groups;\n },\n valueKey() {\n return this.props.value || this.propsDefault.value;\n },\n descKey() {\n return this.props.desc || this.propsDefault.desc;\n },\n leafKey() {\n return this.props.leaf || this.propsDefault.leaf;\n },\n labelKey() {\n return this.props.label || this.propsDefault.label;\n },\n childrenKey() {\n return this.props.children || this.propsDefault.children;\n },\n disabledKey() {\n return this.props.disabled || this.propsDefault.disabled;\n },\n idKey() {\n return this.props.id || this.propsDefault.id;\n }\n },\n created() {\n this.initVal();\n }\n };\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/common/props.js?");
|
2066
2066
|
|
2067
2067
|
/***/ }),
|
2068
2068
|
|
@@ -2074,7 +2074,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var glob
|
|
2074
2074
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2075
2075
|
|
2076
2076
|
"use strict";
|
2077
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/dialog-form/index.vue\");\n\
|
2077
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/dialog-form/index.vue\");\n\nlet Plugin = function () {\n this.$root = {};\n};\nPlugin.prototype.initMounted = function () {\n this.$root = (() => {\n let DialogConstructor = window.Vue.extend(_index_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n let instance = new DialogConstructor();\n instance.vm = instance.$mount();\n document.body.appendChild(instance.vm.$el);\n instance.dom = instance.vm.$el;\n return instance.vm;\n })();\n};\nPlugin.prototype.show = function (opt) {\n this.initMounted();\n this.$root.show(opt);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (new Plugin());\n\n//# sourceURL=webpack://AVUE/./packages/core/components/dialog-form/index.js?");
|
2078
2078
|
|
2079
2079
|
/***/ }),
|
2080
2080
|
|
@@ -2194,7 +2194,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
2194
2194
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2195
2195
|
|
2196
2196
|
"use strict";
|
2197
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/image-cropper/index.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (
|
2197
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/image-cropper/index.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (ops = {}) {\n let MessageConstructor = window.Vue.extend(_index_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n let option = Object.assign({\n outputSize: 1,\n //裁剪生成图片的质量(可选0.1 - 1)\n outputType: 'jpeg',\n //裁剪生成图片的格式(jpeg || png || webp)\n info: true,\n //图片大小信息\n canScale: true,\n //图片是否允许滚轮缩放\n autoCrop: true,\n //是否默认生成截图框\n fixed: false,\n //是否开启截图框宽高固定比例\n full: false,\n //false按原比例裁切图片,不失真\n fixedBox: false,\n //固定截图框大小,不允许改变\n canMove: true,\n //上传图片是否可以移动\n canMoveBox: true,\n //截图框能否拖动\n original: false,\n //上传图片按照原始比例渲染\n centerBox: false,\n //截图框是否被限制在图片里面\n height: true,\n //是否按照设备的dpr 输出等比例图片\n infoTrue: false,\n //true为展示真实输出图片宽高,false展示看到的截图框宽高\n enlarge: 1 //图片根据截图框输出比例倍数\n }, ops);\n let instance = new MessageConstructor({\n data: {\n option\n }\n });\n instance.vm = instance.$mount();\n document.body.appendChild(instance.vm.$el);\n instance.vm.show();\n instance.dom = instance.vm.$el;\n return instance.vm;\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/image-cropper/index.js?");
|
2198
2198
|
|
2199
2199
|
/***/ }),
|
2200
2200
|
|
@@ -2242,7 +2242,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
2242
2242
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2243
2243
|
|
2244
2244
|
"use strict";
|
2245
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/image-preview/index.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (
|
2245
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ \"./packages/core/components/image-preview/index.vue\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (datas = [], index = 0, ops = {}) {\n let MessageConstructor = window.Vue.extend(_index_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n let options = {\n datas: datas,\n index: index,\n ops: Object.assign({\n closeOnClickModal: false,\n beforeClose: null,\n click: null,\n modal: true\n }, ops)\n };\n let instance = new MessageConstructor({\n data: options\n });\n instance.vm = instance.$mount();\n document.body.appendChild(instance.vm.$el);\n instance.vm.open();\n instance.dom = instance.vm.$el;\n return instance.vm;\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/components/image-preview/index.js?");
|
2246
2246
|
|
2247
2247
|
/***/ }),
|
2248
2248
|
|
@@ -2290,7 +2290,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
2290
2290
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2291
2291
|
|
2292
2292
|
"use strict";
|
2293
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ((
|
2293
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ((() => {\n let dialogDom;\n function setEvent(el, value, event, first) {\n let v_params = value,\n e_params = event;\n if (first) {\n el.oncontextmenu = function (e) {\n let divLeft = e.clientX,\n divTop = e.clientY;\n let client_width = document.documentElement.clientWidth;\n let client_height = document.documentElement.clientHeight;\n let dialogDom_width = dialogDom.offsetWidth;\n let dialogDom_height = dialogDom.offsetHeight;\n let calcWidth = client_width - divLeft - dialogDom_width;\n let calcHeight = client_height - divTop - dialogDom_height;\n if (calcHeight < 0) {\n divTop = divTop - dialogDom_height;\n }\n if (calcWidth < 0) {\n divLeft = divLeft - dialogDom_width;\n }\n const closeDialog = () => {\n dialogDom.style.display = 'none';\n document.removeEventListener('click', closeDialog);\n };\n const showDialog = () => {\n dialogDom.style.display = 'block';\n dialogDom.style.position = 'fixed';\n dialogDom.style.zIndex = 1024;\n dialogDom.style.top = divTop + 'px';\n dialogDom.style.left = divLeft + 'px';\n document.addEventListener('click', closeDialog);\n };\n if (e_params) {\n e_params(v_params, showDialog);\n } else {\n showDialog();\n }\n return false;\n };\n }\n }\n return {\n inserted(el, binding) {\n let id = binding.value.id;\n let event = binding.value.event;\n let value = binding.value.value;\n dialogDom = document.getElementById(id);\n if (!dialogDom) return;\n dialogDom.style.display = 'none';\n setEvent(el, value, event, true);\n },\n update(el, binding) {\n let event = binding.value.event;\n let value = binding.value.value;\n setEvent(el, value, event, false);\n }\n };\n})());\n\n//# sourceURL=webpack://AVUE/./packages/core/directive/contextmenu.js?");
|
2294
2294
|
|
2295
2295
|
/***/ }),
|
2296
2296
|
|
@@ -2302,7 +2302,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
2302
2302
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2303
2303
|
|
2304
2304
|
"use strict";
|
2305
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n // v-dialog-drag: 弹窗拖拽 \n bind
|
2305
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n // v-dialog-drag: 弹窗拖拽 \n bind(el, binding, vnode, oldVnode) {\n const value = binding.value;\n if (value == false) return;\n // 获取拖拽内容头部\n const dialogHeaderEl = el.querySelector('.el-dialog__header');\n const dragDom = el.querySelector('.el-dialog');\n if (!dragDom & !dialogHeaderEl) return;\n dialogHeaderEl.style.cursor = 'move';\n // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);\n const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);\n\n // dragDom.style.position = 'absolute';\n // dragDom.style.top = `${dragDom.style.marginTop}`;\n // dragDom.style.marginTop = 0;\n let width = dragDom.style.width;\n if (width.includes('%')) {\n width = +document.body.clientWidth * (+width.replace(/\\%/g, '') / 100);\n } else {\n width = +width.replace(/\\px/g, '');\n }\n ``;\n // dragDom.style.left = `${(document.body.clientWidth - width) / 2}px`;\n // 鼠标按下事件\n dialogHeaderEl.onmousedown = e => {\n // 鼠标按下,计算当前元素距离可视区的距离 (鼠标点击位置距离可视窗口的距离)\n const disX = e.clientX - dialogHeaderEl.offsetLeft;\n const disY = e.clientY - dialogHeaderEl.offsetTop;\n\n // 获取到的值带px 正则匹配替换\n let styL, styT;\n\n // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px\n if (sty.left.includes('%')) {\n styL = +document.body.clientWidth * (+sty.left.replace(/\\%/g, '') / 100);\n styT = +document.body.clientHeight * (+sty.top.replace(/\\%/g, '') / 100);\n } else {\n styL = +sty.left.replace(/\\px/g, '');\n styT = +sty.top.replace(/\\px/g, '');\n }\n ;\n\n // 鼠标拖拽事件\n document.onmousemove = function (e) {\n // 通过事件委托,计算移动的距离 (开始拖拽至结束拖拽的距离)\n const l = e.clientX - disX;\n const t = e.clientY - disY;\n let finallyL = l + styL;\n let finallyT = t + styT;\n\n // // 边界值判定 注意clientWidth scrollWidth区别 要减去之前的top left值\n // // dragDom.offsetParent表示弹窗阴影部分\n // if (finallyL < 0) {\n // finallyL = 0\n // } else if (finallyL > dragDom.offsetParent.clientWidth - dragDom.clientWidth - dragDom.offsetParent.offsetLeft) {\n // finallyL = dragDom.offsetParent.clientWidth - dragDom.clientWidth - dragDom.offsetParent.offsetLeft\n // }\n\n // if (finallyT < 0) {\n // finallyT = 0\n // } else if (finallyT > dragDom.offsetParent.clientHeight - dragDom.clientHeight - dragDom.offsetParent.offsetLeft) (\n // finallyT = dragDom.offsetParent.clientHeight - dragDom.clientHeight - dragDom.offsetParent.offsetLeft\n // )\n\n // 移动当前元素\n dragDom.style.left = `${finallyL}px`;\n dragDom.style.top = `${finallyT}px`;\n\n //将此时的位置传出去\n //binding.value({x:e.pageX,y:e.pageY})\n };\n document.onmouseup = function (e) {\n document.onmousemove = null;\n document.onmouseup = null;\n };\n };\n }\n});\n\n//# sourceURL=webpack://AVUE/./packages/core/directive/dialog-drag.js?");
|
2306
2306
|
|
2307
2307
|
/***/ }),
|
2308
2308
|
|
@@ -2314,7 +2314,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
2314
2314
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2315
2315
|
|
2316
2316
|
"use strict";
|
2317
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ((
|
2317
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ((() => {\n function init(el, binding) {\n const value = binding.value;\n if (value === false) {\n el.style.display = \"none\";\n } else {\n el.style.display = \"\";\n }\n }\n return {\n bind(el, binding) {\n init(el, binding);\n },\n update(el, binding) {\n init(el, binding);\n }\n };\n})());\n\n//# sourceURL=webpack://AVUE/./packages/core/directive/permission.js?");
|
2318
2318
|
|
2319
2319
|
/***/ }),
|
2320
2320
|
|
@@ -3562,7 +3562,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
3562
3562
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3563
3563
|
|
3564
3564
|
"use strict";
|
3565
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
3565
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./header-search.vue?vue&type=template&id=fc201faa */ \"./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa\");\n/* harmony import */ var _header_search_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./header-search.vue?vue&type=script&lang=js */ \"./packages/element-ui/crud/header-search.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _header_search_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/header-search.vue?");
|
3566
3566
|
|
3567
3567
|
/***/ }),
|
3568
3568
|
|
@@ -3578,15 +3578,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
3578
3578
|
|
3579
3579
|
/***/ }),
|
3580
3580
|
|
3581
|
-
/***/ "./packages/element-ui/crud/header-search.vue?vue&type=template&id=
|
3581
|
+
/***/ "./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa":
|
3582
3582
|
/*!**********************************************************************************!*\
|
3583
|
-
!*** ./packages/element-ui/crud/header-search.vue?vue&type=template&id=
|
3583
|
+
!*** ./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa ***!
|
3584
3584
|
\**********************************************************************************/
|
3585
3585
|
/*! exports provided: render, staticRenderFns */
|
3586
3586
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3587
3587
|
|
3588
3588
|
"use strict";
|
3589
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
3589
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./header-search.vue?vue&type=template&id=fc201faa */ \"./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/crud/header-search.vue?vue&type=template&id=fc201faa\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_header_search_vue_vue_type_template_id_fc201faa__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/header-search.vue?");
|
3590
3590
|
|
3591
3591
|
/***/ }),
|
3592
3592
|
|
@@ -3862,7 +3862,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n// form配置文件\n/* harmo
|
|
3862
3862
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3863
3863
|
|
3864
3864
|
"use strict";
|
3865
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
3865
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=455a06b3 */ \"./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3\");\n/* harmony import */ var _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js */ \"./packages/element-ui/form/index.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/index.vue?");
|
3866
3866
|
|
3867
3867
|
/***/ }),
|
3868
3868
|
|
@@ -3878,15 +3878,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
3878
3878
|
|
3879
3879
|
/***/ }),
|
3880
3880
|
|
3881
|
-
/***/ "./packages/element-ui/form/index.vue?vue&type=template&id=
|
3881
|
+
/***/ "./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3":
|
3882
3882
|
/*!**************************************************************************!*\
|
3883
|
-
!*** ./packages/element-ui/form/index.vue?vue&type=template&id=
|
3883
|
+
!*** ./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3 ***!
|
3884
3884
|
\**************************************************************************/
|
3885
3885
|
/*! exports provided: render, staticRenderFns */
|
3886
3886
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3887
3887
|
|
3888
3888
|
"use strict";
|
3889
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
3889
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!../../../node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./index.vue?vue&type=template&id=455a06b3 */ \"./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib/index.js?!./packages/element-ui/form/index.vue?vue&type=template&id=455a06b3\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_5_node_modules_store_vue_loader_15_11_1_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_455a06b3__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/form/index.vue?");
|
3890
3890
|
|
3891
3891
|
/***/ }),
|
3892
3892
|
|
@@ -4990,7 +4990,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var util
|
|
4990
4990
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4991
4991
|
|
4992
4992
|
"use strict";
|
4993
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calcCascader\", function() { return calcCascader; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calcCount\", function() { return calcCount; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initVal\", function() { return initVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSearchType\", function() { return getSearchType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComponent\", function() { return getComponent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formInitVal\", function() { return formInitVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPlaceholder\", function() { return getPlaceholder; });\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! locale */ \"./src/locale/index.js\");\n\n\n\n\n/**\n * 计算级联属性\n */\
|
4993
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calcCascader\", function() { return calcCascader; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calcCount\", function() { return calcCount; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initVal\", function() { return initVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSearchType\", function() { return getSearchType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComponent\", function() { return getComponent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formInitVal\", function() { return formInitVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPlaceholder\", function() { return getPlaceholder; });\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! locale */ \"./src/locale/index.js\");\n\n\n\n\n/**\n * 计算级联属性\n */\nconst calcCascader = (list = []) => {\n list.forEach(ele => {\n let cascader = ele.cascader;\n if (!Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(cascader)) {\n let parentProp = ele.prop;\n cascader.forEach(citem => {\n let column = Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"findObject\"])(list, citem);\n if (column) column.parentProp = parentProp;\n });\n }\n });\n return list;\n};\n/**\n * 计算空白列row\n */\nlet count = 0;\nconst calcCount = (ele, spanDefault = 12, init = false) => {\n if (init) count = 0;\n const spanAll = 24;\n count = count + (ele.span || spanDefault) + (ele.offset || 0);\n if (count === spanAll) {\n count = 0;\n } else if (count > spanAll) {\n count = 0 + (ele.span || spanDefault) + (ele.offset || 0);\n } else if (ele.row && count !== spanAll) {\n ele.count = spanAll - count;\n count = 0;\n }\n return ele;\n};\n\n/**\n * 初始化数据格式\n */\nconst initVal = (value, safe) => {\n let {\n type,\n multiple,\n dataType,\n separator = global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_SPLIT\"],\n alone,\n emitPath,\n range\n } = safe;\n let list = value;\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"MULTIPLE_LIST\"].includes(type) && multiple == true || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"ARRAY_VALUE_LIST\"].includes(type) && emitPath !== false || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"RANGE_LIST\"].includes(type) && range == true) {\n if (!Array.isArray(list)) {\n if (Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(list)) {\n list = [];\n } else {\n list = (list + '').split(separator) || [];\n }\n }\n // 数据转化\n list.forEach((ele, index) => {\n list[index] = Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"detailDataType\"])(ele, dataType);\n });\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"ARRAY_LIST\"].includes(type) && Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(list) && alone) list = [''];\n } else {\n list = Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"detailDataType\"])(list, dataType);\n }\n return list;\n};\n\n/**\n * 搜索框获取动态组件\n */\nconst getSearchType = column => {\n const type = column.type;\n const range = column.searchRange;\n let result = type;\n if (column.searchType) return column.searchType;\n if (['radio', 'checkbox', 'switch'].includes(type)) {\n result = 'select';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DATE_LIST\"].includes(type)) {\n let rangeKey = 'range';\n if (range) {\n if (!type.includes(rangeKey)) {\n result = type + rangeKey;\n } else {\n result = type;\n }\n } else result = type.replace(rangeKey, '');\n } else if (['textarea'].includes(type)) {\n result = 'input';\n }\n return result;\n};\n\n/**\n * 动态获取组件\n */\nconst getComponent = (type, component) => {\n let result = type || 'input';\n if (!Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(component)) {\n return component;\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"ARRAY_LIST\"].includes(type)) {\n result = 'array';\n } else if (['time', 'timerange'].includes(type)) {\n result = 'time';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DATE_LIST\"].includes(type)) {\n result = 'date';\n } else if (['password', 'textarea', 'search'].includes(type)) {\n result = 'input';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"INPUT_LIST\"].includes(type)) {\n result = 'input-' + type;\n }\n return global_variable__WEBPACK_IMPORTED_MODULE_1__[\"KEY_COMPONENT_NAME\"] + result;\n};\n\n/**\n * 表格初始化值\n */\n\nconst formInitVal = (list = []) => {\n let tableForm = {};\n list.forEach(ele => {\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"ARRAY_VALUE_LIST\"].includes(ele.type) && ele.emitPath !== false || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"MULTIPLE_LIST\"].includes(ele.type) && ele.multiple || ele.dataType === 'array') {\n tableForm[ele.prop] = [];\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"RANGE_LIST\"].includes(ele.type) && ele.range == true) {\n tableForm[ele.prop] = [0, 0];\n } else if (['rate', 'slider', 'number'].includes(ele.type) || ele.dataType === 'number') {\n tableForm[ele.prop] = undefined;\n } else {\n tableForm[ele.prop] = '';\n }\n if (ele.bind) {\n tableForm = Object(utils_util__WEBPACK_IMPORTED_MODULE_2__[\"createObj\"])(tableForm, ele.bind);\n }\n // 表单默认值设置\n if (!Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele.value)) {\n tableForm[ele.prop] = ele.value;\n }\n });\n return {\n tableForm\n };\n};\nconst getPlaceholder = function (column) {\n const placeholder = column.placeholder;\n const label = column.label;\n if (Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(placeholder)) {\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"SELECT_LIST\"].includes(column.type)) {\n return `${Object(locale__WEBPACK_IMPORTED_MODULE_3__[\"t\"])('tip.select')} ${label}`;\n } else {\n return `${Object(locale__WEBPACK_IMPORTED_MODULE_3__[\"t\"])('tip.input')} ${label}`;\n }\n }\n return placeholder;\n};\n\n//# sourceURL=webpack://AVUE/./src/core/dataformat.js?");
|
4994
4994
|
|
4995
4995
|
/***/ }),
|
4996
4996
|
|
@@ -5002,7 +5002,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5002
5002
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5003
5003
|
|
5004
5004
|
"use strict";
|
5005
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detail\", function() { return detail; });\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\
|
5005
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detail\", function() { return detail; });\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nconst detail = (row = {}, column = {}, option = {}, dic = []) => {\n let result = row[column.prop];\n let type = column.type;\n let separator = column.separator;\n // 深结构绑定处理\n if (column.bind) result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getAsVal\"])(row, column.bind);\n if (!Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(result)) {\n let selectFlag = global_variable__WEBPACK_IMPORTED_MODULE_2__[\"MULTIPLE_LIST\"].includes(column.type) && column.multiple;\n let arrayFlag = global_variable__WEBPACK_IMPORTED_MODULE_2__[\"ARRAY_VALUE_LIST\"].includes(column.type) && column.emitPath !== false;\n if ((selectFlag || arrayFlag) && !Array.isArray(result) && !column.dataType) column.dataType = 'string';\n if (column.dataType) {\n if (selectFlag || arrayFlag) {\n if (!Array.isArray(result)) result = result.split(separator || global_variable__WEBPACK_IMPORTED_MODULE_2__[\"DIC_SPLIT\"]);\n result.forEach(ele => {\n ele = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"detailDataType\"])(ele, column.dataType);\n });\n } else {\n result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"detailDataType\"])(result, column.dataType);\n }\n }\n if ('password' === type) {\n result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getPasswordChar\"])(result, '*');\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_2__[\"DATE_LIST\"].includes(type) && column.format) {\n const format = column.format.replace('dd', 'DD').replace('yyyy', 'YYYY');\n let formatValue = dayjs__WEBPACK_IMPORTED_MODULE_3___default()().format('YYYY-MM-DD');\n if (type.indexOf('range') !== -1) {\n let date1 = result[0] || '',\n date2 = result[1] || '';\n if (type === 'timerange' && date1.length <= 8 && date2.length < 8) {\n date1 = `${formatValue} ${date1}`;\n date2 = `${formatValue} ${date2}`;\n }\n result = [dayjs__WEBPACK_IMPORTED_MODULE_3___default()(date1).format(format), dayjs__WEBPACK_IMPORTED_MODULE_3___default()(date2).format(format)].join(column.separator || '~');\n } else {\n if (type === 'time' && result.length <= 8) {\n result = `${formatValue} ${result}`;\n }\n result = dayjs__WEBPACK_IMPORTED_MODULE_3___default()(result).format(format);\n }\n }\n }\n // 字典处理\n if (!Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(dic)) {\n result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getDicValue\"])(dic, result, column.props || option.props);\n }\n // 自定义格式化\n if (typeof column.formatter === 'function') {\n result = column.formatter(row, row[column.prop], result, column);\n } else if (Array.isArray(result) && !Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(dic)) {\n result = result.join(separator || global_variable__WEBPACK_IMPORTED_MODULE_2__[\"DIC_SHOW_SPLIT\"]);\n }\n return result;\n};\n\n//# sourceURL=webpack://AVUE/./src/core/detail.js?");
|
5006
5006
|
|
5007
5007
|
/***/ }),
|
5008
5008
|
|
@@ -5014,7 +5014,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5014
5014
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5015
5015
|
|
5016
5016
|
"use strict";
|
5017
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCascaderDic\", function() { return loadCascaderDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadDic\", function() { return loadDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadLocalDic\", function() { return loadLocalDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sendDic\", function() { return sendDic; });\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\
|
5017
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCascaderDic\", function() { return loadCascaderDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadDic\", function() { return loadDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadLocalDic\", function() { return loadLocalDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sendDic\", function() { return sendDic; });\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\nconst key = 'key';\nfunction getDataType(list = [], props = {}, type) {\n let valueKey = props.value || global_variable__WEBPACK_IMPORTED_MODULE_2__[\"DIC_PROPS\"].value;\n let childrenKey = props.children || global_variable__WEBPACK_IMPORTED_MODULE_2__[\"DIC_PROPS\"].children;\n list.forEach(ele => {\n ele[valueKey] = Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"detailDataType\"])(ele[valueKey], type);\n if (ele[childrenKey]) getDataType(ele[childrenKey], props, type);\n });\n return list;\n}\n;\nfunction getResData(data, props, dataType) {\n const bind = props.res;\n let res = data;\n let deep = data.data;\n if (bind) {\n res = Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"getAsVal\"])(res, bind);\n } else if (deep) {\n res = Array.isArray(deep) ? deep : [deep];\n }\n if (dataType) res = getDataType(res, props, dataType);\n return res;\n}\n;\nconst loadCascaderDic = (columnOption, safe) => {\n return new Promise(resolve => {\n let list = [];\n let result = {};\n let columnList = columnOption.filter(ele => ele.parentProp);\n safe.data.forEach((ele, index) => {\n if (!safe.cascaderDIC[index]) safe.$set(safe.cascaderDIC, index, {});\n columnList.forEach(column => {\n if (column.hide !== true && column.dicFlag !== false) {\n list.push(new Promise(resolve => {\n if (ele[column.parentProp]) {\n sendDic({\n url: column.dicUrl,\n props: column.props,\n method: column.dicMethod,\n headers: column.dicHeaders,\n formatter: column.dicFormatter,\n query: column.dicQuery,\n dataType: column.dataType,\n form: ele,\n value: ele[column.parentProp]\n }).then(res => {\n let obj = {\n prop: column.prop,\n data: res,\n index: index\n };\n safe.$set(safe.cascaderDIC[index], obj.prop, obj.data);\n resolve(obj);\n });\n } else {\n let obj = {\n prop: column.prop,\n data: [],\n index: index\n };\n safe.$set(safe.cascaderDIC[index], obj.prop, obj.data);\n resolve(obj);\n }\n }));\n }\n });\n });\n Promise.all(list).then(data => {\n data.forEach(ele => {\n if (!result[ele.index]) result[ele.index] = {};\n result[ele.index][ele.prop] = ele.data;\n });\n resolve(result);\n });\n });\n};\nconst loadDic = (option, safe) => {\n return new Promise(resolve => {\n let list = [],\n result = {};\n let notList = [],\n nameList = [],\n column = option.column || [];\n column.forEach(ele => {\n let url = ele.dicUrl;\n let prop = ele.prop;\n let parentProp = ele.parentProp;\n notList = notList.concat(ele.cascader || []);\n let flag = ele.dicFlag === false || ele.lazy === true || notList.includes(prop);\n if (url && !parentProp && !flag) {\n list.push(new Promise(resolve => {\n sendDic({\n url: url,\n name: prop,\n method: ele.dicMethod,\n headers: ele.dicHeaders,\n formatter: ele.dicFormatter,\n props: ele.props,\n dataType: ele.dataType,\n query: ele.dicQuery\n }).then(res => {\n safe.$set(safe.DIC, prop, res);\n resolve(res);\n });\n }));\n }\n });\n Promise.all(list).then(res => {\n nameList.forEach((ele, index) => {\n result[ele] = res[index];\n });\n resolve(result);\n });\n });\n};\nconst loadLocalDic = (option, safe) => {\n let columnData = {};\n let optionData = option.dicData || {};\n option.column.forEach(ele => {\n if (ele.dicData) columnData[ele.prop] = getDataType(ele.dicData, ele.props, ele.dataType);\n });\n let result = {\n ...optionData,\n ...columnData\n };\n Object.keys(result).forEach(ele => {\n safe.$set(safe.DIC, ele, result[ele]);\n });\n return result;\n};\nconst sendDic = params => {\n let {\n url,\n query,\n method,\n props,\n formatter,\n headers,\n value,\n column = {},\n form = {},\n dataType\n } = params;\n url = column.dicUrl || url;\n method = (column.dicMethod || method || 'get').toLowerCase();\n headers = column.dicHeaders || headers || {};\n query = column.dicQuery || query || {};\n formatter = column.dicFormatter || formatter;\n props = column.props || props || {};\n let list = url.match(/[^\\{\\}]+(?=\\})/g) || [];\n list.forEach(ele => {\n let result = ele === key ? value : form[ele];\n if (Object(utils_validate__WEBPACK_IMPORTED_MODULE_1__[\"validatenull\"])(result)) result = '';\n url = url.replace(`{{${ele}}}`, result);\n });\n const getKey = data => {\n let result = {};\n Object.keys(data).forEach(ele => {\n let eleKey = data[ele];\n if (typeof eleKey == 'string' && eleKey.match(/\\{{|}}/g)) {\n let prop = eleKey.replace(/\\{{|}}/g, '');\n result[ele] = prop == key ? value : form[prop];\n } else {\n result[ele] = eleKey;\n }\n });\n return result;\n };\n return new Promise((resolve, reject) => {\n if (!url) resolve([]);\n const callback = res => {\n let list = [];\n res = res.data || {};\n if (typeof formatter === 'function') {\n list = formatter(res, form);\n } else {\n list = getResData(res, props, dataType);\n }\n resolve(list);\n };\n const getData = () => {\n let data = getKey(query);\n if (method == 'get') return {\n params: data\n };\n return {\n data\n };\n };\n window.axios(Object.assign({\n url,\n method,\n headers: getKey(headers)\n }, getData())).then(function (res) {\n callback(res);\n }).catch(err => [reject(err)]);\n });\n};\n\n//# sourceURL=webpack://AVUE/./src/core/dic.js?");
|
5018
5018
|
|
5019
5019
|
/***/ }),
|
5020
5020
|
|
@@ -5026,7 +5026,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5026
5026
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5027
5027
|
|
5028
5028
|
"use strict";
|
5029
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! locale */ \"./src/locale/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n methods: {\n t
|
5029
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! locale */ \"./src/locale/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n methods: {\n t(...args) {\n return locale__WEBPACK_IMPORTED_MODULE_0__[\"t\"].apply(this, args);\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/core/locale.js?");
|
5030
5030
|
|
5031
5031
|
/***/ }),
|
5032
5032
|
|
@@ -5038,7 +5038,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var loca
|
|
5038
5038
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5039
5039
|
|
5040
5040
|
"use strict";
|
5041
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n\
|
5041
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n\nconst list = {\n 'AliOSS': {\n url: 'https://cdn.staticfile.org/ali-oss/6.17.1/aliyun-oss-sdk.min.js',\n title: '阿里云云图片上传,需引入OSS的sdk',\n github: 'https://github.com/ali-sdk/ali-oss/'\n },\n 'Map': {\n url: 'https://webapi.amap.com/maps?v=1.4.11&key=xxxxx&plugin=AMap.PlaceSearch,https://webapi.amap.com/ui/1.0/main.js?v=1.0.11',\n title: '地图组件,需引入高德SDK'\n },\n 'MapUi': {\n url: 'https://webapi.amap.com/ui/1.0/main.js?v=1.0.11',\n title: '地图组件,需引入高德UISDK'\n },\n 'Sortable': {\n url: 'https://cdn.staticfile.org/Sortable/1.10.0-rc2/Sortable.min.js',\n title: '拖拽,需引入sortableJs',\n github: 'https://github.com/SortableJS/Sortable'\n },\n 'Screenshot': {\n url: 'https://cdn.staticfile.org/html2canvas/0.5.0-beta4/html2canvas.min.js',\n title: '需引入html2canvas依赖包',\n github: 'https://github.com/niklasvh/html2canvas/'\n },\n 'COS': {\n url: 'https://avuejs.com/cdn/cos-js-sdk-v5.min.js',\n title: '腾讯云云图片上传,需引入COS'\n },\n 'CryptoJS': {\n url: 'https://avuejs.com/cdn/CryptoJS.js',\n title: '七牛云图片上传,需引入CryptoJS'\n },\n 'hljs': {\n url: 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js',\n title: '需引入hljs框架包',\n github: 'https://github.com/highlightjs/highlight.js'\n },\n 'file-saver': {\n url: 'https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js',\n title: '需引入文件操作包',\n github: 'https://github.com/eligrey/FileSaver.js'\n },\n 'xlsx': {\n url: 'https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js',\n title: '需引入excel操作包',\n github: 'https://github.com/protobi/js-xlsx'\n },\n 'mock': {\n url: 'https://cdn.staticfile.org/Mock.js/1.0.1-beta3/mock-min.js',\n title: '需要引入mock模拟数据包',\n github: 'https://github.com/Colingo/mock'\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ((() => {\n return {\n logs: function (name) {\n const obj = list[name];\n plugin_logs___WEBPACK_IMPORTED_MODULE_0__[\"default\"].capsule(name, obj.title, 'warning');\n plugin_logs___WEBPACK_IMPORTED_MODULE_0__[\"default\"].warning('CDN:' + (obj.url || '-'));\n plugin_logs___WEBPACK_IMPORTED_MODULE_0__[\"default\"].warning('GITHUB:' + (obj.github || '-'));\n }\n };\n})());\n\n//# sourceURL=webpack://AVUE/./src/core/packages.js?");
|
5042
5042
|
|
5043
5043
|
/***/ }),
|
5044
5044
|
|
@@ -5050,7 +5050,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var plug
|
|
5050
5050
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5051
5051
|
|
5052
5052
|
"use strict";
|
5053
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n methods: {\n getSlotName
|
5053
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n methods: {\n getSlotName(item = {}, type = 'D', slot) {\n let result = {\n F: 'Form',\n H: 'Header',\n E: 'Error',\n L: 'Label',\n S: 'Search',\n T: 'Type',\n D: ''\n };\n let name = item.prop + result[type];\n if (slot) return slot[name];\n return name;\n },\n getSlotList(list = [], slot, propList) {\n propList = propList.map(ele => ele.prop);\n return Object.keys(slot).filter(ele => {\n let result = false;\n if (!propList.includes(ele)) {\n list.forEach(name => {\n if (ele.includes(name)) result = true;\n });\n }\n return result;\n });\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/core/slot.js?");
|
5054
5054
|
|
5055
5055
|
/***/ }),
|
5056
5056
|
|
@@ -5062,7 +5062,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
5062
5062
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5063
5063
|
|
5064
5064
|
"use strict";
|
5065
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KEY_COMPONENT_NAME\", function() { return KEY_COMPONENT_NAME; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_PROPS\", function() { return DIC_PROPS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_HTTP_PROPS\", function() { return DIC_HTTP_PROPS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DATE_LIST\", function() { return DATE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CHILDREN_LIST\", function() { return CHILDREN_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"INPUT_LIST\", function() { return INPUT_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARRAY_LIST\", function() { return ARRAY_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MULTIPLE_LIST\", function() { return MULTIPLE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RANGE_LIST\", function() { return RANGE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARRAY_VALUE_LIST\", function() { return ARRAY_VALUE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SELECT_LIST\", function() { return SELECT_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_SHOW_SPLIT\", function() { return DIC_SHOW_SPLIT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_SPLIT\", function() { return DIC_SPLIT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"typeList\", function() { return typeList; });\
|
5065
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KEY_COMPONENT_NAME\", function() { return KEY_COMPONENT_NAME; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_PROPS\", function() { return DIC_PROPS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_HTTP_PROPS\", function() { return DIC_HTTP_PROPS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DATE_LIST\", function() { return DATE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CHILDREN_LIST\", function() { return CHILDREN_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"INPUT_LIST\", function() { return INPUT_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARRAY_LIST\", function() { return ARRAY_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MULTIPLE_LIST\", function() { return MULTIPLE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RANGE_LIST\", function() { return RANGE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARRAY_VALUE_LIST\", function() { return ARRAY_VALUE_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SELECT_LIST\", function() { return SELECT_LIST; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_SHOW_SPLIT\", function() { return DIC_SHOW_SPLIT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DIC_SPLIT\", function() { return DIC_SPLIT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"typeList\", function() { return typeList; });\nconst KEY_COMPONENT_NAME = 'avue-';\nconst DIC_PROPS = {\n rowKey: 'id',\n rowParentKey: \"parentId\",\n nodeKey: 'id',\n label: 'label',\n value: 'value',\n desc: 'desc',\n groups: 'groups',\n title: 'title',\n leaf: 'leaf',\n children: 'children',\n hasChildren: 'hasChildren',\n labelText: '名称',\n disabled: 'disabled'\n};\nconst DIC_HTTP_PROPS = {\n name: 'name',\n url: 'url',\n fileName: 'file',\n res: ''\n};\nconst DATE_LIST = ['dates', 'date', 'datetime', 'datetimerange', 'daterange', 'time', 'timerange', 'week', 'month', 'monthrange', 'year'];\nconst CHILDREN_LIST = ['table', 'dynamic'];\nconst INPUT_LIST = ['tree', 'number', 'icon', 'color', 'table', 'map'];\nconst ARRAY_LIST = ['img', 'array', 'url'];\nconst MULTIPLE_LIST = ['cascader', 'tree', 'select', 'table'];\nconst RANGE_LIST = ['slider'];\nconst ARRAY_VALUE_LIST = ARRAY_LIST.concat(['upload', 'dynamic', 'map', 'checkbox', 'cascader', 'timerange', 'monthrange', 'daterange', 'datetimerange', 'dates']);\nconst SELECT_LIST = DATE_LIST.concat(['select', 'checkbox', 'radio', 'cascader', 'tree', 'color', 'icon', 'map']);\nconst DIC_SHOW_SPLIT = ' | ';\nconst DIC_SPLIT = ',';\nconst typeList = {\n img: /\\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,\n video: /\\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,\n audio: /\\.(mp3|wav|MP3|WAV)/\n};\n\n//# sourceURL=webpack://AVUE/./src/global/variable.js?");
|
5066
5066
|
|
5067
5067
|
/***/ }),
|
5068
5068
|
|
@@ -5074,7 +5074,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5074
5074
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5075
5075
|
|
5076
5076
|
"use strict";
|
5077
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ui_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/index */ \"./src/ui/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version */ \"./src/version.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var utils_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate.js */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! packages/core/directive/dialog-drag */ \"./packages/core/directive/dialog-drag.js\");\n/* harmony import */ var packages_core_directive_contextmenu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! packages/core/directive/contextmenu */ \"./packages/core/directive/contextmenu.js\");\n/* harmony import */ var plugin_export___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/export/ */ \"./src/plugin/export/index.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n/* harmony import */ var _locale___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./locale/ */ \"./src/locale/index.js\");\n/* harmony import */ var plugin_screenshot___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! plugin/screenshot/ */ \"./src/plugin/screenshot/index.js\");\n/* harmony import */ var plugin_clipboard___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! plugin/clipboard/ */ \"./src/plugin/clipboard/index.js\");\n/* harmony import */ var plugin_print___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! plugin/print/ */ \"./src/plugin/print/index.js\");\n/* harmony import */ var plugin_nprogress___WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! plugin/nprogress/ */ \"./src/plugin/nprogress/index.js\");\n/* harmony import */ var packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! packages/core/components/image-preview/ */ \"./packages/core/components/image-preview/index.js\");\n/* harmony import */ var packages_core_components_image_cropper___WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! packages/core/components/image-cropper/ */ \"./packages/core/components/image-cropper/index.js\");\n/* harmony import */ var packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! packages/core/components/dialog-form/ */ \"./packages/core/components/dialog-form/index.js\");\
|
5077
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ui_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/index */ \"./src/ui/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version */ \"./src/version.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var utils_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate.js */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! packages/core/directive/dialog-drag */ \"./packages/core/directive/dialog-drag.js\");\n/* harmony import */ var packages_core_directive_contextmenu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! packages/core/directive/contextmenu */ \"./packages/core/directive/contextmenu.js\");\n/* harmony import */ var plugin_export___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/export/ */ \"./src/plugin/export/index.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n/* harmony import */ var _locale___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./locale/ */ \"./src/locale/index.js\");\n/* harmony import */ var plugin_screenshot___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! plugin/screenshot/ */ \"./src/plugin/screenshot/index.js\");\n/* harmony import */ var plugin_clipboard___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! plugin/clipboard/ */ \"./src/plugin/clipboard/index.js\");\n/* harmony import */ var plugin_print___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! plugin/print/ */ \"./src/plugin/print/index.js\");\n/* harmony import */ var plugin_nprogress___WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! plugin/nprogress/ */ \"./src/plugin/nprogress/index.js\");\n/* harmony import */ var packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! packages/core/components/image-preview/ */ \"./packages/core/components/image-preview/index.js\");\n/* harmony import */ var packages_core_components_image_cropper___WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! packages/core/components/image-cropper/ */ \"./packages/core/components/image-cropper/index.js\");\n/* harmony import */ var packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! packages/core/components/dialog-form/ */ \"./packages/core/components/dialog-form/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet prototypes = {\n $ImagePreview: packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n $ImageCropper: packages_core_components_image_cropper___WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n $DialogForm: packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n $Export: plugin_export___WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n $Print: plugin_print___WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n $Clipboard: plugin_clipboard___WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n $Log: plugin_logs___WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n $NProgress: plugin_nprogress___WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n $Screenshot: plugin_screenshot___WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n deepClone: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"deepClone\"],\n dataURLtoFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"dataURLtoFile\"],\n isJson: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isJson\"],\n setPx: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"setPx\"],\n vaildData: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"vaildData\"],\n findArray: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findArray\"],\n findNode: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findNode\"],\n validatenull: utils_validate_js__WEBPACK_IMPORTED_MODULE_3__[\"validatenull\"],\n downFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"downFile\"],\n loadScript: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"loadScript\"],\n watermark: plugin_canvas___WEBPACK_IMPORTED_MODULE_8__[\"watermark\"],\n findObject: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findObject\"],\n randomId: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"randomId\"]\n};\nlet directive = {\n dialogDrag: packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n contextmenu: packages_core_directive_contextmenu__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n};\nconst install = function (Vue, opts = {}) {\n if (opts.theme === 'dark') document.documentElement.className = 'avue-theme--dark';\n const defaultOption = {\n size: opts.size || 'small',\n calcHeight: opts.calcHeight || 0,\n menuType: opts.menuType || 'text',\n modalAppendToBody: Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"vaildData\"])(opts.modalAppendToBody, true),\n appendToBody: Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"vaildData\"])(opts.appendToBody, true),\n canvas: Object.assign({\n text: 'avuejs.com',\n fontFamily: 'microsoft yahei',\n color: '#999',\n fontSize: 16,\n opacity: 100,\n bottom: 10,\n right: 10,\n ratio: 1\n }, opts.canvas),\n qiniu: Object.assign({\n AK: '',\n SK: '',\n scope: '',\n url: '',\n bucket: 'https://upload.qiniup.com',\n deadline: 1\n }, opts.qiniu || {}),\n ali: Object.assign({\n region: '',\n endpoint: '',\n stsToken: '',\n accessKeyId: '',\n accessKeySecret: '',\n bucket: ''\n }, opts.ali || {})\n };\n Vue.prototype.$AVUE = Object.assign(opts, defaultOption);\n Object.keys(_ui_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"]).forEach(ele => {\n const component = _ui_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"][ele];\n Vue.component(component.name, component);\n });\n Object.keys(prototypes).forEach(key => {\n Vue.prototype[key] = prototypes[key];\n });\n Object.keys(directive).forEach(key => {\n Vue.directive(key, directive[key]);\n });\n _locale___WEBPACK_IMPORTED_MODULE_10__[\"default\"].use(opts.locale);\n _locale___WEBPACK_IMPORTED_MODULE_10__[\"default\"].i18n(opts.i18n);\n Vue.prototype.$axios = opts.axios || window.axios || axios__WEBPACK_IMPORTED_MODULE_2___default.a;\n window.axios = Vue.prototype.$axios;\n window.Vue = Vue;\n Vue.prototype.$uploadFun = function (column = {}, safe) {\n safe = safe || this;\n let list = ['uploadPreview', 'uploadBefore', 'uploadAfter', 'uploadDelete', 'uploadError', 'uploadExceed'];\n let result = {};\n if (column.type === 'upload') {\n list.forEach(ele => {\n if (!column[ele]) {\n result[ele] = safe[ele];\n }\n });\n } else {\n list.forEach(ele => {\n result[ele] = safe[ele];\n });\n }\n return result;\n };\n};\nif (typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n ...{\n version: _version__WEBPACK_IMPORTED_MODULE_1__[\"version\"],\n locale: _locale___WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n install\n },\n ..._ui_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n});\n\n//# sourceURL=webpack://AVUE/./src/index.js?");
|
5078
5078
|
|
5079
5079
|
/***/ }),
|
5080
5080
|
|
@@ -5086,7 +5086,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ui_
|
|
5086
5086
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5087
5087
|
|
5088
5088
|
"use strict";
|
5089
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasOwn\", function() { return hasOwn; });\
|
5089
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasOwn\", function() { return hasOwn; });\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n;\nconst RE_NARGS = /(%|)\\{([0-9a-zA-Z_]+)\\}/g;\n/**\n * String format template\n * - Inspired:\n * https://github.com/Matt-Esch/string-template/index.js\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (Vue) {\n /**\n * template\n *\n * @param {String} string\n * @param {Array} ...args\n * @return {String}\n */\n\n function template(string = '', ...args) {\n if (args.length === 1 && typeof args[0] === 'object') {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return string.replace(RE_NARGS, (match, prefix, i, index) => {\n let result;\n if (string[index - 1] === '{' && string[index + match.length] === '}') {\n return i;\n } else {\n result = hasOwn(args, i) ? args[i] : null;\n if (result === null || result === undefined) {\n return '';\n }\n return result;\n }\n });\n }\n return template;\n});\n\n//# sourceURL=webpack://AVUE/./src/locale/format.js?");
|
5090
5090
|
|
5091
5091
|
/***/ }),
|
5092
5092
|
|
@@ -5098,7 +5098,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5098
5098
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5099
5099
|
|
5100
5100
|
"use strict";
|
5101
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return t; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"use\", function() { return use; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i18n\", function() { return i18n; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./format */ \"./src/locale/format.js\");\n/* harmony import */ var _lang_zh__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lang/zh */ \"./src/locale/lang/zh.js\");\n\n\n\
|
5101
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return t; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"use\", function() { return use; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i18n\", function() { return i18n; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./format */ \"./src/locale/format.js\");\n/* harmony import */ var _lang_zh__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lang/zh */ \"./src/locale/lang/zh.js\");\n\n\n\nconst format = Object(_format__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(vue__WEBPACK_IMPORTED_MODULE_0___default.a);\nlet lang = _lang_zh__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\nlet merged = false;\nlet i18nHandler = function () {\n const vuei18n = Object.getPrototypeOf(this || vue__WEBPACK_IMPORTED_MODULE_0___default.a || {}).$t;\n if (typeof vuei18n === 'function' && !!vue__WEBPACK_IMPORTED_MODULE_0___default.a.locale) {\n if (!merged) {\n merged = true;\n vue__WEBPACK_IMPORTED_MODULE_0___default.a.locale(vue__WEBPACK_IMPORTED_MODULE_0___default.a.config.lang, Object.assign(lang, vue__WEBPACK_IMPORTED_MODULE_0___default.a.locale(vue__WEBPACK_IMPORTED_MODULE_0___default.a.config.lang) || {}, {\n clone: true\n }));\n }\n return vuei18n.apply(this, arguments);\n }\n};\nconst t = function (path, options) {\n let value = i18nHandler.apply(this, arguments);\n if (value !== null && value !== undefined) return value;\n const array = path.split('.');\n let current = lang;\n for (let i = 0, j = array.length; i < j; i++) {\n const property = array[i];\n value = current[property];\n if (i === j - 1) return format(value, options);\n if (!value) return '';\n current = value;\n }\n return '';\n};\nconst use = function (l) {\n lang = l || lang;\n};\nconst i18n = function (fn) {\n i18nHandler = fn || i18nHandler;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n use,\n t,\n i18n\n});\n\n//# sourceURL=webpack://AVUE/./src/locale/index.js?");
|
5102
5102
|
|
5103
5103
|
/***/ }),
|
5104
5104
|
|
@@ -5110,7 +5110,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5110
5110
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5111
5111
|
|
5112
5112
|
"use strict";
|
5113
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n common: {\n submitBtn: '确 定',\n cancelBtn: '取 消',\n condition: '条件',\n display: '显示',\n hide: '隐藏'\n },\n tip: {\n select: '请选择',\n input: '请输入'\n },\n check: {\n checkAll: '全选'\n },\n upload: {\n upload: '点击上传',\n tip: '将文件拖到此处,或'\n },\n time: {\n start: '开始',\n end: '结束'\n },\n date: {\n start: '开始',\n end: '结束',\n t: '今日',\n y: '昨日',\n n: '近7天',\n a: '全部'\n },\n form: {\n printBtn: '打 印',\n mockBtn: '模 拟',\n submitBtn: '提 交',\n emptyBtn: '清 空'\n },\n crud: {\n excel: {\n name: '文件名',\n type: '数据',\n typeDic: {\n
|
5113
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n common: {\n submitBtn: '确 定',\n cancelBtn: '取 消',\n condition: '条件',\n display: '显示',\n hide: '隐藏'\n },\n tip: {\n select: '请选择',\n input: '请输入'\n },\n check: {\n checkAll: '全选'\n },\n upload: {\n upload: '点击上传',\n tip: '将文件拖到此处,或'\n },\n time: {\n start: '开始',\n end: '结束'\n },\n date: {\n start: '开始',\n end: '结束',\n t: '今日',\n y: '昨日',\n n: '近7天',\n a: '全部'\n },\n form: {\n printBtn: '打 印',\n mockBtn: '模 拟',\n submitBtn: '提 交',\n emptyBtn: '清 空'\n },\n crud: {\n excel: {\n name: '文件名',\n type: '数据',\n typeDic: {\n true: '当前数据(当前页全部的数据)',\n false: '选中的数据(当前页选中的数据)'\n },\n prop: '字段',\n params: '参数',\n paramsDic: {\n header: '表头',\n data: '数据源',\n headers: '复杂表头',\n sum: '合计统计'\n }\n },\n filter: {\n addBtn: '新增条件',\n clearBtn: '清空数据',\n resetBtn: '清空条件',\n cancelBtn: '取 消',\n submitBtn: '确 定'\n },\n column: {\n name: '列名',\n hide: '隐藏',\n fixed: '冻结',\n filters: '过滤',\n sortable: '排序',\n index: '顺序',\n width: '宽度'\n },\n emptyText: '暂无数据',\n tipStartTitle: '当前表格已选择',\n tipEndTitle: '项',\n editTitle: '编 辑',\n copyTitle: '复 制',\n addTitle: '新 增',\n viewTitle: '查 看',\n filterTitle: '过滤条件',\n showTitle: '列显隐',\n menu: '操作',\n addBtn: '新 增',\n show: '显 示',\n hide: '隐 藏',\n open: '展 开',\n shrink: '收 缩',\n printBtn: '打 印',\n excelBtn: '导 出',\n updateBtn: '修 改',\n cancelBtn: '取 消',\n searchBtn: '搜 索',\n emptyBtn: '清 空',\n menuBtn: '功 能',\n saveBtn: '保 存',\n viewBtn: '查 看',\n editBtn: '编 辑',\n copyBtn: '复 制',\n delBtn: '删 除'\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/locale/lang/zh.js?");
|
5114
5114
|
|
5115
5115
|
/***/ }),
|
5116
5116
|
|
@@ -5122,7 +5122,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
5122
5122
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5123
5123
|
|
5124
5124
|
"use strict";
|
5125
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClient\", function() { return getClient; });\
|
5125
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getClient\", function() { return getClient; });\nconst getClient = params => {\n //oss 基本配置\n var client = new OSS(params);\n return client;\n};\n\n//# sourceURL=webpack://AVUE/./src/plugin/ali/index.js?");
|
5126
5126
|
|
5127
5127
|
/***/ }),
|
5128
5128
|
|
@@ -5134,7 +5134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5134
5134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5135
5135
|
|
5136
5136
|
"use strict";
|
5137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"watermark\", function() { return watermark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fileToBase64\", function() { return fileToBase64; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detailImg\", function() { return detailImg; });\n/* harmony import */ var _watermark__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./watermark */ \"./src/plugin/canvas/watermark.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n// 标准参数\nvar canvas,\n ctx,\n configDefault = {\n width: 200,\n height: 200\n };\
|
5137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"watermark\", function() { return watermark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fileToBase64\", function() { return fileToBase64; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detailImg\", function() { return detailImg; });\n/* harmony import */ var _watermark__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./watermark */ \"./src/plugin/canvas/watermark.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n// 标准参数\nvar canvas,\n ctx,\n configDefault = {\n width: 200,\n height: 200\n };\nlet config = {\n text: 'avueJS',\n // 文字\n fontFamily: 'microsoft yahei',\n // 字体\n color: '#999',\n // 颜色\n fontSize: 16,\n // 大小\n opacity: 100,\n // 透明度\n bottom: 10,\n // 下边位置\n right: 10,\n // 右边位置\n ratio: 1 // 压缩比\n};\n\n/**\n * 参数 {Object} opt\n * @param {String} text 水印文本,默认'avue商用通用无敌大水印'\n * @param {String} font 水印字体,默认'30px 黑体'\n * @param {Int} canvasWidth 单个水印容器宽度,默认500\n * @param {Int} canvasHeight 单个水印容器高度,默认200\n * @param {String} textAlign 水印文本对齐方式,默认'center'\n * @param {String} textStyle 水印文本样式,默认'rgba(100,100,100,0.15)'\n * @param {Int} degree 水印文本旋转角度,默认 -20\n * @param return\n **/\nconst watermark = function (opt = {}) {\n return new _watermark__WEBPACK_IMPORTED_MODULE_0__[\"default\"](opt);\n};\n\n// file转base64\nfunction fileToBase64(file, callback) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = function (e) {\n callback(e.target.result);\n };\n}\n\n// 图片加水印\nfunction detailImg(file, option = {}, callback) {\n const {\n text,\n fontFamily,\n color,\n fontSize,\n opacity,\n bottom,\n right,\n ratio\n } = option;\n initParams();\n fileToBase64(file, initImg);\n // 参数初始化\n function initParams() {\n config.text = text || config.text;\n config.fontFamily = fontFamily || config.fontFamily;\n config.color = color || config.color;\n config.fontSize = fontSize || config.fontSize;\n config.opacity = opacity || config.opacity;\n config.bottom = bottom || config.bottom;\n config.right = right || config.right;\n config.ratio = ratio || config.ratio;\n }\n // 加载图片\n function initImg(data) {\n var img = new Image();\n img.src = data;\n img.onload = function () {\n var width = img.width;\n var height = img.height;\n cretedCanvas(width, height);\n ctx.drawImage(img, 0, 0, width, height);\n setText(width, height);\n const base64 = document.getElementById('canvas').toDataURL(file.type, config.ratio);\n const result = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"dataURLtoFile\"])(base64, file.name);\n callback && callback(result);\n };\n }\n // 创建画板\n function cretedCanvas(width, height) {\n canvas = document.getElementById('canvas');\n if (canvas === null) {\n canvas = document.createElement('canvas');\n canvas.id = 'canvas';\n canvas.className = 'avue-canvas';\n document.body.appendChild(canvas);\n }\n ctx = canvas.getContext('2d');\n canvas.width = width;\n canvas.height = height;\n }\n // 添加水印\n function setText(width, height) {\n var txt = config.text;\n var param = calcParam(txt, width, height);\n ctx.font = param.fontSize + 'px ' + config.fontFamily;\n ctx.fillStyle = config.color;\n ctx.globalAlpha = config.opacity / 100;\n ctx.fillText(txt, param.x, param.y);\n }\n // 计算比例\n function calcParam(txt, width, height) {\n var x, y;\n\n // 字体的比例\n var calcFontSize = config.fontSize / configDefault.width;\n var fontSize = calcFontSize * width;\n if (config.bottom) {\n y = configDefault.height - config.bottom;\n } else {\n y = config.top;\n }\n if (config.right) {\n x = configDefault.width - config.right;\n } else {\n x = config.left;\n }\n ctx.font = config.fontSize + 'px ' + config.fontFamily;\n var txtWidth = Number(ctx.measureText(txt).width);\n x = x - txtWidth;\n var calcPosX = x / configDefault.width;\n var calcPosY = y / configDefault.height;\n x = calcPosX * width;\n y = calcPosY * height;\n return {\n x: x,\n y: y,\n fontSize: fontSize\n };\n }\n}\n\n//# sourceURL=webpack://AVUE/./src/plugin/canvas/index.js?");
|
5138
5138
|
|
5139
5139
|
/***/ }),
|
5140
5140
|
|
@@ -5146,7 +5146,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5146
5146
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5147
5147
|
|
5148
5148
|
"use strict";
|
5149
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\
|
5149
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n// const CONTAINERID = '_avue_markcontainer';\n\n\nclass waterMark {\n constructor(opt = {}) {\n this.CONTAINERID = Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"randomId\"])();\n this.drawCanvas = this.drawCanvas.bind(this);\n this.parentObserver = this.parentObserver.bind(this);\n this.Repaint = this.Repaint.bind(this);\n this.isOberserve = false;\n this.init(opt);\n this.drawCanvas();\n this.parentObserver();\n }\n init(opt) {\n this.option = Object.assign({\n width: 400,\n height: 200,\n text: 'avueJS',\n fontSize: '30px',\n fontStyle: '黑体',\n textAlign: 'center',\n color: 'rgba(100,100,100,0.15)',\n degree: -20\n }, opt);\n }\n drawCanvas() {\n this.isOberserve = true;\n let divContainer = document.createElement('div');\n let canvas = document.createElement('canvas');\n let context = canvas.getContext('2d');\n divContainer.id = this.CONTAINERID;\n canvas.width = this.option.width;\n canvas.height = this.option.height;\n context.font = `${this.option.fontSize} ${this.option.fontStyle}`;\n context.textAlign = this.option.textAlign;\n context.fillStyle = this.option.color;\n context.translate(canvas.width / 2, canvas.height / 2);\n context.rotate(this.option.degree * Math.PI / 180);\n context.fillText(this.option.text, 0, 0);\n let backgroundUrl = canvas.toDataURL('image/png');\n let flag = this.option.id,\n el;\n if (flag) el = document.getElementById(flag);\n this.styleStr = `\n position:${flag ? 'absolute' : 'fixed'};\n top:0;\n left:0;\n width:${flag ? el.offsetWidth + 'px' : '100%'};\n height:${flag ? el.offsetHeight + 'px' : '100%'};\n z-index:9999;\n pointer-events:none;\n background-repeat:repeat;\n background-image:url('${backgroundUrl}')`;\n divContainer.setAttribute('style', this.styleStr);\n if (flag) {\n let el = document.getElementById(flag);\n el.appendChild(divContainer);\n } else {\n document.body.appendChild(divContainer);\n }\n this.wmObserver(divContainer);\n this.isOberserve = false;\n }\n wmObserver(divContainer) {\n let wmConf = {\n attributes: true,\n childList: true,\n characterData: true\n };\n let wmObserver = new MutationObserver(mo => {\n if (!this.isOberserve) {\n let _obj = mo[0].target;\n _obj.setAttribute('style', this.styleStr);\n _obj.setAttribute('id', this.CONTAINERID);\n wmObserver.takeRecords();\n }\n });\n wmObserver.observe(divContainer, wmConf);\n }\n parentObserver() {\n let bodyObserver = new MutationObserver(() => {\n if (!this.isOberserve) {\n let __wm = document.querySelector(`#${this.CONTAINERID}`);\n if (!__wm) {\n this.drawCanvas();\n } else if (__wm.getAttribute('style') !== this.styleStr) {\n __wm.setAttribute('style', this.styleStr);\n }\n }\n });\n bodyObserver.observe(document.querySelector(`#${this.CONTAINERID}`).parentNode, {\n childList: true\n });\n }\n Repaint(opt = {}) {\n this.remove();\n this.init(opt);\n this.drawCanvas();\n }\n remove() {\n this.isOberserve = true;\n let _wm = document.querySelector(`#${this.CONTAINERID}`);\n _wm.parentNode.removeChild(_wm);\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (waterMark);\n\n//# sourceURL=webpack://AVUE/./src/plugin/canvas/watermark.js?");
|
5150
5150
|
|
5151
5151
|
/***/ }),
|
5152
5152
|
|
@@ -5158,7 +5158,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var util
|
|
5158
5158
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5159
5159
|
|
5160
5160
|
"use strict";
|
5161
|
-
eval("__webpack_require__.r(__webpack_exports__);\nfunction select(element) {\n
|
5161
|
+
eval("__webpack_require__.r(__webpack_exports__);\nfunction select(element) {\n let selectedText;\n if (element.nodeName === 'SELECT') {\n element.focus();\n selectedText = element.value;\n } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n let isReadOnly = element.hasAttribute('readonly');\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n element.select();\n element.setSelectionRange(0, element.value.length);\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n selectedText = element.value;\n } else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n let selection = window.getSelection();\n let range = document.createRange();\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n selectedText = selection.toString();\n }\n return selectedText;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (function ({\n text\n}) {\n return new Promise((resolve, reject) => {\n const container = document.body;\n const isRTL = document.documentElement.getAttribute('dir') == 'rtl';\n const fakeElem = document.createElement('textarea');\n fakeElem.style.fontSize = '12pt';\n fakeElem.style.border = '0';\n fakeElem.style.padding = '0';\n fakeElem.style.margin = '0';\n fakeElem.style.position = 'absolute';\n fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';\n let yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElem.style.top = `${yPosition}px`;\n fakeElem.setAttribute('readonly', '');\n fakeElem.value = text;\n container.appendChild(fakeElem);\n select(fakeElem);\n let succeeded;\n try {\n succeeded = document.execCommand('copy');\n resolve();\n } catch (err) {\n succeeded = false;\n reject();\n }\n });\n});\n\n//# sourceURL=webpack://AVUE/./src/plugin/clipboard/index.js?");
|
5162
5162
|
|
5163
5163
|
/***/ }),
|
5164
5164
|
|
@@ -5170,7 +5170,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nfunction select(element) {\n
|
|
5170
5170
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5171
5171
|
|
5172
5172
|
"use strict";
|
5173
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/* eslint-disable */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n buildHeader: function buildHeader(revealList) {\n var _this = this;\n var excelHeader = [];\n // 构建生成excel表头需要的数据结构\n this.getHeader(revealList, excelHeader, 0, 0);\n // 多行表头长短不一,短的向长的看齐,不够的补上行合并占位符\n var max = Math.max.apply(Math, _toConsumableArray(excelHeader.map(function (a) {\n return a.length;\n })));\n excelHeader.filter(function (e) {\n return e.length < max;\n }).forEach(function (e) {\n return _this.pushRowSpanPlaceHolder(e, max - e.length);\n });\n return excelHeader;\n },\n /**\n * 生成头部 \n * @param headers 展示的头部\n * @param excelHeader excel头部\n * @param deep 深度\n * @param perOffset 前置偏移量\n * @returns {number} 后置偏移量\n */\n getHeader: function getHeader(headers, excelHeader, deep, perOffset) {\n var offset = 0;\n var cur = excelHeader[deep];\n if (!cur) {\n cur = excelHeader[deep] = [];\n }\n // 填充行合并占位符\n this.pushRowSpanPlaceHolder(cur, perOffset - cur.length);\n for (var i = 0; i < headers.length; i++) {\n var head = headers[i];\n cur.push(head.label);\n if (head.hasOwnProperty('children') && Array.isArray(head.children) && head.children.length > 0) {\n var childOffset = this.getHeader(head.children, excelHeader, deep + 1, cur.length - 1);\n // 填充列合并占位符\n this.pushColSpanPlaceHolder(cur, childOffset - 1);\n offset += childOffset;\n } else {\n offset++;\n }\n }\n return offset;\n },\n /**\n * 填充行合并占位符\n * */\n pushRowSpanPlaceHolder: function pushRowSpanPlaceHolder(arr, count) {\n for (var i = 0; i < count; i++) {\n arr.push('!$ROW_SPAN_PLACEHOLDER');\n }\n },\n // 填充列合并占位符\n pushColSpanPlaceHolder: function pushColSpanPlaceHolder(arr, count) {\n for (var i = 0; i < count; i++) {\n arr.push('!$COL_SPAN_PLACEHOLDER');\n }\n },\n doMerges: function doMerges(arr) {\n // 要么横向合并 要么纵向合并\n var deep = arr.length;\n var merges = [];\n for (var y = 0; y < deep; y++) {\n // 先处理横向合并\n var row = arr[y];\n var colSpan = 0;\n for (var x = 0; x < row.length; x++) {\n if (row[x] === '!$COL_SPAN_PLACEHOLDER') {\n row[x] = undefined;\n if (x + 1 === row.length) {\n merges.push({\n s: {\n r: y,\n c: x - colSpan - 1\n },\n e: {\n r: y,\n c: x\n }\n });\n }\n colSpan++;\n } else if (colSpan > 0 && x > colSpan) {\n merges.push({\n s: {\n r: y,\n c: x - colSpan - 1\n },\n e: {\n r: y,\n c: x - 1\n }\n });\n colSpan = 0;\n } else {\n colSpan = 0;\n }\n }\n }\n // 再处理纵向合并\n var colLength = arr[0].length;\n for (var _x = 0; _x < colLength; _x++) {\n var rowSpan = 0;\n for (var _y = 0; _y < deep; _y++) {\n if (arr[_y][_x] === '!$ROW_SPAN_PLACEHOLDER') {\n arr[_y][_x] = undefined;\n if (_y + 1 === deep) {\n merges.push({\n s: {\n r: _y - rowSpan,\n c: _x\n },\n e: {\n r: _y,\n c: _x\n }\n });\n }\n rowSpan++;\n } else if (rowSpan > 0 && _y > rowSpan) {\n merges.push({\n s: {\n r: _y - rowSpan - 1,\n c: _x\n },\n e: {\n r: _y - 1,\n c: _x\n }\n });\n rowSpan = 0;\n } else {\n rowSpan = 0;\n }\n }\n }\n return merges;\n },\n /**\n * 从github复制过来的\n */\n aoa_to_sheet: function aoa_to_sheet(data, headerRows) {\n var ws = {};\n var range = {\n s: {\n c: 10000000,\n r: 10000000\n },\n e: {\n c: 0,\n r: 0\n }\n };\n for (var R = 0; R !== data.length; ++R) {\n for (var C = 0; C !== data[R].length; ++C) {\n if (range.s.r > R) {\n range.s.r = R;\n }\n if (range.s.c > C) {\n range.s.c = C;\n }\n if (range.e.r < R) {\n range.e.r = R;\n }\n if (range.e.c < C) {\n range.e.c = C;\n }\n /// 这里生成cell的时候,使用上面定义的默认样式\n var cell = {\n v: Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"vaildData\"])(data[R][C], ''),\n s: {\n font: {\n name: \"宋体\",\n sz: 11,\n color: {\n auto: 1,\n rgb: '000000'\n },\n bold: true\n },\n alignment: {\n /// 自动换行\n wrapText: 1,\n // 居中\n horizontal: \"center\",\n vertical: \"center\",\n indent: 0\n }\n }\n };\n // 头部列表加边框\n if (R < headerRows) {\n cell.s.border = {\n top: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n left: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n bottom: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n right: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n }\n };\n cell.s.fill = {\n patternType: 'solid',\n fgColor: {\n theme: 3,\n \"tint\": 0.3999755851924192,\n rgb: 'F5F7FA'\n },\n bgColor: {\n theme: 7,\n \"tint\": 0.3999755851924192,\n rgb: 'F5F7FA'\n }\n };\n }\n var cell_ref = XLSX.utils.encode_cell({\n c: C,\n r: R\n });\n if (typeof cell.v === 'number') {\n cell.t = 'n';\n } else if (typeof cell.v === 'boolean') {\n cell.t = 'b';\n } else {\n cell.t = 's';\n }\n ws[cell_ref] = cell;\n }\n }\n if (range.s.c < 10000000) {\n ws['!ref'] = XLSX.utils.encode_range(range);\n }\n return ws;\n },\n s2ab: function s2ab(s) {\n var buf = new ArrayBuffer(s.length);\n var view = new Uint8Array(buf);\n for (var i = 0; i !== s.length; ++i) {\n view[i] = s.charCodeAt(i) & 0xFF;\n }\n return buf;\n },\n // 导出 excel\n excel: function excel(params) {\n var _this2 = this;\n if (!window.XLSX) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"xlsx\");\n return;\n }\n return new Promise(function (resolve, reject) {\n var _params$header;\n // 合并参数\n var _params = {\n prop: []\n };\n\n // 从参数中派生数据\n _params.header = _this2.buildHeader(params.columns);\n _params.title = params.title || dayjs__WEBPACK_IMPORTED_MODULE_2___default()().format('YYYY-MM-DD HH:mm:ss');\n var callback = function callback(list) {\n list.forEach(function (ele) {\n if (ele.children && ele.children instanceof Array) {\n callback(ele.children);\n } else {\n _params.prop.push(ele.prop);\n }\n });\n };\n callback(params.columns);\n _params.data = params.data.map(function (row) {\n return _params.prop.map(function (prop) {\n var data = row[prop];\n if (Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"isJson\"])(data)) data = JSON.stringify(data);\n return data;\n });\n });\n var headerRows = _params.header.length;\n (_params$header = _params.header).push.apply(_params$header, _toConsumableArray(_params.data).concat([[]]));\n // 计算合并\n var merges = _this2.doMerges(_params.header);\n // 生成sheet\n var ws = _this2.aoa_to_sheet(_params.header, headerRows);\n // 单元格合并\n ws['!merges'] = merges;\n // 头部冻结\n ws[\"!freeze\"] = {\n xSplit: \"1\",\n ySplit: \"\" + headerRows,\n topLeftCell: \"B\" + (headerRows + 1),\n activePane: \"bottomRight\",\n state: \"frozen\"\n };\n // 列宽\n ws['!cols'] = [{\n wpx: 165\n }];\n var workbook = {\n SheetNames: ['Sheet1'],\n Sheets: {}\n };\n workbook.Sheets.Sheet1 = ws;\n // excel样式\n var wopts = {\n bookType: 'xlsx',\n bookSST: false,\n type: 'binary',\n cellStyles: true\n };\n var wbout = XLSX.write(workbook, wopts);\n var blob = new Blob([_this2.s2ab(wbout)], {\n type: \"application/octet-stream\"\n });\n Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"downFile\"])(blob, _params.title + '.xlsx');\n resolve();\n });\n },\n // 导入 xlsx\n xlsx: function xlsx(file) {\n if (!window.saveAs || !window.XLSX) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"file-saver\");\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"xlsx\");\n return;\n }\n var xlsx = window.XLSX;\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n var fixdata = function fixdata(data) {\n var o = '';\n var l = 0;\n var w = 10240;\n for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));\n o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));\n return o;\n };\n var getHeaderRow = function getHeaderRow(sheet) {\n var headers = [];\n var range = xlsx.utils.decode_range(sheet['!ref']);\n var C;\n var R = range.s.r;\n for (C = range.s.c; C <= range.e.c; ++C) {\n var cell = sheet[xlsx.utils.encode_cell({\n c: C,\n r: R\n })];\n var hdr = 'UNKNOWN ' + C;\n if (cell && cell.t) hdr = xlsx.utils.format_cell(cell);\n headers.push(hdr);\n }\n return headers;\n };\n reader.onload = function (e) {\n var data = e.target.result;\n var fixedData = fixdata(data);\n var workbook = xlsx.read(btoa(fixedData), {\n type: 'base64'\n });\n var firstSheetName = workbook.SheetNames[0];\n var worksheet = workbook.Sheets[firstSheetName];\n var header = getHeaderRow(worksheet);\n var results = xlsx.utils.sheet_to_json(worksheet);\n resolve({\n header: header,\n results: results\n });\n };\n reader.readAsArrayBuffer(file);\n });\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/plugin/export/index.js?");
|
5173
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dayjs */ \"./node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__);\n/* eslint-disable */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n buildHeader(revealList) {\n let excelHeader = [];\n // 构建生成excel表头需要的数据结构\n this.getHeader(revealList, excelHeader, 0, 0);\n // 多行表头长短不一,短的向长的看齐,不够的补上行合并占位符\n let max = Math.max(...excelHeader.map(a => a.length));\n excelHeader.filter(e => e.length < max).forEach(e => this.pushRowSpanPlaceHolder(e, max - e.length));\n return excelHeader;\n },\n /**\n * 生成头部 \n * @param headers 展示的头部\n * @param excelHeader excel头部\n * @param deep 深度\n * @param perOffset 前置偏移量\n * @returns {number} 后置偏移量\n */\n getHeader(headers, excelHeader, deep, perOffset) {\n let offset = 0;\n let cur = excelHeader[deep];\n if (!cur) {\n cur = excelHeader[deep] = [];\n }\n // 填充行合并占位符\n this.pushRowSpanPlaceHolder(cur, perOffset - cur.length);\n for (let i = 0; i < headers.length; i++) {\n let head = headers[i];\n cur.push(head.label);\n if (head.hasOwnProperty('children') && Array.isArray(head.children) && head.children.length > 0) {\n let childOffset = this.getHeader(head.children, excelHeader, deep + 1, cur.length - 1);\n // 填充列合并占位符\n this.pushColSpanPlaceHolder(cur, childOffset - 1);\n offset += childOffset;\n } else {\n offset++;\n }\n }\n return offset;\n },\n /**\n * 填充行合并占位符\n * */\n pushRowSpanPlaceHolder(arr, count) {\n for (let i = 0; i < count; i++) {\n arr.push('!$ROW_SPAN_PLACEHOLDER');\n }\n },\n // 填充列合并占位符\n pushColSpanPlaceHolder(arr, count) {\n for (let i = 0; i < count; i++) {\n arr.push('!$COL_SPAN_PLACEHOLDER');\n }\n },\n doMerges(arr) {\n // 要么横向合并 要么纵向合并\n let deep = arr.length;\n let merges = [];\n for (let y = 0; y < deep; y++) {\n // 先处理横向合并\n let row = arr[y];\n let colSpan = 0;\n for (let x = 0; x < row.length; x++) {\n if (row[x] === '!$COL_SPAN_PLACEHOLDER') {\n row[x] = undefined;\n if (x + 1 === row.length) {\n merges.push({\n s: {\n r: y,\n c: x - colSpan - 1\n },\n e: {\n r: y,\n c: x\n }\n });\n }\n colSpan++;\n } else if (colSpan > 0 && x > colSpan) {\n merges.push({\n s: {\n r: y,\n c: x - colSpan - 1\n },\n e: {\n r: y,\n c: x - 1\n }\n });\n colSpan = 0;\n } else {\n colSpan = 0;\n }\n }\n }\n // 再处理纵向合并\n let colLength = arr[0].length;\n for (let x = 0; x < colLength; x++) {\n let rowSpan = 0;\n for (let y = 0; y < deep; y++) {\n if (arr[y][x] === '!$ROW_SPAN_PLACEHOLDER') {\n arr[y][x] = undefined;\n if (y + 1 === deep) {\n merges.push({\n s: {\n r: y - rowSpan,\n c: x\n },\n e: {\n r: y,\n c: x\n }\n });\n }\n rowSpan++;\n } else if (rowSpan > 0 && y > rowSpan) {\n merges.push({\n s: {\n r: y - rowSpan - 1,\n c: x\n },\n e: {\n r: y - 1,\n c: x\n }\n });\n rowSpan = 0;\n } else {\n rowSpan = 0;\n }\n }\n }\n return merges;\n },\n /**\n * 从github复制过来的\n */\n aoa_to_sheet(data, headerRows) {\n const ws = {};\n const range = {\n s: {\n c: 10000000,\n r: 10000000\n },\n e: {\n c: 0,\n r: 0\n }\n };\n for (let R = 0; R !== data.length; ++R) {\n for (let C = 0; C !== data[R].length; ++C) {\n if (range.s.r > R) {\n range.s.r = R;\n }\n if (range.s.c > C) {\n range.s.c = C;\n }\n if (range.e.r < R) {\n range.e.r = R;\n }\n if (range.e.c < C) {\n range.e.c = C;\n }\n /// 这里生成cell的时候,使用上面定义的默认样式\n const cell = {\n v: Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"vaildData\"])(data[R][C], ''),\n s: {\n font: {\n name: \"宋体\",\n sz: 11,\n color: {\n auto: 1,\n rgb: '000000'\n },\n bold: true\n },\n alignment: {\n /// 自动换行\n wrapText: 1,\n // 居中\n horizontal: \"center\",\n vertical: \"center\",\n indent: 0\n }\n }\n };\n // 头部列表加边框\n if (R < headerRows) {\n cell.s.border = {\n top: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n left: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n bottom: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n },\n right: {\n style: 'thin',\n color: {\n rgb: \"EBEEF5\"\n }\n }\n };\n cell.s.fill = {\n patternType: 'solid',\n fgColor: {\n theme: 3,\n \"tint\": 0.3999755851924192,\n rgb: 'F5F7FA'\n },\n bgColor: {\n theme: 7,\n \"tint\": 0.3999755851924192,\n rgb: 'F5F7FA'\n }\n };\n }\n const cell_ref = XLSX.utils.encode_cell({\n c: C,\n r: R\n });\n if (typeof cell.v === 'number') {\n cell.t = 'n';\n } else if (typeof cell.v === 'boolean') {\n cell.t = 'b';\n } else {\n cell.t = 's';\n }\n ws[cell_ref] = cell;\n }\n }\n if (range.s.c < 10000000) {\n ws['!ref'] = XLSX.utils.encode_range(range);\n }\n return ws;\n },\n s2ab(s) {\n let buf = new ArrayBuffer(s.length);\n let view = new Uint8Array(buf);\n for (let i = 0; i !== s.length; ++i) {\n view[i] = s.charCodeAt(i) & 0xFF;\n }\n return buf;\n },\n // 导出 excel\n excel(params) {\n if (!window.XLSX) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"xlsx\");\n return;\n }\n return new Promise((resolve, reject) => {\n // 合并参数\n const _params = {\n prop: []\n };\n\n // 从参数中派生数据\n _params.header = this.buildHeader(params.columns);\n _params.title = params.title || dayjs__WEBPACK_IMPORTED_MODULE_2___default()().format('YYYY-MM-DD HH:mm:ss');\n const callback = list => {\n list.forEach(ele => {\n if (ele.children && ele.children instanceof Array) {\n callback(ele.children);\n } else {\n _params.prop.push(ele.prop);\n }\n });\n };\n callback(params.columns);\n _params.data = params.data.map(row => _params.prop.map(prop => {\n let data = row[prop];\n if (Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"isJson\"])(data)) data = JSON.stringify(data);\n return data;\n }));\n let headerRows = _params.header.length;\n _params.header.push(..._params.data, []);\n // 计算合并\n let merges = this.doMerges(_params.header);\n // 生成sheet\n let ws = this.aoa_to_sheet(_params.header, headerRows);\n // 单元格合并\n ws['!merges'] = merges;\n // 头部冻结\n ws[\"!freeze\"] = {\n xSplit: \"1\",\n ySplit: \"\" + headerRows,\n topLeftCell: \"B\" + (headerRows + 1),\n activePane: \"bottomRight\",\n state: \"frozen\"\n };\n // 列宽\n ws['!cols'] = [{\n wpx: 165\n }];\n let workbook = {\n SheetNames: ['Sheet1'],\n Sheets: {}\n };\n workbook.Sheets.Sheet1 = ws;\n // excel样式\n let wopts = {\n bookType: 'xlsx',\n bookSST: false,\n type: 'binary',\n cellStyles: true\n };\n let wbout = XLSX.write(workbook, wopts);\n let blob = new Blob([this.s2ab(wbout)], {\n type: \"application/octet-stream\"\n });\n Object(utils_util__WEBPACK_IMPORTED_MODULE_0__[\"downFile\"])(blob, _params.title + '.xlsx');\n resolve();\n });\n },\n // 导入 xlsx\n xlsx(file) {\n if (!window.saveAs || !window.XLSX) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"file-saver\");\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"xlsx\");\n return;\n }\n const xlsx = window.XLSX;\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const fixdata = data => {\n let o = '';\n let l = 0;\n const w = 10240;\n for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));\n o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));\n return o;\n };\n const getHeaderRow = sheet => {\n const headers = [];\n const range = xlsx.utils.decode_range(sheet['!ref']);\n let C;\n const R = range.s.r;\n for (C = range.s.c; C <= range.e.c; ++C) {\n var cell = sheet[xlsx.utils.encode_cell({\n c: C,\n r: R\n })];\n var hdr = 'UNKNOWN ' + C;\n if (cell && cell.t) hdr = xlsx.utils.format_cell(cell);\n headers.push(hdr);\n }\n return headers;\n };\n reader.onload = e => {\n const data = e.target.result;\n const fixedData = fixdata(data);\n const workbook = xlsx.read(btoa(fixedData), {\n type: 'base64'\n });\n const firstSheetName = workbook.SheetNames[0];\n const worksheet = workbook.Sheets[firstSheetName];\n const header = getHeaderRow(worksheet);\n const results = xlsx.utils.sheet_to_json(worksheet);\n resolve({\n header,\n results\n });\n };\n reader.readAsArrayBuffer(file);\n });\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/plugin/export/index.js?");
|
5174
5174
|
|
5175
5175
|
/***/ }),
|
5176
5176
|
|
@@ -5182,7 +5182,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var util
|
|
5182
5182
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5183
5183
|
|
5184
5184
|
"use strict";
|
5185
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Keyboard; });\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar Keyboard = /*#__PURE__*/function () {\n function Keyboard(obj) {\n _classCallCheck(this, Keyboard);\n if (_typeof(obj) !== 'object') {\n console.error('aKeyboard: The obj parameter needs to be an object <In \"new aKeyboard()\">');\n return;\n }\n this.obj = obj;\n var el = document.querySelector(obj.el);\n var keyboardStyle = '';\n if (_typeof(obj.style) === 'object') {\n for (var i in obj.style) {\n keyboardStyle += i + ': ' + obj.style[i] + ';';\n }\n }\n var html = '<div class=\"akeyboard-keyboard' + (obj.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '\" style=\"' + keyboardStyle + '\">';\n\n // init keys\n var numberKeys = [];\n for (var _i = 1; _i < 10; _i++) {\n numberKeys.push(_i.toString());\n }\n numberKeys.push('0');\n var keys = obj.keys || [['`'].concat(numberKeys).concat(['-', '=', 'Delete']), ['Tab', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\\\'], ['Caps', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\\'', 'Enter'], ['Shift', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', 'Shift'], ['Space']];\n var thisKeys;\n var shiftKey = [],\n capsKey = [];\n for (var _i2 = 0; _i2 < keys.length; _i2++) {\n shiftKey.push([]);\n capsKey.push([]);\n thisKeys = keys[_i2];\n for (var a = 0; a < thisKeys.length; a++) {\n if (thisKeys[a].length === 1) {\n capsKey[_i2].push(thisKeys[a].toUpperCase());\n switch (thisKeys[a]) {\n case '`':\n shiftKey[_i2].push('~');\n continue;\n case '1':\n shiftKey[_i2].push('!');\n continue;\n case '2':\n shiftKey[_i2].push('@');\n continue;\n case '3':\n shiftKey[_i2].push('#');\n continue;\n case '4':\n shiftKey[_i2].push('$');\n continue;\n case '5':\n shiftKey[_i2].push('%');\n continue;\n case '6':\n shiftKey[_i2].push('^');\n continue;\n case '7':\n shiftKey[_i2].push('&');\n continue;\n case '8':\n shiftKey[_i2].push('*');\n continue;\n case '9':\n shiftKey[_i2].push('(');\n continue;\n case '0':\n shiftKey[_i2].push(')');\n continue;\n case '-':\n shiftKey[_i2].push('_');\n continue;\n case '=':\n shiftKey[_i2].push('+');\n continue;\n case '[':\n shiftKey[_i2].push('{');\n continue;\n case ']':\n shiftKey[_i2].push('}');\n continue;\n case '\\\\':\n shiftKey[_i2].push('|');\n continue;\n case ';':\n shiftKey[_i2].push(':');\n continue;\n case '\\'':\n shiftKey[_i2].push('\"');\n continue;\n case ',':\n shiftKey[_i2].push('<');\n continue;\n case '.':\n shiftKey[_i2].push('>');\n continue;\n case '/':\n shiftKey[_i2].push('?');\n continue;\n }\n shiftKey[_i2].push(thisKeys[a].toUpperCase());\n continue;\n }\n shiftKey[_i2].push(thisKeys[a]);\n capsKey[_i2].push(thisKeys[a]);\n }\n }\n for (var _i3 = 0; _i3 < keys.length; _i3++) {\n thisKeys = keys[_i3];\n html += '<div class=\"akeyboard-keyboard-innerKeys\">';\n for (var _a = 0; _a < thisKeys.length; _a++) {\n html += '<div class=\"akeyboard-keyboard-keys akeyboard-keyboard-keys-' + thisKeys[_a] + '\">' + thisKeys[_a] + '</div>';\n }\n html += '</div>';\n }\n html += '</div>';\n el.innerHTML = html;\n var containShift = false;\n keys.forEach(function (key) {\n if (key.includes('Shift')) {\n containShift = true;\n return;\n }\n });\n if (containShift) {\n // bind the shift and caps key\n var elKeysEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-keys-Shift');\n elKeysEl.forEach(function (el) {\n el.onclick = function () {\n if (!this.isShift) {\n var caps = document.querySelector(obj.el + ' .akeyboard-keyboard-keys-Caps');\n if (caps && caps.isCaps) {\n return;\n }\n\n // shift\n el.isShift = true;\n el.innerHTML = 'SHIFT';\n this.classList.add('keyboard-keyboard-keys-focus');\n var _keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n var _thisEl;\n for (var _i4 = 0; _i4 < _keysInnerEl.length; _i4++) {\n _thisEl = _keysInnerEl[_i4];\n for (var _a2 = 0; _a2 < _thisEl.childNodes.length; _a2++) {\n if (shiftKey[_i4][_a2] === 'Shift') {\n continue;\n }\n _thisEl.childNodes[_a2].innerHTML = shiftKey[_i4][_a2];\n }\n }\n return;\n }\n el.isShift = false;\n el.innerHTML = 'Shift';\n this.classList.remove('keyboard-keyboard-keys-focus');\n var keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n var thisEl;\n for (var _i5 = 0; _i5 < keysInnerEl.length; _i5++) {\n thisEl = keysInnerEl[_i5];\n for (var _a3 = 0; _a3 < thisEl.childNodes.length; _a3++) {\n thisEl.childNodes[_a3].innerHTML = keys[_i5][_a3];\n }\n }\n };\n });\n }\n var containCaps = false;\n keys.forEach(function (key) {\n if (key.includes('Caps')) {\n containCaps = true;\n return;\n }\n });\n if (containCaps) {\n var elCapsEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-keys-Caps');\n elCapsEl.forEach(function (el) {\n el.onclick = function () {\n if (!this.isCaps) {\n var shift = document.querySelector(obj.el + ' .akeyboard-keyboard-keys-Shift');\n if (shift && shift.isShift) {\n return;\n }\n\n // caps\n this.isCaps = true;\n this.classList.add('keyboard-keyboard-keys-focus');\n var _keysInnerEl2 = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n var _thisEl2;\n for (var _i6 = 0; _i6 < _keysInnerEl2.length; _i6++) {\n _thisEl2 = _keysInnerEl2[_i6];\n for (var _a4 = 0; _a4 < _thisEl2.childNodes.length; _a4++) {\n _thisEl2.childNodes[_a4].innerHTML = capsKey[_i6][_a4];\n }\n }\n return;\n }\n this.isCaps = false;\n this.classList.remove('keyboard-keyboard-keys-focus');\n var keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n var thisEl;\n for (var _i7 = 0; _i7 < keysInnerEl.length; _i7++) {\n thisEl = keysInnerEl[_i7];\n for (var _a5 = 0; _a5 < thisEl.childNodes.length; _a5++) {\n thisEl.childNodes[_a5].innerHTML = keys[_i7][_a5];\n }\n }\n };\n });\n }\n }\n _createClass(Keyboard, [{\n key: \"inputOn\",\n value: function inputOn(inputEle, type, fn, customClick) {\n if (typeof inputEle !== 'string') {\n console.error('aKeyboard: The inputEle parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n if (typeof type !== 'string') {\n console.error('aKeyboard: The type parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n var inputEl = document.querySelector(inputEle),\n elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys');\n for (var i = 0; i < elKeysEl.length; i++) {\n if (['Shift', 'Caps'].includes(elKeysEl[i].innerHTML)) {\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Delete') {\n elKeysEl[i].onclick = function () {\n inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1);\n fn('Delete', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Tab') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += ' ';\n fn('Tab', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Enter') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += '\\n';\n fn('Enter', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Space') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += ' ';\n fn('Space', inputEl[type]);\n };\n continue;\n }\n if (customClick && _typeof(customClick) === 'object' && Object.keys(customClick).length > 0 && customClick[elKeysEl[i].innerHTML]) {\n elKeysEl[i].onclick = customClick[elKeysEl[i].innerHTML];\n } else {\n elKeysEl[i].onclick = function () {\n inputEl[type] += this.innerText;\n fn(this.innerText, inputEl[type]);\n };\n }\n }\n }\n }, {\n key: \"onclick\",\n value: function onclick(btn, fn) {\n if (typeof btn !== 'string') {\n console.error('aKeyboard: The btn parameter needs to be a string <In \"aKeyboard.onclick()\">');\n return;\n }\n if (typeof fn !== 'function') {\n console.error('aKeyboard: The fn parameter needs to be a function <In \"aKeyboard.onclick()\">');\n return;\n }\n var elKeysEl = document.querySelector(this.obj.el + ' .akeyboard-keyboard-keys-' + btn);\n if (elKeysEl) elKeysEl.onclick = fn;else console.error('Can not find key: ' + btn);\n }\n }]);\n return Keyboard;\n}();\n\n\n//# sourceURL=webpack://AVUE/./src/plugin/keyboard/index.js?");
|
5185
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Keyboard; });\nclass Keyboard {\n constructor(obj) {\n if (typeof obj !== 'object') {\n console.error('aKeyboard: The obj parameter needs to be an object <In \"new aKeyboard()\">');\n return;\n }\n this.obj = obj;\n const el = document.querySelector(obj.el);\n let keyboardStyle = '';\n if (typeof obj.style === 'object') {\n for (let i in obj.style) {\n keyboardStyle += i + ': ' + obj.style[i] + ';';\n }\n }\n let html = '<div class=\"akeyboard-keyboard' + (obj.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '\" style=\"' + keyboardStyle + '\">';\n\n // init keys\n let numberKeys = [];\n for (let i = 1; i < 10; i++) {\n numberKeys.push(i.toString());\n }\n numberKeys.push('0');\n const keys = obj.keys || [['`'].concat(numberKeys).concat(['-', '=', 'Delete']), ['Tab', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\\\'], ['Caps', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\\'', 'Enter'], ['Shift', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', 'Shift'], ['Space']];\n let thisKeys;\n const shiftKey = [],\n capsKey = [];\n for (let i = 0; i < keys.length; i++) {\n shiftKey.push([]);\n capsKey.push([]);\n thisKeys = keys[i];\n for (let a = 0; a < thisKeys.length; a++) {\n if (thisKeys[a].length === 1) {\n capsKey[i].push(thisKeys[a].toUpperCase());\n switch (thisKeys[a]) {\n case '`':\n shiftKey[i].push('~');\n continue;\n case '1':\n shiftKey[i].push('!');\n continue;\n case '2':\n shiftKey[i].push('@');\n continue;\n case '3':\n shiftKey[i].push('#');\n continue;\n case '4':\n shiftKey[i].push('$');\n continue;\n case '5':\n shiftKey[i].push('%');\n continue;\n case '6':\n shiftKey[i].push('^');\n continue;\n case '7':\n shiftKey[i].push('&');\n continue;\n case '8':\n shiftKey[i].push('*');\n continue;\n case '9':\n shiftKey[i].push('(');\n continue;\n case '0':\n shiftKey[i].push(')');\n continue;\n case '-':\n shiftKey[i].push('_');\n continue;\n case '=':\n shiftKey[i].push('+');\n continue;\n case '[':\n shiftKey[i].push('{');\n continue;\n case ']':\n shiftKey[i].push('}');\n continue;\n case '\\\\':\n shiftKey[i].push('|');\n continue;\n case ';':\n shiftKey[i].push(':');\n continue;\n case '\\'':\n shiftKey[i].push('\"');\n continue;\n case ',':\n shiftKey[i].push('<');\n continue;\n case '.':\n shiftKey[i].push('>');\n continue;\n case '/':\n shiftKey[i].push('?');\n continue;\n }\n shiftKey[i].push(thisKeys[a].toUpperCase());\n continue;\n }\n shiftKey[i].push(thisKeys[a]);\n capsKey[i].push(thisKeys[a]);\n }\n }\n for (let i = 0; i < keys.length; i++) {\n thisKeys = keys[i];\n html += '<div class=\"akeyboard-keyboard-innerKeys\">';\n for (let a = 0; a < thisKeys.length; a++) {\n html += '<div class=\"akeyboard-keyboard-keys akeyboard-keyboard-keys-' + thisKeys[a] + '\">' + thisKeys[a] + '</div>';\n }\n html += '</div>';\n }\n html += '</div>';\n el.innerHTML = html;\n let containShift = false;\n keys.forEach(key => {\n if (key.includes('Shift')) {\n containShift = true;\n return;\n }\n });\n if (containShift) {\n // bind the shift and caps key\n const elKeysEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-keys-Shift');\n elKeysEl.forEach(el => {\n el.onclick = function () {\n if (!this.isShift) {\n const caps = document.querySelector(obj.el + ' .akeyboard-keyboard-keys-Caps');\n if (caps && caps.isCaps) {\n return;\n }\n\n // shift\n el.isShift = true;\n el.innerHTML = 'SHIFT';\n this.classList.add('keyboard-keyboard-keys-focus');\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n if (shiftKey[i][a] === 'Shift') {\n continue;\n }\n thisEl.childNodes[a].innerHTML = shiftKey[i][a];\n }\n }\n return;\n }\n el.isShift = false;\n el.innerHTML = 'Shift';\n this.classList.remove('keyboard-keyboard-keys-focus');\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n thisEl.childNodes[a].innerHTML = keys[i][a];\n }\n }\n };\n });\n }\n let containCaps = false;\n keys.forEach(key => {\n if (key.includes('Caps')) {\n containCaps = true;\n return;\n }\n });\n if (containCaps) {\n const elCapsEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-keys-Caps');\n elCapsEl.forEach(el => {\n el.onclick = function () {\n if (!this.isCaps) {\n const shift = document.querySelector(obj.el + ' .akeyboard-keyboard-keys-Shift');\n if (shift && shift.isShift) {\n return;\n }\n\n // caps\n this.isCaps = true;\n this.classList.add('keyboard-keyboard-keys-focus');\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n thisEl.childNodes[a].innerHTML = capsKey[i][a];\n }\n }\n return;\n }\n this.isCaps = false;\n this.classList.remove('keyboard-keyboard-keys-focus');\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n thisEl.childNodes[a].innerHTML = keys[i][a];\n }\n }\n };\n });\n }\n }\n inputOn(inputEle, type, fn, customClick) {\n if (typeof inputEle !== 'string') {\n console.error('aKeyboard: The inputEle parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n if (typeof type !== 'string') {\n console.error('aKeyboard: The type parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n const inputEl = document.querySelector(inputEle),\n elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys');\n for (let i = 0; i < elKeysEl.length; i++) {\n if (['Shift', 'Caps'].includes(elKeysEl[i].innerHTML)) {\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Delete') {\n elKeysEl[i].onclick = function () {\n inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1);\n fn('Delete', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Tab') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += ' ';\n fn('Tab', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Enter') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += '\\n';\n fn('Enter', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Space') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += ' ';\n fn('Space', inputEl[type]);\n };\n continue;\n }\n if (customClick && typeof customClick === 'object' && Object.keys(customClick).length > 0 && customClick[elKeysEl[i].innerHTML]) {\n elKeysEl[i].onclick = customClick[elKeysEl[i].innerHTML];\n } else {\n elKeysEl[i].onclick = function () {\n inputEl[type] += this.innerText;\n fn(this.innerText, inputEl[type]);\n };\n }\n }\n }\n onclick(btn, fn) {\n if (typeof btn !== 'string') {\n console.error('aKeyboard: The btn parameter needs to be a string <In \"aKeyboard.onclick()\">');\n return;\n }\n if (typeof fn !== 'function') {\n console.error('aKeyboard: The fn parameter needs to be a function <In \"aKeyboard.onclick()\">');\n return;\n }\n let elKeysEl = document.querySelector(this.obj.el + ' .akeyboard-keyboard-keys-' + btn);\n if (elKeysEl) elKeysEl.onclick = fn;else console.error('Can not find key: ' + btn);\n }\n}\n\n//# sourceURL=webpack://AVUE/./src/plugin/keyboard/index.js?");
|
5186
5186
|
|
5187
5187
|
/***/ }),
|
5188
5188
|
|
@@ -5194,7 +5194,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5194
5194
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5195
5195
|
|
5196
5196
|
"use strict";
|
5197
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return MobileKeyboard; });\
|
5197
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return MobileKeyboard; });\nclass MobileKeyboard {\n constructor(obj) {\n if (typeof obj !== 'object') {\n console.error('aKeyboard: The obj parameter needs to be an object <In \"new aKeyboard()\">');\n return;\n }\n this.obj = obj;\n const el = document.querySelector(obj.el);\n let keyboardStyle = '';\n if (typeof obj.style === 'object') {\n for (let i in obj.style) {\n keyboardStyle += i + ': ' + obj.style[i] + ';';\n }\n }\n let html = '<div class=\"akeyboard-mobileKeyboard' + (obj.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '\" style=\"' + keyboardStyle + '\">';\n\n //init keys\n let numberKeys = [];\n for (let i = 1; i < 10; i++) {\n numberKeys.push(i.toString());\n }\n numberKeys.push('0');\n const keys = obj.keys || [['`'].concat(numberKeys).concat(['-', '=']), ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\\\'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\\''], ['⇧', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', '⇦'], ['Space', 'Enter']];\n let thisKeys;\n const shiftKey = [];\n for (let i = 0; i < keys.length; i++) {\n shiftKey.push([]);\n thisKeys = keys[i];\n for (let a = 0; a < thisKeys.length; a++) {\n if (thisKeys[a].length === 1) {\n switch (thisKeys[a]) {\n case '`':\n shiftKey[i].push('~');\n continue;\n case '1':\n shiftKey[i].push('!');\n continue;\n case '2':\n shiftKey[i].push('@');\n continue;\n case '3':\n shiftKey[i].push('#');\n continue;\n case '4':\n shiftKey[i].push('$');\n continue;\n case '5':\n shiftKey[i].push('%');\n continue;\n case '6':\n shiftKey[i].push('^');\n continue;\n case '7':\n shiftKey[i].push('&');\n continue;\n case '8':\n shiftKey[i].push('*');\n continue;\n case '9':\n shiftKey[i].push('(');\n continue;\n case '0':\n shiftKey[i].push(')');\n continue;\n case '-':\n shiftKey[i].push('_');\n continue;\n case '=':\n shiftKey[i].push('+');\n continue;\n case '[':\n shiftKey[i].push('{');\n continue;\n case ']':\n shiftKey[i].push('}');\n continue;\n case '\\\\':\n shiftKey[i].push('|');\n continue;\n case ';':\n shiftKey[i].push(':');\n continue;\n case '\\'':\n shiftKey[i].push('\"');\n continue;\n case ',':\n shiftKey[i].push('<');\n continue;\n case '.':\n shiftKey[i].push('>');\n continue;\n case '/':\n shiftKey[i].push('?');\n continue;\n }\n shiftKey[i].push(thisKeys[a].toUpperCase());\n continue;\n }\n shiftKey[i].push(thisKeys[a]);\n }\n }\n for (let i = 0; i < keys.length; i++) {\n thisKeys = keys[i];\n html += '<div class=\"akeyboard-keyboard-innerKeys\">';\n for (let a = 0; a < thisKeys.length; a++) {\n html += '<div class=\"akeyboard-mobileKeyboard-keys akeyboard-mobileKeyboard-keys-' + thisKeys[a] + '\">' + thisKeys[a] + '</div>';\n }\n html += '</div>';\n }\n html += '</div>';\n el.innerHTML = html;\n let containShift = false;\n keys.forEach(key => {\n if (key.includes(\"Shift\") || key.includes(\"⇧\")) {\n containShift = true;\n return;\n }\n });\n //bind the shift\n if (containShift) {\n const elKeysEl = document.querySelectorAll(obj.el + ' .akeyboard-mobileKeyboard-keys-⇧');\n elKeysEl.forEach(el => {\n el.onclick = function () {\n if (!this.isShift) {\n //shift\n el.classList.add('akeyboard-mobileKeyboard-keys-focus');\n el.isShift = true;\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n thisEl.childNodes[a].innerHTML = shiftKey[i][a];\n }\n }\n return;\n }\n el.isShift = false;\n el.classList.remove('akeyboard-mobileKeyboard-keys-focus');\n const keysInnerEl = document.querySelectorAll(obj.el + ' .akeyboard-keyboard-innerKeys');\n let thisEl;\n for (let i = 0; i < keysInnerEl.length; i++) {\n thisEl = keysInnerEl[i];\n for (let a = 0; a < thisEl.childNodes.length; a++) {\n thisEl.childNodes[a].innerHTML = keys[i][a];\n }\n }\n };\n });\n }\n }\n inputOn(inputEle, type, fn, customClick) {\n if (typeof inputEle !== 'string') {\n console.error('aKeyboard: The inputEle parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n if (typeof type !== 'string') {\n console.error('aKeyboard: The type parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n const inputEl = document.querySelector(inputEle),\n elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-mobileKeyboard-keys');\n for (let i = 0; i < elKeysEl.length; i++) {\n switch (elKeysEl[i].innerHTML) {\n case '⇧':\n continue;\n case '⇦':\n elKeysEl[i].onclick = function () {\n inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1);\n fn('Delete', inputEl[type]);\n };\n continue;\n case 'Enter':\n elKeysEl[i].onclick = function () {\n inputEl[type] += '\\n';\n fn('Enter', inputEl[type]);\n };\n continue;\n case 'Space':\n elKeysEl[i].onclick = function () {\n inputEl[type] += ' ';\n fn('Space', inputEl[type]);\n };\n continue;\n }\n if (customClick && typeof customClick == 'object' && Object.keys(customClick).length > 0 && customClick[elKeysEl[i].innerHTML]) {\n elKeysEl[i].onclick = customClick[elKeysEl[i].innerHTML];\n } else {\n elKeysEl[i].onclick = function () {\n inputEl[type] += this.innerText;\n fn(this.innerText, inputEl[type]);\n };\n }\n }\n }\n onclick(btn, fn) {\n if (typeof btn !== 'string') {\n console.error('aKeyboard: The btn parameter needs to be a string <In \"aKeyboard.onclick()\">');\n return;\n }\n if (typeof fn !== 'function') {\n console.error('aKeyboard: The fn parameter needs to be a function <In \"aKeyboard.onclick()\">');\n return;\n }\n let elKeysEl = document.querySelector(this.obj.el + ' .akeyboard-mobileKeyboard-keys-' + btn);\n if (elKeysEl) elKeysEl.onclick = fn;else console.error(\"Can not find key: \" + btn);\n }\n}\n\n//# sourceURL=webpack://AVUE/./src/plugin/keyboard/mobile.js?");
|
5198
5198
|
|
5199
5199
|
/***/ }),
|
5200
5200
|
|
@@ -5206,7 +5206,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5206
5206
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5207
5207
|
|
5208
5208
|
"use strict";
|
5209
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return NumberKeyboard; });\
|
5209
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return NumberKeyboard; });\nclass NumberKeyboard {\n constructor(obj) {\n if (typeof obj !== 'object') {\n console.error('aKeyboard: The obj parameter needs to be an object <In \"new aKeyboard()\">');\n return;\n }\n this.obj = obj;\n const el = document.querySelector(obj.el);\n let keyboardStyle = '';\n if (typeof obj.style === 'object') {\n for (let i in obj.style) {\n keyboardStyle += i + ': ' + obj.style[i] + ';';\n }\n }\n let html = '<div class=\"akeyboard-numberKeyboard' + (obj.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '\" style=\"' + keyboardStyle + '\">';\n\n // init keys\n html += '<div class=\"akeyboard-keyboard-innerKeys\">';\n for (let i = 1; i < 10; i++) {\n html += '<div class=\"akeyboard-keyboard-keys akeyboard-keyboard-keys-' + i + '\">' + i + '</div>';\n if (i % 3 === 0) {\n html += '</div><div class=\"akeyboard-keyboard-innerKeys\">';\n }\n }\n html += '<div class=\"akeyboard-keyboard-keys akeyboard-keyboard-keys-0\">0</div><div class=\"akeyboard-keyboard-keys akeyboard-keyboard-keys-Delete\">Delete</div></div><div class=\"akeyboard-keyboard-innerKeys\"><div class=\"akeyboard-keyboard-keys akeyboard-numberKeyboard-keys-Enter\">Enter</div></div>';\n html += '</div>';\n el.innerHTML = html;\n }\n inputOn(inputEle, type, fn, customClick) {\n if (typeof inputEle !== 'string') {\n console.error('aKeyboard: The inputEle parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n if (typeof type !== 'string') {\n console.error('aKeyboard: The type parameter needs to be a string <In \"aKeyboard.inputOn()\">');\n return;\n }\n const inputEl = document.querySelector(inputEle),\n elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys');\n for (let i = 0; i < elKeysEl.length; i++) {\n if (elKeysEl[i].innerHTML === 'Delete') {\n elKeysEl[i].onclick = function () {\n inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1);\n fn('Delete', inputEl[type]);\n };\n continue;\n }\n if (elKeysEl[i].innerHTML === 'Enter') {\n elKeysEl[i].onclick = function () {\n inputEl[type] += '\\n';\n fn('Enter', inputEl[type]);\n };\n continue;\n }\n if (customClick && typeof customClick === 'object' && Object.keys(customClick).length > 0 && customClick[elKeysEl[i].innerHTML]) {\n elKeysEl[i].onclick = customClick[elKeysEl[i].innerHTML];\n } else {\n elKeysEl[i].onclick = function () {\n inputEl[type] += this.innerText;\n fn(this.innerText, inputEl[type]);\n };\n }\n }\n }\n onclick(btn, fn) {\n if (typeof btn !== 'string') {\n console.error('aKeyboard: The btn parameter needs to be a string <In \"aKeyboard.onclick()\">');\n return;\n }\n if (typeof fn !== 'function') {\n console.error('aKeyboard: The fn parameter needs to be a function <In \"aKeyboard.onclick()\">');\n return;\n }\n let elKeysEl = document.querySelector(this.obj.el + ' .akeyboard-keyboard-keys-' + btn);\n if (elKeysEl) elKeysEl.onclick = fn;else console.error('Can not find key: ' + btn);\n }\n}\n\n//# sourceURL=webpack://AVUE/./src/plugin/keyboard/number.js?");
|
5210
5210
|
|
5211
5211
|
/***/ }),
|
5212
5212
|
|
@@ -5218,7 +5218,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5218
5218
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5219
5219
|
|
5220
5220
|
"use strict";
|
5221
|
-
eval("__webpack_require__.r(__webpack_exports__);\
|
5221
|
+
eval("__webpack_require__.r(__webpack_exports__);\nconst log = {};\n\n/**\n * @description 返回这个样式的颜色值\n * @param {String} type 样式名称 [ primary | success | warning | danger | text ]\n */\nfunction typeColor(type = 'default') {\n let color = '';\n switch (type) {\n case 'default':\n color = '#35495E';\n break;\n case 'primary':\n color = '#3488ff';\n break;\n case 'success':\n color = '#43B883';\n break;\n case 'warning':\n color = '#e6a23c';\n break;\n case 'danger':\n color = '#f56c6c';\n break;\n default:\n break;\n }\n return color;\n}\n\n/**\n * @description 打印一个 [ title | text ] 样式的信息\n * @param {String} title title text\n * @param {String} info info text\n * @param {String} type style\n */\nlog.capsule = function (title, info, type = 'primary') {\n console.log(`%c ${title} %c ${info} %c`, 'background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;', `background:${typeColor(type)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`, 'background:transparent');\n};\n\n/**\n * @description 打印彩色文字\n */\nlog.colorful = function (textArr) {\n console.log(`%c${textArr.map(t => t.text || '').join('%c')}`, ...textArr.map(t => `color: ${typeColor(t.type)};`));\n};\n\n/**\n * @description 打印 default 样式的文字\n */\nlog.default = function (text) {\n log.colorful([{\n text\n }]);\n};\n\n/**\n * @description 打印 primary 样式的文字\n */\nlog.primary = function (text) {\n log.colorful([{\n text,\n type: 'primary'\n }]);\n};\n\n/**\n * @description 打印 success 样式的文字\n */\nlog.success = function (text) {\n log.colorful([{\n text,\n type: 'success'\n }]);\n};\n\n/**\n * @description 打印 warning 样式的文字\n */\nlog.warning = function (text) {\n log.colorful([{\n text,\n type: 'warning'\n }]);\n};\n\n/**\n * @description 打印 danger 样式的文字\n */\nlog.danger = function (text) {\n log.colorful([{\n text,\n type: 'danger'\n }]);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (log);\n\n//# sourceURL=webpack://AVUE/./src/plugin/logs/index.js?");
|
5222
5222
|
|
5223
5223
|
/***/ }),
|
5224
5224
|
|
@@ -5242,7 +5242,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var npro
|
|
5242
5242
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5243
5243
|
|
5244
5244
|
"use strict";
|
5245
|
-
eval("__webpack_require__.r(__webpack_exports__);\
|
5245
|
+
eval("__webpack_require__.r(__webpack_exports__);\n// 打印类属性、方法定义\n/* eslint-disable */\nconst Print = function (dom, options) {\n if (!(this instanceof Print)) return new Print(dom, options);\n this.options = this.extend({\n 'noPrint': '.no-print'\n }, options);\n if (typeof dom === \"string\") {\n this.dom = document.querySelector(dom);\n } else {\n this.isDOM(dom);\n this.dom = this.isDOM(dom) ? dom : dom.$el;\n }\n this.init();\n};\nPrint.prototype = {\n init: function () {\n var content = this.getStyle() + this.getHtml();\n this.writeIframe(content);\n },\n extend: function (obj, obj2) {\n for (var k in obj2) {\n obj[k] = obj2[k];\n }\n return obj;\n },\n getStyle: function () {\n var str = \"\",\n styles = document.querySelectorAll('style,link');\n for (var i = 0; i < styles.length; i++) {\n str += styles[i].outerHTML;\n }\n str += \"<style>\" + (this.options.noPrint ? this.options.noPrint : '.no-print') + \"{display:none;}</style>\";\n return str;\n },\n getHtml: function () {\n var inputs = document.querySelectorAll('input');\n var textareas = document.querySelectorAll('textarea');\n var selects = document.querySelectorAll('select');\n for (var k = 0; k < inputs.length; k++) {\n if (inputs[k].type == \"checkbox\" || inputs[k].type == \"radio\") {\n if (inputs[k].checked == true) {\n inputs[k].setAttribute('checked', \"checked\");\n } else {\n inputs[k].removeAttribute('checked');\n }\n } else if (inputs[k].type == \"text\") {\n inputs[k].setAttribute('value', inputs[k].value);\n } else {\n inputs[k].setAttribute('value', inputs[k].value);\n }\n }\n for (var k2 = 0; k2 < textareas.length; k2++) {\n if (textareas[k2].type == 'textarea') {\n textareas[k2].innerHTML = textareas[k2].value;\n }\n }\n for (var k3 = 0; k3 < selects.length; k3++) {\n if (selects[k3].type == 'select-one') {\n var child = selects[k3].children;\n for (var i in child) {\n if (child[i].tagName == 'OPTION') {\n if (child[i].selected == true) {\n child[i].setAttribute('selected', \"selected\");\n } else {\n child[i].removeAttribute('selected');\n }\n }\n }\n }\n }\n // 包裹要打印的元素\n let outerHTML = this.wrapperRefDom(this.dom).outerHTML;\n return outerHTML;\n },\n // 向父级元素循环,包裹当前需要打印的元素\n // 防止根级别开头的 css 选择器不生效\n wrapperRefDom: function (refDom) {\n let prevDom = null;\n let currDom = refDom;\n // 判断当前元素是否在 body 中,不在文档中则直接返回该节点\n if (!this.isInBody(currDom)) return currDom;\n while (currDom) {\n if (prevDom) {\n let element = currDom.cloneNode(false);\n element.appendChild(prevDom);\n prevDom = element;\n } else {\n prevDom = currDom.cloneNode(true);\n }\n currDom = currDom.parentElement;\n }\n return prevDom;\n },\n writeIframe: function (content) {\n var w,\n doc,\n iframe = document.createElement('iframe'),\n f = document.body.appendChild(iframe);\n iframe.id = \"myIframe\";\n //iframe.style = \"position:absolute;width:0;height:0;top:-10px;left:-10px;\";\n iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');\n w = f.contentWindow || f.contentDocument;\n doc = f.contentDocument || f.contentWindow.document;\n doc.open();\n doc.write(content);\n doc.close();\n var _this = this;\n iframe.onload = function () {\n _this.toPrint(w);\n setTimeout(function () {\n document.body.removeChild(iframe);\n }, 100);\n };\n },\n toPrint: function (frameWindow) {\n try {\n setTimeout(function () {\n frameWindow.focus();\n try {\n if (!frameWindow.document.execCommand('print', false, null)) {\n frameWindow.print();\n }\n } catch (e) {\n frameWindow.print();\n }\n frameWindow.close();\n }, 10);\n } catch (err) {\n console.log('err', err);\n }\n },\n // 检查一个元素是否是 body 元素的后代元素且非 body 元素本身\n isInBody: function (node) {\n return node === document.body ? false : document.body.contains(node);\n },\n isDOM: typeof HTMLElement === 'object' ? function (obj) {\n return obj instanceof HTMLElement;\n } : function (obj) {\n return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Print);\n\n//# sourceURL=webpack://AVUE/./src/plugin/print/index.js?");
|
5246
5246
|
|
5247
5247
|
/***/ }),
|
5248
5248
|
|
@@ -5254,7 +5254,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(o) { \"@babe
|
|
5254
5254
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5255
5255
|
|
5256
5256
|
"use strict";
|
5257
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getToken\", function() { return getToken; });\
|
5257
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getToken\", function() { return getToken; });\nconst getToken = (accessKey, secretKey, putPolicy) => {\n //SETP 2\n var put_policy = JSON.stringify(putPolicy);\n true && console && console.log(\"put_policy = \", put_policy);\n\n //SETP 3\n var encoded = base64encode(utf16to8(put_policy));\n true && console && console.log(\"encoded = \", encoded);\n\n //SETP 4\n var hash = CryptoJS.HmacSHA1(encoded, secretKey);\n var encoded_signed = hash.toString(CryptoJS.enc.Base64);\n true && console && console.log(\"encoded_signed=\", encoded_signed);\n\n //SETP 5\n var upload_token = accessKey + \":\" + safe64(encoded_signed) + \":\" + encoded;\n true && console && console.log(\"upload_token=\", upload_token);\n return upload_token;\n};\nfunction utf16to8(str) {\n var out, i, len, c;\n out = \"\";\n len = str.length;\n for (i = 0; i < len; i++) {\n c = str.charCodeAt(i);\n if (c >= 0x0001 && c <= 0x007F) {\n out += str.charAt(i);\n } else if (c > 0x07FF) {\n out += String.fromCharCode(0xE0 | c >> 12 & 0x0F);\n out += String.fromCharCode(0x80 | c >> 6 & 0x3F);\n out += String.fromCharCode(0x80 | c >> 0 & 0x3F);\n } else {\n out += String.fromCharCode(0xC0 | c >> 6 & 0x1F);\n out += String.fromCharCode(0x80 | c >> 0 & 0x3F);\n }\n }\n return out;\n}\nfunction utf8to16(str) {\n var out, i, len, c;\n var char2, char3;\n out = \"\";\n len = str.length;\n i = 0;\n while (i < len) {\n c = str.charCodeAt(i++);\n switch (c >> 4) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n // 0xxxxxxx\n out += str.charAt(i - 1);\n break;\n case 12:\n case 13:\n // 110x xxxx 10xx xxxx\n char2 = str.charCodeAt(i++);\n out += String.fromCharCode((c & 0x1F) << 6 | char2 & 0x3F);\n break;\n case 14:\n // 1110 xxxx 10xx xxxx 10xx xxxx\n char2 = str.charCodeAt(i++);\n char3 = str.charCodeAt(i++);\n out += String.fromCharCode((c & 0x0F) << 12 | (char2 & 0x3F) << 6 | (char3 & 0x3F) << 0);\n break;\n }\n }\n return out;\n}\n\n/*\n * Interfaces:\n * b64 = base64encode(data);\n * data = base64decode(b64);\n */\nvar base64EncodeChars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\nvar base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);\nfunction base64encode(str) {\n var out, i, len;\n var c1, c2, c3;\n len = str.length;\n i = 0;\n out = \"\";\n while (i < len) {\n c1 = str.charCodeAt(i++) & 0xff;\n if (i == len) {\n out += base64EncodeChars.charAt(c1 >> 2);\n out += base64EncodeChars.charAt((c1 & 0x3) << 4);\n out += \"==\";\n break;\n }\n c2 = str.charCodeAt(i++);\n if (i == len) {\n out += base64EncodeChars.charAt(c1 >> 2);\n out += base64EncodeChars.charAt((c1 & 0x3) << 4 | (c2 & 0xF0) >> 4);\n out += base64EncodeChars.charAt((c2 & 0xF) << 2);\n out += \"=\";\n break;\n }\n c3 = str.charCodeAt(i++);\n out += base64EncodeChars.charAt(c1 >> 2);\n out += base64EncodeChars.charAt((c1 & 0x3) << 4 | (c2 & 0xF0) >> 4);\n out += base64EncodeChars.charAt((c2 & 0xF) << 2 | (c3 & 0xC0) >> 6);\n out += base64EncodeChars.charAt(c3 & 0x3F);\n }\n return out;\n}\nfunction base64decode(str) {\n var c1, c2, c3, c4;\n var i, len, out;\n len = str.length;\n i = 0;\n out = \"\";\n while (i < len) {\n /* c1 */\n do {\n c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];\n } while (i < len && c1 == -1);\n if (c1 == -1) break;\n /* c2 */\n do {\n c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];\n } while (i < len && c2 == -1);\n if (c2 == -1) break;\n out += String.fromCharCode(c1 << 2 | (c2 & 0x30) >> 4);\n /* c3 */\n do {\n c3 = str.charCodeAt(i++) & 0xff;\n if (c3 == 61) return out;\n c3 = base64DecodeChars[c3];\n } while (i < len && c3 == -1);\n if (c3 == -1) break;\n out += String.fromCharCode((c2 & 0XF) << 4 | (c3 & 0x3C) >> 2);\n /* c4 */\n do {\n c4 = str.charCodeAt(i++) & 0xff;\n if (c4 == 61) return out;\n c4 = base64DecodeChars[c4];\n } while (i < len && c4 == -1);\n if (c4 == -1) break;\n out += String.fromCharCode((c3 & 0x03) << 6 | c4);\n }\n return out;\n}\nvar safe64 = function (base64) {\n base64 = base64.replace(/\\+/g, \"-\");\n base64 = base64.replace(/\\//g, \"_\");\n return base64;\n};\n\n//# sourceURL=webpack://AVUE/./src/plugin/qiniu/index.js?");
|
5258
5258
|
|
5259
5259
|
/***/ }),
|
5260
5260
|
|
@@ -5266,7 +5266,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5266
5266
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5267
5267
|
|
5268
5268
|
"use strict";
|
5269
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (doc
|
5269
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (doc, option = {}) {\n if (!window.html2canvas) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs(\"Screenshot\");\n return;\n }\n return window.html2canvas(doc, option);\n});\n\n//# sourceURL=webpack://AVUE/./src/plugin/screenshot/index.js?");
|
5270
5270
|
|
5271
5271
|
/***/ }),
|
5272
5272
|
|
@@ -5278,7 +5278,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
5278
5278
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5279
5279
|
|
5280
5280
|
"use strict";
|
5281
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return RecordVideo; });\
|
5281
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return RecordVideo; });\nclass RecordVideo {\n /**\n * 构造函数\n *\n * @param {Object} videoObj 视频对象\n */\n constructor(videoObj) {\n this.video = videoObj;\n this.mediaRecorder = null;\n this.chunks = [];\n }\n\n /**\n * 初始化\n *\n * @return {Object} promise\n */\n init() {\n // 返回Promise对象\n // resolve 正常处理\n // reject 处理异常情况\n return new Promise((resovle, reject) => {\n navigator.mediaDevices.getUserMedia({\n audio: true,\n video: true\n // video: {\n // width: this.videoWidth,\n // height: this.videoHeight\n // }\n })\n // 返回一个媒体内容的流\n .then(stream => {\n // 检测是否支持 srcObject,该属性在新的浏览器支持\n if ('srcObject' in this.video) {\n this.video.srcObject = stream;\n } else {\n // 兼容旧的浏览器\n this.video.src = window.URL.createObjectURL(stream);\n }\n\n // 当视频的元数据已经加载时触发\n this.video.addEventListener('loadmetadata', () => {\n this.video.play();\n });\n this.mediaRecorder = new MediaRecorder(stream);\n this.mediaRecorder.addEventListener('dataavailable', e => {\n this.chunks.push(e.data);\n });\n resovle();\n })\n // 异常抓取,包括用于禁用麦克风、摄像头\n .catch(error => {\n reject(error);\n });\n });\n }\n\n /**\n * 视频开始录制\n */\n startRecord() {\n if (this.mediaRecorder.state === 'inactive') {\n this.mediaRecorder.start();\n }\n }\n\n /**\n * 视频结束录制\n */\n stopRecord() {\n if (this.mediaRecorder.state === 'recording') {\n this.mediaRecorder.stop();\n }\n }\n\n /**\n * 检测当前浏览器对否支持\n *\n * @return {boolean} 当前浏览器是否支持\n */\n isSupport() {\n const flag = navigator.mediaDevices && navigator.mediaDevices.getUserMedia;\n if (flag) {\n return true;\n }\n }\n}\n\n//# sourceURL=webpack://AVUE/./src/plugin/video/index.js?");
|
5282
5282
|
|
5283
5283
|
/***/ }),
|
5284
5284
|
|
@@ -5314,7 +5314,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var pack
|
|
5314
5314
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5315
5315
|
|
5316
5316
|
"use strict";
|
5317
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _element_ui___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./element-ui/ */ \"./src/ui/element-ui/index.js\");\n/* harmony import */ var _data___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ */ \"./src/ui/data/index.js\");\
|
5317
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _element_ui___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./element-ui/ */ \"./src/ui/element-ui/index.js\");\n/* harmony import */ var _data___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ */ \"./src/ui/data/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n ..._element_ui___WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n ..._data___WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n\n//# sourceURL=webpack://AVUE/./src/ui/index.js?");
|
5318
5318
|
|
5319
5319
|
/***/ }),
|
5320
5320
|
|
@@ -5326,7 +5326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ele
|
|
5326
5326
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5327
5327
|
|
5328
5328
|
"use strict";
|
5329
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\r\n * bem helper\r\n * b() // 'button'\r\n * b('text') // 'button__text'\r\n * b({ disabled }) // 'button button--disabled'\r\n * b('text', { disabled }) // 'button__text button__text--disabled'\r\n * b(['disabled', 'primary']) // 'button button--disabled button--primary'\r\n */\n\
|
5329
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/**\r\n * bem helper\r\n * b() // 'button'\r\n * b('text') // 'button__text'\r\n * b({ disabled }) // 'button button--disabled'\r\n * b('text', { disabled }) // 'button__text button__text--disabled'\r\n * b(['disabled', 'primary']) // 'button button--disabled button--primary'\r\n */\n\nconst ELEMENT = '__';\nconst MODS = '--';\nconst join = (name, el, symbol) => el ? name + symbol + el : name;\nconst prefix = (name, mods) => {\n if (typeof mods === 'string') {\n return join(name, mods, MODS);\n }\n if (Array.isArray(mods)) {\n return mods.map(item => prefix(name, item));\n }\n const ret = {};\n Object.keys(mods || {}).forEach(key => {\n ret[name + MODS + key] = mods[key];\n });\n return ret;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n methods: {\n b(el, mods) {\n const {\n name\n } = this.$options;\n if (el && typeof el !== 'string') {\n mods = el;\n el = '';\n }\n el = join(name, el, ELEMENT);\n return mods ? [el, prefix(el, mods)] : el;\n }\n }\n});\n\n//# sourceURL=webpack://AVUE/./src/utils/bem.js?");
|
5330
5330
|
|
5331
5331
|
/***/ }),
|
5332
5332
|
|
@@ -5338,7 +5338,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/**\r\n * bem helper\r\n * b(
|
|
5338
5338
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5339
5339
|
|
5340
5340
|
"use strict";
|
5341
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\
|
5341
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((column, dic, defaultForm, run) => {\n if (!run) return;\n if (!window.Mock) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs(\"mock\");\n return;\n }\n let mockjs = window.Mock;\n let Random = (mockjs || {}).Random;\n let form = {};\n function createName({\n en\n }) {\n if (en) {\n return Random.name(true);\n }\n return Random.cname();\n }\n function createNumber({\n max,\n min,\n precision\n }) {\n if (precision) {\n const number = Random.float(min, max, precision) + '';\n const index = number.indexOf('.') + 1;\n return Number(number.substring(0, index + precision));\n } else {\n return Random.integer(min, max);\n }\n }\n function createUrl({\n header,\n footer\n }) {\n let url = Random.url();\n const index = url.indexOf('://');\n if (header === false) {\n url = url.substring(index + 3);\n } else {\n url = 'http://' + url.substring(index + 3);\n }\n return url;\n }\n function createDatetime({\n format,\n now\n }) {\n if (now) {\n return Random.now(format);\n }\n return Random.datetime(format);\n }\n function createText({\n min,\n max\n }) {\n return Random.csentence(min, max);\n }\n function createCounty() {\n return Random.county(true);\n }\n function createDic({\n dic,\n props,\n columnType,\n multiple\n }) {\n const value = props.value || 'value';\n const len = dic.length;\n if (['checkbox'].includes(columnType) || multiple) {\n const number = createNumber({\n min: 1,\n max: len\n });\n let result = [];\n for (let i = 0; i < number; i++) {\n let flag = true;\n while (flag) {\n const numbers = createNumber({\n min: 0,\n max: len - 1\n });\n const values = dic[numbers][value];\n if (!result.includes(values)) {\n result.push(values);\n flag = false;\n }\n }\n }\n return result;\n } else {\n const number = createNumber({\n min: 0,\n max: len - 1\n });\n return dic[number][value];\n }\n }\n function create() {\n Object.keys(column).forEach(index => {\n const ele = column[index];\n if (ele.mock && typeof ele.mock === 'object') {\n let params = ele.mock;\n params.dic = typeof ele.dicData === 'string' ? dic[ele.dicData] : ele.dicData || [];\n params.props = ele.props || {};\n params.columnType = ele.type;\n params.multiple = ele.multiple;\n switch (params.type) {\n case 'name':\n form[ele.prop] = createName(params);\n break;\n case 'number':\n form[ele.prop] = createNumber(params);\n break;\n case 'datetime':\n form[ele.prop] = createDatetime(params);\n break;\n case 'word':\n form[ele.prop] = createText(params);\n break;\n case 'url':\n form[ele.prop] = createUrl(params);\n break;\n case 'county':\n form[ele.prop] = createCounty(params);\n break;\n case 'dic':\n form[ele.prop] = createDic(params);\n break;\n }\n } else if (ele.mock instanceof Function) {\n form[ele.prop] = ele.mock(defaultForm);\n }\n });\n }\n create();\n return form;\n});\n\n//# sourceURL=webpack://AVUE/./src/utils/mock.js?");
|
5342
5342
|
|
5343
5343
|
/***/ }),
|
5344
5344
|
|
@@ -5350,7 +5350,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
5350
5350
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5351
5351
|
|
5352
5352
|
"use strict";
|
5353
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isMediaType\", function() { return isMediaType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"uuid\", function() { return uuid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFixed\", function() { return getFixed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAsVal\", function() { return getAsVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAsVal\", function() { return setAsVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadScript\", function() { return loadScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"downFile\", function() { return downFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createObj\", function() { return createObj; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dataURLtoFile\", function() { return dataURLtoFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findObject\", function() { return findObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"randomId\", function() { return randomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getObjType\", function() { return getObjType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isJson\", function() { return isJson; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deepClone\", function() { return deepClone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getColumn\", function() { return getColumn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setPx\", function() { return setPx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detailDataType\", function() { return detailDataType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDicValue\", function() { return getDicValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterParams\", function() { return filterParams; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findArray\", function() { return findArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findNode\", function() { return findNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPasswordChar\", function() { return getPasswordChar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"arraySort\", function() { return arraySort; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blankVal\", function() { return blankVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clearVal\", function() { return clearVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"vaildData\", function() { return vaildData; });\n/* harmony import */ var _validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\nvar isMediaType = function isMediaType(url, type) {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(url)) return;\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].audio.test(url) || type == 'audio') {\n return 'audio';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].video.test(url) || type == 'video') {\n return 'video';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].img.test(url) || type == 'img') {\n return 'img';\n }\n return;\n};\nvar uuid = function uuid() {\n var s = [];\n var hexDigits = \"0123456789abcdef\";\n for (var i = 0; i < 36; i++) {\n s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);\n }\n s[14] = \"4\"; // bits 12-15 of the time_hi_and_version field to 0010\n s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01\n s[8] = s[13] = s[18] = s[23] = \"-\";\n var uuid = s.join(\"\");\n return uuid;\n};\nfunction getFixed() {\n var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n return Number(val.toFixed(len));\n}\nfunction getAsVal(obj) {\n var bind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var result = deepClone(obj);\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(bind)) return result;\n bind.split('.').forEach(function (ele) {\n result = !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(result[ele]) ? result[ele] : '';\n });\n return result;\n}\nfunction setAsVal(obj) {\n var bind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var value = arguments.length > 2 ? arguments[2] : undefined;\n var result;\n var type = getObjType(value);\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) {\n if (type === 'array') {\n result = \"obj.\".concat(bind, \"=[]\");\n } else if (type === 'object') {\n result = \"obj.\".concat(bind, \"={}\");\n } else if (['number', 'boolean'].includes(type)) {\n result = \"obj.\".concat(bind, \"=undefined\");\n } else {\n result = \"obj.\".concat(bind, \"=''\");\n }\n } else {\n if (type == 'string') {\n result = \"obj.\".concat(bind, \"='\").concat(value, \"'\");\n } else {\n result = \"obj.\".concat(bind, \"=\").concat(value);\n }\n }\n eval(result);\n return obj;\n}\nvar loadScript = function loadScript() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'js';\n var url = arguments.length > 1 ? arguments[1] : undefined;\n var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"body\";\n var flag = false;\n return new Promise(function (resolve) {\n var head = dom == 'head' ? document.getElementsByTagName('head')[0] : document.body;\n for (var i = 0; i < head.children.length; i++) {\n var ele = head.children[i];\n if ((ele.src || '').indexOf(url) !== -1) {\n flag = true;\n resolve();\n }\n }\n if (flag) return;\n var script;\n if (type === 'js') {\n script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n } else if (type === 'css') {\n script = document.createElement('link');\n script.rel = 'stylesheet';\n script.type = 'text/css';\n script.href = url;\n }\n head.appendChild(script);\n script.onload = function () {\n resolve();\n };\n });\n};\nfunction downFile(url, saveName) {\n if (_typeof(url) == 'object' && url instanceof Blob) {\n url = URL.createObjectURL(url); // 创建blob地址\n }\n var aLink = document.createElement('a');\n aLink.href = url;\n aLink.download = saveName || ''; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效\n var event;\n if (window.MouseEvent) {\n event = new MouseEvent('click');\n } else {\n event = document.createEvent('MouseEvents');\n event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n }\n aLink.dispatchEvent(event);\n}\nfunction extend() {\n var target = arguments[0] || {};\n var deep = false;\n var arr = Array.prototype.slice.call(arguments);\n var i = 1;\n var options, src, key, copy;\n var isArray = false;\n if (typeof target === 'boolean') {\n deep = target;\n i++;\n target = arguments[1];\n }\n for (; i < arr.length; i++) {\n // 循环传入的对象数组\n if ((options = arr[i]) != null) {\n // 如果当前值不是null,如果是null不做处理\n for (key in options) {\n // for in循环对象中key\n copy = options[key];\n src = target[key];\n // 如果对象中value值任然是一个引用类型\n if (deep && (toString.call(copy) === '[object Object]' || (isArray = toString.call(copy) == '[object Array]'))) {\n if (isArray) {\n // 如果引用类型是数组\n // 如果目标对象target存在当前key,且数据类型是数组,那就还原此值,如果不是就定义成一个空数组;\n src = toString.call(src) === '[object Array]' ? src : [];\n } else {\n // 如果目标对象target存在当前key,且数据类型是对象,那就还原此值,如果不是就定义成一个空对象;\n src = toString.call(src) === '[object Object]' ? src : {};\n }\n // 引用类型就再次调用extend,递归,直到此时copy是一个基本类型的值。\n target[key] = extend(deep, src, copy);\n } else if (copy !== undefined && copy !== src) {\n // 如果这个值是基本值类型,且不是undefined\n target[key] = copy;\n }\n }\n }\n }\n return target;\n}\nfunction createObj(obj, bind) {\n var list = bind.split('.');\n var first = list.splice(0, 1)[0];\n var deep = {};\n deep[first] = {};\n if (list.length >= 2) {\n var start = '{';\n var end = '}';\n var result = '';\n list.forEach(function (ele) {\n result = \"\".concat(result).concat(start, \"\\\"\").concat(ele, \"\\\":\");\n });\n result = \"\".concat(result, \"\\\"\\\"\");\n for (var i = 0; i < list.length; i++) {\n result = \"\".concat(result).concat(end);\n }\n result = JSON.parse(result);\n deep[first] = result;\n }\n obj = extend(true, obj, deep);\n return obj;\n}\nfunction dataURLtoFile(dataurl, filename) {\n var arr = dataurl.split(',');\n var mime = arr[0].match(/:(.*?);/)[1];\n var bstr = atob(arr[1]);\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n return new File([u8arr], filename, {\n type: mime\n });\n}\nfunction findObject() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var value = arguments.length > 1 ? arguments[1] : undefined;\n var prop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'prop';\n var result;\n result = findNode(list, {\n value: prop\n }, value);\n if (!result) {\n list.forEach(function (ele) {\n if (ele.column) {\n if (!result) result = findNode(ele.column, {\n value: prop\n }, value);\n } else if (ele.children && global_variable__WEBPACK_IMPORTED_MODULE_1__[\"CHILDREN_LIST\"].includes(ele.type)) {\n if (!result) result = findNode(ele.children.column, {\n value: prop\n }, value);\n }\n });\n }\n return result;\n}\n/**\r\n * 生成随机数\r\n */\nfunction randomId() {\n var $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n var maxPos = $chars.length;\n var id = '';\n for (var i = 0; i < 16; i++) {\n id += $chars.charAt(Math.floor(Math.random() * maxPos));\n }\n return id;\n}\nvar getObjType = function getObjType(obj) {\n var toString = Object.prototype.toString;\n var map = {\n '[object Boolean]': 'boolean',\n '[object Number]': 'number',\n '[object String]': 'string',\n '[object Function]': 'function',\n '[object Array]': 'array',\n '[object Date]': 'date',\n '[object RegExp]': 'regExp',\n '[object Undefined]': 'undefined',\n '[object Null]': 'null',\n '[object Object]': 'object'\n };\n if (obj instanceof Element) {\n return 'element';\n }\n return map[toString.call(obj)];\n};\n/**\r\n *判断是否为json对象\r\n */\n\nvar isJson = function isJson(str) {\n if (Array.isArray(str)) {\n if (str[0] instanceof Object) {\n return true;\n } else {\n return false;\n }\n } else if (str instanceof Object) {\n return true;\n }\n return false;\n};\n/**\r\n * 对象深拷贝\r\n */\nvar deepClone = function deepClone(data) {\n var type = getObjType(data);\n var obj;\n if (type === 'array') obj = [];else if (type === 'object') obj = {};else return data;\n if (type === 'array') {\n for (var i = 0, len = data.length; i < len; i++) {\n data[i] = function () {\n if (data[i] === 0) {\n return data[i];\n }\n return data[i];\n }();\n if (data[i]) {\n delete data[i].$parent;\n }\n obj.push(deepClone(data[i]));\n }\n } else if (type === 'object') {\n for (var key in data) {\n if (data) {\n delete data.$parent;\n }\n obj[key] = deepClone(data[key]);\n }\n }\n return obj;\n};\nvar getColumn = function getColumn(column) {\n var columnList = [];\n if (Array.isArray(column)) {\n columnList = column;\n } else {\n for (var o in column) {\n var columnMerge = _objectSpread(_objectSpread({}, column[o]), {\n prop: o\n });\n columnList.push(columnMerge);\n }\n }\n return columnList;\n};\n\n/**\r\n * 设置px像素\r\n */\nvar setPx = function setPx(val) {\n var defval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val)) val = defval;\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val)) return '';\n val = val + '';\n if (val.indexOf('%') === -1) {\n val = val + 'px';\n }\n return val;\n};\n\n/**\r\n * 字符串数据类型转化\r\n */\nvar detailDataType = function detailDataType(value, type) {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) return value;\n if (type === 'number') {\n return Number(value);\n } else if (type === 'string') {\n return value + '';\n } else {\n return value;\n }\n};\n\n/**\r\n * 根据字典的value显示label\r\n */\n\nvar getDicValue = function getDicValue(list, value) {\n var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(list)) return value;\n var isArray = Array.isArray(value);\n value = isArray ? value : [value];\n var result = [];\n var labelKey = props[global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].label] || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].label;\n var groupsKey = props[global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].groups] || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].groups;\n var dic = deepClone(list);\n dic.forEach(function (ele) {\n if (ele[groupsKey]) {\n dic = dic.concat(ele[groupsKey]);\n delete ele[groupsKey];\n }\n });\n value.forEach(function (val) {\n if (Array.isArray(val)) {\n var array_result = [];\n val.forEach(function (array_val) {\n var obj = findNode(dic, props, array_val) || {};\n array_result.push(obj[labelKey] || array_val);\n });\n result.push(array_result);\n } else {\n var obj = findNode(dic, props, val) || {};\n result.push(obj[labelKey] || val);\n }\n });\n if (isArray) {\n return result;\n } else {\n return result.join('');\n }\n};\n/**\r\n * 过滤字典翻译字段和空字段\r\n */\nvar filterParams = function filterParams(form) {\n var list = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['', '$'];\n var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var data = deep ? deepClone(form) : form;\n for (var o in data) {\n if (list.includes('')) {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(data[o])) delete data[o];\n }\n if (list.includes('$')) {\n if (o.indexOf('$') !== -1) delete data[o];\n }\n }\n return data;\n};\n\n/**\r\n * 根据值查找对应的序号\r\n */\nvar findArray = function findArray() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var value = arguments.length > 1 ? arguments[1] : undefined;\n var valueKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value;\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var node;\n if (index) {\n node = list.findIndex(function (ele) {\n return ele[valueKey] == value;\n });\n } else {\n node = list.find(function (ele) {\n return ele[valueKey] == value;\n });\n }\n return node;\n};\nvar findNode = function findNode() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var value = arguments.length > 2 ? arguments[2] : undefined;\n var valueKey = props.value || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value;\n var childrenKey = props.children || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].children;\n for (var i = 0; i < list.length; i++) {\n var ele = list[i];\n if (ele[valueKey] == value) {\n if (value === 0 || ele[valueKey] === 0) {\n if (ele[valueKey] === value) {\n return ele;\n }\n } else {\n return ele;\n }\n } else if (ele[childrenKey] && Array.isArray(ele[childrenKey])) {\n var node = findNode(ele[childrenKey], props, value);\n if (node) return node;\n }\n }\n};\n/**\r\n * 根据位数获取*密码程度\r\n */\nvar getPasswordChar = function getPasswordChar() {\n var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var _char = arguments.length > 1 ? arguments[1] : undefined;\n var len = result.toString().length;\n result = '';\n for (var i = 0; i < len; i++) {\n result = result + _char;\n }\n return result;\n};\nvar arraySort = function arraySort() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var prop = arguments.length > 1 ? arguments[1] : undefined;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n return list.filter(function (ele) {\n return !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele[prop]);\n }).sort(function (a, b) {\n return callback(a, b);\n }).concat(list.filter(function (ele) {\n return Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele[prop]);\n }));\n};\nvar blankVal = function blankVal(value) {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) return value;\n var type = getObjType(value);\n if (type === 'array') value = [];else if (type === 'object') value = {};else if (['number', 'boolean'].includes(type)) value = undefined;else value = '';\n return value;\n};\nvar clearVal = function clearVal(obj, propList) {\n var list = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n if (!obj) return {};\n propList.forEach(function (ele) {\n if (list.includes(ele)) return;else if (ele.includes('$')) delete obj[ele];else if (!Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(obj[ele])) {\n obj[ele] = blankVal(obj[ele]);\n }\n });\n return obj;\n};\n/**\r\n * 验证是否存在true/false\r\n */\nvar vaildData = function vaildData(val, dafult) {\n if (typeof val === 'boolean') {\n return val;\n }\n return !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val) ? val : dafult;\n};\n\n//# sourceURL=webpack://AVUE/./src/utils/util.js?");
|
5353
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isMediaType\", function() { return isMediaType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"uuid\", function() { return uuid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFixed\", function() { return getFixed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAsVal\", function() { return getAsVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAsVal\", function() { return setAsVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadScript\", function() { return loadScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"downFile\", function() { return downFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createObj\", function() { return createObj; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dataURLtoFile\", function() { return dataURLtoFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findObject\", function() { return findObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"randomId\", function() { return randomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getObjType\", function() { return getObjType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isJson\", function() { return isJson; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deepClone\", function() { return deepClone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getColumn\", function() { return getColumn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setPx\", function() { return setPx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detailDataType\", function() { return detailDataType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDicValue\", function() { return getDicValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterParams\", function() { return filterParams; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findArray\", function() { return findArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findNode\", function() { return findNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPasswordChar\", function() { return getPasswordChar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"arraySort\", function() { return arraySort; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blankVal\", function() { return blankVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clearVal\", function() { return clearVal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"vaildData\", function() { return vaildData; });\n/* harmony import */ var _validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validate */ \"./src/utils/validate.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\nconst isMediaType = (url, type) => {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(url)) return;\n if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].audio.test(url) || type == 'audio') {\n return 'audio';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].video.test(url) || type == 'video') {\n return 'video';\n } else if (global_variable__WEBPACK_IMPORTED_MODULE_1__[\"typeList\"].img.test(url) || type == 'img') {\n return 'img';\n }\n return;\n};\nconst uuid = () => {\n var s = [];\n var hexDigits = \"0123456789abcdef\";\n for (var i = 0; i < 36; i++) {\n s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);\n }\n s[14] = \"4\"; // bits 12-15 of the time_hi_and_version field to 0010\n s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01\n s[8] = s[13] = s[18] = s[23] = \"-\";\n var uuid = s.join(\"\");\n return uuid;\n};\nfunction getFixed(val = 0, len = 2) {\n return Number(val.toFixed(len));\n}\nfunction getAsVal(obj, bind = '') {\n let result = deepClone(obj);\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(bind)) return result;\n bind.split('.').forEach(ele => {\n result = !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(result[ele]) ? result[ele] : '';\n });\n return result;\n}\nfunction setAsVal(obj, bind = '', value) {\n let result;\n let type = getObjType(value);\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) {\n if (type === 'array') {\n result = `obj.${bind}=[]`;\n } else if (type === 'object') {\n result = `obj.${bind}={}`;\n } else if (['number', 'boolean'].includes(type)) {\n result = `obj.${bind}=undefined`;\n } else {\n result = `obj.${bind}=''`;\n }\n } else {\n if (type == 'string') {\n result = `obj.${bind}='${value}'`;\n } else {\n result = `obj.${bind}=${value}`;\n }\n }\n eval(result);\n return obj;\n}\nconst loadScript = (type = 'js', url, dom = \"body\") => {\n let flag = false;\n return new Promise(resolve => {\n const head = dom == 'head' ? document.getElementsByTagName('head')[0] : document.body;\n for (let i = 0; i < head.children.length; i++) {\n let ele = head.children[i];\n if ((ele.src || '').indexOf(url) !== -1) {\n flag = true;\n resolve();\n }\n }\n if (flag) return;\n let script;\n if (type === 'js') {\n script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n } else if (type === 'css') {\n script = document.createElement('link');\n script.rel = 'stylesheet';\n script.type = 'text/css';\n script.href = url;\n }\n head.appendChild(script);\n script.onload = function () {\n resolve();\n };\n });\n};\nfunction downFile(url, saveName) {\n if (typeof url == 'object' && url instanceof Blob) {\n url = URL.createObjectURL(url); // 创建blob地址\n }\n var aLink = document.createElement('a');\n aLink.href = url;\n aLink.download = saveName || ''; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效\n var event;\n if (window.MouseEvent) {\n event = new MouseEvent('click');\n } else {\n event = document.createEvent('MouseEvents');\n event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n }\n aLink.dispatchEvent(event);\n}\nfunction extend() {\n var target = arguments[0] || {};\n var deep = false;\n var arr = Array.prototype.slice.call(arguments);\n var i = 1;\n var options, src, key, copy;\n var isArray = false;\n if (typeof target === 'boolean') {\n deep = target;\n i++;\n target = arguments[1];\n }\n for (; i < arr.length; i++) {\n // 循环传入的对象数组\n if ((options = arr[i]) != null) {\n // 如果当前值不是null,如果是null不做处理\n for (key in options) {\n // for in循环对象中key\n copy = options[key];\n src = target[key];\n // 如果对象中value值任然是一个引用类型\n if (deep && (toString.call(copy) === '[object Object]' || (isArray = toString.call(copy) == '[object Array]'))) {\n if (isArray) {\n // 如果引用类型是数组\n // 如果目标对象target存在当前key,且数据类型是数组,那就还原此值,如果不是就定义成一个空数组;\n src = toString.call(src) === '[object Array]' ? src : [];\n } else {\n // 如果目标对象target存在当前key,且数据类型是对象,那就还原此值,如果不是就定义成一个空对象;\n src = toString.call(src) === '[object Object]' ? src : {};\n }\n // 引用类型就再次调用extend,递归,直到此时copy是一个基本类型的值。\n target[key] = extend(deep, src, copy);\n } else if (copy !== undefined && copy !== src) {\n // 如果这个值是基本值类型,且不是undefined\n target[key] = copy;\n }\n }\n }\n }\n return target;\n}\nfunction createObj(obj, bind) {\n let list = bind.split('.');\n let first = list.splice(0, 1)[0];\n let deep = {};\n deep[first] = {};\n if (list.length >= 2) {\n let start = '{';\n let end = '}';\n let result = '';\n list.forEach(ele => {\n result = `${result}${start}\"${ele}\":`;\n });\n result = `${result}\"\"`;\n for (let i = 0; i < list.length; i++) {\n result = `${result}${end}`;\n }\n result = JSON.parse(result);\n deep[first] = result;\n }\n obj = extend(true, obj, deep);\n return obj;\n}\nfunction dataURLtoFile(dataurl, filename) {\n let arr = dataurl.split(',');\n let mime = arr[0].match(/:(.*?);/)[1];\n let bstr = atob(arr[1]);\n let n = bstr.length;\n let u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n return new File([u8arr], filename, {\n type: mime\n });\n}\nfunction findObject(list = [], value, prop = 'prop') {\n let result;\n result = findNode(list, {\n value: prop\n }, value);\n if (!result) {\n list.forEach(ele => {\n if (ele.column) {\n if (!result) result = findNode(ele.column, {\n value: prop\n }, value);\n } else if (ele.children && global_variable__WEBPACK_IMPORTED_MODULE_1__[\"CHILDREN_LIST\"].includes(ele.type)) {\n if (!result) result = findNode(ele.children.column, {\n value: prop\n }, value);\n }\n });\n }\n return result;\n}\n/**\r\n * 生成随机数\r\n */\nfunction randomId() {\n let $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n let maxPos = $chars.length;\n let id = '';\n for (let i = 0; i < 16; i++) {\n id += $chars.charAt(Math.floor(Math.random() * maxPos));\n }\n return id;\n}\nconst getObjType = obj => {\n var toString = Object.prototype.toString;\n var map = {\n '[object Boolean]': 'boolean',\n '[object Number]': 'number',\n '[object String]': 'string',\n '[object Function]': 'function',\n '[object Array]': 'array',\n '[object Date]': 'date',\n '[object RegExp]': 'regExp',\n '[object Undefined]': 'undefined',\n '[object Null]': 'null',\n '[object Object]': 'object'\n };\n if (obj instanceof Element) {\n return 'element';\n }\n return map[toString.call(obj)];\n};\n/**\r\n *判断是否为json对象\r\n */\n\nconst isJson = str => {\n if (Array.isArray(str)) {\n if (str[0] instanceof Object) {\n return true;\n } else {\n return false;\n }\n } else if (str instanceof Object) {\n return true;\n }\n return false;\n};\n/**\r\n * 对象深拷贝\r\n */\nconst deepClone = data => {\n var type = getObjType(data);\n var obj;\n if (type === 'array') obj = [];else if (type === 'object') obj = {};else return data;\n if (type === 'array') {\n for (var i = 0, len = data.length; i < len; i++) {\n data[i] = (() => {\n if (data[i] === 0) {\n return data[i];\n }\n return data[i];\n })();\n if (data[i]) {\n delete data[i].$parent;\n }\n obj.push(deepClone(data[i]));\n }\n } else if (type === 'object') {\n for (var key in data) {\n if (data) {\n delete data.$parent;\n }\n obj[key] = deepClone(data[key]);\n }\n }\n return obj;\n};\nconst getColumn = column => {\n let columnList = [];\n if (Array.isArray(column)) {\n columnList = column;\n } else {\n for (let o in column) {\n let columnMerge = {\n ...column[o],\n ...{\n prop: o\n }\n };\n columnList.push(columnMerge);\n }\n }\n return columnList;\n};\n\n/**\r\n * 设置px像素\r\n */\nconst setPx = (val, defval = '') => {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val)) val = defval;\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val)) return '';\n val = val + '';\n if (val.indexOf('%') === -1) {\n val = val + 'px';\n }\n return val;\n};\n\n/**\r\n * 字符串数据类型转化\r\n */\nconst detailDataType = (value, type) => {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) return value;\n if (type === 'number') {\n return Number(value);\n } else if (type === 'string') {\n return value + '';\n } else {\n return value;\n }\n};\n\n/**\r\n * 根据字典的value显示label\r\n */\n\nconst getDicValue = (list, value, props = {}) => {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(list)) return value;\n let isArray = Array.isArray(value);\n value = isArray ? value : [value];\n let result = [];\n let labelKey = props[global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].label] || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].label;\n let groupsKey = props[global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].groups] || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].groups;\n let dic = deepClone(list);\n dic.forEach(ele => {\n if (ele[groupsKey]) {\n dic = dic.concat(ele[groupsKey]);\n delete ele[groupsKey];\n }\n });\n value.forEach(val => {\n if (Array.isArray(val)) {\n let array_result = [];\n val.forEach(array_val => {\n let obj = findNode(dic, props, array_val) || {};\n array_result.push(obj[labelKey] || array_val);\n });\n result.push(array_result);\n } else {\n let obj = findNode(dic, props, val) || {};\n result.push(obj[labelKey] || val);\n }\n });\n if (isArray) {\n return result;\n } else {\n return result.join('');\n }\n};\n/**\r\n * 过滤字典翻译字段和空字段\r\n */\nconst filterParams = (form, list = ['', '$'], deep = true) => {\n let data = deep ? deepClone(form) : form;\n for (let o in data) {\n if (list.includes('')) {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(data[o])) delete data[o];\n }\n if (list.includes('$')) {\n if (o.indexOf('$') !== -1) delete data[o];\n }\n }\n return data;\n};\n\n/**\r\n * 根据值查找对应的序号\r\n */\nconst findArray = (list = [], value, valueKey = global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value, index = false) => {\n let node;\n if (index) {\n node = list.findIndex(ele => ele[valueKey] == value);\n } else {\n node = list.find(ele => ele[valueKey] == value);\n }\n return node;\n};\nconst findNode = (list = [], props = {}, value) => {\n let valueKey = props.value || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].value;\n let childrenKey = props.children || global_variable__WEBPACK_IMPORTED_MODULE_1__[\"DIC_PROPS\"].children;\n for (let i = 0; i < list.length; i++) {\n const ele = list[i];\n if (ele[valueKey] == value) {\n if (value === 0 || ele[valueKey] === 0) {\n if (ele[valueKey] === value) {\n return ele;\n }\n } else {\n return ele;\n }\n } else if (ele[childrenKey] && Array.isArray(ele[childrenKey])) {\n let node = findNode(ele[childrenKey], props, value);\n if (node) return node;\n }\n }\n};\n/**\r\n * 根据位数获取*密码程度\r\n */\nconst getPasswordChar = (result = '', char) => {\n let len = result.toString().length;\n result = '';\n for (let i = 0; i < len; i++) {\n result = result + char;\n }\n return result;\n};\nconst arraySort = (list = [], prop, callback) => {\n return list.filter(ele => !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele[prop])).sort((a, b) => callback(a, b)).concat(list.filter(ele => Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele[prop])));\n};\nconst blankVal = value => {\n if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(value)) return value;\n let type = getObjType(value);\n if (type === 'array') value = [];else if (type === 'object') value = {};else if (['number', 'boolean'].includes(type)) value = undefined;else value = '';\n return value;\n};\nconst clearVal = (obj, propList, list = []) => {\n if (!obj) return {};\n propList.forEach(ele => {\n if (list.includes(ele)) return;else if (ele.includes('$')) delete obj[ele];else if (!Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(obj[ele])) {\n obj[ele] = blankVal(obj[ele]);\n }\n });\n return obj;\n};\n/**\r\n * 验证是否存在true/false\r\n */\nconst vaildData = (val, dafult) => {\n if (typeof val === 'boolean') {\n return val;\n }\n return !Object(_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(val) ? val : dafult;\n};\n\n//# sourceURL=webpack://AVUE/./src/utils/util.js?");
|
5354
5354
|
|
5355
5355
|
/***/ }),
|
5356
5356
|
|
@@ -5374,7 +5374,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5374
5374
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5375
5375
|
|
5376
5376
|
"use strict";
|
5377
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\
|
5377
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\nconst version = '0.1.0';\n\n//# sourceURL=webpack://AVUE/./src/version.js?");
|
5378
5378
|
|
5379
5379
|
/***/ }),
|
5380
5380
|
|
@@ -5385,7 +5385,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
5385
5385
|
/*! no static exports found */
|
5386
5386
|
/***/ (function(module, exports, __webpack_require__) {
|
5387
5387
|
|
5388
|
-
eval("module.exports = __webpack_require__(/*! /Users/xuexingwei/Desktop/code/avue/src/index.js */\"./src/index.js\");\n\n\n//# sourceURL=webpack://AVUE/multi_./src/index.js?");
|
5388
|
+
eval("module.exports = __webpack_require__(/*! /Users/xuexingwei/Desktop/code/jsy-avue/src/index.js */\"./src/index.js\");\n\n\n//# sourceURL=webpack://AVUE/multi_./src/index.js?");
|
5389
5389
|
|
5390
5390
|
/***/ }),
|
5391
5391
|
|