VUE代码规范

import Vue from 'vue'

import { XButton } from 'vux'
import {Popup} from 'vue-ydui/dist/lib.px/popup'
import {Button} from 'vue-ydui/dist/lib.px/button'

Vue.component(Button.name, Button)
Vue.component(Popup.name, Popup)
export default {
    name: 'read',
    data() {
        return { 
            show1: false,
            outlineList:'',
            x:'',
            y:'',
            ok:''
        }
    }, 
    components: {
        XButton
    },
    mounted: function () {
        
    },
    methods: {
        abc: function () {
            this.show1 = true;
         },

        getPost:function(){ 
            this.axios.post('/olquestion/news',{"uid":10,"daily_id":1}).then(res=>{
                this.outlineList = res.data.datas
                console.log(this.outlineList.length)
                // let choseList = this.outlineList[0].chose_single.split(' ');
                // console.log(choseList);
                let arr = []
                this.outlineList.forEach((value,index) => {
                    arr.push(value.chose_single.split(' '));
                });
                // console.log(arr);
                this.secondList = arr;
                let x=0,y=0,i=0,ok=0;
                let outlineList = res.data.datas;
                for(i=0;i

标准

你可能感兴趣的:(VUE代码规范)