cc1-admin-front 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { ApiAuthRole as L, ApiAuthMenu as h, ssys as i, ApiAuthApi as b, scurd a
3
3
  import { TSys as s } from "cc1-form";
4
4
  const _ = /* @__PURE__ */ u({
5
5
  __name: "index",
6
- setup(d) {
6
+ setup(g) {
7
7
  const e = c({
8
8
  menuList: [],
9
9
  apiList: [],
@@ -19,6 +19,9 @@ const _ = /* @__PURE__ */ u({
19
19
  table: {
20
20
  border: !0
21
21
  },
22
+ page: {
23
+ show: !1
24
+ },
22
25
  tools: {
23
26
  export: {
24
27
  show: !1
@@ -65,7 +68,7 @@ const _ = /* @__PURE__ */ u({
65
68
  {
66
69
  key: "roleList",
67
70
  label: "角色列表",
68
- type: "tree-select",
71
+ type: "treeSelect",
69
72
  value: [],
70
73
  options: {
71
74
  treeSelect: {
@@ -85,7 +88,7 @@ const _ = /* @__PURE__ */ u({
85
88
  {
86
89
  key: "menuList",
87
90
  label: "菜单列表",
88
- type: "tree-select",
91
+ type: "treeSelect",
89
92
  value: [],
90
93
  options: {
91
94
  treeSelect: {
@@ -105,7 +108,7 @@ const _ = /* @__PURE__ */ u({
105
108
  {
106
109
  key: "apiList",
107
110
  label: "接口列表",
108
- type: "tree-select",
111
+ type: "treeSelect",
109
112
  value: [],
110
113
  options: {
111
114
  treeSelect: {
@@ -129,12 +132,12 @@ const _ = /* @__PURE__ */ u({
129
132
  if (t || (o.form.sort = e.roleList.length + 1), e.menuList.length === 0) {
130
133
  s.loading();
131
134
  let a = await h.list({
132
- final(r, n, p) {
135
+ final(p, r, n) {
133
136
  s.loading(!1);
134
137
  }
135
138
  });
136
139
  e.menuList = i.getTableTree(a.data), a = await b.list({
137
- final(r, n, p) {
140
+ final(p, r, n) {
138
141
  s.loading(!1);
139
142
  }
140
143
  }), e.apiList = i.getTableTree(a.data);
@@ -1,28 +1,35 @@
1
- import { defineComponent as y, reactive as m, resolveComponent as s, openBlock as n, createBlock as p, withCtx as r, createTextVNode as i } from "vue";
2
- import { ApiAuthApi as u, scurd as d, ssys as b } from "./cc1-admin-front.js";
3
- import { TSys as f } from "cc1-form";
4
- const v = /* @__PURE__ */ y({
1
+ import { defineComponent as y, reactive as m, resolveComponent as s, openBlock as p, createBlock as r, withCtx as n, createTextVNode as u } from "vue";
2
+ import { TSys as i } from "cc1-form";
3
+ import { ApiAuthApi as d, scurd as f, ssys as b } from "./cc1-admin-front.js";
4
+ const x = /* @__PURE__ */ y({
5
5
  __name: "index",
6
6
  setup(_) {
7
- const e = m({
7
+ const t = m({
8
8
  data: [],
9
9
  option: {
10
- api: u,
10
+ api: d,
11
11
  search: {
12
12
  show: !1
13
13
  },
14
- data(t) {
15
- return e.data = b.getTableTree(t), e.data;
14
+ data(e) {
15
+ return t.data = b.getTableTree(e), t.data;
16
16
  },
17
17
  table: {
18
18
  border: !0,
19
- index: !1
19
+ index: !1,
20
+ add: (e) => e?.type === 0,
21
+ operate: {
22
+ width: 160
23
+ }
24
+ },
25
+ page: {
26
+ show: !1
20
27
  },
21
28
  column: [
22
29
  {
23
30
  key: "parentId",
24
31
  label: "父级",
25
- type: "tree-select",
32
+ type: "treeSelect",
26
33
  value: "0",
27
34
  form: {
28
35
  span: 12
@@ -81,7 +88,7 @@ const v = /* @__PURE__ */ y({
81
88
  type: "select",
82
89
  value: "",
83
90
  show: {
84
- form: (t) => t.type === 1
91
+ form: (e) => e.type === 1
85
92
  },
86
93
  options: {
87
94
  select: {
@@ -99,11 +106,11 @@ const v = /* @__PURE__ */ y({
99
106
  }
100
107
  ],
101
108
  form: {
102
- openBefore: async (t, a) => {
103
- d.form.openBefore.parentId(t, a, e.data, e.option);
104
- const l = await e.api.getList();
105
- d.setOptionsData(
106
- e.option,
109
+ openBefore: async (e, a) => {
110
+ f.form.openBefore.parentId(e, a, t.data, t.option), a.type === i.EDialog.Add && (e.title = "");
111
+ const l = await t.api.getList();
112
+ f.setOptionsData(
113
+ t.option,
107
114
  "url",
108
115
  l.map((o) => ({
109
116
  label: o.path,
@@ -113,7 +120,7 @@ const v = /* @__PURE__ */ y({
113
120
  }
114
121
  },
115
122
  tools: {
116
- add: (t) => t === void 0 ? !0 : t.type === 0,
123
+ add: (e) => e === void 0 ? !0 : e.type === 0,
117
124
  update: !0,
118
125
  delete: !0,
119
126
  export: {
@@ -125,38 +132,38 @@ const v = /* @__PURE__ */ y({
125
132
  api: {
126
133
  list: [],
127
134
  getList: async () => {
128
- if (e.api.list.length) return e.api.list;
129
- f.loading(!0);
130
- const t = await u.all({
135
+ if (t.api.list.length) return t.api.list;
136
+ i.loading(!0);
137
+ const e = await d.all({
131
138
  final(a, l, o) {
132
- f.loading(!1);
139
+ i.loading(!1);
133
140
  }
134
141
  });
135
- return e.api.list = t.data, e.api.list;
142
+ return t.api.list = e.data, t.api.list;
136
143
  }
137
144
  }
138
145
  });
139
- return (t, a) => {
146
+ return (e, a) => {
140
147
  const l = s("el-tag"), o = s("t-curd");
141
- return n(), p(o, {
142
- option: e.option
148
+ return p(), r(o, {
149
+ option: t.option
143
150
  }, {
144
- "table-type": r(({ row: c }) => [
145
- c.type === 0 ? (n(), p(l, {
151
+ "table-type": n(({ row: c }) => [
152
+ c.type === 0 ? (p(), r(l, {
146
153
  key: 0,
147
154
  type: "success"
148
155
  }, {
149
- default: r(() => a[0] || (a[0] = [
150
- i("目录", -1)
156
+ default: n(() => a[0] || (a[0] = [
157
+ u("目录", -1)
151
158
  ])),
152
159
  _: 1,
153
160
  __: [0]
154
- })) : (n(), p(l, {
161
+ })) : (p(), r(l, {
155
162
  key: 1,
156
163
  type: "warning"
157
164
  }, {
158
- default: r(() => a[1] || (a[1] = [
159
- i("接口", -1)
165
+ default: n(() => a[1] || (a[1] = [
166
+ u("接口", -1)
160
167
  ])),
161
168
  _: 1,
162
169
  __: [1]
@@ -168,5 +175,5 @@ const v = /* @__PURE__ */ y({
168
175
  }
169
176
  });
170
177
  export {
171
- v as default
178
+ x as default
172
179
  };
@@ -110,7 +110,7 @@ const k = /* @__PURE__ */ s({
110
110
  {
111
111
  key: "roleList",
112
112
  label: "角色列表",
113
- type: "tree-select",
113
+ type: "treeSelect",
114
114
  value: [],
115
115
  options: {
116
116
  treeSelect: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import 'tools-css/index.css';
2
2
  import 'tools-css/scroll.css';
3
+ import type { query, ApiData, ApiRes } from './apis/types/query';
3
4
  import ApiAuthApi from './apis/auth/ApiAuthApi';
4
5
  import ApiAuthMenu from './apis/auth/ApiAuthMenu';
5
6
  import ApiAuthPhone from './apis/auth/ApiAuthPhone';
@@ -15,7 +16,7 @@ import ApiSmsConfig from './apis/sms/ApiSmsConfig';
15
16
  import ApiApp from './apis/system/ApiApp';
16
17
  import ApiSystemConfig from './apis/system/ApiSystemConfig';
17
18
  import ApiSystemTenant from './apis/system/ApiSystemTenant';
18
- import { EDialog, ERouter } from './enum/Enum';
19
+ import { ERouter } from './enum/Enum';
19
20
  import { scurd } from './sstore/scurd';
20
21
  import { ssys } from './sstore/ssys';
21
22
  import { suser } from './sstore/suser';
@@ -24,7 +25,7 @@ import { svf } from './sstore/svf';
24
25
  import './styles/index.less';
25
26
  import System from './utils/System';
26
27
  declare const initApp: (config: Partial<typeof System.config>) => Promise<void>;
27
- export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, EDialog, ERouter, initApp, scurd, ssys, suser, sutil, svf, System };
28
+ export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, ERouter, initApp, scurd, ssys, suser, sutil, svf, System, type query, type ApiData, type ApiRes };
28
29
 
29
30
  export {}
30
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-admin-front",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "我来助你-后台管理系统-页面",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,12 +33,22 @@
33
33
  "typecheck": "vue-tsc --noEmit",
34
34
  "addtype": "tsx ./build/buildTypes.ts"
35
35
  },
36
+ "peerDependencies": {
37
+ "cc1-form": "*",
38
+ "cc1-js": "*",
39
+ "cc1-ui": "*",
40
+ "cc1-vue3": "*",
41
+ "element-plus": "*",
42
+ "xlsx": "*",
43
+ "sortablejs": "*",
44
+ "@wangeditor/editor-for-vue": "*"
45
+ },
36
46
  "devDependencies": {
37
47
  "@types/node": "22.15.2",
38
48
  "@vitejs/plugin-vue": "5.2.1",
39
49
  "@vue/tsconfig": "0.7.0",
40
50
  "@wangeditor/editor-for-vue": "5.1.12",
41
- "cc1-form": "1.3.8",
51
+ "cc1-form": "1.3.9",
42
52
  "cc1-js": "1.0.9",
43
53
  "cc1-ui": "1.0.17",
44
54
  "cc1-vue3": "1.1.0",