cy-element-ui 1.1.7 → 1.1.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.
Files changed (165) hide show
  1. package/README.md +54 -0
  2. package/lib/index.js +1 -1
  3. package/lib/theme-chalk/index.css +1 -1
  4. package/lib/theme-chalk/subTitle.css +0 -0
  5. package/lib/theme-chalk/tabDialog.css +0 -1
  6. package/lib/theme-chalk/treeSelect.css +0 -1
  7. package/lib/theme-cy/base.css +1 -0
  8. package/lib/theme-cy/element.css +1 -0
  9. package/lib/theme-cy/index.css +1 -0
  10. package/lib/theme-cy/subTitle.css +1 -0
  11. package/lib/theme-cy/tabDialog.css +1 -0
  12. package/lib/theme-cy/treeSelect.css +1 -0
  13. package/package.json +2 -2
  14. package/packages/subTitle/index.js +7 -0
  15. package/packages/subTitle/src/main.vue +36 -0
  16. package/packages/tabDialog/src/dialog/drag.js +63 -63
  17. package/packages/theme-chalk/src/index.scss +1 -0
  18. package/packages/theme-chalk/src/subTitle.scss +0 -0
  19. package/packages/theme-chalk/src/tabDialog.scss +0 -43
  20. package/packages/theme-chalk/src/treeSelect.scss +0 -98
  21. package/packages/theme-cy/gulpfile.js +19 -0
  22. package/packages/theme-cy/lib/base.css +1 -0
  23. package/packages/theme-cy/lib/element.css +1 -0
  24. package/packages/theme-cy/lib/index.css +1 -0
  25. package/packages/theme-cy/lib/subTitle.css +1 -0
  26. package/packages/theme-cy/lib/tabDialog.css +1 -0
  27. package/packages/theme-cy/lib/treeSelect.css +1 -0
  28. package/packages/theme-cy/package.json +9 -0
  29. package/packages/theme-cy/src/base.scss +3 -0
  30. package/packages/theme-cy/src/element.scss +12 -0
  31. package/packages/theme-cy/src/index.scss +4 -0
  32. package/packages/theme-cy/src/subTitle.scss +26 -0
  33. package/packages/theme-cy/src/tabDialog.scss +43 -0
  34. package/packages/theme-cy/src/treeSelect.scss +131 -0
  35. package/src/index.js +12 -4
  36. package/lib/alert.js +0 -420
  37. package/lib/aside.js +0 -277
  38. package/lib/autocomplete.js +0 -952
  39. package/lib/avatar.js +0 -363
  40. package/lib/backtop.js +0 -404
  41. package/lib/badge.js +0 -334
  42. package/lib/breadcrumb-item.js +0 -322
  43. package/lib/breadcrumb.js +0 -293
  44. package/lib/button-group.js +0 -262
  45. package/lib/button.js +0 -357
  46. package/lib/calendar.js +0 -933
  47. package/lib/card.js +0 -297
  48. package/lib/carousel-item.js +0 -434
  49. package/lib/carousel.js +0 -707
  50. package/lib/cascader-panel.js +0 -1558
  51. package/lib/cascader.js +0 -1439
  52. package/lib/checkbox-button.js +0 -583
  53. package/lib/checkbox-group.js +0 -313
  54. package/lib/checkbox.js +0 -627
  55. package/lib/col.js +0 -177
  56. package/lib/collapse-item.js +0 -497
  57. package/lib/collapse.js +0 -329
  58. package/lib/color-picker.js +0 -1943
  59. package/lib/container.js +0 -288
  60. package/lib/date-picker.js +0 -6336
  61. package/lib/descriptions-item.js +0 -140
  62. package/lib/descriptions.js +0 -457
  63. package/lib/dialog.js +0 -598
  64. package/lib/directives/mousewheel.js +0 -26
  65. package/lib/directives/repeat-click.js +0 -33
  66. package/lib/divider.js +0 -313
  67. package/lib/drawer.js +0 -592
  68. package/lib/dropdown-item.js +0 -316
  69. package/lib/dropdown-menu.js +0 -351
  70. package/lib/dropdown.js +0 -643
  71. package/lib/element-ui.common.js +0 -44659
  72. package/lib/empty.js +0 -730
  73. package/lib/footer.js +0 -277
  74. package/lib/form-item.js +0 -826
  75. package/lib/form.js +0 -466
  76. package/lib/header.js +0 -277
  77. package/lib/icon.js +0 -265
  78. package/lib/image.js +0 -1138
  79. package/lib/infinite-scroll.js +0 -301
  80. package/lib/input-number.js +0 -757
  81. package/lib/input.js +0 -998
  82. package/lib/link.js +0 -332
  83. package/lib/loading.js +0 -631
  84. package/lib/locale/format.js +0 -56
  85. package/lib/locale/index.js +0 -63
  86. package/lib/locale/lang/en.js +0 -126
  87. package/lib/locale/lang/zh-CN.js +0 -126
  88. package/lib/locale/lang/zh-TW.js +0 -126
  89. package/lib/main.js +0 -264
  90. package/lib/menu-item-group.js +0 -308
  91. package/lib/menu-item.js +0 -491
  92. package/lib/menu.js +0 -865
  93. package/lib/message-box.js +0 -1192
  94. package/lib/message.js +0 -548
  95. package/lib/mixins/emitter.js +0 -36
  96. package/lib/mixins/focus.js +0 -15
  97. package/lib/mixins/locale.js +0 -17
  98. package/lib/mixins/migrating.js +0 -69
  99. package/lib/notification.js +0 -615
  100. package/lib/option-group.js +0 -344
  101. package/lib/option.js +0 -474
  102. package/lib/page-header.js +0 -319
  103. package/lib/pagination.js +0 -950
  104. package/lib/popconfirm.js +0 -457
  105. package/lib/popover.js +0 -617
  106. package/lib/progress.js +0 -595
  107. package/lib/radio-button.js +0 -463
  108. package/lib/radio-group.js +0 -391
  109. package/lib/radio.js +0 -497
  110. package/lib/rate.js +0 -670
  111. package/lib/result.js +0 -578
  112. package/lib/row.js +0 -149
  113. package/lib/scrollbar.js +0 -423
  114. package/lib/select.js +0 -2167
  115. package/lib/skeleton-item.js +0 -342
  116. package/lib/skeleton.js +0 -372
  117. package/lib/slider.js +0 -1199
  118. package/lib/spinner.js +0 -301
  119. package/lib/statistic.js +0 -533
  120. package/lib/step.js +0 -522
  121. package/lib/steps.js +0 -342
  122. package/lib/submenu.js +0 -701
  123. package/lib/switch.js +0 -554
  124. package/lib/tab-pane.js +0 -332
  125. package/lib/tabDialog.js +0 -1184
  126. package/lib/table-column.js +0 -952
  127. package/lib/table.js +0 -5011
  128. package/lib/tabs.js +0 -920
  129. package/lib/tag.js +0 -304
  130. package/lib/time-picker.js +0 -2967
  131. package/lib/time-select.js +0 -1765
  132. package/lib/timeline-item.js +0 -371
  133. package/lib/timeline.js +0 -275
  134. package/lib/tooltip.js +0 -425
  135. package/lib/transfer.js +0 -1102
  136. package/lib/transitions/collapse-transition.js +0 -91
  137. package/lib/tree.js +0 -2263
  138. package/lib/treeSelect.js +0 -746
  139. package/lib/umd/locale/en.js +0 -142
  140. package/lib/umd/locale/zh-CN.js +0 -142
  141. package/lib/umd/locale/zh-TW.js +0 -142
  142. package/lib/upload.js +0 -1390
  143. package/lib/utils/after-leave.js +0 -35
  144. package/lib/utils/aria-dialog.js +0 -104
  145. package/lib/utils/aria-utils.js +0 -126
  146. package/lib/utils/clickoutside.js +0 -79
  147. package/lib/utils/date-util.js +0 -310
  148. package/lib/utils/date.js +0 -369
  149. package/lib/utils/dom.js +0 -234
  150. package/lib/utils/lodash.js +0 -9421
  151. package/lib/utils/menu/aria-menubar.js +0 -24
  152. package/lib/utils/menu/aria-menuitem.js +0 -62
  153. package/lib/utils/menu/aria-submenu.js +0 -69
  154. package/lib/utils/merge.js +0 -21
  155. package/lib/utils/popper.js +0 -1261
  156. package/lib/utils/popup/index.js +0 -233
  157. package/lib/utils/popup/popup-manager.js +0 -205
  158. package/lib/utils/resize-event.js +0 -59
  159. package/lib/utils/scroll-into-view.js +0 -38
  160. package/lib/utils/scrollbar-width.js +0 -39
  161. package/lib/utils/shared.js +0 -12
  162. package/lib/utils/types.js +0 -52
  163. package/lib/utils/util.js +0 -272
  164. package/lib/utils/vdom.js +0 -13
  165. package/lib/utils/vue-popper.js +0 -202
