Explorar el Código

fix: 修复编译问题

zhangyuhan hace 11 meses
padre
commit
f064aa4ea6

+ 0 - 3
package.json

@@ -145,8 +145,5 @@
     "webpack-cli": "^3.0.8",
     "webpack-dev-server": "^3.1.11",
     "webpack-node-externals": "^1.7.2"
-  },
-  "resolutions": {
-    "**/**/fsevents": "^1.2.9"
   }
 }

+ 4 - 4
packages/date-picker/src/basic/year-table.vue

@@ -80,8 +80,8 @@ export default {
       const today = new Date();
 
       style.disabled = typeof this.disabledDate === 'function'
-          ? datesInYear(year).every(this.disabledDate)
-          : false;
+        ? datesInYear(year).every(this.disabledDate)
+        : false;
       style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), date => date.getFullYear() === year) >= 0;
       style.today = today.getFullYear() === year;
       style.default = this.defaultValue && this.defaultValue.getFullYear() === year;
@@ -98,8 +98,8 @@ export default {
           const value = this.value || [];
           const idx = arrayFindIndex(value, date => date.getFullYear() === Number(year));
           const newValue = idx > -1
-              ? [...value.slice(0, idx), ...value.slice(idx + 1)]
-              : [...value, new Date(year)];
+            ? [...value.slice(0, idx), ...value.slice(idx + 1)]
+            : [...value, new Date(year)];
           this.$emit('pick', newValue);
         } else {
           this.$emit('pick', Number(year));

+ 11 - 11
packages/date-picker/src/panel/date.vue

@@ -316,8 +316,8 @@ export default {
     handleTimePick(value, visible, first) {
       if (isDate(value)) {
         const newDate = this.value
-            ? modifyTime(this.value, value.getHours(), value.getMinutes(), value.getSeconds())
-            : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
+          ? modifyTime(this.value, value.getHours(), value.getMinutes(), value.getSeconds())
+          : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
         this.date = newDate;
         this.emit(this.date, true);
       } else {
@@ -349,8 +349,8 @@ export default {
     handleDatePick(value) {
       if (this.selectionMode === 'day') {
         let newDate = this.value
-            ? modifyDate(this.value, value.getFullYear(), value.getMonth(), value.getDate())
-            : modifyWithTimeString(value, this.defaultTime);
+          ? modifyDate(this.value, value.getFullYear(), value.getMonth(), value.getDate())
+          : modifyWithTimeString(value, this.defaultTime);
         // change default time while out of selectableRange
         if (!this.checkDateWithinRange(newDate)) {
           newDate = modifyDate(this.selectableRange[0][0], value.getFullYear(), value.getMonth(), value.getDate());
@@ -394,8 +394,8 @@ export default {
         // value were emitted in handle{Date,Time}Pick, nothing to update here
         // deal with the scenario where: user opens the picker, then confirm without doing anything
         const value = this.value
-            ? this.value
-            : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
+          ? this.value
+          : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
         this.date = new Date(value); // refresh date
         this.emit(value);
       }
@@ -492,9 +492,9 @@ export default {
 
     isValidValue(value) {
       return value && !isNaN(value) && (
-          typeof this.disabledDate === 'function'
-              ? !this.disabledDate(value)
-              : true
+        typeof this.disabledDate === 'function'
+          ? !this.disabledDate(value)
+          : true
       ) && this.checkDateWithinRange(value);
     },
 
@@ -506,8 +506,8 @@ export default {
 
     checkDateWithinRange(date) {
       return this.selectableRange.length > 0
-          ? timeWithinRange(date, this.selectableRange, this.format || 'HH:mm:ss')
-          : true;
+        ? timeWithinRange(date, this.selectableRange, this.format || 'HH:mm:ss')
+        : true;
     }
   },
 

+ 1 - 1
packages/loading/src/index.js

@@ -88,7 +88,7 @@ const Loading = (options = {}) => {
 
   addStyle(options, parent, instance);
   if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed' && instance.originalPosition !== 'sticky') {
-      addClass(parent, 'el-loading-parent--relative');
+    addClass(parent, 'el-loading-parent--relative');
   }
   if (options.fullscreen && options.lock) {
     addClass(parent, 'el-loading-parent--hidden');

+ 1 - 1
src/directives/repeat-click.js

@@ -10,7 +10,7 @@ export default {
     const handler = () => vnode.context[binding.expression].apply();
     const clear = () => {
       if (Date.now() - startTime < maxIntervals) {
-          handler();
+        handler();
       }
       clearInterval(interval);
       interval = null;

+ 1 - 1
src/utils/util.js

@@ -292,5 +292,5 @@ export function calcShadowRootEvent(e) {
 
 export const isMac = function() {
   return !Vue.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
-}
+};