标签:com ble pre html name ted content body tle
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<title>Document</title>
</head>
<body>
<div id='app'>
<input type="text" v-focus>
</div>
<script src='./vue.js'></script>
<script>
new Vue({
el: '#app',
data: {},
// // 局部自定义指令
// // 1. 定义 (通过选项)
// // 2. 功能
// // 3. 使用
directives: {
// 指令名字:{inserted:function(el){}}
focus: {
inserted: function (el) {
el.focus();
}
}
},
methods: {}
});
</script>
</body>
</html>
标签:com ble pre html name ted content body tle
原文地址:https://www.cnblogs.com/divtab/p/10940539.html