快乐的昕的电脑
2025-10-14 2d7b538d72f1d3904da8367aa08cb53cb0c11210
按键优化
已修改1个文件
16 ■■■■■ 文件已修改
components/mold.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/mold.vue
@@ -37,7 +37,11 @@
                    <button class="btn-blue" @click="searchTool" :disabled="loadingTools">搜索</button>
                </view>
                <view class="tool-list">
                    <button v-for="tool in filteredTools" :key="tool.no" class="tool-btn" @click="selectTool(tool)">
                    <button v-for="tool in filteredTools"
                            :key="tool.no"
                            class="tool-btn"
                            :class="{ active: activeToolNo === tool.no }"
                            @click="selectTool(tool)">
                        {{ tool.no }} | {{ tool.name }}
                    </button>
                </view>
@@ -112,6 +116,7 @@
            return {
                machineNo: '',//机台编码
                workOrderNo: '',//工单号
                activeToolNo: '', // 当前选中的刀具编号
                pageIndex: 1,
                pageSize: 18,
                total: 0,
@@ -223,6 +228,7 @@
                this.selectedToolNo = tool.no;
                this.toolName = tool.name;
                this.toolModel = tool.model;
                this.activeToolNo = tool.no; // 记录选中
            },
            confirmTool() {
                this.showToolDialog = false;
@@ -558,17 +564,17 @@
        box-sizing: border-box;
        margin: 5px 1% 5px 0;
        padding: 8px 16px;
        background: #fff; /* 常态白色 */
        background: #00A2E9;
        border: 1px solid #ccc;
        border-radius: 4px;
        cursor: pointer;
        color: #333; /* 常态深色字 */
        color: #333;
        text-align: left;
        transition: background 0.15s, color 0.15s;
    }
        .tool-btn:active {
            background: #e0e0e0; /* 按下变灰 */
        .tool-btn.active {
            background: #e0e0e0; /* 选中时变灰 */
            color: #888;
        }