mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
setting up e2e
This commit is contained in:
parent
0c6c748d9d
commit
119286fb09
@ -8,7 +8,7 @@
|
||||
<script src="http://dynamicsjs.com/lib/dynamics.js"></script>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<!-- template for the component -->
|
||||
<script type="x/template" id="header-view-template">
|
||||
<script type="text/x-template" id="header-view-template">
|
||||
<div class="draggable-header-view"
|
||||
@mousedown="startDrag" @touchstart="startDrag"
|
||||
@mousemove="onDrag" @touchmove="onDrag"
|
||||
|
@ -23,9 +23,9 @@
|
||||
},
|
||||
methods: {
|
||||
marked: marked,
|
||||
update: function (e) {
|
||||
update: _.debounce(function (e) {
|
||||
this.input = e.target.value
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
@ -24,7 +24,7 @@
|
||||
</select2>
|
||||
</div>
|
||||
|
||||
<script type="x/template" id="select2-template">
|
||||
<script type="text/x-template" id="select2-template">
|
||||
<select>
|
||||
<option v-if="placeholder"></option>
|
||||
<slot></slot>
|
||||
|
@ -11,9 +11,10 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "webpack --config build/webpack.config.js --watch",
|
||||
"test": "mocha",
|
||||
"test": "npm run e2e",
|
||||
"build": "NODE_ENV=production node build/build.js",
|
||||
"lint": "eslint src"
|
||||
"lint": "eslint src",
|
||||
"e2e": "casperjs test --concise ./test/e2e"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -34,6 +35,7 @@
|
||||
"babel-preset-es2015": "^6.0.0",
|
||||
"babel-preset-es2015-rollup": "^1.1.1",
|
||||
"babel-preset-stage-2": "^6.0.0",
|
||||
"casperjs": "^1.1.0",
|
||||
"eslint": "^2.7.0",
|
||||
"eslint-config-standard": "^5.1.0",
|
||||
"eslint-loader": "^1.3.0",
|
||||
|
@ -38,8 +38,10 @@ function initProps (vm) {
|
||||
export function getPropValue (data, key) {
|
||||
if (!data) return
|
||||
const altKey = hyphenate(key)
|
||||
return getPropValueFromHash(data.attrs, key, altKey) ||
|
||||
getPropValueFromHash(data.props, key, altKey)
|
||||
const attrVal = getPropValueFromHash(data.attrs, key, altKey)
|
||||
return attrVal === undefined
|
||||
? getPropValueFromHash(data.props, key, altKey)
|
||||
: attrVal
|
||||
}
|
||||
|
||||
function getPropValueFromHash (hash, key, altKey) {
|
||||
|
@ -27,6 +27,7 @@ function updateAttrs (oldVnode, vnode) {
|
||||
if (booleanAttrsDict[key] && cur == null) {
|
||||
elm.removeAttribute(key)
|
||||
} else {
|
||||
if (!cur) debugger
|
||||
elm.setAttribute(key, cur)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user