0.1.7 • Published 1 year ago

meixistoretag v0.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

meixistoretag

用于子系统中添加对应的数据标签,所添加的标签常用于下拉选择列表中。

项目结构

    |-- packages --------------------------------------主要目录
    |   |-- config.ts
    |   |-- index.js 
    |   |-- index.ts ----------------------------------入口文件
    |   |-- storeTagRouter.ts
    |   |-- type.d.ts
    |   |-- component ---------------------------------vue组件文件夹
    |   |   |-- storetagmanager -----------------------页面组件/同项目中的页面文件夹
    |   |       |-- index.vue
    |   |       |-- component
    |   |       |   |-- storeTagManagerDrawer.vue
    |   |       |   |-- storeTagManagerForm.vue
    |   |       |   |-- storeTagManagerItemTable.vue
    |   |       |   |-- storeTagManagerTable.vue
    |   |       |-- js
    |   |           |-- LinkViewClass.js
    |   |           |-- StoreTagManagerConfig.js
    |   |           |-- StoreTagManagerItemConfig.js
    |   |           |-- apiOfStoreTagManager.js
    |   |-- typings
    |       |-- .d.ts
    |-- public
    |   |-- favicon.ico
    |   |-- index.html
    |-- readmeAssets
    |-- src

组件预览

npm.io

安装依赖

npm install meixistoretag

项目文件

/// index.ts
// 入口导出包含组件的路由信息,需在项目中在获取动态路由信息后添加至项目路由中
const init = (systemId: string,layout:any): RouterType => {
    config.systemId = systemId
    return [

        {
            path: '/storetag',
            name: 'storetag',
            component: layout,
            redirect: '/storetag/storetagmanager',
            meta: {
                title: '数据标签',
                icon: 'meixicomponenticon-yuansu',
                noCache: false,
            },
            isShow: 1,
            children: [
                {
                    path: 'storetagmanager',
                    component: index,
                    name: 'storetagmanager',
                    isShow: 1,
                    meta: {
                        title: '数据标签管理',
                        icon: 'meixicomponenticon-CombinedShape-',
                        noCache: true,
                    },
                }
            ],
        }


    ]
}

插件使用

//子系统中 
//store ->permissionRouter.js 文件中
//引入插件
import meixilayout from 'meixilayout';
import { init } from 'meixistoretag';
//第一个参数为系统的systemId,第二给插件是meixilayout插件中导出的layout布局组件
//init(process.env.VUE_APP_SYSTEMID, meixilayout.layout);
accessedRoutes = accessedRoutes.concat(init(process.env.VUE_APP_SYSTEMID, meixilayout.layout));