@ctsy/template

0.0.162 • Public • Published

碳素云后台模板库

配置目录参数

// export class MenuConfig {
//     BackgroundColor: string = "none"
//     TextColor = "#fff"
//     ActiveTextColor = "#ffd04b"
// }
Store.commit("set_menu_config", {
  BackgroundColor: "#111",
  TextColor: "white",
  ActiveTextColor: "#ffd04b",
});

使用外键关联

注册外键接口数据

Store.dispatch("set_foreign_config", {
  Code: "Family",
  Search: MasterApi.FamilyApi.search.bind(MasterApi.FamilyApi),
  All: false,
  PK: "FID",
  L: [],
  Value: 0,
});

使用外键数据

      new Ctsy.ViewConfigFields({
        Name: "计费方案",
        Code: "BGID",
        Desc: "",
        Column: {
          width: 70,
          fixed: "left",
        },
        Type: Ctsy.ViewConfigFieldsType.ForeignTableAll,
        Default: 0,
        Show: new Ctsy.ViewConfigFieldsShow(),
        Foreign: Object.assign(new Ctsy.ViewConfig(), {
          Name: "计费方案",
          Code: "BillingGroup",
          PK: "BGID",
          Title: "Title",
          Format: (v: any) => {
            // console.log(v);
            return `${v.Title}(${v.Price})`;
          },
          Fields: [
            new Ctsy.ViewConfigFields({
              Name: "名称",
              Code: "Title",
            }),
            new Ctsy.ViewConfigFields({
              Name: "单价",
              Code: "Price",
            }),
            // new Ctsy.ViewConfigFields({
            //   Name: "生效时间",
            //   Code: "STime"
            // }),
            // new Ctsy.ViewConfigFields({
            //   Name: "失效时间",
            //   Code: "ETime"
            // })
          ],
          // Search: MasterApi.BillingGroupApi.search.bind(
          // 	MasterApi.BillingGroupApi
          // ),
        }),
      }),

Readme

Keywords

none

Package Sidebar

Install

npm i @ctsy/template

Weekly Downloads

81

Version

0.0.162

License

MIT

Unpacked Size

862 kB

Total Files

124

Last publish

Collaborators

  • yanpengquan
  • ida_xyt