cc1-admin-front 0.0.2 → 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.
@@ -1,22 +1,26 @@
1
- import { defineComponent as y, reactive as m, resolveComponent as s, openBlock as p, createBlock as n, 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
+ }
20
24
  },
21
25
  page: {
22
26
  show: !1
@@ -84,7 +88,7 @@ const v = /* @__PURE__ */ y({
84
88
  type: "select",
85
89
  value: "",
86
90
  show: {
87
- form: (t) => t.type === 1
91
+ form: (e) => e.type === 1
88
92
  },
89
93
  options: {
90
94
  select: {
@@ -102,11 +106,11 @@ const v = /* @__PURE__ */ y({
102
106
  }
103
107
  ],
104
108
  form: {
105
- openBefore: async (t, a) => {
106
- d.form.openBefore.parentId(t, a, e.data, e.option);
107
- const l = await e.api.getList();
108
- d.setOptionsData(
109
- 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,
110
114
  "url",
111
115
  l.map((o) => ({
112
116
  label: o.path,
@@ -116,7 +120,7 @@ const v = /* @__PURE__ */ y({
116
120
  }
117
121
  },
118
122
  tools: {
119
- add: (t) => t === void 0 ? !0 : t.type === 0,
123
+ add: (e) => e === void 0 ? !0 : e.type === 0,
120
124
  update: !0,
121
125
  delete: !0,
122
126
  export: {
@@ -128,38 +132,38 @@ const v = /* @__PURE__ */ y({
128
132
  api: {
129
133
  list: [],
130
134
  getList: async () => {
131
- if (e.api.list.length) return e.api.list;
132
- f.loading(!0);
133
- 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({
134
138
  final(a, l, o) {
135
- f.loading(!1);
139
+ i.loading(!1);
136
140
  }
137
141
  });
138
- return e.api.list = t.data, e.api.list;
142
+ return t.api.list = e.data, t.api.list;
139
143
  }
140
144
  }
141
145
  });
142
- return (t, a) => {
146
+ return (e, a) => {
143
147
  const l = s("el-tag"), o = s("t-curd");
144
- return p(), n(o, {
145
- option: e.option
148
+ return p(), r(o, {
149
+ option: t.option
146
150
  }, {
147
- "table-type": r(({ row: c }) => [
148
- c.type === 0 ? (p(), n(l, {
151
+ "table-type": n(({ row: c }) => [
152
+ c.type === 0 ? (p(), r(l, {
149
153
  key: 0,
150
154
  type: "success"
151
155
  }, {
152
- default: r(() => a[0] || (a[0] = [
153
- i("目录", -1)
156
+ default: n(() => a[0] || (a[0] = [
157
+ u("目录", -1)
154
158
  ])),
155
159
  _: 1,
156
160
  __: [0]
157
- })) : (p(), n(l, {
161
+ })) : (p(), r(l, {
158
162
  key: 1,
159
163
  type: "warning"
160
164
  }, {
161
- default: r(() => a[1] || (a[1] = [
162
- i("接口", -1)
165
+ default: n(() => a[1] || (a[1] = [
166
+ u("接口", -1)
163
167
  ])),
164
168
  _: 1,
165
169
  __: [1]
@@ -171,5 +175,5 @@ const v = /* @__PURE__ */ y({
171
175
  }
172
176
  });
173
177
  export {
174
- v as default
178
+ x as default
175
179
  };
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.2",
3
+ "version": "0.0.3",
4
4
  "description": "我来助你-后台管理系统-页面",
5
5
  "repository": {
6
6
  "type": "git",