table-unit-table.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. exports.ids = [40];
  2. exports.modules = {
  3. /***/ 169:
  4. /***/ (function(module, exports) {
  5. // Exports
  6. module.exports = {
  7. };
  8. /***/ }),
  9. /***/ 189:
  10. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11. "use strict";
  12. __webpack_require__.r(__webpack_exports__);
  13. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
  14. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  16. /***/ }),
  17. /***/ 200:
  18. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19. "use strict";
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  23. var render = function render() {
  24. var _vm = this,
  25. _c = _vm._self._c;
  26. return _c('div', [_vm._ssrNode("<p class=\"tb-title\" data-v-931e8840>Markup %</p> "), _c('el-table', {
  27. ref: "elTable",
  28. style: {
  29. width: _vm.operateWith
  30. },
  31. attrs: {
  32. "border": "",
  33. "data": _vm.tableData,
  34. "highlight-current-row": false,
  35. "header-cell-style": {
  36. backgroundColor: '#fff',
  37. color: '#606266',
  38. fontWeight: 500,
  39. fontSize: '16px'
  40. }
  41. }
  42. }, [_vm._l(_vm.tableColumns, function (item) {
  43. return [item.isText ? _c('el-table-column', {
  44. key: item.prop,
  45. attrs: {
  46. "align": "center",
  47. "prop": item.prop,
  48. "label": item.label,
  49. "formatter": item.formatter,
  50. "width": item.width,
  51. "sortable": item.sortable
  52. }
  53. }) : _vm._e(), _vm._v(" "), !item.isText ? _c('el-table-column', {
  54. key: item.prop,
  55. attrs: {
  56. "prop": item.prop,
  57. "label": item.label,
  58. "formatter": item.formatter,
  59. "width": item.width,
  60. "align": item.align ? item.align : 'center',
  61. "sortable": item.sortable
  62. },
  63. scopedSlots: _vm._u([{
  64. key: "default",
  65. fn: function ({
  66. row,
  67. $index
  68. }) {
  69. return [_c('el-input', {
  70. staticClass: "edit-input",
  71. attrs: {
  72. "size": "small",
  73. "type": "number",
  74. "min": "0"
  75. },
  76. on: {
  77. "input": function ($event) {
  78. return _vm.saveUnitData(row, $index);
  79. }
  80. },
  81. model: {
  82. value: row[item.prop],
  83. callback: function ($$v) {
  84. _vm.$set(row, item.prop, $$v);
  85. },
  86. expression: "row[item.prop]"
  87. }
  88. })];
  89. }
  90. }], null, true)
  91. }) : _vm._e()];
  92. })], 2)], 2);
  93. };
  94. var staticRenderFns = [];
  95. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  96. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=script&lang=js
  97. /* harmony default export */ var UnitTablevue_type_script_lang_js = ({
  98. props: {
  99. tableData: {
  100. type: Array,
  101. default: []
  102. },
  103. tableColumns: {
  104. type: Array,
  105. default: []
  106. },
  107. operateWith: {
  108. type: String,
  109. default: "100%"
  110. },
  111. selectionShow: {
  112. type: Boolean,
  113. default: false
  114. },
  115. handleShow: {
  116. type: Boolean,
  117. default: false
  118. }
  119. },
  120. methods: {
  121. saveUnitData(row, idx) {
  122. this.tableData[idx] = row;
  123. localStorage.setItem('unit', JSON.stringify(this.tableData));
  124. }
  125. }
  126. });
  127. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=script&lang=js
  128. /* harmony default export */ var table_UnitTablevue_type_script_lang_js = (UnitTablevue_type_script_lang_js);
  129. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  130. var componentNormalizer = __webpack_require__(2);
  131. // CONCATENATED MODULE: ./components/table/UnitTable.vue
  132. function injectStyles (context) {
  133. var style0 = __webpack_require__(189)
  134. if (style0.__inject__) style0.__inject__(context)
  135. }
  136. /* normalize component */
  137. var component = Object(componentNormalizer["a" /* default */])(
  138. table_UnitTablevue_type_script_lang_js,
  139. render,
  140. staticRenderFns,
  141. false,
  142. injectStyles,
  143. "931e8840",
  144. "01507f2a"
  145. )
  146. /* harmony default export */ var UnitTable = __webpack_exports__["default"] = (component.exports);
  147. /***/ })
  148. };;
  149. //# sourceMappingURL=table-unit-table.js.map