后台管理系统【商品分类】

本文介绍如何使用Vue.js框架来开发后台商品分类管理系统,通过JavaScript技术实现商品分类的增删改查功能,详细讲解关键代码和实现逻辑。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

<template>
  <div>
      <!-- A面包屑导航区域 -->
			<el-breadcrumb separator-class="el-icon-arrow-right">
				<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
				<el-breadcrumb-item>用户管理</el-breadcrumb-item>
				<el-breadcrumb-item>商品分类</el-breadcrumb-item>
			</el-breadcrumb>

      <!-- B卡片视图区域 -->
      <el-card>
        <el-row>
          <el-col><el-button type="primary" @click="showAddCateDialog">
          添加分类</el-button></el-col>
        </el-row>
       <!-- 表格  树型表格  需要在main.js引入一下  npm i vue-table-with-tree-grid -S -->
        <tree-table class="treeTable" :data="catelist" :columns="columns"
         :selection-type="false" :expand-type="false"
         show-index index-text="#" border :show-row-hover="false">
                <!-- 是否有效 -->
          <template slot="isok" slot-scope="scope">
              <i class="el-icon-success" 
              v-if="scope.row.cat_deleted===false"
              style="color:lightgreen">
              </i>
              <i class="el-icon-error" 
              v-else
              style="color:lightgreen">
              </i>
          </template>
          <!-- 排序 -->
          <template slot="order" slot-scope="scope">
             <el-tag size="mini" v-if="scope.row.cat_level===0">一级</el-tag>
             <el-tag size="mini" v-else-if="scope.row.cat_level===1" type="success">
             二级</el-tag>
             <el-tag size="mini" v-else type="warning">三级</el-tag>
          </template>
          <!-- 操作  编辑 删除按钮-->
          <template slot="opt" slot-scope="scope">  
            <!-- {
  {scope.row}}           -->
              <el-button size="mini" icon="el-icon-edit" type="primary" @click="showCateEditDialog(scope.row.cat_id)">
                编辑</
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值