Merge pull request #583 from QingWei-Li/feat/vue-template-whitespace

Feat/vue template whitespace
pull/594/head
杨奕 2016-10-22 17:41:59 +08:00 committed by GitHub
commit 588523e808
8 changed files with 16 additions and 13 deletions

View File

@ -13,6 +13,7 @@ Object.keys(dependencies).forEach(function(key) {
});
externals['element-ui/src/utils/clickoutside'] = 'element-ui/lib/utils/clickoutside';
externals['element-ui/src/utils/date'] = 'element-ui/lib/utils/date';
externals['element-ui/src/utils/popper'] = 'element-ui/lib/utils/popper';
externals['element-ui/src/utils/vue-popper'] = 'element-ui/lib/utils/vue-popper';
externals['element-ui/src/utils/resize-event'] = 'element-ui/lib/utils/resize-event';

View File

@ -14,5 +14,5 @@ cooking.set({
cooking.add('output.filename', 'element-ui.common.js');
cooking.add('loader.js.exclude', config.jsexclude);
cooking.add('vue.preserveWhitespace', false);
module.exports = cooking.resolve();

View File

@ -15,4 +15,5 @@ cooking.set({
cooking.add('output.filename', '[name]/index.js');
cooking.add('loader.js.exclude', config.jsexclude);
cooking.add('vue.preserveWhitespace', false);
module.exports = cooking.resolve();

View File

@ -14,5 +14,5 @@ cooking.set({
cooking.add('output.filename', 'index.js');
cooking.add('loader.js.exclude', config.jsexclude);
cooking.add('vue.preserveWhitespace', false);
module.exports = cooking.resolve();

View File

@ -91,4 +91,5 @@ if (process.env.NODE_ENV === 'production') {
cooking.add('externals.vue-router', 'VueRouter');
}
cooking.add('vue.preserveWhitespace', false);
module.exports = cooking.resolve();

View File

@ -24,4 +24,5 @@ cooking.add('preLoader.0', {
if (!process.env.CI_ENV) {
cooking.add('plugins.process', new ProgressBarPlugin());
}
cooking.add('vue.preserveWhitespace', false);
module.exports = cooking.resolve();

View File

@ -99,8 +99,8 @@
"theaterjs": "^3.0.0",
"uppercamelcase": "^1.1.0",
"url-loader": "^0.5.7",
"vue": "^2.0.2",
"vue-loader": "^9.5.1",
"vue": "^2.0.3",
"vue-loader": "^9.7.0",
"vue-markdown-loader": "^0.5.1",
"vue-router": "^2.0.0",
"webpack": "^1.13.2",

View File

@ -45,15 +45,14 @@ export default {
},
unbind(el) {
nodeList.splice(el[ctx].id, 1);
delete el[ctx];
},
let len = nodeList.length;
install(Vue) {
/* istanbul ignore next */
Vue.directive('clickoutside', {
bind: this.bind,
unbind: this.unbind
});
for (let i = 0; i < len; i++) {
if (nodeList[i][ctx].id === el[ctx].id) {
nodeList.splice(i, 1);
delete el[ctx];
break;
}
}
}
};