Skip to content

Commit d302235

Browse files
committed
revert ad2ac50 in additon to vuejs#2076
1 parent acb9817 commit d302235

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/directive.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import {
77
getBindAttr,
88
camelize,
99
nextTick,
10-
warn,
11-
setClass
10+
warn
1211
} from './util/index'
1312
import Watcher from './watcher'
14-
import { removeTags } from './parsers/text'
1513
import { parseExpression, isSimplePath } from './parsers/expression'
1614

1715
function noop () {}
@@ -84,16 +82,7 @@ Directive.prototype._bind = function () {
8482
this.el && this.el.removeAttribute
8583
) {
8684
var attr = descriptor.attr || ('v-' + name)
87-
if (attr !== 'class') {
88-
this.el.removeAttribute(attr)
89-
} else {
90-
// for class interpolations, only remove the parts that
91-
// need to be interpolated.
92-
setClass(
93-
this.el,
94-
removeTags(this.el.getAttribute('class')).trim().replace(/\s+/g, ' ')
95-
)
96-
}
85+
this.el.removeAttribute(attr)
9786
}
9887

9988
// copy def properties

src/parsers/text.js

-11
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,3 @@ function inlineFilters (exp, single) {
159159
}
160160
}
161161
}
162-
163-
/**
164-
* Replace all interpolation tags in a piece of text.
165-
*
166-
* @param {String} text
167-
* @return {String}
168-
*/
169-
170-
export function removeTags (text) {
171-
return text.replace(tagRE, '')
172-
}

0 commit comments

Comments
 (0)