vue 橫縱向列印

2021-10-12 09:53:38 字數 513 閱讀 2187

用單選框來切換列印時的方向

"footer" class="dialog-footer">

"isportrait" label="1" @change="handleradiochange">縱向

"isportrait" label="0" @change="handleradiochange">橫向

通過css可以設定列印的橫縱向

由於不能在css裡用變數控制size的改變,所以定義了乙個變數把css當成了字串,用v-html繫結在需要列印的div中

styletext

:''

"styletext">

監聽單選框的改變事件 ,在事件中改變size的值

handleradiochange()

else

}

樹的橫向列印 縱向列印

水平列印樹,選擇右中左遍歷的原因。右樹在根節點的上面,左樹在根節點的下面,按照從上到下的順序列印就是右中左的遍歷方式。def printtree root,depth 0 s if not root return s sright printtree2 root.right,depth 1 prin...

自定義橫向或縱向列印

using system using system.collections.generic using system.componentmodel using system.data using system.drawing using system.linq using system.text u...

Sql分組查詢,如何把縱向顯示的結果變成橫向顯示

建庫並錄入資料 create table booklibary 圖書館 varchar 10 科目 varchar 10 數量 int insert into booklibary select a 語文 5 union all select b 數學 6 union all select c 英語...