vue基本页面结构
//html<template><div :disabled = 'disabled'>看不到</div></template>//js<script>import PickerCol from './PickerCol';import mixins from '../../../mixins/mixin...
·
//html
<template>
<div :disabled = 'disabled'>看不到</div>
</template>
//js
<script>
import PickerCol from './PickerCol';
import mixins from '../../../mixins/mixins';
export default ({
name:'cardPro',
mixins: [mixins],
components: { PickerCol } //组件
data () {
return {
disabled: false,
}
},
//监听
watch () {
data: {
handler (_lm) {
console.log(_lm)
},
deep: true
}
},
//计算属性
computed () {},
//生命周期钩子函数- 实例创建后当然这里用mounted挂载后完成一些操作也可以
created () {
this.getMapInFo()//页面打开先执行一次的方法
},
//方法
methods: {
getMapInFo () {
//ajax
this.$http.get(this.$api.QUERY_EACT,_param,(res)=>{
if (res.retCode === '200') {}
})
}
}
})
</script>
//css scoped样式只作用于当前页
<style lang='less' scoped>
</style>
更多推荐
已为社区贡献7条内容
所有评论(0)