<template>
    <div id="app2" ref='app2'>
        <div ref="deallastestwrap">
            <StockDealLastest ref='stockdeallastest' :DealSymbol='Symbol'></StockDealLastest>
        </div>
        
    </div>
</template>
    
<script>
    import StockDealLastest from '../../jscommon/umychart.vue.components/stockdeallastest.vue'    
    
    export default 
    {
        data () 
        {
            return {
              JSStock:null,  //共享的股票数据类
              Symbol:'300219.sz'
            }
        },   
    
        components: {StockDealLastest },
    
        created:function()
        {
            var symbol = this.GetURLParams('symbol');
            if (symbol != null) this.Symbol = symbol;
        },
    
        mounted:function()
        {   
            this.OnSize();
    
            var self=this;
            window.onresize = function() { self.OnSize() }
        },
    
    
        methods:
        {
            OnSize:function()
            {
                var width = window.innerWidth;
                var height = window.innerHeight;
                var deallastestwrap = this.$refs.deallastestwrap;
                deallastestwrap.style.width = width + 'px';
                deallastestwrap.style.height = height + 'px';
                this.$refs.stockdeallastest.OnSize();
            },
            GetURLParams:function(name) 
            {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return decodeURI(r[2]);
                return null;
            }
        }
    }
    
    </script>
    
    <style>
    
      
    </style>
    