Эх сурвалжийг харах

添加EPC发卡的控件。

yangzhijie 4 жил өмнө
parent
commit
3d11bd9730

+ 4 - 1
examples/App.vue

@@ -29,7 +29,10 @@
                         <router-link :to="{ path: '/desktop/navbar-example'}">页面导航</router-link>
                     </li>
                     <li>
-                        <router-link :to="{ path: '/desktop/page-size-select-example'}">分页控件</router-link>
+                        <router-link :to="{ path: '/desktop/page-size-select-example'}">页面大小控件</router-link>
+                    </li>
+                    <li>
+                        <router-link :to="{ path: '/desktop/print-example'}">打印控件</router-link>
                     </li>
                     
 

+ 1 - 1
examples/page-size-select/src/PageSizeSelectExample.vue

@@ -1,5 +1,5 @@
 <template>
-    <h1>页控件</h1>
+    <h1>页面大小控件</h1>
 
     <PageSizeSelect @pageSizeChanged="pageSize = $event"></PageSizeSelect>
 

+ 35 - 0
examples/pagination/src/PaginationExample.vue

@@ -0,0 +1,35 @@
+<template>
+    <h1>分页控件</h1>
+
+    <Pagination @paginationChanged="pageSize = $event"></Pagination>
+
+    {{ pageSize }}
+</template>
+
+<script>
+import Pagination from "@/pagination/index.js";
+
+export default {
+    data: function(){
+        return {
+            pageSize: 20
+        }
+    },
+
+    components: {
+        "Pagination": Pagination
+    },
+
+    methods: {
+        
+    },
+
+    mounted: function(){
+        
+    }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 42 - 0
examples/print/src/PrintExample.vue

@@ -0,0 +1,42 @@
+<template>
+    <h1>EPC发卡</h1>
+    <button class="btn btn-default" @click="printEpc">打印</button>
+    <PrintEpc ref="printEpc" printerName='打印机'></PrintEpc>
+
+    <h1>打印控件</h1>
+
+    <PrintWidget></PrintWidget>
+
+</template>
+
+<script>
+import PrintEpc from "@/print/print-epc.js";
+import PrintWidget from "@/print/print-widget.js";
+
+export default {
+    data: function(){
+        return {
+            pageSize: 20
+        }
+    },
+
+    components: {
+        "PrintEpc": PrintEpc,
+        "PrintWidget": PrintWidget,
+    },
+
+    methods: {
+        printEpc: function(){
+            this.$refs.printEpc.show()
+        }
+    },
+
+    mounted: function(){
+        
+    }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 0
examples/route/index.js

@@ -7,6 +7,7 @@ const ModalExample = () => import(/* webpackChunkName: "modal-example" */ '../mo
 const NavbarExample = () => import(/* webpackChunkName: "nav-bar-example" */ '../navbar/src/NavbarExample.vue')
 const ImagePreviewExample = () => import(/* webpackChunkName: "image-preview-example" */ '../image-preview/src/ImagePreviewExample.vue')
 const PageSizeSelectExample = () => import(/* webpackChunkName: "page-size-select-example" */ '../page-size-select/src/PageSizeSelectExample.vue')
+const PrintExample = () => import(/* webpackChunkName: "print-example" */ '../print/src/PrintExample.vue')
 
 
 
@@ -49,6 +50,12 @@ export default {
 				/** 分页控件 */
 				{ path: 'page-size-select-example', component: PageSizeSelectExample },
 
+				/** 分页控件 */
+				{ path: 'page-size-select-example', component: PageSizeSelectExample },
+
+				/** 打印控件 */
+				{ path: 'print-example', component: PrintExample },
+
 				
 
 				/** 流程报表 */