gyyg-components 0.3.7 → 0.3.8
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.
|
@@ -359,7 +359,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
359
359
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
360
360
|
|
|
361
361
|
"use strict";
|
|
362
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n
|
|
362
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n this.tagsData = [];\n this.tagsData = [...val];\n if (this.tagsData.length > 0) {\n this.$nextTick(() => {\n this.updateTagsContainerWidth();\n });\n }\n },\n deep: true,\n immediate: true\n }\n },\n mounted() {\n this.updateTagsContainerWidth();\n window.addEventListener('resize', this.updateTagsContainerWidth);\n },\n beforeDestroy() {\n window.removeEventListener('resize', this.updateTagsContainerWidth);\n },\n methods: {\n handleClose(index, tag) {\n this.tagsData.splice(index, 1);\n this.$emit('tagClose', tag.key, tag);\n },\n scrollLeft() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: -150,\n behavior: 'smooth'\n });\n },\n scrollRight() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: 150,\n behavior: 'smooth'\n });\n },\n updateTagsContainerWidth() {\n this.tagsContainerWidth = this.$refs.tagsContainer.offsetWidth;\n const boxWidth = this.$refs.tagsBox.scrollWidth;\n if (boxWidth > this.tagsContainerWidth) {\n this.showArrow = true;\n } else {\n this.showArrow = false;\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/MecTags/MecTags.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");
|
|
363
363
|
|
|
364
364
|
/***/ }),
|
|
365
365
|
|
|
@@ -368,7 +368,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
368
368
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
369
369
|
|
|
370
370
|
"use strict";
|
|
371
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n
|
|
371
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n this.tagsData = [];\n this.tagsData = [...val];\n if (this.tagsData.length > 0) {\n this.$nextTick(() => {\n this.updateTagsContainerWidth();\n });\n }\n },\n deep: true,\n immediate: true\n }\n },\n mounted() {\n this.updateTagsContainerWidth();\n window.addEventListener('resize', this.updateTagsContainerWidth);\n },\n beforeDestroy() {\n window.removeEventListener('resize', this.updateTagsContainerWidth);\n },\n methods: {\n handleClose(index, tag) {\n this.tagsData.splice(index, 1);\n this.$emit('tagClose', tag.key, tag);\n },\n scrollLeft() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: -150,\n behavior: 'smooth'\n });\n },\n scrollRight() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: 150,\n behavior: 'smooth'\n });\n },\n updateTagsContainerWidth() {\n this.tagsContainerWidth = this.$refs.tagsContainer.offsetWidth;\n const boxWidth = this.$refs.tagsBox.scrollWidth;\n if (boxWidth > this.tagsContainerWidth) {\n this.showArrow = true;\n } else {\n this.showArrow = false;\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/MecTags/MecTags.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");
|
|
372
372
|
|
|
373
373
|
/***/ }),
|
|
374
374
|
|
|
@@ -368,7 +368,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
368
368
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
369
369
|
|
|
370
370
|
"use strict";
|
|
371
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n
|
|
371
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MecTags',\n props: {\n tagsList: {\n type: [Array, Object]\n },\n btnWidth: {\n // type: Number,\n }\n },\n data() {\n return {\n tagsData: [],\n tagsContainerWidth: 0,\n showArrow: false\n };\n },\n watch: {\n tagsList: {\n handler(val) {\n this.tagsData = [];\n this.tagsData = [...val];\n if (this.tagsData.length > 0) {\n this.$nextTick(() => {\n this.updateTagsContainerWidth();\n });\n }\n },\n deep: true,\n immediate: true\n }\n },\n mounted() {\n this.updateTagsContainerWidth();\n window.addEventListener('resize', this.updateTagsContainerWidth);\n },\n beforeDestroy() {\n window.removeEventListener('resize', this.updateTagsContainerWidth);\n },\n methods: {\n handleClose(index, tag) {\n this.tagsData.splice(index, 1);\n this.$emit('tagClose', tag.key, tag);\n },\n scrollLeft() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: -150,\n behavior: 'smooth'\n });\n },\n scrollRight() {\n const tagsBox = this.$refs.tagsBox;\n tagsBox.scrollBy({\n left: 150,\n behavior: 'smooth'\n });\n },\n updateTagsContainerWidth() {\n this.tagsContainerWidth = this.$refs.tagsContainer.offsetWidth;\n const boxWidth = this.$refs.tagsBox.scrollWidth;\n if (boxWidth > this.tagsContainerWidth) {\n this.showArrow = true;\n } else {\n this.showArrow = false;\n }\n }\n }\n});\n\n//# sourceURL=webpack://gyyg-components/./src/components/MecTags/MecTags.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");
|
|
372
372
|
|
|
373
373
|
/***/ }),
|
|
374
374
|
|
package/package.json
CHANGED