text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>import config from '../config' import { initUse } from './use' import { initMixin } from './mixin' import { initExtend } from './extend' import { initAssetRegisters } fr<|fim_suffix|>til/index' import type { GlobalAPI } from 'types/global-api' export function initGlobalAPI(Vue: GlobalAPI) { // config ...
fim
vuejs/vue
typescript
<|fim_prefix|>import type { GlobalAPI } from 'types/global-api' import { mergeOptions } from '../util/index' export function initMixin(Vue: GlobalAPI) { Vue.mixin = function (mixin: Object) { this.options<|fim_suffix|>urn this } } <|fim_middle|> = mergeOptions(this.options, mixin) ret<|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>import type { GlobalAPI } from 'types/global-api' import { toArray, isFunction } from '../util/index' export function initUse(V<|fim_suffix|> const args = toArray(arguments, 1) args.unshift(this) if (isFunction(plugin.install)) { plugin.install.apply(plugin, args) } else if (isFunction...
fim
vuejs/vue
typescript
<|fim_prefix|>import Vue from './instance/index' import { initGlobalAPI } from './global-api/index' import { isServerRendering } from 'core/util/env' import { FunctionalRenderContext } from 'core/vdom/create-functional-component' import { version } from 'v3' initGlobalAPI(Vue) Object.defineProperty(Vue.prototype, '$i...
fim
vuejs/vue
typescript
<|fim_suffix|>once = function (event: string, fn: Function): Component { const vm: Component = this function on() { vm.$off(event, on) fn.apply(vm, arguments) } on.fn = fn vm.$on(event, on) return vm } Vue.prototype.$off = function ( event?: string | Array<string>, fn?: ...
fim
vuejs/vue
typescript
<|fim_prefix|>import { initMixin } from './init' import { stateMixin } from './state' import { renderMixin } from './render' import { eventsMixin } from './events' import { lifecycleMixin } from './lifecycle' import { warn } from '../util/index' import type { GlobalAPI } from 'types/global-api' function Vue(options) {...
fim
vuejs/vue
typescript
<|fim_prefix|>import config from '../config' import { initProxy } from './proxy' import { initState } from './state' import { initRender } from './render' import { initEvents } from './events' import { mark, meas<|fim_suffix|> istanbul ignore if */ if (__DEV__ && config.performance && mark) { vm._name = forma...
fim
vuejs/vue
typescript
<|fim_suffix|>erty( source, key, Object.getOwnPropertyDescriptor(provided, key)! ) } } } export function initInjections(vm: Component) { const result = resolveInject(vm.$options.inject, vm) if (result) { toggleObserving(false) Object.keys(result).forEach(key => { /...
fim
vuejs/vue
typescript
import config from '../config' import Watcher, { WatcherOptions } from '../observer/watcher' import { mark, measure } from '../util/perf' import VNode, { createEmptyVNode } from '../vdom/vnode' import { updateComponentListeners } from './events' import { resolveSlots } from './render-helpers/resolve-slots' import { tog...
fim
vuejs/vue
typescript
<|fim_prefix|>/* not type checking this file because flow <|fim_suffix|>the data option, or for class-based components, by ' + 'initializing the property. ' + 'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target ) } const warnReservedPrefix = (target...
fim
vuejs/vue
typescript
<|fim_prefix|>// helper to process dynamic keys for dynamic arguments in v-bind and v-on. // For example, the f<|fim_suffix|> value for dynamic directive argument (expected string or null): ${key}`, this ) } } return baseObj } // helper to dynamically append modifier runtime markers to event name...
fim
vuejs/vue
typescript
<|fim_suffix|>ny): VNodeData { if (value) { if (!isPlainObject(value)) { __DEV__ && warn('v-on without argument expects an Object value', this) } else { const on = (data.on = data.on ? extend({}, data.on) : {}) for (const key in value) { const existing = on[key] const ours = ...
fim
vuejs/vue
typescript
import config from 'core/config' import { warn, isObject, toObject, isReservedAttribute, camelize, hyphenate, isArray } from 'core/util/index' import type { VNodeData } from 'types/vnode' /** * Runtime helper for merging v-bind="object" into a VNode's data. */ export function bindObjectProps( data: ...
fim
vuejs/vue
typescript
<|fim_suffix|>nst mappedKeyCode = config.keyCodes[key] || builtInKeyCode if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { return isKeyNotMatch(builtInKeyName, eventKeyName) } else if (mappedKeyCode) { return isKeyNotMatch(mappedKeyCode, eventKeyCode) } else if (eventKeyName) { return hyp...
fim
vuejs/vue
typescript
<|fim_suffix|>tProps } from './bind-object-props' import { renderStatic, markOnce } from './render-static' import { bindObjectListeners } from './bind-object-listeners' import { resolveScopedSlots } from './resolve-scoped-slots' import { bindDynamicKeys, prependModifier } from './bind-dynamic-keys' export function ins...
fim
vuejs/vue
typescript
<|fim_prefix|>import { isObject, isDef, hasSymbol, isArray } from 'core/util/index' import VNode from 'core/vdom/vnode' /** * Runtime helper for rendering v-for lists. */ export function renderList( val: any, render: (val: any, keyOrIndex: string | number, index?: number) => VNode ): Array<VNode> | null { let ...
fim
vuejs/vue
typescript
<|fim_suffix|>pedSlots[name] let nodes if (scopedSlotFn) { // scoped slot props = props || {} if (bindObject) { if (__DEV__ && !isObject(bindObject)) { warn('slot v-bind without argument expects an Object', this) } props = extend(extend({}, bindObject), props) } nodes =...
fim
vuejs/vue
typescript
<|fim_prefix|>i<|fim_suffix|>ame tree. if (tree && !isInFor) { return tree } // otherwise, render a fresh tree. tree = cached[index] = this.$options.staticRenderFns[index].call( this._renderProxy, this._c, this // for render fns generated for functional component templates ) markStatic(tree,...
fim
vuejs/vue
typescript
<|fim_suffix|> { return resolveAsset(this.$options, 'filters', id, true) || identity } <|fim_prefix|>import { identity, resolveAsset } from 'core/util/index' /** * Runtime helper for resolving f<|fim_middle|>ilters */ export function resolveFilter(id: string): Function<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|> if (isArray(slot)) { resolveScopedSlots(slot, res, hasDynamicKeys) } else if (slot) { // marker for reverse proxying v-slot without scope on this.$slots // @ts-expect-error if (slot.proxy) { // @ts-expect-error slot.fn.proxy = true } res[slot.key] =...
fim
vuejs/vue
typescript
<|fim_suffix|> children VNodes into a slot object. */ export function resolveSlots( children: Array<VNode> | null | undefined, context: Component | null ): { [key: string]: Array<VNode> } { if (!children || !children.length) { return {} } const slots: Record<string, any> = {} for (let i = 0, l = childr...
fim
vuejs/vue
typescript
<|fim_prefix|>import { warn, nextTick, emptyObject, handleError, defineReactive, isArray } from '../util/index' import { createElement } from '../vdom/create-element' import { installRenderHelpers } from './render-helpers/index' import { resolveSlots } from './render-helpers/resolve-slots' import { normali...
fim
vuejs/vue
typescript
<|fim_prefix|>import config from '../config' import Watcher from '../observer/watcher' import Dep, { pushTarget, popTarget } from '../observer/dep' import { isUpdatingChildComponent } from './lifecycle' import { initSetup } from 'v3/apiSetup' import { set, del, observe, defineReactive, toggleObserving } from...
fim
vuejs/vue
typescript
<|fim_prefix|>/* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ import { TriggerOpTypes } from '../../v3' import { def } from '../util/index' const arrayProto = Array.prototype export const arrayMethods = Object.create(arrayProto) const meth...
fim
vuejs/vue
typescript
import config from '../config' import { DebuggerOptions, DebuggerEventExtraInfo } from 'v3' let uid = 0 const pendingCleanupDeps: Dep[] = [] export const cleanupDeps = () => { for (let i = 0; i < pendingCleanupDeps.length; i++) { const dep = pendingCleanupDeps[i] dep.subs = dep.subs.filter(s => s) dep....
fim
vuejs/vue
typescript
<|fim_suffix|>l) { const value = getter ? getter.call(obj) : val if (!hasChanged(value, newVal)) { return } if (__DEV__ && customSetter) { customSetter() } if (setter) { setter.call(obj, newVal) } else if (getter) { // #7981: for accessor propert...
fim
vuejs/vue
typescript
<|fim_suffix|>) } } /** * Push a watcher into the watcher queue. * Jobs with duplicate IDs will be skipped unless it's * pushed when the queue is being flushed. */ export function queueWatcher(watcher: Watcher) { const id = watcher.id if (has[id] != null) { return } if (watcher === Dep.target && wat...
fim
vuejs/vue
typescript
<|fim_prefix|>import { _Set as Set, isObject, isArray } from '../util/index' import type { SimpleSet } from '../util/index' import VNode from '../vdom/vnode' import { isRef } from '../../v3' const seenObjects = new Set() /** * Recursively traverse an object to evoke all convert<|fim_suffix|> || val.__v_skip /* R...
fim
vuejs/vue
typescript
<|fim_suffix|> Dep) { const id = dep.id if (!this.newDepIds.has(id)) { this.newDepIds.add(id) this.newDeps.push(dep) if (!this.depIds.has(id)) { dep.addSub(this) } } } /** * Clean up for dependency collection. */ cleanupDeps() { let i = this.deps.length w...
fim
vuejs/vue
typescript
<|fim_prefix|>import config from '../config' import { noop, isArray, isFunction } from 'shared/util' import type { Component } from 'types/component' import { currentInstance } from 'v3/currentInstance' import { getComponentName } from '../vdom/create-component' export let warn: (msg: string, vm?: Component | null) =>...
fim
vuejs/vue
typescript
<|fim_prefix|>// can we use __proto__? export const hasProto = '__proto__' in {} // Browser environment sniffing export const inBrowser = typeof window !== 'undefined' export const UA = inBrowser && window.navigator.userAgent.toLowerCase() export const isIE = UA && /msie|trident/.test(UA) export const isIE9 = UA && UA...
fim
vuejs/vue
typescript
<|fim_prefix|>import config from '../config' import { warn } from './debug' import { inBrowser } from './env' import { isPromise } from 'shared/util' import { pushTarget, popTarget } from '../observer/dep' export function handleError(err: Error, vm: any, info: string) { // Deactivate deps tracking while processing e...
fim
vuejs/vue
typescript
<|fim_prefix|>export * from 'shared/util' export * fr<|fim_suffix|>./observer/index' <|fim_middle|>om './lang' export * from './env' export * from './options' export * from './debug' export * from './props' export * from './error' export * from './next-tick' export { defineReactive } from '.<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>true }) } /** * Parse simple path. */ const bailRE = new RegExp(`[^${unicodeRegExp.source}.$_\\d]`) export function parsePath(path: string): any { if (bailRE.test(path)) { return } const segments = path.split('.') return function (obj) { for (let i = 0; i < segments.length; i++) { ...
fim
vuejs/vue
typescript
<|fim_suffix|> the // microtask queue but the queue isn't being flushed, until the browser // needs to do some other work, e.g. handle a timer. Therefore we can // "force" the microtask queue to be flushed by adding an empty timer. if (isIOS) setTimeout(noop) } isUsingMicroTask = true } else if ( ...
fim
vuejs/vue
typescript
<|fim_suffix|>ild.extends, vm) } if (child.mixins) { for (let i = 0, l = child.mixins.length; i < l; i++) { parent = mergeOptions(parent, child.mixins[i], vm) } } } const options: ComponentOptions = {} as any let key for (key in parent) { mergeField(key) } for (key in ch...
fim
vuejs/vue
typescript
<|fim_prefix|>import { inBrowser } from './env' export let mark export let measure if (__DEV__<|fim_suffix|>f.measure(name, startTag, endTag) perf.clearMarks(startTag) perf.clearMarks(endTag) // perf.clearMeasures(name) } } } <|fim_middle|>) { const perf = inBrowser && window.performance /...
fim
vuejs/vue
typescript
import { warn } from './debug' import { observe, toggleObserving, shouldObserve } from '../observer/index' import { hasOwn, isArray, isObject, isFunction, toRawType, hyphenate, capitalize, isPlainObject } from 'shared/util' import type { Component } from 'types/component' type PropOptions = { type: F...
fim
vuejs/vue
typescript
<|fim_suffix|>: toMerge } } } function mergeHook(f1: any, f2: any): Function { const merged = (a, b) => { // flow complains about extra args which is why we use any f1(a, b) f2(a, b) } merged._merged = true return merged } // transform component v-model info (value and callback) into // prop...
fim
vuejs/vue
typescript
<|fim_suffix|>s) || (isTrue(force) && child.tag !== 'svg')) ) { applyNS(child, ns, force) } } } } // ref #5318 // necessary to ensure parent re-render when deep bindings like :style and // :class are used on slot nodes function registerDeepBindings(data) { if (isObject(data.style)) { tr...
fim
vuejs/vue
typescript
<|fim_prefix|>import VNode, { cloneVNode } from './vnode' import { createElement } from './create-element' import { resolveInject } from '../instance/inject' import { normalizeChildren } from '../vdom/helpers/normalize-children' import { resolveSlots } from '../instance/render-helpers/resolve-slots' import { normalizeS...
fim
vuejs/vue
typescript
<|fim_suffix|>eckProp(res, attrs, key, altKey, false) } } return res } function checkProp( res: Object, hash: Object | undefined, key: string, altKey: string, preserve: boolean ): boolean { if (isDef(hash)) { if (hasOwn(hash, key)) { res[key] = hash[key] if (!preserve) { del...
fim
vuejs/vue
typescript
<|fim_prefix|>import { isDef, isArray } from 'shared/util' import VNode from '.<|fim_suffix|>t { isAsyncPlaceholder } from './is-async-placeholder' export function getFirstComponentChild( children?: Array<VNode> ): VNode | undefined { if (isArray(children)) { for (let i = 0; i < children.length; i++) { c...
fim
vuejs/vue
typescript
<|fim_suffix|>'./normalize-children' export * from './resolve-async-component' export * from './get-first-component-child' export * from './is-async-placeholder' <|fim_prefix|>export * f<|fim_middle|>rom './merge-hook' export * from './extract-props' export * from './update-listeners' export * from <|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>import VNode from '../vnode' export function <|fim_suffix|>ot really boolean type return node.isComment && node.asyncFactory } <|fim_middle|>isAsyncPlaceholder(node: VNode): boolean { // @ts-expect-error n<|endoftext|>
fim
vuejs/vue
typescript
import VNode from '../vnode' import { createFnInvoker } from './update-listeners' import { remove, isDef, isUndef, isTrue } from 'shared/util' export function mergeVNodeHook( def: Record<string, any>, hookKey: string, hook: Function ) { if (def instanceof VNode) { def = def.data!.hook || (def.data!.hook = ...
fim
vuejs/vue
typescript
import VNode, { createTextVNode } from 'core/vdom/vnode' import { isFalse, isTrue, isArray, isDef, isUndef, isPrimitive } from 'shared/util' // The template compiler attempts to minimize the need for normalization by // statically analyzing the template at compile time. // // For plain HTML markup, normali...
fim
vuejs/vue
typescript
<|fim_suffix|>hasNormalSlots && !prevScopedSlots.$hasNormal ) { // fast path 2: stable scoped slots w/ no normal slots to proxy, // only need to normalize once return prevScopedSlots } else { res = {} for (const key in scopedSlots) { if (scopedSlots[key] && key[0] !== '$') { re...
fim
vuejs/vue
typescript
<|fim_prefix|>import { warn, once, isDef, isUndef, isTrue, isObject, hasSymbol, isPromise, remove } from 'core/util/index' import VNode, { createEmptyVNode } from 'core/vdom/vnode' import { currentRenderingInstance } from 'core/instance/render' import type { VNodeData } from 'types/vnode' impo<|fim_s...
fim
vuejs/vue
typescript
import { warn, invokeWithErrorHandling } from 'core/util/index' import { cached, isUndef, isTrue, isArray } from 'shared/util' import type { Component } from 'types/component' const normalizeEvent = cached( ( name: string ): { name: string once: boolean capture: boolean passive: boolean han...
fim
vuejs/vue
typescript
<|fim_suffix|>Name(dir)] = dir if (vm._setupState && vm._setupState.__sfc) { const setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name) if (typeof setupDef === 'function') { dir.def = { bind: setupDef, update: setupDef, } } else { dir.d...
fim
vuejs/vue
typescript
<|fim_suffix|>ort default [ref, directives] <|fim_prefix|>import <|fim_middle|>directives from './directives' import ref from './template-ref' exp<|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>import { remove, isDef, hasOwn, isArray, isFunction, invokeWithErrorHandling, warn } from 'core/util' import type { VNodeWithData } from 'types/vnode' import { Component } from 'types/component' import { isRef } from 'v3' export default { create(_: any, vnode: VNodeWithData) { registe...
fim
vuejs/vue
typescript
<|fim_prefix|>/** * Virtual DOM patching algorithm based on Snabbdom by * Simon Friis Vindum (@paldepind) * Licensed under the MIT License * https://github.com/paldepind/snabbdom/blob/master/LICENSE * * modified by Evan You (@yyx990803) * * Not type-checking this because this file is perf-critical and the cost ...
fim
vuejs/vue
typescript
<|fim_suffix|> fnOptions?: ComponentOptions | null // for SSR caching devtoolsMeta?: Object | null // used to store functional render context for devtools fnScopeId?: string | null // functional scope id support isComponentRootElement?: boolean | null // for SSR directives constructor( tag?: string, d...
fim
vuejs/vue
typescript
<|fim_suffix|>m https://github.com/vuejs/vue-devtools/blob/bc719c95a744614f5c3693460b64dc21dfa339a8/packages/app-backend-api/src/global-hook.ts#L3 interface DevtoolsHook { emit: (event: string, ...payload: any[]) => void on: (event: string, handler: Function) => void once: (event: string, handler: Function) => vo...
fim
vuejs/vue
typescript
<|fim_prefix|>import { addProp } from 'compiler/helpers' import {<|fim_suffix|>ddProp(el, 'innerHTML', `_s(${dir.value})`, dir) } } <|fim_middle|> ASTDirective, ASTElement } from 'types/compiler' export default function html(el: ASTElement, dir: ASTDirective) { if (dir.value) { a<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>odel, text, html } <|fim_prefix|>import model from './model' import text from <|fim_middle|>'./text' import html from './html' export default { m<|endoftext|>
fim
vuejs/vue
typescript
import config from 'core/config' import { addHandler, addProp, getBindingAttr } from 'compiler/helpers' import { genComponentModel, genAssignmentCode } from 'compiler/directives/model' import { ASTDirective, ASTElement, ASTModifiers } from 'types/compiler' let warn // in some cases, the event used has to be determine...
fim
vuejs/vue
typescript
<|fim_prefix|>import { addProp } from 'compiler/helpers' import { ASTDirective<|fim_suffix|>rective) { if (dir.value) { addProp(el, 'textContent', `_s(${dir.value})`, dir) } } <|fim_middle|>, ASTElement } from 'types/compiler' export default function text(el: ASTElement, dir: ASTDi<|endoftext|>
fim
vuejs/vue
typescript
import { baseOptions } from './options' import { createCompiler } from 'compiler/index' const { compile, compileToFunctions } = createCompiler(baseOptions) export { compile, compileToFunctions } <|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>terpolation inside attributes has been removed. ' + 'Use v-bind or the colon shorthand instead. For example, ' + 'instead of <div class="{{ val }}">, use <div :class="val">.', el.rawAttrsMap['class'] ) } } if (staticClass) { el.staticClass = JSON.stringify(sta...
fim
vuejs/vue
typescript
<|fim_prefix|>import<|fim_suffix|>/style' import model from './model' export default [klass, style, model] <|fim_middle|> klass from './class' import style from '.<|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>/** * Expand input[v-model] with dynamic type bindings into v-if-else chains * Turn this: * <input v-model="data[type]" :type="type"> * into this: * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]"> * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]"> ...
fim
vuejs/vue
typescript
<|fim_prefix|>i<|fim_suffix|> string { let data = '' if (el.staticStyle) { data += `staticStyle:${el.staticStyle},` } if (el.styleBinding) { data += `style:(${el.styleBinding}),` } return data } export default { staticKeys: ['staticStyle'], transformNode, genData } as ModuleOptions <|fim_midd...
fim
vuejs/vue
typescript
<|fim_prefix|>import { isPreTag, must<|fim_suffix|>, directives, isPreTag, isUnaryTag, mustUseProp, canBeLeftOpenTag, isReservedTag, getTagNamespace, staticKeys: genStaticKeys(modules) } <|fim_middle|>UseProp, isReservedTag, getTagNamespace } from '../util/index' import modules from './modules/...
fim
vuejs/vue
typescript
<|fim_prefix|>import { makeMap } from 'shared/util' export const isUna<|fim_suffix|>rce,track,wbr' ) // Elements that you can, intentionally, leave open // (and which close themselves) export const canBeLeftOpenTag = makeMap( 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' ) // HTML5 tags https://html.sp...
fim
vuejs/vue
typescript
<|fim_prefix|>export { parseComponent } from 'sfc/parseComponent' export { compile, compileToFunctions } from './compiler/index' export { ssrCompile, ssrCompileToFunctions } from 'server/compi<|fim_suffix|>ler/codeframe' <|fim_middle|>ler' export { generateCodeFrame } from 'compi<|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>import Vue <|fim_suffix|>om 'v3' <|fim_middle|>from './runtime/index' export default Vue export * fr<|endoftext|>
fim
vuejs/vue
typescript
import Vue from './runtime-with-compiler' export default Vue export * from 'v3' <|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>import Vue from './runtime-with-compiler' import * as vca from 'v3' import <|fim_suffix|>om 'shared/util' extend(Vue, vca) import { effect } from 'v3/reactivity/effect' Vue.effect = effect export default Vue <|fim_middle|>{ extend } fr<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>m 'shared/util' extend(Vue, vca) export default Vue <|fim_prefix|>import Vue fr<|fim_middle|>om './runtime/index' import * as vca from 'v3' import { extend } fro<|endoftext|>
fim
vuejs/vue
typescript
<|fim_prefix|>const whitespaceRE = /\s+/ /** * Add class with compatibility for SVG since classList is not supported on * SVG elements in IE */ export function addClass(el: HTMLElement, cls?: string) { /* istanbul ignore if */ if (!cls || !(cls = cls.trim())) { return } /* istanbul ignore else */ if ...
fim
vuejs/vue
typescript
<|fim_suffix|>on-group' export default { Transition, TransitionGroup } <|fim_prefix|>import Transition from './tr<|fim_middle|>ansition' import TransitionGroup from './transiti<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>nst c: VNode = prevChildren[i] c.data!.transition = transitionData // @ts-expect-error .getBoundingClientRect is not typed in Node c.data!.pos = c.elm.getBoundingClientRect() if (map[c.key!]) { kept.push(c) } else { removed.push(c) } ...
fim
vuejs/vue
typescript
<|fim_prefix|>// Provides transition support for a single element/component. // supports transition mode (out-in / in-out) import { warn } from 'core/util/index' import { camelize, extend, isPrimitive } from 'shared/util' import { mergeVNodeHook, isAsyncPlaceholder, getFirstComponentChild } from 'core/vdom/helpe...
fim
vuejs/vue
typescript
<|fim_suffix|>./model' import show from './show' export default { model, show } <|fim_prefix|>import<|fim_middle|> model from '<|endoftext|>
fim
vuejs/vue
typescript
/** * Not type checking this file because flow doesn't like attaching * properties to Elements. */ import { isTextInputType } from 'web/util/element' import { looseEqual, looseIndexOf } from 'shared/util' import { mergeVNodeHook } from 'core/vdom/helpers/index' import { warn, isIE9, isIE, isEdge } from 'core/util/i...
fim
vuejs/vue
typescript
<|fim_suffix|> if (transition) { vnode.data.show = true if (value) { enter(vnode, () => { el.style.display = el.__vOriginalDisplay }) } else { leave(vnode, () => { el.style.display = 'none' }) } } else { el.style.display = value ?...
fim
vuejs/vue
typescript
<|fim_prefix|>import Vue from 'core/index' import config from 'core/config' import { extend, noop } from 'shared/util' import { mountComponent } from 'core/instance/lifecycle' import { devtools, inBrowser } from 'core/util/index' import { query, mustUseProp, isReservedTag, isReservedAttr, getTagNamespace, ...
fim
vuejs/vue
typescript
<|fim_suffix|>tePropagation() el.removeEventListener('input', blocker) } el.addEventListener('input', blocker) // $flow-disable-line el.__ieph = true /* IE placeholder patched */ } el.setAttribute(key, value) } } export default { create: updateAttrs, update: updateAttrs } ...
fim
vuejs/vue
typescript
import { isDef, isUndef } from 'shared/util' import type { VNodeData } from 'types/vnode' import { concat, stringifyClass, genClassForVnode } from 'web/util/index' function updateClass(oldVnode: any, vnode: any) { const el = vnode.elm const data: VNodeData = vnode.data const oldData: VNodeData = oldVnode.data ...
fim
vuejs/vue
typescript
import { isDef, isUndef, extend, toNumber, isTrue } from 'shared/util' import type { VNodeWithData } from 'types/vnode' import { isSVG } from 'web/util/index' let svgContainer function updateDOMProps(oldVnode: VNodeWithData, vnode: VNodeWithData) { if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)...
fim
vuejs/vue
typescript
<|fim_suffix|>per = function (e) { if ( // no bubbling, should always fire. // this is just a safety net in case event.timeStamp is unreliable in // certain weird environments... e.target === e.currentTarget || // event is fired after handler attachment e.timeStamp ...
fim
vuejs/vue
typescript
<|fim_suffix|>rs from './attrs' import klass from './class' import events from './events' import domProps from './dom-props' import style from './style' import transition from './transition' export default [attrs, klass, events, domProps, style, transition] <|fim_prefix|>impor<|fim_middle|>t att<|endoftext|>
fim
vuejs/vue
typescript
<|fim_suffix|>le) && isUndef(oldData.staticStyle) && isUndef(oldData.style) ) { return } let cur, name const el: any = vnode.elm const oldStaticStyle: any = oldData.staticStyle const oldStyleBinding: any = oldData.normalizedStyle || oldData.style || {} // if static style exists, stylebinding...
fim
vuejs/vue
typescript
<|fim_prefix|>import { inBrowser, isIE9, warn } from 'core/util/index' import { mergeVNodeHook } from 'core/vdom/helpers/index' import { activeInstance } from 'core/instance/lifecycle' import { once, isDef, isUndef, isObject, toNumber, isFunction } from 'shared/util' import { nextFrame, resolveTransit...
fim
vuejs/vue
typescript
<|fim_prefix|>import VNode from 'core/vdom/vnode' import { namespaceMap } from 'web/util/index' export function createElement(tagName: string, vnode: VNode): Element { const elm = document.createElement(tagName) if (tagName !== 'select') { return elm } // false or null will re<|fim_suffix|>appendChild(node...
fim
vuejs/vue
typescript
<|fim_suffix|>modules }) <|fim_prefix|>import * as nodeOps from 'web/runtime/node-ops' import { createPatchFunction } from 'core/vdom/patch' import baseModules from 'core/vdom/modules/index' import platformModules from 'web/runtime/modules/index' // the directive module should be applied last, after all // built-in mo...
fim
vuejs/vue
typescript
<|fim_suffix|>n undefined for transition properties const transitionDelays: Array<string> = ( styles[transitionProp + 'Delay'] || '' ).split(', ') const transitionDurations: Array<string> = ( styles[transitionProp + 'Duration'] || '' ).split(', ') const transitionTimeout: number = getTimeout( tran...
fim
vuejs/vue
typescript
<|fim_suffix|>inesForHref, delimiters: options.delimiters, comments: options.comments }, this ) options.render = render options.staticRenderFns = staticRenderFns /* istanbul ignore if */ if (__DEV__ && config.performance && mark) { mark('compile...
fim
vuejs/vue
typescript
<|fim_suffix|>ltiple,' + 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + 'required,reversed,scoped,seamless,selected,sortable,' + 'truespeed,typemustmatch,visible' ) export const xlinkNS = 'http://www.w3.org/1999/xlink' export const isXlink = (name: string): boolean => { r...
fim
vuejs/vue
typescript
<|fim_prefix|>import VNode from 'core/vdom/vnode' import { isDef, isObject } from 'shared/util' import type { VNodeData, VNodeWithData } from 'types/vnode' export function genClassForVnode(vnode: VNodeWithData): string { let data = vnode.data let parentNode: VNode | VNodeWithData | undefined = vnode let childNod...
fim
vuejs/vue
typescript
<|fim_prefix|>import { inBrowser } from 'core/util/index' // check whether current browser encodes a char inside attribute values let div function getShouldDecode(href: boolean): boolean { <|fim_suffix|>href ? `<a href="\n"/>` : `<div a="\n"/>` return div.innerHTML.indexOf('&#10;') > 0 } // #3663: IE encodes newlin...
fim
vuejs/vue
typescript
<|fim_suffix|>ng())) } } export const isTextInputType = makeMap( 'text,number,password,search,email,tel,url' ) <|fim_prefix|>import { inBrowser } from 'core/util/env' import { makeMap } from 'shared/util' export const namespaceMap = { svg: 'http://www.w3.org/2000/svg', math: 'http://www.w3.org/1998/Math/MathM...
fim
vuejs/vue
typescript
<|fim_suffix|>(el: string | Element): Element { if (typeof el === 'string') { const selected = document.querySelector(el) if (!selected) { __DEV__ && warn('Cannot find element: ' + el) return document.createElement('div') } return selected } else { return el } } <|fim_prefix|>impor...
fim
vuejs/vue
typescript
<|fim_suffix|>alizeStyleData(parentNode.data))) { extend(res, styleData) } } return res } <|fim_prefix|>import VNode from 'core/vdom/vnode' import { cached, extend, toObject } from 'shared/util' import type { VNodeData, VNodeWithData } from 'types/vnode' export const parseStyleText = cached(function (css...
fim
vuejs/vue
typescript
<|fim_prefix|>export const SSR_ATTR = 'data-server-rendered' export const ASSE<|fim_suffix|> 'renderTriggered' ] as const <|fim_middle|>T_TYPES = ['component', 'directive', 'filter'] as const export const LIFECYCLE_HOOKS = [ 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated',...
fim
vuejs/vue
typescript
<|fim_suffix|> } } else if (!isObjectA && !isObjectB) { return String(a) === String(b) } else { return false } } /** * Return the first index at which a loosely equal value can be * found in the array (if value is a plain object, the array must * contain an object of the same shape), or -1 if it is ...
fim
vuejs/vue
typescript
<|fim_prefix|>import { BindingMetadata } from 'sfc/types' export type CompilerOptions = { warn?: Function // allow customizing warning in different environments; e.g. node modules?: Array<ModuleOptions> // platform specific modules; e.g. style; class directives?: { [key: string]: Function } // platform specific ...
fim
vuejs/vue
typescript