103103 </div >
104104 </div >
105105
106+ <!-- 未选择守护进程时显示 -->
107+ <div v-show =" !currentRemoteUuid" >
108+ <div class =" notAnyInstanceTip" >
109+ <i class =" el-icon-guide" style =" font-size : 190px " ></i >
110+ <div class =" sub-title" >
111+ <div class =" sub-title-title" >请在左侧下拉框中选择远程守护进程</div >
112+ <div class =" sub-title-info" >
113+ 默认可选择 localhost
114+ 守护进程,守护进程可以部署在任意主机上,帮助您快速管理多个主机并且分布式部署。
115+ </div >
116+ </div >
117+ </div >
118+ </div >
119+
120+ <!-- 第一页且无任何数据时显示 -->
121+ <div v-show =" notAnyInstance && page === 1" >
122+ <div class =" notAnyInstanceTip" >
123+ <i class =" el-icon-truck" style =" font-size : 190px " ></i >
124+ <div class =" sub-title" >
125+ <div class =" sub-title-title" >无数据,请点击右上方绿色的“新建实例”按钮创建实例。</div >
126+ <div class =" sub-title-info" >
127+ 应用实例可以是 Minecraft
128+ 服务器,也可以是其他任何应用程序,点击创建后将部署在指定的远程守护进程中。
129+ </div >
130+ </div >
131+ </div >
132+ </div >
133+
106134 <el-table
107135 :data =" instances"
108136 stripe
109137 style =" width : 100% "
110138 size =" mini"
111139 ref =" multipleTable"
112140 @selection-change =" selectionChange"
141+ v-show =" !notAnyInstance"
113142 >
114143 <el-table-column type =" selection" width =" 55" > </el-table-column >
115144 <el-table-column prop =" nickname" label =" 实例昵称" min-width =" 240" >
170199.instanceTitle :hover {
171200 color : rgb (20 , 128 , 230 );
172201}
202+ .notAnyInstanceTip {
203+ text-align : center ;
204+ margin : 100px 0px ;
205+ }
173206 </style >
174207
175208<script >
@@ -196,6 +229,8 @@ export default {
196229 availableService: [], // 可用和不可用守护进程列表
197230 unavailableService: [],
198231
232+ notAnyInstance: false , // 无任何实例
233+
199234 page: 1 ,
200235 maxPage: 1 ,
201236
@@ -289,6 +324,11 @@ export default {
289324 this .loading = false ;
290325 // 记录当前选择的守护进程,方便下次直接加载
291326 localStorage .setItem (" pageSelectedRemoteUuid" , this .currentRemoteUuid );
327+
328+ // 无任何实例时,显示快速创建界面
329+ if (this .instances .length === 0 ) {
330+ this .notAnyInstance = true ;
331+ }
292332 } catch (error) {
293333 this .$notify ({
294334 title: " 访问远程守护进程异常" ,
0 commit comments