115 lines
6.0 KiB
HTML
Raw Permalink Normal View History

2025-04-24 17:03:28 +08:00
<div id="view" class="scroll">
<ui-section>
<div class="header box horizontal ">
<h4 style="width: 80%;">设置</h4>
<ui-button class='tiny green ' v-on:confirm="onConfirmFilter">
保存设置
</ui-button>
</div>
<ui-box-container>
<!-- ui-row 包裹多个组件时为多栏效果 -->
<ui-prop name="忽略目录:" style="width: 90%;"
tooltip="设置需要排除检测的目录,以','分隔多个目录,设定后将不会检测此目录中的资源">
<ui-input class="big flex-3" :value="filters" v-on:change="onFilterChange($event)"></ui-input>
</ui-prop>
<br/>
<ui-prop name="移动阈值:" style="width: 90%;" tooltip="重复数量超过一定数量的资源,将会移动到Texture目录下">
<ui-num-input class="big flex-3"
v-on:change="onMoveNumberChanged($event)" :value="moveNumber" step="1" min="2"
max="999" input-type="integer"
precision="0"></ui-num-input>
<ui-checkbox :checked="moveSwitch" v-on:change="onMoveSwitchChanged($event)"
tooltip="勾选后启用此设置">{{moveSwitch?"已启用":"已停用"}}
</ui-checkbox>
</ui-prop>
</ui-box-container>
</ui-section>
<hr/>
<ui-box-container>
<div class="horizontal end-justified" style="float:right;">
<ui-button class='large blue' v-on:confirm="onMakCache">
1.构建资源索引
</ui-button>
<ui-button class="large red" v-on:confirm="onConfirmAll">
<i class="icon-arrows-ok"></i>2.清理资源
</ui-button>
</div>
<span style="line-height: 2.5rem">构建索引后,选择要保留的资源,并点击清理.</span>
<ui-progress style="width: 100%;" :value="checkProgress" class="mini"></ui-progress>
</ui-box-container>
<!-- 重复文件列表区. -->
<div class="section">
<div v-if="files.length<=0" style="height: 10rem;line-height: 10rem; text-align: center;">
没有发现重复资源,你可以尝试重新构建资源索引!
</div>
<ui-box-container v-else>
<ui-section :key="index" v-for="(index,items) in files">
<div class="header">
<ui-checkbox :checked="!!savedFiles[items[0].uuid]" v-on:change="onItemChecked($event,items[0])">
{{items[0].url}}({{items.length}}项)
</ui-checkbox>
</div>
<div>
<div class="wrapper center layout horizontal"
style="height: 40px"
:key="index"
v-for="(index,item) in items">
<div style="width: 30px;"></div>
<ui-checkbox class="flex-3" :checked="!!savedFiles[item.uuid]"
v-on:confirm="onItemChecked($event,item)"
style="-ms-text-overflow: ellipsis;text-overflow: ellipsis;overflow:hidden;">
<span style="border-radius: 2rem;background-color: #13ce66;
color: #e1f3d8;width: 20px;margin: 5px;padding-left: 10px;padding-right: 10px;">{{item.depends||0}}</span>
{{item.url}}
</ui-checkbox>
<ui-asset style="width: 100px;" readonly type="sprite-frame" v-value="item.uuid" class="flex-1">
</ui-asset>
<ui-button class='medium green' v-on:confirm="onPrintDepends(item)">
查找引用
</ui-button>
</div>
</div>
</ui-section>
</ui-box-container>
<hr/>
<ui-section>
<div class="header box horizontal">
<span class="flex-3">无引用资源列表(共计:{{depend0s.length}}项)</span>
<ui-checkbox v-on:change="onUnusedSelect($event)">
全选保留所有/取消勾选清理所有
</ui-checkbox>
</div>
<div>
<div v-if="depend0s.length<=0" style="height: 10rem;line-height: 10rem; text-align: center;">没有发现无用资源
</div>
<div v-else>
<div class="wrapper center layout horizontal"
style="height: 40px"
:key="index"
v-for="(index,item) in depend0s">
<div style="width: 30px;"></div>
<ui-checkbox class="flex-3" :checked="!!savedFiles[item.uuid]"
v-on:confirm="onItemChecked($event,item)"
style="-ms-text-overflow: ellipsis;text-overflow: ellipsis;overflow:hidden;">
<span style="border-radius: 2rem;background-color: #13ce66;
color: #e1f3d8;width: 20px;margin: 5px;padding-left: 10px;padding-right: 10px;">{{item.depends||0}}</span>
{{item.url}}
</ui-checkbox>
<ui-asset style="width: 100px;" readonly type="sprite-frame" v-value="item.uuid" class="flex-1">
</ui-asset>
</div>
</div>
</div>
</ui-section>
</div>
</div>
<!-- 操作日志显示区 -->
<div style="width: 100%; height: 150px;margin: 0 0 0 0 ;">
<hr style="margin: 0 0 0 0 ;"/>
<h2 style="margin: 0 0 0 0">日志:</h2>
<textarea class="flex-1 " id="logTextArea" v-model="logView"
style="width: 100%; height: 120px; background: #252525; resize: none; color: #fd942b; border-color: #fd942b;"></textarea>
</div>
<div style="width: calc(100% - 20px);text-align: right;">状态:{{taskState}}</div>