UNPKG

@varonervar/components

Version:

> 基于[Element-UI](https://element.eleme.cn/#/zh-CN/component/quickstart) 封装常用组件,部分组件参考[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

1,735 lines (1,604 loc) 191 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ 0: 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { /******/ return __webpack_require__.p + "" + chunkId + ".js" /******/ } /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ var promises = []; /******/ /******/ /******/ // JSONP chunk loading for javascript /******/ /******/ var installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ // setup Promise in chunk cache /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var script = document.createElement('script'); /******/ var onScriptComplete; /******/ /******/ script.charset = 'utf-8'; /******/ script.timeout = 120; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = jsonpScriptSrc(chunkId); /******/ /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ onScriptComplete = function (event) { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ chunk[1](error); /******/ } /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ var timeout = setTimeout(function(){ /******/ onScriptComplete({ type: 'timeout', target: script }); /******/ }, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ document.head.appendChild(script); /******/ } /******/ } /******/ return Promise.all(promises); /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist/"; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ /******/ var jsonpArray = window["webpackJsonpELEMENT"] = window["webpackJsonpELEMENT"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 9); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier /* server only */, shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection(h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/es.array.includes.js"); /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-table/body/ZTable.vue?vue&type=template&id=b0f170b6& var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "wl-ztable" }, [ _c( "el-table", _vm._g( _vm._b( { ref: "table", staticStyle: { width: "100%" }, attrs: { data: _vm.tableData, "header-row-class-name": "table-header", }, scopedSlots: _vm._u( [ { key: "append", fn: function () { return [_vm._t("append")] }, proxy: true, }, ], null, true ), }, "el-table", _vm.$attrs, false ), _vm.$listeners ), [ _vm.isShowCheck ? _c("el-table-column", { attrs: { "is-show-check": _vm.isShowCheck, type: "selection", width: "55", }, }) : _vm._e(), _vm.isShowIndex ? _c("el-table-column", { attrs: { type: "index", width: "55", label: _vm.indexLabel }, }) : _vm._e(), _vm._l(_vm.showTableFormat, function (column) { return [ _c( "el-table-column", _vm._b( { key: column.value, attrs: { label: column.label, prop: column.value, "show-overflow-tooltip": true, }, scopedSlots: _vm._u( [ column.template === "slot" ? { key: "default", fn: function (ref) { var row = ref.row var col = ref.column return [ _vm._t(column.slotName, null, { row: row, column: col, }), ] }, } : column.template === "enumer" ? { key: "default", fn: function (ref) { var row = ref.row var col = ref.column return [ _c("span", [ _vm._v( _vm._s( (typeof column.enumer[ row[col.property] ] === "function" ? column.enumer[row[col.property]]( row ) : column.enumer[row[col.property]]) || col.def || "-" ) ), ]), ] }, } : column.list && [ "select", "radio", "radioButton", "checkbox", ].includes(column.template) ? { key: "default", fn: function (ref) { var row = ref.row var col = ref.column return _vm._l( column.list, function (valueEnumItem, index) { return _c( "div", { key: index }, [ row[col.property] == valueEnumItem.value ? [ valueEnumItem.status ? _c( "el-link", { attrs: { underline: false, type: valueEnumItem.status, }, }, [ _vm._v( _vm._s( valueEnumItem.label ) ), ] ) : _c("span", [ _vm._v( _vm._s( valueEnumItem.label || col.def || "-" ) ), ]), ] : _vm._e(), ], 2 ) } ) }, } : column.template === "time" ? { key: "default", fn: function (ref) { var row = ref.row return [ _c("span", [ _vm._v( _vm._s( _vm._f("dateFormat")( (column.value || "") .split(/,|,/g) .map(function (v) { return row[v] }), { def: column.def, format: column.format, flag: column.connectFlag, } ) ) ), ]), ] }, } : { key: "default", fn: function (ref) { var row = ref.row var col = ref.column return [ column.iconfont ? _c("i", { class: column.iconfont, attrs: { classs: "table-item-icon" }, }) : _vm._e(), _c("span", { staticClass: "span" }, [ _vm._v( _vm._s( row[col.property] == null || row[col.property] === "" ? col.def || "-" : row[col.property] ) ), ]), ] }, }, ], null, true ), }, "el-table-column", Object.assign({}, column.bind, column.config), false ) ), ] }), _vm.isShowOpions ? _c("el-table-column", { staticClass: "options-col", attrs: { label: _vm.optionsLabel, "header-align": "left", fixed: _vm.optionsFixed, width: _vm.optionsWidth, }, scopedSlots: _vm._u( [ { key: "default", fn: function (scope) { return [ _vm._t("options", null, { row: scope.row, column: scope.column, $index: scope.$index, }), ] }, }, ], null, true ), }) : _vm._e(), ], 2 ), _vm.isShowPagination ? _c( "div", { staticClass: "pagination flex-align-center" }, [ _c( "el-dropdown", { on: { command: _vm.sizeChange } }, [ _c("span", { staticClass: "page-info" }, [ _vm._v( "\n 每页显示 " + _vm._s(_vm.paginationObj.pageSize) + " 项" ), _c("i", { staticClass: "el-icon-arrow-down el-icon--right", }), ]), _c( "el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, _vm._l(_vm.pageSizes, function (item) { return _c( "el-dropdown-item", { key: item, attrs: { command: item } }, [_vm._v("每页显示 " + _vm._s(item) + " 项")] ) }), 1 ), ], 1 ), _c("span", { staticClass: "page-info total" }, [ _vm._v("总计" + _vm._s(_vm.paginationObj.total) + "项"), ]), _c("el-pagination", { attrs: { layout: "prev, pager, next", "page-size": _vm.paginationObj.pageSize, "current-page": _vm.paginationObj.pageNum, "page-sizes": _vm.pageSizes, total: _vm.paginationObj.total, }, on: { "size-change": _vm.sizeChange, "current-change": _vm.currentChange, }, }), _c( "div", { staticClass: "el-input el-pagination__editor is-in-pagination", }, [ _c("input", { ref: "number", staticClass: "el-input__inner", attrs: { type: "number", autocomplete: "off", min: "1", max: "2", }, domProps: { value: _vm.jumpPage }, on: { change: _vm.jumpNumberChange, keyup: function ($event) { if ( !$event.type.indexOf("key") && _vm._k( $event.keyCode, "enter", 13, $event.key, "Enter" ) ) { return null } return _vm.jumpGo.apply(null, arguments) }, }, }), ] ), _c("p", { staticClass: "jumpbtn", on: { click: _vm.jumpGo } }, [ _vm._v("跳转"), ]), ], 1 ) : _vm._e(), ], 1 ) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/z-table/body/ZTable.vue?vue&type=template&id=b0f170b6& // EXTERNAL MODULE: external "dayjs" var external_dayjs_ = __webpack_require__(5); var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-table/body/ZTable.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // const _pageSize = 30; const _pageNum = 1; const _pageTotal = 0; /* harmony default export */ var ZTablevue_type_script_lang_js_ = ({ name: 'ZTable', filters: { dateFormat(arr, _ref) { let { def, format = 'YYYY-MM-DD HH:mm:ss', flag = '-' } = _ref; try { if (arr.some(v => !v)) return def || '-'; return arr.map(t => external_dayjs_default()(new Date(t)).format(format)).join(flag); } catch (error) { return def || '-'; } } }, inheritAttrs: false, props: { pageSizes: { type: Array, default() { return [10, 20, 30, 40, 50, 100]; } }, tableData: { // table数据 type: Array, required: true }, // 请求函数 getTableData: { type: Function, required: true }, /** * label:必需 * value:必需 * template: 决定column的种类 * width:宽度 */ tableFormat: { // table格式 type: Array, required: true }, // 是否初始调用函数 isInitGetData: { type: Boolean, default: true }, isShowCheck: { // 是否显示选择行 type: Boolean, default: false }, isShowIndex: { // 是否显示序号 type: Boolean, default: false }, indexLabel: { type: String, default: '序号' }, isShowOpions: { // 是否显示操作列 type: Boolean, default: true }, optionsLabel: { // 操作的label type: String, default: '操作' }, optionsFixed: { type: [String, Boolean], default: false }, optionsWidth: { // 操作的宽度 type: [String, Number], default: '160' }, isShowPagination: { // 是否显示分页 type: Boolean, default: true }, value: { type: Object, default() { return { pageNum: _pageNum, pageSize: _pageSize, total: _pageTotal }; } } }, data() { return { jumpPage: '', paginationObj: { total: _pageTotal, pageSize: _pageSize, pageNum: _pageNum } }; }, methods: { jumpNumberChange(e) { const eVal = e.target.value; const { total, pageSize } = this.paginationObj; const max = Math.ceil(total / pageSize); if (eVal > max) { e.target.value = max; } else if (eVal <= 0) { this.jumpPage = 1; e.target.value = 1; } else { this.jumpPage = +eVal; } }, jumpGo() { if (!this.jumpPage) return; this.paginationObj.pageNum = this.jumpPage; this.$emit('input', { ...this.paginationObj }); typeof this.getTableData === 'function' && this.getTableData(this._setTotal.bind(this)); }, sizeChange(size) { this.paginationObj.pageNum = 1; this.paginationObj.pageSize = size; this.$emit('input', { ...this.paginationObj }); typeof this.getTableData === 'function' && this.getTableData(this._setTotal.bind(this)); }, currentChange(page) { this.paginationObj.pageNum = page; this.$emit('input', { ...this.paginationObj }); typeof this.getTableData === 'function' && this.getTableData(this._setTotal.bind(this)); }, toSearch() { this.paginationObj.pageNum = 1; this.$emit('input', { ...this.paginationObj }); typeof this.getTableData === 'function' && this.getTableData(this._setTotal.bind(this)); }, // 设置总数 _setTotal(total) { if (typeof total !== 'number' || !(+total >= 0)) { console.error('总条数必须是正整数!'); return; } this.paginationObj.total = total; this.$emit('input', { ...this.paginationObj }); }, table() { return this.$refs.table; }, clearSelection() { return this.$refs.table.clearSelection(); }, toggleRowSelection(row) { return this.$refs.table.toggleRowSelection(row); } }, mounted() { if (this.isInitGetData) { this.$nextTick(() => { typeof this.getTableData === 'function' && this.getTableData(this._setTotal.bind(this)); }); } }, computed: { showTableFormat(_ref2) { let { tableFormat } = _ref2; return tableFormat.filter(v => !v.hidden); } }, watch: { value: { handler(v) { this.paginationObj.pageNum = v.pageNum || _pageNum; this.paginationObj.pageSize = v.pageSize || _pageSize; this.paginationObj.total = v.total || _pageTotal; }, immediate: true, deep: true } } }); // CONCATENATED MODULE: ./packages/z-table/body/ZTable.vue?vue&type=script&lang=js& /* harmony default export */ var body_ZTablevue_type_script_lang_js_ = (ZTablevue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/z-table/body/ZTable.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( body_ZTablevue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var ZTable = (component.exports); // CONCATENATED MODULE: ./packages/z-table/index.js /* istanbul ignore next */ ZTable.install = function install(Vue) { Vue.component(ZTable.name, ZTable); }; /* harmony default export */ var z_table = __webpack_exports__["a"] = (ZTable); /***/ }), /* 3 */ /***/ (function(module, exports) { module.exports = require("element-ui"); /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-object-show/body/index.vue?vue&type=template&id=0f12df6e& var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "wl-objectshow flex" }, [ _vm._l(_vm.showData, function (value, key) { return _c( "p", { key: key, staticClass: "wl-objectshow__p" }, [ _c( "el-tag", { staticClass: "mr-5", attrs: { size: "small", type: "primary" }, }, [_vm._v(_vm._s(key))] ), typeof value === "object" ? [ Object.keys(value || {}).length ? _c( "el-button", { attrs: { size: "mini" }, on: { click: function ($event) { _vm.btnHandler( Array.isArray(value) ? "subList" : "subData", key, value ) }, }, }, [_vm._v("查看详情")] ) : _c("span", [_vm._v("null")]), ] : [ _c("span", [ _vm._v(_vm._s(_vm.isFalse(value) ? "null" : value)), ]), ], ], 2 ) }), _c( "el-dialog", { attrs: { visible: _vm.dialogVisible, "close-on-click-modal": false, title: _vm.dialogTitle, "append-to-body": true, top: "50px", width: "80vw", }, on: { "update:visible": function ($event) { _vm.dialogVisible = $event }, }, }, [ _vm.dialogVisible ? [ _vm.isObjectData ? _c("ZObjectShow", { attrs: { data: _vm.subData } }) : _c("ZarrayShow", { attrs: { list: _vm.subList } }), ] : _vm._e(), _c( "footer", { staticClass: "dialog-footer text-right" }, [ _c( "el-button", { attrs: { size: "small" }, on: { click: function ($event) { _vm.dialogVisible = false }, }, }, [_vm._v("关 闭")] ), ], 1 ), ], 2 ), ], 2 ) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/z-object-show/body/index.vue?vue&type=template&id=0f12df6e& // EXTERNAL MODULE: external "core-js/modules/es.array.includes.js" var es_array_includes_js_ = __webpack_require__(1); // EXTERNAL MODULE: external "dayjs" var external_dayjs_ = __webpack_require__(5); var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-object-show/body/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var bodyvue_type_script_lang_js_ = ({ name: 'ZObjectShow', inheritAttrs: false, props: { data: { type: Object, required: true }, config: { type: Array, default() { return []; } } }, data() { return { dialogVisible: false, // 弹窗显隐 dialogTitle: '', // 弹窗title isObjectData: true, // 弹窗内容是否是对象 subData: {}, // 弹窗数据object subList: [] // 弹窗数据array }; }, methods: { dateFormat(arr, _ref) { let { format = 'YYYY-MM-DD HH:mm:ss', flag = '-' } = _ref; try { if (arr.some(v => !v)) return null; return arr.map(t => external_dayjs_default()(new Date(t)).format(format)).join(flag); } catch (error) { return null; } }, btnHandler(flag, key, data) { this.dialogTitle = "".concat(key, "\u8BE6\u60C5"); this[flag] = data; this.isObjectData = flag === 'subData'; this.dialogVisible = true; }, isFalse(value) { return value == null || value === ''; } }, computed: { showData(_ref2) { let { data, config, dateFormat } = _ref2; const result = {}; const keyarr = []; // 再config里的数据,进行 config.forEach(v => { if (v.value && v.label) { // 如果是枚举数据 if (v.template === 'enumer' && v.enumer) { result[v.label] = v.enumer[data[v.value]]; keyarr.push(v.value); } else if (v.template === 'time') { // 如股是时间数据 const arr = v.value.split(','); result[v.label] = dateFormat(arr.map(it => data[it]), { format: v.format, flag: v.connectFlag }); keyarr.push(...arr); } else { // 其他的中文 result[v.label] = data[v.value]; keyarr.push(v.value); } } }); // 剩余没在config数组里的数据 Object.keys(data).forEach(key => { // 处理过的数据就不添加了 if (!keyarr.includes(key)) { result[key] = data[key]; } }); return result; } }, components: { ZarrayShow: () => __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, 16)) } }); // CONCATENATED MODULE: ./packages/z-object-show/body/index.vue?vue&type=script&lang=js& /* harmony default export */ var z_object_show_bodyvue_type_script_lang_js_ = (bodyvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/z-object-show/body/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( z_object_show_bodyvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var body = __webpack_exports__["default"] = (component.exports); /***/ }), /* 5 */ /***/ (function(module, exports) { module.exports = require("dayjs"); /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/es.error.cause.js"); /***/ }), /* 7 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/es.array.reduce.js"); /***/ }), /* 8 */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABC1BMVEUoKCgAAAApKSkrKysoKCgpKSkpKSkpKSknJycpKSn6+vrAwMDy8vInJycqKiopKSkkJCT9/f3r6+s5OTkoKCgoKCgoKCgqKionJyf4+Pji4uLf39+jo6MwMDDn5+fZ2dmwsLCKiop6enpqampgYGBTU1NLS0v19fXQ0NDMzMy7u7u0tLSVlZWDg4N9fX1xcXFCQkI1NTWOjo7u7u7b29vW1tbIyMi4uLilpaWPj4/T09PKyspaWlpMTEw5OTkuLi61tbWbm5vS0tLGxsbe3t6rq6uoqKiZmZmNjY3b29uGhoZ0dHTPz8/U1NRNTU3AwMDIyMjExMSsrKygoKCpqamYmJhcXFyIiIj////zQ87XAAAAWHRSTlPbANsUq4o+1qg3/vP8z49jB/77CcvAmmhh/fr47tz69/Dq5+Xj4eD99vXy8ezp6Obf3Vr7+Pf08u7q5+Li4N3cp2L29PLv7+zq6enm5eDg1tLOo5NoJRkPTY4kdQAAAnlJREFUSMeVl2dz4jAQhvcsMNgxvfdQQ4eQ3pPrvRf//19yvuHi7GtkCZ5vnvEz0qx2Vyt6JiVnlqKRQj4Wyxci0ZKZk/8lk0U5HiMgFi+LrWSraJAEo2hpZStOocQtpSySpCQpwmUzQRoSZpicMkiLkZLK6ShtRTS9KYsIbUlEBOU0uBo7HZADex50zkdVp5LJVJzqqN4ZBHaOcooYjVnLDdCaNYiR4rLJ43yddSVkr3nMzSdZ8POd264Ue87PW/gyz6s+uGD3ea49yhbfUM0NpUYM67/Ma6HrKujyKlnLFjH2VPJeYGlPLvJdH6jkAy4X/8nC4OFyldzwdYQnl4kxV8sdYpQ9GVrHVC1PCUJGOeh1r9Tya+iKOTIJg61kTByTSvA9Urp4Vp6KtXiyg+yp2ARqO8ieWoDv5g6yp+bhu7qD7Kl4Kz3fRY6h3D9Sy8eHIMO2l46rocbtPARs39VS5wGDo8rq5SY/KkiSik7Fko5Ceh7r5RZPTyiMtl5u88KAkjTGOvfMgJLEZtC7eBNuXrztYTPANuRhhIY8axBQXjdAoK4+YmyAXusFPmfkbmZAQNFv+pzzsIURy79uOA1pXVbvCIj7Fx3SszdduxdcmF2xQLcSdCtdQpJwuQM3LXRPBoQkBI4VyGKY8cM8XFAAw8SBZoPb07X74pY2SClGKWgN+5IhUD/ETUCGIU49Pi5nZ02/eYzbS3CFanC965wGU3T4/hAG17CRudGW1pUzbcDILB3WF0xFjj7AsC55JkxcBZONZwKyugp3Lx+0T6PVF0dm2p9+bvUo+/3jygmY7+5/qR5lSG71/dvHl45tO7XLr/cPf+R//QU4ErN5XnO4vQAAAABJRU5ErkJggg==" /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(15); /***/ }), /* 10 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/web.dom-exception.stack.js"); /***/ }), /* 11 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/es.typed-array.at.js"); /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/es.typed-array.set.js"); /***/ }), /* 13 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/esnext.typed-array.find-last.js"); /***/ }), /* 14 */ /***/ (function(module, exports) { module.exports = require("core-js/modules/esnext.typed-array.find-last-index.js"); /***/ }), /* 15 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "core-js/modules/es.array.includes.js" var es_array_includes_js_ = __webpack_require__(1); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/ham-burger/body/index.vue?vue&type=template&id=63afec0b& var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "wl-hamburger", staticStyle: { padding: "0 15px" }, on: { click: _vm.toggleClick }, }, [ _c( "svg", { staticClass: "wl-hamburger__svg", class: { "is-active": _vm.isActive }, attrs: { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", }, }, [ _c("path", { attrs: { d: "M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z", }, }), ] ), ] ) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/ham-burger/body/index.vue?vue&type=template&id=63afec0b& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ham-burger/body/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // /* harmony default export */ var bodyvue_type_script_lang_js_ = ({ name: 'HamBurger', props: { isActive: { type: Boolean, default: false } }, methods: { toggleClick() { this.$emit('toggleClick'); } } }); // CONCATENATED MODULE: ./packages/ham-burger/body/index.vue?vue&type=script&lang=js& /* harmony default export */ var ham_burger_bodyvue_type_script_lang_js_ = (bodyvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/ham-burger/body/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( ham_burger_bodyvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var body = (component.exports); // CONCATENATED MODULE: ./packages/ham-burger/index.js /* istanbul ignore next */ body.install = function install(Vue) { Vue.component(body.name, body); }; /* harmony default export */ var ham_burger = (body); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/pro-table/body/index.vue?vue&type=template&id=897ac76e& var bodyvue_type_template_id_897ac76e_render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", [ _c( "ZForm", _vm._b( { ref: "form", attrs: { inline: true, formFormat: _vm.columnsSearch }, model: { value: _vm.searchFormModel, callback: function ($$v) { _vm.searchFormModel = $$v }, expression: "searchFormModel", }, }, "ZForm", _vm.genProFormProps, false ), [ _c( "el-button", { attrs: { size: "mini", type: "default" }, on: { click: _vm.test }, }, [_vm._v("重置")] ), _c( "el-button", { attrs: { size: "mini", type: "primary" }, on: { click: _vm.test }, }, [_vm._v("查询")] ), _c( "el-button", { attrs: { size: "mini", type: "text", icon: "el-icon-arrow-down" }, on: { click: _vm.test }, }, [_vm._v("展开")] ), ], 1 ), _c("div", { domProps: { innerHTML: _vm._s(_vm.searchFormModel) } }), _c("div", { staticStyle: { height: "40px" } }, [ _c( "div", { staticStyle: { display: "flex", "justify-content": "space-between", }, }, [ _c( "div", { staticStyle: { display: "flex", "align-items": "center" } }, [ _c( "span", { directives: [ { name: "show", rawName: "v-show", value: _vm.multipleSelection.length, expression: "multipleSelection.length", }, ], }, [ _vm._v("已选择"), _c("el-button", { attrs: { type: "text" } }, [ _vm._v(_vm._s(_vm.multipleSelection.length)), ]), _vm._v("项"), ], 1 ), ] ), _c( "div", [ _vm.editable.addShow ? _c( "el-button", { attrs: { size: "mini", type: "primary" }, on: { click: _vm.handleOnOpenEditable }, }, [_vm._v("新增")] ) : _vm._e(), _c( "el-button", { attrs: { size: "mini", type: "primary" }, on: { click: function ($event) { return _vm.test(_vm.multipleSelection) }, }, }, [_vm._v("多选批量操作")] ), _c( "el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: "刷新", placement: "top-start", }, }, [ _c("el-link", { staticStyle: { "font-size": "18px", margin: "0 6px" }, attrs: { underline: false, icon: "el-icon-refresh-right", }, }), ], 1 ), _c( "el-popover", { attrs: { width: "60", placement: "top-start", trigger: "click", }, }, [ _c( "div", [ _c( "el-checkbox", { attrs: { indeterminate: _vm.columnSelectedIsIndeterminate, }, on: { change: _vm.handleColumnSelectedCheckAllChange, }, model: { value: _vm.columnSelectedCheckAll, callback: function ($$v) { _vm.columnSelectedCheckAll = $$v }, expression: "columnSelectedCheckAll", },