Browse Source

refactor: additional tweaks after revert

dev
Evan You 6 years ago
parent
commit
794ad0dae3
  1. 7
      src/compiler/parser/index.js
  2. 2
      test/unit/features/component/component-scoped-slot.spec.js

7
src/compiler/parser/index.js

@ -99,7 +99,7 @@ export function parse (
function closeElement (element) {
if (!inVPre && !element.processed) {
element = processElement(element, options, currentParent)
element = processElement(element, options)
}
// tree management
if (!stack.length && element !== root) {
@ -377,8 +377,7 @@ function processRawAttrs (el) {
export function processElement (
element: ASTElement,
options: CompilerOptions,
parent: ASTElement | undefined
options: CompilerOptions
) {
processKey(element)
@ -391,7 +390,7 @@ export function processElement (
)
processRef(element)
processSlot(element, parent)
processSlot(element)
processComponent(element)
for (let i = 0; i < transforms.length; i++) {
element = transforms[i](element, options) || element

2
test/unit/features/component/component-scoped-slot.spec.js

@ -458,7 +458,7 @@ describe('Component scoped slot', () => {
// new in 2.6, unifying all slots as functions
it('non-scoped slots should also be available on $scopedSlots', () => {
const vm = new Vue({
template: `<foo>before <div slot="bar">{{ $slot.msg }}</div> after</foo>`,
template: `<foo>before <div slot="bar" slot-scope="{ msg }">{{ msg }}</div> after</foo>`,
components: {
foo: {
render(h) {

Loading…
Cancel
Save