Browse Source

chore(src): fix some typos (#5104)

YOU 9 years ago
parent
commit
be9ac624c8

+ 1 - 1
src/core/observer/dep.js

@@ -34,7 +34,7 @@ export default class Dep {
   }
 
   notify () {
-    // stablize the subscriber list first
+    // stabilize the subscriber list first
     const subs = this.subs.slice()
     for (let i = 0, l = subs.length; i < l; i++) {
       subs[i].update()

+ 1 - 1
src/platforms/web/runtime/components/transition-group.js

@@ -8,7 +8,7 @@
 // we force transition-group to update its children into two passes:
 // in the first pass, we remove all nodes that need to be removed,
 // triggering their leaving transition; in the second pass, we insert/move
-// into the final disired state. This way in the second pass removed
+// into the final desired state. This way in the second pass removed
 // nodes will remain where they should be.
 
 import { warn, extend } from 'core/util/index'

+ 4 - 4
src/platforms/web/runtime/modules/transition.js

@@ -103,7 +103,7 @@ export function enter (vnode: VNodeWithData, toggleDisplay: ?() => void) {
   }
 
   const expectsCSS = css !== false && !isIE9
-  const userWantsControl = getHookAgumentsLength(enterHook)
+  const userWantsControl = getHookArgumentsLength(enterHook)
 
   const cb = el._enterCb = once(() => {
     if (expectsCSS) {
@@ -197,7 +197,7 @@ export function leave (vnode: VNodeWithData, rm: Function) {
   } = data
 
   const expectsCSS = css !== false && !isIE9
-  const userWantsControl = getHookAgumentsLength(leave)
+  const userWantsControl = getHookArgumentsLength(leave)
 
   const explicitLeaveDuration: any = toNumber(
     isObject(duration)
@@ -294,12 +294,12 @@ function isValidDuration (val) {
  * - a wrapped component method (check ._length)
  * - a plain function (.length)
  */
-function getHookAgumentsLength (fn: Function): boolean {
+function getHookArgumentsLength (fn: Function): boolean {
   if (!fn) return false
   const invokerFns = fn.fns
   if (invokerFns) {
     // invoker
-    return getHookAgumentsLength(
+    return getHookArgumentsLength(
       Array.isArray(invokerFns)
         ? invokerFns[0]
         : invokerFns

+ 2 - 2
src/platforms/web/runtime/transition-util.js

@@ -115,9 +115,9 @@ export function getTransitionInfo (el: Element, expectedType?: ?string): {
   hasTransform: boolean;
 } {
   const styles: any = window.getComputedStyle(el)
-  const transitioneDelays: Array<string> = styles[transitionProp + 'Delay'].split(', ')
+  const transitionDelays: Array<string> = styles[transitionProp + 'Delay'].split(', ')
   const transitionDurations: Array<string> = styles[transitionProp + 'Duration'].split(', ')
-  const transitionTimeout: number = getTimeout(transitioneDelays, transitionDurations)
+  const transitionTimeout: number = getTimeout(transitionDelays, transitionDurations)
   const animationDelays: Array<string> = styles[animationProp + 'Delay'].split(', ')
   const animationDurations: Array<string> = styles[animationProp + 'Duration'].split(', ')
   const animationTimeout: number = getTimeout(animationDelays, animationDurations)

+ 3 - 3
src/platforms/weex/framework.js

@@ -92,7 +92,7 @@ export function createInstance (
   }
   Object.freeze(weexInstanceVar)
 
-  // Each instance has a independent `Vue` mdoule instance
+  // Each instance has a independent `Vue` module instance
   const Vue = instance.Vue = createVueModuleInstance(instanceId, moduleGetter)
 
   // The function which create a closure the JS Bundle will run in.
@@ -286,7 +286,7 @@ function createVueModuleInstance (instanceId, moduleGetter) {
 
 /**
  * Generate native module getter. Each native module has several
- * methods to call. And all the hebaviors is instance-related. So
+ * methods to call. And all the behaviors is instance-related. So
  * this getter will return a set of methods which additionally
  * send current instance id to native when called. Also the args
  * will be normalized into "safe" value. For example function arg
@@ -314,7 +314,7 @@ function genModuleGetter (instanceId) {
 /**
  * Generate HTML5 Timer APIs. An important point is that the callback
  * will be converted into callback id when sent to native. So the
- * framework can make sure no side effect of the callabck happened after
+ * framework can make sure no side effect of the callback happened after
  * an instance destroyed.
  * @param  {[type]} instanceId   [description]
  * @param  {[type]} moduleGetter [description]

+ 3 - 3
src/server/create-bundle-runner.js

@@ -22,7 +22,7 @@ function createContext (context) {
 
 function compileModule (files, basedir) {
   const compiledScripts = {}
-  const reoslvedModules = {}
+  const resolvedModules = {}
 
   function getCompiledScript (filename) {
     if (compiledScripts[filename]) {
@@ -52,8 +52,8 @@ function compileModule (files, basedir) {
         return evaluateModule(file, context, evaluatedModules)
       } else if (basedir) {
         return require(
-          reoslvedModules[file] ||
-          (reoslvedModules[file] = resolve.sync(file, { basedir }))
+          resolvedModules[file] ||
+          (resolvedModules[file] = resolve.sync(file, { basedir }))
         )
       } else {
         return require(file)