package/lib/utils/util.js DELETED
@@ -1,272 +0,0 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
- exports.isMac = exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;
5
-
6
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
7
-
8
- exports.noop = noop;
9
- exports.hasOwn = hasOwn;
10
- exports.toObject = toObject;
11
- exports.getPropByPath = getPropByPath;
12
- exports.rafThrottle = rafThrottle;
13
- exports.objToArray = objToArray;
14
-
15
- var _vue = require('vue');
16
-
17
- var _vue2 = _interopRequireDefault(_vue);
18
-
19
- var _types = require('element-ui/lib/utils/types');
20
-
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
-
23
- var hasOwnProperty = Object.prototype.hasOwnProperty;
24
-
25
- function noop() {};
26
-
27
- function hasOwn(obj, key) {
28
- return hasOwnProperty.call(obj, key);
29
- };
30
-
31
- function extend(to, _from) {
32
- for (var key in _from) {
33
- to[key] = _from[key];
34
- }
35
- return to;
36
- };
37
-
38
- function toObject(arr) {
39
- var res = {};
40
- for (var i = 0; i < arr.length; i++) {
41
- if (arr[i]) {
42
- extend(res, arr[i]);
43
- }
44
- }
45
- return res;
46
- };
47
-
48
- var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
49
- prop = prop || '';
50
- var paths = prop.split('.');
51
- var current = object;
52
- var result = null;
53
- for (var i = 0, j = paths.length; i < j; i++) {
54
- var path = paths[i];
55
- if (!current) break;
56
-
57
- if (i === j - 1) {
58
- result = current[path];
59
- break;
60
- }
61
- current = current[path];
62
- }
63
- return result;
64
- };
65
-
66
- function getPropByPath(obj, path, strict) {
67
- var tempObj = obj;
68
- path = path.replace(/\[(\w+)\]/g, '.$1');
69
- path = path.replace(/^\./, '');
70
-
71
- var keyArr = path.split('.');
72
- var i = 0;
73
- for (var len = keyArr.length; i < len - 1; ++i) {
74
- if (!tempObj && !strict) break;
75
- var key = keyArr[i];
76
- if (key in tempObj) {
77
- tempObj = tempObj[key];
78
- } else {
79
- if (strict) {
80
- throw new Error('please transfer a valid prop path to form item!');
81
- }
82
- break;
83
- }
84
- }
85
- return {
86
- o: tempObj,
87
- k: keyArr[i],
88
- v: tempObj ? tempObj[keyArr[i]] : null
89
- };
90
- };
91
-
92
- var generateId = exports.generateId = function generateId() {
93
- return Math.floor(Math.random() * 10000);
94
- };
95
-
96
- var valueEquals = exports.valueEquals = function valueEquals(a, b) {
97
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
98
- if (a === b) return true;
99
- if (!(a instanceof Array)) return false;
100
- if (!(b instanceof Array)) return false;
101
- if (a.length !== b.length) return false;
102
- for (var i = 0; i !== a.length; ++i) {
103
- if (a[i] !== b[i]) return false;
104
- }
105
- return true;
106
- };
107
-
108
- var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
109
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
110
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
111
- };
112
-
113
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
114
- var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
115
- for (var i = 0; i !== arr.length; ++i) {
116
- if (pred(arr[i])) {
117
- return i;
118
- }
119
- }
120
- return -1;
121
- };
122
-
123
- var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
124
- var idx = arrayFindIndex(arr, pred);
125
- return idx !== -1 ? arr[idx] : undefined;
126
- };
127
-
128
- // coerce truthy value to array
129
- var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
130
- if (Array.isArray(val)) {
131
- return val;
132
- } else if (val) {
133
- return [val];
134
- } else {
135
- return [];
136
- }
137
- };
138
-
139
- var isIE = exports.isIE = function isIE() {
140
- return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
141
- };
142
-
143
- var isEdge = exports.isEdge = function isEdge() {
144
- return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
145
- };
146
-
147
- var isFirefox = exports.isFirefox = function isFirefox() {
148
- return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
149
- };
150
-
151
- var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
152
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
153
- var rules = ['transform', 'transition', 'animation'];
154
- var prefixes = ['ms-', 'webkit-'];
155
- rules.forEach(function (rule) {
156
- var value = style[rule];
157
- if (rule && value) {
158
- prefixes.forEach(function (prefix) {
159
- style[prefix + rule] = value;
160
- });
161
- }
162
- });
163
- return style;
164
- };
165
-
166
- var kebabCase = exports.kebabCase = function kebabCase(str) {
167
- var hyphenateRE = /([^-])([A-Z])/g;
168
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
169
- };
170
-
171
- var capitalize = exports.capitalize = function capitalize(str) {
172
- if (!(0, _types.isString)(str)) return str;
173
- return str.charAt(0).toUpperCase() + str.slice(1);
174
- };
175
-
176
- var looseEqual = exports.looseEqual = function looseEqual(a, b) {
177
- var isObjectA = (0, _types.isObject)(a);
178
- var isObjectB = (0, _types.isObject)(b);
179
- if (isObjectA && isObjectB) {
180
- return JSON.stringify(a) === JSON.stringify(b);
181
- } else if (!isObjectA && !isObjectB) {
182
- return String(a) === String(b);
183
- } else {
184
- return false;
185
- }
186
- };
187
-
188
- var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
189
- arrayA = arrayA || [];
190
- arrayB = arrayB || [];
191
-
192
- if (arrayA.length !== arrayB.length) {
193
- return false;
194
- }
195
-
196
- for (var i = 0; i < arrayA.length; i++) {
197
- if (!looseEqual(arrayA[i], arrayB[i])) {
198
- return false;
199
- }
200
- }
201
-
202
- return true;
203
- };
204
-
205
- var isEqual = exports.isEqual = function isEqual(value1, value2) {
206
- if (Array.isArray(value1) && Array.isArray(value2)) {
207
- return arrayEquals(value1, value2);
208
- }
209
- return looseEqual(value1, value2);
210
- };
211
-
212
- var isEmpty = exports.isEmpty = function isEmpty(val) {
213
- // null or undefined
214
- if (val == null) return true;
215
-
216
- if (typeof val === 'boolean') return false;
217
-
218
- if (typeof val === 'number') return !val;
219
-
220
- if (val instanceof Error) return val.message === '';
221
-
222
- switch (Object.prototype.toString.call(val)) {
223
- // String or Array
224
- case '[object String]':
225
- case '[object Array]':
226
- return !val.length;
227
-
228
- // Map or Set or File
229
- case '[object File]':
230
- case '[object Map]':
231
- case '[object Set]':
232
- {
233
- return !val.size;
234
- }
235
- // Plain Object
236
- case '[object Object]':
237
- {
238
- return !Object.keys(val).length;
239
- }
240
- }
241
-
242
- return false;
243
- };
244
-
245
- function rafThrottle(fn) {
246
- var locked = false;
247
- return function () {
248
- var _this = this;
249
-
250
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
251
- args[_key] = arguments[_key];
252
- }
253
-
254
- if (locked) return;
255
- locked = true;
256
- window.requestAnimationFrame(function (_) {
257
- fn.apply(_this, args);
258
- locked = false;
259
- });
260
- };
261
- }
262
-
263
- function objToArray(obj) {
264
- if (Array.isArray(obj)) {
265
- return obj;
266
- }
267
- return isEmpty(obj) ? [] : [obj];
268
- }
269
-
270
- var isMac = exports.isMac = function isMac() {
271
- return !_vue2.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
272
- };
package/lib/utils/vdom.js DELETED
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6
-
7
- exports.isVNode = isVNode;
8
-
9
- var _util = require('element-ui/lib/utils/util');
10
-
11
- function isVNode(node) {
12
- return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && (0, _util.hasOwn)(node, 'componentOptions');
13
- };
@@ -1,202 +0,0 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _vue = require('vue');
6
-
7
- var _vue2 = _interopRequireDefault(_vue);
8
-
9
- var _popup = require('element-ui/lib/utils/popup');
10
-
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
- var PopperJS = _vue2.default.prototype.$isServer ? function () {} : require('./popper');
14
- var stop = function stop(e) {
15
- return e.stopPropagation();
16
- };
17
-
18
- /**
19
- * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
20
- * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
21
- * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
22
- * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
23
- * @param {Boolean} [visible=false] Visibility of the popup element.
24
- * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
25
- */
26
- exports.default = {
27
- props: {
28
- transformOrigin: {
29
- type: [Boolean, String],
30
- default: true
31
- },
32
- placement: {
33
- type: String,
34
- default: 'bottom'
35
- },
36
- boundariesPadding: {
37
- type: Number,
38
- default: 5
39
- },
40
- reference: {},
41
- popper: {},
42
- offset: {
43
- default: 0
44
- },
45
- value: Boolean,
46
- visibleArrow: Boolean,
47
- arrowOffset: {
48
- type: Number,
49
- default: 35
50
- },
51
- appendToBody: {
52
- type: Boolean,
53
- default: true
54
- },
55
- popperOptions: {
56
- type: Object,
57
- default: function _default() {
58
- return {
59
- gpuAcceleration: false
60
- };
61
- }
62
- }
63
- },
64
-
65
- data: function data() {
66
- return {
67
- showPopper: false,
68
- currentPlacement: ''
69
- };
70
- },
71
-
72
-
73
- watch: {
74
- value: {
75
- immediate: true,
76
- handler: function handler(val) {
77
- this.showPopper = val;
78
- this.$emit('input', val);
79
- }
80
- },
81
-
82
- showPopper: function showPopper(val) {
83
- if (this.disabled) return;
84
- val ? this.updatePopper() : this.destroyPopper();
85
- this.$emit('input', val);
86
- }
87
- },
88
-
89
- methods: {
90
- createPopper: function createPopper() {
91
- var _this = this;
92
-
93
- if (this.$isServer) return;
94
- this.currentPlacement = this.currentPlacement || this.placement;
95
- if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
96
- return;
97
- }
98
-
99
- var options = this.popperOptions;
100
- var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
101
- var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
102
-
103
- if (!reference && this.$slots.reference && this.$slots.reference[0]) {
104
- reference = this.referenceElm = this.$slots.reference[0].elm;
105
- }
106
-
107
- if (!popper || !reference) return;
108
- if (this.visibleArrow) this.appendArrow(popper);
109
- if (this.appendToBody) document.body.appendChild(this.popperElm);
110
- if (this.popperJS && this.popperJS.destroy) {
111
- this.popperJS.destroy();
112
- }
113
-
114
- options.placement = this.currentPlacement;
115
- options.offset = this.offset;
116
- options.arrowOffset = this.arrowOffset;
117
- this.popperJS = new PopperJS(reference, popper, options);
118
- this.popperJS.onCreate(function (_) {
119
- _this.$emit('created', _this);
120
- _this.resetTransformOrigin();
121
- _this.$nextTick(_this.updatePopper);
122
- });
123
- if (typeof options.onUpdate === 'function') {
124
- this.popperJS.onUpdate(options.onUpdate);
125
- }
126
- this.popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
127
- this.popperElm.addEventListener('click', stop);
128
- },
129
- updatePopper: function updatePopper() {
130
- var popperJS = this.popperJS;
131
- if (popperJS) {
132
- popperJS.update();
133
- if (popperJS._popper) {
134
- popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
135
- }
136
- } else {
137
- this.createPopper();
138
- }
139
- },
140
- doDestroy: function doDestroy(forceDestroy) {
141
- /* istanbul ignore if */
142
- if (!this.popperJS || this.showPopper && !forceDestroy) return;
143
- this.popperJS.destroy();
144
- this.popperJS = null;
145
- },
146
- destroyPopper: function destroyPopper() {
147
- if (this.popperJS) {
148
- this.resetTransformOrigin();
149
- }
150
- },
151
- resetTransformOrigin: function resetTransformOrigin() {
152
- if (!this.transformOrigin) return;
153
- var placementMap = {
154
- top: 'bottom',
155
- bottom: 'top',
156
- left: 'right',
157
- right: 'left'
158
- };
159
- var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
160
- var origin = placementMap[placement];
161
- this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
162
- },
163
- appendArrow: function appendArrow(element) {
164
- var hash = void 0;
165
- if (this.appended) {
166
- return;
167
- }
168
-
169
- this.appended = true;
170
-
171
- for (var item in element.attributes) {
172
- if (/^_v-/.test(element.attributes[item].name)) {
173
- hash = element.attributes[item].name;
174
- break;
175
- }
176
- }
177
-
178
- var arrow = document.createElement('div');
179
-
180
- if (hash) {
181
- arrow.setAttribute(hash, '');
182
- }
183
- arrow.setAttribute('x-arrow', '');
184
- arrow.className = 'popper__arrow';
185
- element.appendChild(arrow);
186
- }
187
- },
188
-
189
- beforeDestroy: function beforeDestroy() {
190
- this.doDestroy(true);
191
- if (this.popperElm && this.popperElm.parentNode === document.body) {
192
- this.popperElm.removeEventListener('click', stop);
193
- document.body.removeChild(this.popperElm);
194
- }
195
- },
196
-
197
-
198
- // call destroy in keep-alive mode
199
- deactivated: function deactivated() {
200
- this.$options.beforeDestroy[0].call(this);
201
- }
202
- };