1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <div id= "counter-event-example" > <p>{{ total }}</p> <button-counter v-on:increment= "incrementTotal" ></button-counter> <button-counter v-on:increment= "incrementTotal" ></button-counter> </div> <script type= "text/javascript" src= "./vue.js" ></script> <script> Vue.component( 'button-counter' , { template: '<button v-on:click="incrementCounter">{{ counter }}</button>' , data: function () { return { counter: 0 } }, methods:{ incrementCounter: function (){ this .counter+=1 this .$emit( 'increment' ) } } }) new Vue({ el: "#counter-event-example" , data:{ total:0 }, methods:{ incrementTotal: function (){ this .total+=1 } } }) </script> |
月度归档: 2017年12月
查找mg issue数据不匹配的voucher
1 2 3 4 5 | select group_concat(a_id) as voucher_ids from ( select a.voucher_id as a_id, b.voucher_id as b_id from voucher_campaign_issue a left join voucher_action b on (b.action_id = 6 and a.voucher_id = b.voucher_id and b.action_time between '2016-12-01' and '2017-12-01' ) where a.issue_date between '2016-12-01' and '2017-12-01' having b.voucher_id is NULL ) x |