Skip to content

Commit f512f34

Browse files
committed
migrate files to vue2
1 parent d4bb635 commit f512f34

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

dev/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fieldset
44
legend Layouts
55
select#layoutSelector(v-model="layout")
6-
option(v-for="layout in allLayouts", :value="$key") {{ $key }}
6+
option(v-for="(layout, key) in allLayouts", :value="key") {{ key }}
77

88
fieldset
99
legend Normal layout
@@ -88,7 +88,7 @@
8888
}
8989
},
9090
91-
ready() {
91+
mounted() {
9292
window.app = this;
9393
this.$nextTick(() => {
9494
this.input = document.querySelector("input#text");

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"stats-webpack-plugin": "0.4.2",
8686
"style-loader": "0.13.1",
8787
"url-loader": "0.5.7",
88+
"vue": "1.0.27",
8889
"vue-hot-reload-api": "1.3.2",
8990
"vue-html-loader": "1.2.3",
9091
"vue-loader": "8.5.4",
@@ -95,7 +96,6 @@
9596
"webpack-merge": "0.14.1"
9697
},
9798
"dependencies": {
98-
"babel-runtime": "6.11.6",
99-
"vue": "1.0.27"
99+
"babel-runtime": "6.11.6"
100100
}
101101
}

src/keyboard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.vue-touch-keyboard
33
// input(type="text", v-model="keyboardText", v-if="!input")
44
.keyboard
5-
.line(v-for="line in keySet", track-by="$index")
6-
span(v-for="key in line", track-by="$index", :class="getClassesOfKey(key)", v-text="getCaptionOfKey(key)", @click="clickKey(key)", @mousedown="mousedown", :style="getKeyStyle(key)")
5+
.line(v-for="(line, index) in keySet", key="index")
6+
span(v-for="(key, index) in line", key="index", :class="getClassesOfKey(key)", v-text="getCaptionOfKey(key)", @click="clickKey(key)", @mousedown="mousedown", :style="getKeyStyle(key)")
77

88
</template>
99

@@ -269,7 +269,7 @@
269269
}
270270
},
271271
272-
ready() {
272+
mounted() {
273273
if (this.input) {
274274
this.setFocusToInput();
275275
}

typings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"globalDevDependencies": {
3+
"vue": "registry:dt/vue#1.0.21+20160929090511"
4+
}
5+
}

typings/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)