{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/2249","labels_url":"https://api.github.com/repos/vuejs/vue/issues/2249/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/2249/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/2249/events","html_url":"https://github.com/vuejs/vue/issues/2249","id":129391179,"number":2249,"title":"Keep default slot content for named slots?","user":{"login":"fnlctrl","id":5557143,"avatar_url":"https://avatars.githubusercontent.com/u/5557143?v=3","gravatar_id":"","url":"https://api.github.com/users/fnlctrl","html_url":"https://github.com/fnlctrl","followers_url":"https://api.github.com/users/fnlctrl/followers","following_url":"https://api.github.com/users/fnlctrl/following{/other_user}","gists_url":"https://api.github.com/users/fnlctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/fnlctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnlctrl/subscriptions","organizations_url":"https://api.github.com/users/fnlctrl/orgs","repos_url":"https://api.github.com/users/fnlctrl/repos","events_url":"https://api.github.com/users/fnlctrl/events{/privacy}","received_events_url":"https://api.github.com/users/fnlctrl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-28T09:12:31Z","updated_at":"2016-01-28T09:25:59Z","closed_at":"2016-01-28T09:25:59Z","body":"Consider this:\r\nFor a component `foo` using named slots,\r\n```html\r\n<slot name=\"a\">\r\n    Some Useful Default Content\r\n</slot>\r\n<slot name=\"b\"></slot>\r\n```\r\n\r\nAnd in another components' template:\r\n```html\r\n<foo>\r\n  <div slot=\"b\"> asdfasdf</div>\r\n</foo>\r\n```\r\n\r\nIt gets rendered as: \r\n```html\r\n<div slot=\"b\"> asdfasdf</div>\r\n```\r\nand ```<slot name=\"a\">``` is discarded!\r\n\r\n    \r\n    \r\n      \r\nWouldn't it be better to let\r\n ```html\r\n<slot name=\"a\">\r\n    Some Useful Default Content\r\n</slot>\r\n```\r\nget rendered even if it's not used in another component's template?\r\n\r\nIf I intentionally want to suppress `slot a`, I could just write\r\n```<div slot=\"a\"></div>``` or something like that so that there would be nothing at slot a.\r\nOn the other hand, I could really use some default content because I don't want to write them multiple times in different components.\r\n\r\nThe reason I'm not using unnamed default <slot> is that the default slot is rendered anyway,\r\nwhat I really want is:\r\nIf content for `slot a` is provided, use it, and no default content is shown.\r\nIf not, use default."},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/176080385","html_url":"https://github.com/vuejs/vue/issues/2249#issuecomment-176080385","issue_url":"https://api.github.com/repos/vuejs/vue/issues/2249","id":176080385,"user":{"login":"fnlctrl","id":5557143,"avatar_url":"https://avatars.githubusercontent.com/u/5557143?v=3","gravatar_id":"","url":"https://api.github.com/users/fnlctrl","html_url":"https://github.com/fnlctrl","followers_url":"https://api.github.com/users/fnlctrl/followers","following_url":"https://api.github.com/users/fnlctrl/following{/other_user}","gists_url":"https://api.github.com/users/fnlctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/fnlctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnlctrl/subscriptions","organizations_url":"https://api.github.com/users/fnlctrl/orgs","repos_url":"https://api.github.com/users/fnlctrl/repos","events_url":"https://api.github.com/users/fnlctrl/events{/privacy}","received_events_url":"https://api.github.com/users/fnlctrl/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T09:25:59Z","updated_at":"2016-01-28T09:25:59Z","body":"Oops I made a mistake.. there was no issue at all.. really sorry."}}