gyyg-components 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -167,7 +167,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
167
167
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
168
168
|
|
|
169
169
|
"use strict";
|
|
170
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
170
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n this.$emit('selectionChange', row);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n this.$emit('rowClick', row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
171
171
|
|
|
172
172
|
/***/ }),
|
|
173
173
|
|
|
@@ -176,7 +176,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
176
176
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
177
177
|
|
|
178
178
|
"use strict";
|
|
179
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
179
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n this.$emit('selectionChange', row);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n this.$emit('rowClick', row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
180
180
|
|
|
181
181
|
/***/ }),
|
|
182
182
|
|
|
@@ -176,7 +176,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
176
176
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
177
177
|
|
|
178
178
|
"use strict";
|
|
179
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
179
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'GyygTable',\n data() {\n return {\n simpleMultipleSelection: this.multipleSelection\n };\n },\n props: {\n //列表数据\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n //行的唯一标识\n rowKey: {\n type: [String, Number],\n default: 'id'\n },\n //选择的行\n multipleSelection: {\n type: Array,\n default: () => {\n return [];\n }\n },\n // 高度\n height: {\n type: [String, Number],\n default: '100%'\n },\n // 点击单行,是否只选中当前行\n toggleRow: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n // 列表选中加粗\n selectedRowStyle({\n row\n }) {\n const idArr = this.simpleMultipleSelection.map(row => row[this.rowKey]);\n if (idArr.includes(row[this.rowKey])) {\n return {\n 'font-weight': '700'\n };\n }\n },\n // 列表选中的当前行\n handleSelectionChange(row) {\n this.simpleMultipleSelection = row;\n this.$emit('update:multipleSelection', this.simpleMultipleSelection);\n this.$emit('selectionChange', row);\n },\n // 选中单条数据\n clickOne(row) {\n if (this.toggleRow) {\n this.$refs.simpleTableRef.clearSelection();\n this.$refs.simpleTableRef.toggleRowSelection(row);\n this.$emit('rowClick', row);\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/GyygTable/GyygTable.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
180
180
|
|
|
181
181
|
/***/ }),
|
|
182
182
|
|
package/package.json
CHANGED
|
@@ -56,12 +56,14 @@ export default {
|
|
|
56
56
|
handleSelectionChange(row) {
|
|
57
57
|
this.simpleMultipleSelection = row
|
|
58
58
|
this.$emit('update:multipleSelection',this.simpleMultipleSelection)
|
|
59
|
+
this.$emit('selectionChange',row)
|
|
59
60
|
},
|
|
60
61
|
// 选中单条数据
|
|
61
62
|
clickOne(row) {
|
|
62
63
|
if(this.toggleRow){
|
|
63
64
|
this.$refs.simpleTableRef.clearSelection()
|
|
64
65
|
this.$refs.simpleTableRef.toggleRowSelection(row)
|
|
66
|
+
this.$emit('rowClick',row)
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
},
|