@ditari/bsui 1.1.48 → 1.1.50
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.
- package/CHANGELOG.md +8 -2
- package/dist/cjs/layout/Show.vue2.cjs.map +1 -1
- package/dist/cjs/menu/Menu.cjs +7 -1
- package/dist/cjs/menu/Menu.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/layout/style/index.css +1 -1
- package/dist/css/layout/style/main.css +1 -1
- package/dist/esm/layout/Show.vue2.mjs.map +1 -1
- package/dist/esm/menu/Menu.mjs +7 -1
- package/dist/esm/menu/Menu.mjs.map +1 -1
- package/dist/style/layout/style/main.scss +0 -1
- package/package.json +5 -1
- package/example/index.html +0 -13
- package/example/node_modules/.vite/deps/@ant-design_icons-vue.js +0 -29406
- package/example/node_modules/.vite/deps/@ant-design_icons-vue.js.map +0 -7
- package/example/node_modules/.vite/deps/@vueuse_core.js +0 -8255
- package/example/node_modules/.vite/deps/@vueuse_core.js.map +0 -7
- package/example/node_modules/.vite/deps/_metadata.json +0 -80
- package/example/node_modules/.vite/deps/ant-design-vue.js +0 -62756
- package/example/node_modules/.vite/deps/ant-design-vue.js.map +0 -7
- package/example/node_modules/.vite/deps/axios.js +0 -2126
- package/example/node_modules/.vite/deps/axios.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-5WWUZCGV.js +0 -36
- package/example/node_modules/.vite/deps/chunk-5WWUZCGV.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-D36HXFYL.js +0 -25
- package/example/node_modules/.vite/deps/chunk-D36HXFYL.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-EBDM3ESC.js +0 -161
- package/example/node_modules/.vite/deps/chunk-EBDM3ESC.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-EKNPBJBG.js +0 -3600
- package/example/node_modules/.vite/deps/chunk-EKNPBJBG.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-GK7Q6YQN.js +0 -10796
- package/example/node_modules/.vite/deps/chunk-GK7Q6YQN.js.map +0 -7
- package/example/node_modules/.vite/deps/chunk-TDI2FIXO.js +0 -19
- package/example/node_modules/.vite/deps/chunk-TDI2FIXO.js.map +0 -7
- package/example/node_modules/.vite/deps/package.json +0 -3
- package/example/node_modules/.vite/deps/pinia-plugin-persistedstate.js +0 -125
- package/example/node_modules/.vite/deps/pinia-plugin-persistedstate.js.map +0 -7
- package/example/node_modules/.vite/deps/pinia.js +0 -1519
- package/example/node_modules/.vite/deps/pinia.js.map +0 -7
- package/example/node_modules/.vite/deps/vue-request.js +0 -1191
- package/example/node_modules/.vite/deps/vue-request.js.map +0 -7
- package/example/node_modules/.vite/deps/vue-router.js +0 -2667
- package/example/node_modules/.vite/deps/vue-router.js.map +0 -7
- package/example/node_modules/.vite/deps/vue.js +0 -314
- package/example/node_modules/.vite/deps/vue.js.map +0 -7
- package/example/package.json +0 -17
- package/example/src/App.vue +0 -7
- package/example/src/api/list.ts +0 -22
- package/example/src/api/user.ts +0 -13
- package/example/src/components/AppMain.vue +0 -113
- package/example/src/hooks.ts +0 -103
- package/example/src/main.ts +0 -22
- package/example/src/router/form/index.route.ts +0 -23
- package/example/src/router/index.ts +0 -61
- package/example/src/router/table/index.route.ts +0 -39
- package/example/src/views/Demo.vue +0 -49
- package/example/src/views/DemoBk.vue +0 -34
- package/example/src/views/Login.vue +0 -79
- package/example/src/views/form/List.vue +0 -16
- package/example/src/views/form/List2.vue +0 -74
- package/example/src/views/form/QueryFormDemo.vue +0 -49
- package/example/src/views/form/dyn/List.vue +0 -121
- package/example/src/views/table/Add.vue +0 -379
- package/example/src/views/table/Demo.vue +0 -15
- package/example/src/views/table/Demo2.vue +0 -12
- package/example/src/views/table/Edit.vue +0 -10
- package/example/src/views/table/List.vue +0 -415
- package/example/src/views/table/Test.tsx +0 -42
- package/example/src/views/table/TestModal.vue +0 -64
- package/example/src/views/table/WorkStatusRound.vue +0 -31
- package/example/src/views/table/components/AddForm.vue +0 -44
- package/example/src/views/table/hooks.ts +0 -106
- package/example/src/views/task/Todo.vue +0 -6
- package/example/tsconfig.json +0 -16
- package/example/utils/http.ts +0 -107
- package/example/vite-env.d.ts +0 -8
- package/example/vite.config.ts +0 -10
- package/src/_utils/html.ts +0 -17
- package/src/_utils/install.ts +0 -12
- package/src/components.ts +0 -10
- package/src/config/Config.vue +0 -8
- package/src/date/RangePicker.tsx +0 -93
- package/src/date/index.ts +0 -9
- package/src/desensitize/Desensitize.tsx +0 -97
- package/src/desensitize/index.ts +0 -9
- package/src/desensitize/style/index.scss +0 -8
- package/src/dic/DicReplace.tsx +0 -63
- package/src/dic/index.ts +0 -8
- package/src/dic/replace.worker.ts +0 -25
- package/src/form/DQueryForm.tsx +0 -258
- package/src/form/index.ts +0 -9
- package/src/form/style/index.less +0 -0
- package/src/grid/Grid.tsx +0 -83
- package/src/grid/GridItem.tsx +0 -15
- package/src/grid/index.md +0 -4
- package/src/grid/index.ts +0 -16
- package/src/grid/style/index.scss +0 -70
- package/src/index.scss +0 -19
- package/src/index.ts +0 -49
- package/src/json-scheme-render/JsonSchemeRender.tsx +0 -101
- package/src/json-scheme-render/index.ts +0 -9
- package/src/layout/Breadcrumb.vue +0 -39
- package/src/layout/FuckMain.vue +0 -90
- package/src/layout/List.vue +0 -145
- package/src/layout/Main.vue +0 -97
- package/src/layout/NavTabs.vue +0 -129
- package/src/layout/Show.vue +0 -136
- package/src/layout/index.ts +0 -24
- package/src/layout/style/breadcrumb.scss +0 -61
- package/src/layout/style/fuckmain.scss +0 -21
- package/src/layout/style/index.scss +0 -35
- package/src/layout/style/list.scss +0 -26
- package/src/layout/style/main.scss +0 -75
- package/src/layout/style/navtab.scss +0 -146
- package/src/layout/style/show.scss +0 -50
- package/src/menu/Menu.tsx +0 -181
- package/src/menu/style/index.scss +0 -26
- package/src/modal/Modal.tsx +0 -83
- package/src/modal/index.ts +0 -9
- package/src/modal/style/index.scss +0 -74
- package/src/select/Select.vue +0 -177
- package/src/select/dic.worker.ts +0 -32
- package/src/select/index.ts +0 -9
- package/src/table/Field.vue +0 -44
- package/src/table/Table.tsx +0 -515
- package/src/table/index.md +0 -1
- package/src/table/index.ts +0 -9
- package/src/table/interface/table.ts +0 -64
- package/src/table/style/index.scss +0 -10
- package/src/theme/index.ts +0 -1
- package/src/theme/theme.scss +0 -1
- package/src/theme/variable.scss +0 -67
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseTransition,
|
|
3
|
-
BaseTransitionPropsValidators,
|
|
4
|
-
Comment,
|
|
5
|
-
EffectScope,
|
|
6
|
-
Fragment,
|
|
7
|
-
KeepAlive,
|
|
8
|
-
ReactiveEffect,
|
|
9
|
-
Static,
|
|
10
|
-
Suspense,
|
|
11
|
-
Teleport,
|
|
12
|
-
Text,
|
|
13
|
-
Transition,
|
|
14
|
-
TransitionGroup,
|
|
15
|
-
VueElement,
|
|
16
|
-
assertNumber,
|
|
17
|
-
callWithAsyncErrorHandling,
|
|
18
|
-
callWithErrorHandling,
|
|
19
|
-
camelize,
|
|
20
|
-
capitalize,
|
|
21
|
-
cloneVNode,
|
|
22
|
-
compatUtils,
|
|
23
|
-
compile,
|
|
24
|
-
computed,
|
|
25
|
-
createApp,
|
|
26
|
-
createBaseVNode,
|
|
27
|
-
createBlock,
|
|
28
|
-
createCommentVNode,
|
|
29
|
-
createElementBlock,
|
|
30
|
-
createHydrationRenderer,
|
|
31
|
-
createPropsRestProxy,
|
|
32
|
-
createRenderer,
|
|
33
|
-
createSSRApp,
|
|
34
|
-
createSlots,
|
|
35
|
-
createStaticVNode,
|
|
36
|
-
createTextVNode,
|
|
37
|
-
createVNode,
|
|
38
|
-
customRef,
|
|
39
|
-
defineAsyncComponent,
|
|
40
|
-
defineComponent,
|
|
41
|
-
defineCustomElement,
|
|
42
|
-
defineEmits,
|
|
43
|
-
defineExpose,
|
|
44
|
-
defineModel,
|
|
45
|
-
defineOptions,
|
|
46
|
-
defineProps,
|
|
47
|
-
defineSSRCustomElement,
|
|
48
|
-
defineSlots,
|
|
49
|
-
devtools,
|
|
50
|
-
effect,
|
|
51
|
-
effectScope,
|
|
52
|
-
getCurrentInstance,
|
|
53
|
-
getCurrentScope,
|
|
54
|
-
getTransitionRawChildren,
|
|
55
|
-
guardReactiveProps,
|
|
56
|
-
h,
|
|
57
|
-
handleError,
|
|
58
|
-
hasInjectionContext,
|
|
59
|
-
hydrate,
|
|
60
|
-
initCustomFormatter,
|
|
61
|
-
initDirectivesForSSR,
|
|
62
|
-
inject,
|
|
63
|
-
isMemoSame,
|
|
64
|
-
isProxy,
|
|
65
|
-
isReactive,
|
|
66
|
-
isReadonly,
|
|
67
|
-
isRef,
|
|
68
|
-
isRuntimeOnly,
|
|
69
|
-
isShallow,
|
|
70
|
-
isVNode,
|
|
71
|
-
markRaw,
|
|
72
|
-
mergeDefaults,
|
|
73
|
-
mergeModels,
|
|
74
|
-
mergeProps,
|
|
75
|
-
nextTick,
|
|
76
|
-
normalizeClass,
|
|
77
|
-
normalizeProps,
|
|
78
|
-
normalizeStyle,
|
|
79
|
-
onActivated,
|
|
80
|
-
onBeforeMount,
|
|
81
|
-
onBeforeUnmount,
|
|
82
|
-
onBeforeUpdate,
|
|
83
|
-
onDeactivated,
|
|
84
|
-
onErrorCaptured,
|
|
85
|
-
onMounted,
|
|
86
|
-
onRenderTracked,
|
|
87
|
-
onRenderTriggered,
|
|
88
|
-
onScopeDispose,
|
|
89
|
-
onServerPrefetch,
|
|
90
|
-
onUnmounted,
|
|
91
|
-
onUpdated,
|
|
92
|
-
openBlock,
|
|
93
|
-
popScopeId,
|
|
94
|
-
provide,
|
|
95
|
-
proxyRefs,
|
|
96
|
-
pushScopeId,
|
|
97
|
-
queuePostFlushCb,
|
|
98
|
-
reactive,
|
|
99
|
-
readonly,
|
|
100
|
-
ref,
|
|
101
|
-
registerRuntimeCompiler,
|
|
102
|
-
render,
|
|
103
|
-
renderList,
|
|
104
|
-
renderSlot,
|
|
105
|
-
resolveComponent,
|
|
106
|
-
resolveDirective,
|
|
107
|
-
resolveDynamicComponent,
|
|
108
|
-
resolveFilter,
|
|
109
|
-
resolveTransitionHooks,
|
|
110
|
-
setBlockTracking,
|
|
111
|
-
setDevtoolsHook,
|
|
112
|
-
setTransitionHooks,
|
|
113
|
-
shallowReactive,
|
|
114
|
-
shallowReadonly,
|
|
115
|
-
shallowRef,
|
|
116
|
-
ssrContextKey,
|
|
117
|
-
ssrUtils,
|
|
118
|
-
stop,
|
|
119
|
-
toDisplayString,
|
|
120
|
-
toHandlerKey,
|
|
121
|
-
toHandlers,
|
|
122
|
-
toRaw,
|
|
123
|
-
toRef,
|
|
124
|
-
toRefs,
|
|
125
|
-
toValue,
|
|
126
|
-
transformVNodeArgs,
|
|
127
|
-
triggerRef,
|
|
128
|
-
unref,
|
|
129
|
-
useAttrs,
|
|
130
|
-
useCssModule,
|
|
131
|
-
useCssVars,
|
|
132
|
-
useModel,
|
|
133
|
-
useSSRContext,
|
|
134
|
-
useSlots,
|
|
135
|
-
useTransitionState,
|
|
136
|
-
vModelCheckbox,
|
|
137
|
-
vModelDynamic,
|
|
138
|
-
vModelRadio,
|
|
139
|
-
vModelSelect,
|
|
140
|
-
vModelText,
|
|
141
|
-
vShow,
|
|
142
|
-
version,
|
|
143
|
-
warn,
|
|
144
|
-
watch,
|
|
145
|
-
watchEffect,
|
|
146
|
-
watchPostEffect,
|
|
147
|
-
watchSyncEffect,
|
|
148
|
-
withAsyncContext,
|
|
149
|
-
withCtx,
|
|
150
|
-
withDefaults,
|
|
151
|
-
withDirectives,
|
|
152
|
-
withKeys,
|
|
153
|
-
withMemo,
|
|
154
|
-
withModifiers,
|
|
155
|
-
withScopeId
|
|
156
|
-
} from "./chunk-GK7Q6YQN.js";
|
|
157
|
-
import "./chunk-5WWUZCGV.js";
|
|
158
|
-
export {
|
|
159
|
-
BaseTransition,
|
|
160
|
-
BaseTransitionPropsValidators,
|
|
161
|
-
Comment,
|
|
162
|
-
EffectScope,
|
|
163
|
-
Fragment,
|
|
164
|
-
KeepAlive,
|
|
165
|
-
ReactiveEffect,
|
|
166
|
-
Static,
|
|
167
|
-
Suspense,
|
|
168
|
-
Teleport,
|
|
169
|
-
Text,
|
|
170
|
-
Transition,
|
|
171
|
-
TransitionGroup,
|
|
172
|
-
VueElement,
|
|
173
|
-
assertNumber,
|
|
174
|
-
callWithAsyncErrorHandling,
|
|
175
|
-
callWithErrorHandling,
|
|
176
|
-
camelize,
|
|
177
|
-
capitalize,
|
|
178
|
-
cloneVNode,
|
|
179
|
-
compatUtils,
|
|
180
|
-
compile,
|
|
181
|
-
computed,
|
|
182
|
-
createApp,
|
|
183
|
-
createBlock,
|
|
184
|
-
createCommentVNode,
|
|
185
|
-
createElementBlock,
|
|
186
|
-
createBaseVNode as createElementVNode,
|
|
187
|
-
createHydrationRenderer,
|
|
188
|
-
createPropsRestProxy,
|
|
189
|
-
createRenderer,
|
|
190
|
-
createSSRApp,
|
|
191
|
-
createSlots,
|
|
192
|
-
createStaticVNode,
|
|
193
|
-
createTextVNode,
|
|
194
|
-
createVNode,
|
|
195
|
-
customRef,
|
|
196
|
-
defineAsyncComponent,
|
|
197
|
-
defineComponent,
|
|
198
|
-
defineCustomElement,
|
|
199
|
-
defineEmits,
|
|
200
|
-
defineExpose,
|
|
201
|
-
defineModel,
|
|
202
|
-
defineOptions,
|
|
203
|
-
defineProps,
|
|
204
|
-
defineSSRCustomElement,
|
|
205
|
-
defineSlots,
|
|
206
|
-
devtools,
|
|
207
|
-
effect,
|
|
208
|
-
effectScope,
|
|
209
|
-
getCurrentInstance,
|
|
210
|
-
getCurrentScope,
|
|
211
|
-
getTransitionRawChildren,
|
|
212
|
-
guardReactiveProps,
|
|
213
|
-
h,
|
|
214
|
-
handleError,
|
|
215
|
-
hasInjectionContext,
|
|
216
|
-
hydrate,
|
|
217
|
-
initCustomFormatter,
|
|
218
|
-
initDirectivesForSSR,
|
|
219
|
-
inject,
|
|
220
|
-
isMemoSame,
|
|
221
|
-
isProxy,
|
|
222
|
-
isReactive,
|
|
223
|
-
isReadonly,
|
|
224
|
-
isRef,
|
|
225
|
-
isRuntimeOnly,
|
|
226
|
-
isShallow,
|
|
227
|
-
isVNode,
|
|
228
|
-
markRaw,
|
|
229
|
-
mergeDefaults,
|
|
230
|
-
mergeModels,
|
|
231
|
-
mergeProps,
|
|
232
|
-
nextTick,
|
|
233
|
-
normalizeClass,
|
|
234
|
-
normalizeProps,
|
|
235
|
-
normalizeStyle,
|
|
236
|
-
onActivated,
|
|
237
|
-
onBeforeMount,
|
|
238
|
-
onBeforeUnmount,
|
|
239
|
-
onBeforeUpdate,
|
|
240
|
-
onDeactivated,
|
|
241
|
-
onErrorCaptured,
|
|
242
|
-
onMounted,
|
|
243
|
-
onRenderTracked,
|
|
244
|
-
onRenderTriggered,
|
|
245
|
-
onScopeDispose,
|
|
246
|
-
onServerPrefetch,
|
|
247
|
-
onUnmounted,
|
|
248
|
-
onUpdated,
|
|
249
|
-
openBlock,
|
|
250
|
-
popScopeId,
|
|
251
|
-
provide,
|
|
252
|
-
proxyRefs,
|
|
253
|
-
pushScopeId,
|
|
254
|
-
queuePostFlushCb,
|
|
255
|
-
reactive,
|
|
256
|
-
readonly,
|
|
257
|
-
ref,
|
|
258
|
-
registerRuntimeCompiler,
|
|
259
|
-
render,
|
|
260
|
-
renderList,
|
|
261
|
-
renderSlot,
|
|
262
|
-
resolveComponent,
|
|
263
|
-
resolveDirective,
|
|
264
|
-
resolveDynamicComponent,
|
|
265
|
-
resolveFilter,
|
|
266
|
-
resolveTransitionHooks,
|
|
267
|
-
setBlockTracking,
|
|
268
|
-
setDevtoolsHook,
|
|
269
|
-
setTransitionHooks,
|
|
270
|
-
shallowReactive,
|
|
271
|
-
shallowReadonly,
|
|
272
|
-
shallowRef,
|
|
273
|
-
ssrContextKey,
|
|
274
|
-
ssrUtils,
|
|
275
|
-
stop,
|
|
276
|
-
toDisplayString,
|
|
277
|
-
toHandlerKey,
|
|
278
|
-
toHandlers,
|
|
279
|
-
toRaw,
|
|
280
|
-
toRef,
|
|
281
|
-
toRefs,
|
|
282
|
-
toValue,
|
|
283
|
-
transformVNodeArgs,
|
|
284
|
-
triggerRef,
|
|
285
|
-
unref,
|
|
286
|
-
useAttrs,
|
|
287
|
-
useCssModule,
|
|
288
|
-
useCssVars,
|
|
289
|
-
useModel,
|
|
290
|
-
useSSRContext,
|
|
291
|
-
useSlots,
|
|
292
|
-
useTransitionState,
|
|
293
|
-
vModelCheckbox,
|
|
294
|
-
vModelDynamic,
|
|
295
|
-
vModelRadio,
|
|
296
|
-
vModelSelect,
|
|
297
|
-
vModelText,
|
|
298
|
-
vShow,
|
|
299
|
-
version,
|
|
300
|
-
warn,
|
|
301
|
-
watch,
|
|
302
|
-
watchEffect,
|
|
303
|
-
watchPostEffect,
|
|
304
|
-
watchSyncEffect,
|
|
305
|
-
withAsyncContext,
|
|
306
|
-
withCtx,
|
|
307
|
-
withDefaults,
|
|
308
|
-
withDirectives,
|
|
309
|
-
withKeys,
|
|
310
|
-
withMemo,
|
|
311
|
-
withModifiers,
|
|
312
|
-
withScopeId
|
|
313
|
-
};
|
|
314
|
-
//# sourceMappingURL=vue.js.map
|
package/example/package.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "example",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"dev": "vite",
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [],
|
|
12
|
-
"author": "",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@ditari/bsui": "workspace:^"
|
|
16
|
-
}
|
|
17
|
-
}
|
package/example/src/App.vue
DELETED
package/example/src/api/list.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
|
|
3
|
-
export const userList = (params: { page?: number; limit?: number }) => {
|
|
4
|
-
return axios.get("https://61273138c2e8920017bc0b3c.mockapi.io/api/users", {
|
|
5
|
-
params
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const testService = (params: { page?: number; limit?: number }) => {
|
|
11
|
-
return axios.get("https://61273138c2e8920017bc0b3c.mockapi.io/api/users/", {
|
|
12
|
-
params
|
|
13
|
-
});
|
|
14
|
-
// console.log(params)
|
|
15
|
-
// return new Promise((resolve, reject) => {
|
|
16
|
-
// resolve({ data: [], total: 0 });
|
|
17
|
-
// });
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const getUsers = () => {
|
|
21
|
-
return axios.get("/api/login", { params: { name: "a", pwd: "2" } });
|
|
22
|
-
};
|
package/example/src/api/user.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import http from "../../utils/http";
|
|
2
|
-
|
|
3
|
-
export const getImgCode = () => {
|
|
4
|
-
return http.get("getVerifyCode");
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const doLogin = (params: any) => {
|
|
8
|
-
// const formData = new FormData();
|
|
9
|
-
// formData.append("username", params.username);
|
|
10
|
-
// formData.append("password", params.password);
|
|
11
|
-
// formData.append("verifyCode", params.verifyCode);
|
|
12
|
-
return http.post("login", params);
|
|
13
|
-
};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useRouter } from "vue-router";
|
|
3
|
-
|
|
4
|
-
import { UserOutlined } from "@ant-design/icons-vue";
|
|
5
|
-
import { Main as DMain } from "../../../src/components";
|
|
6
|
-
import { useMenuStore, useNavTabsStore } from "../../../../store";
|
|
7
|
-
|
|
8
|
-
const MenuList = [
|
|
9
|
-
{
|
|
10
|
-
title: "Table",
|
|
11
|
-
url: "/table",
|
|
12
|
-
icon: "icon-a-icon-Waybillinformation",
|
|
13
|
-
children: [
|
|
14
|
-
{
|
|
15
|
-
title: "表格demo",
|
|
16
|
-
url: "/table"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: "表格ADD",
|
|
20
|
-
url: "/table/add"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: "表格Edit",
|
|
24
|
-
url: "/table/edit"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
title: "Form",
|
|
30
|
-
url: "/form/add",
|
|
31
|
-
icon: "icon-a-icon-documentsattached",
|
|
32
|
-
children: [
|
|
33
|
-
{
|
|
34
|
-
title: "表单demo",
|
|
35
|
-
url: "/form/add"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: "Form",
|
|
41
|
-
url: "/form",
|
|
42
|
-
icon: "icon-a-icon-documentsattached"
|
|
43
|
-
}
|
|
44
|
-
];
|
|
45
|
-
const store = useMenuStore();
|
|
46
|
-
store.save(MenuList);
|
|
47
|
-
const { deleteTabs } = useNavTabsStore();
|
|
48
|
-
const router = useRouter();
|
|
49
|
-
const showConfig = {
|
|
50
|
-
backBtn: "BackBtn"
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
function onAuto() {
|
|
54
|
-
let i = 0;
|
|
55
|
-
const timer = setInterval(() => {
|
|
56
|
-
router.push("/table/add");
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
deleteTabs("/table/add");
|
|
59
|
-
router.push("/table");
|
|
60
|
-
}, 100);
|
|
61
|
-
|
|
62
|
-
setTimeout(() => {
|
|
63
|
-
deleteTabs("/table/add");
|
|
64
|
-
router.push("/table");
|
|
65
|
-
}, 200);
|
|
66
|
-
|
|
67
|
-
i++;
|
|
68
|
-
|
|
69
|
-
if (i === 100) {
|
|
70
|
-
clearInterval(timer);
|
|
71
|
-
}
|
|
72
|
-
}, 300);
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
<script lang="ts">
|
|
76
|
-
export default {
|
|
77
|
-
name: "AppMain"
|
|
78
|
-
};
|
|
79
|
-
</script>
|
|
80
|
-
<template>
|
|
81
|
-
<d-main>
|
|
82
|
-
<template #logo>
|
|
83
|
-
<div class="app-logo">dsfdsf</div>
|
|
84
|
-
</template>
|
|
85
|
-
<template #operation>
|
|
86
|
-
<div class="ditari-operation-items">
|
|
87
|
-
<a-dropdown>
|
|
88
|
-
<a class="ant-dropdown-link" @click.prevent>
|
|
89
|
-
<a-avatar :size="30">
|
|
90
|
-
<template #icon><UserOutlined /></template>
|
|
91
|
-
</a-avatar>
|
|
92
|
-
<a-button @click="onAuto">模拟执行</a-button>
|
|
93
|
-
</a>
|
|
94
|
-
<template #overlay>
|
|
95
|
-
<a-menu>
|
|
96
|
-
<a-menu-item>
|
|
97
|
-
<a href="javascript:;">企业信息</a>
|
|
98
|
-
</a-menu-item>
|
|
99
|
-
<a-menu-item>
|
|
100
|
-
<a href="javascript:;">系统介绍</a>
|
|
101
|
-
</a-menu-item>
|
|
102
|
-
<a-menu-item>
|
|
103
|
-
<a href="javascript:;">退出</a>
|
|
104
|
-
</a-menu-item>
|
|
105
|
-
</a-menu>
|
|
106
|
-
</template>
|
|
107
|
-
</a-dropdown>
|
|
108
|
-
</div>
|
|
109
|
-
</template>
|
|
110
|
-
<template #micro> </template>
|
|
111
|
-
</d-main>
|
|
112
|
-
</template>
|
|
113
|
-
<style scoped></style>
|
package/example/src/hooks.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { useRequestList } from "../../../hooks/src/index";
|
|
2
|
-
import { reactive, ref } from "vue";
|
|
3
|
-
import { testService } from "./api/list";
|
|
4
|
-
|
|
5
|
-
export const useTableConfig = () => {
|
|
6
|
-
const columns = [
|
|
7
|
-
{
|
|
8
|
-
title: "Id",
|
|
9
|
-
dataIndex: "id",
|
|
10
|
-
width: 350
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
title: "Name",
|
|
14
|
-
dataIndex: "name",
|
|
15
|
-
width: 350
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
title: "avatar",
|
|
19
|
-
dataIndex: "avatar",
|
|
20
|
-
width: 350,
|
|
21
|
-
config: {
|
|
22
|
-
type: "dic",
|
|
23
|
-
name: "k_v",
|
|
24
|
-
style: {
|
|
25
|
-
D: "red",
|
|
26
|
-
S: "blue"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: "Job",
|
|
32
|
-
dataIndex: "job",
|
|
33
|
-
width: 350,
|
|
34
|
-
config: {
|
|
35
|
-
type: "date",
|
|
36
|
-
formatter: "YYYY"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: "操作",
|
|
41
|
-
width: 100,
|
|
42
|
-
fixed: "right",
|
|
43
|
-
slot: "action"
|
|
44
|
-
}
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
columns
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const useTable = () => {
|
|
53
|
-
const queryParams = ref({ limit: 20, page: 1 });
|
|
54
|
-
const selectedRowKeys = ref<any>([]);
|
|
55
|
-
const { columns } = useTableConfig();
|
|
56
|
-
|
|
57
|
-
const { data, loading, onPageChange, pagination, run, onQuery } =
|
|
58
|
-
useRequestList(testService, {
|
|
59
|
-
params: queryParams,
|
|
60
|
-
dataKey: "data.data"
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const id = ref("");
|
|
64
|
-
|
|
65
|
-
//表格选项
|
|
66
|
-
const config = reactive({
|
|
67
|
-
columns,
|
|
68
|
-
bordered: true,
|
|
69
|
-
pagination,
|
|
70
|
-
selection: "N",
|
|
71
|
-
onPageChange,
|
|
72
|
-
pageOption: { sizeOptions: ["20", "100", "200"] },
|
|
73
|
-
dbClick: (record: any) => {
|
|
74
|
-
const index = selectedRowKeys.value.indexOf(record.id);
|
|
75
|
-
if (index > -1) {
|
|
76
|
-
selectedRowKeys.value.splice(index, 1);
|
|
77
|
-
}
|
|
78
|
-
id.value = id.value === record.id ? "" : record.id;
|
|
79
|
-
},
|
|
80
|
-
rowClassName: (record: any) => {
|
|
81
|
-
if (record.id === id.value) {
|
|
82
|
-
return "row-class";
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
getCheckboxProps: (record: any) => {
|
|
86
|
-
return {
|
|
87
|
-
disabled: record.id === "1",
|
|
88
|
-
name: "id",
|
|
89
|
-
value: id.value
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
selectedRowKeys,
|
|
96
|
-
data,
|
|
97
|
-
loading,
|
|
98
|
-
queryParams,
|
|
99
|
-
config: reactive(config),
|
|
100
|
-
run,
|
|
101
|
-
onQuery
|
|
102
|
-
};
|
|
103
|
-
};
|
package/example/src/main.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import Antd from "ant-design-vue";
|
|
3
|
-
import "ant-design-vue/dist/antd.css";
|
|
4
|
-
import * as Icons from "@ant-design/icons-vue";
|
|
5
|
-
import App from "./App.vue";
|
|
6
|
-
import router from "./router";
|
|
7
|
-
import ui from "../../../bsui/src/index";
|
|
8
|
-
import "../../../bsui/src/index.scss";
|
|
9
|
-
|
|
10
|
-
const app = createApp(App);
|
|
11
|
-
// 注册共用组件
|
|
12
|
-
app.use(Antd);
|
|
13
|
-
app.use(router);
|
|
14
|
-
app.use(ui, { menuIcon: { componentName: "nativeHtml", prop: "type" } } as any);
|
|
15
|
-
|
|
16
|
-
//注册UI自带的图标
|
|
17
|
-
const icons: any = Icons;
|
|
18
|
-
for (const i in icons) {
|
|
19
|
-
app.component(i, icons[i]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
app.mount("#app");
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RouteRecordRaw } from "vue-router";
|
|
2
|
-
|
|
3
|
-
const route: RouteRecordRaw[] = [
|
|
4
|
-
{
|
|
5
|
-
path: "/form",
|
|
6
|
-
redirect: "/form",
|
|
7
|
-
meta: {
|
|
8
|
-
title: "表单"
|
|
9
|
-
},
|
|
10
|
-
children: [
|
|
11
|
-
{
|
|
12
|
-
path: "",
|
|
13
|
-
component: () => import("../../views/form/List.vue"),
|
|
14
|
-
meta: {
|
|
15
|
-
title: "表单",
|
|
16
|
-
keepOpen: true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
export default route;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
|
|
2
|
-
import AppMain from "../components/AppMain.vue";
|
|
3
|
-
import { useDitariRoute } from "../../../../hooks";
|
|
4
|
-
import { useUserStore } from "../../../../store";
|
|
5
|
-
|
|
6
|
-
const STATIC_ROUTE: RouteRecordRaw[] = [
|
|
7
|
-
{
|
|
8
|
-
path: "/login",
|
|
9
|
-
component: () => import("../views/Login.vue")
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
path: "/demo",
|
|
13
|
-
component: () => import("../views/Demo.vue")
|
|
14
|
-
}
|
|
15
|
-
];
|
|
16
|
-
const router = createRouter({
|
|
17
|
-
history: createWebHistory(import.meta.env.VITE_APP_BASE_URL || ""),
|
|
18
|
-
routes: [...STATIC_ROUTE]
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// 面包屑匹配方法
|
|
22
|
-
let setMatchedFn: any = null;
|
|
23
|
-
|
|
24
|
-
// 路由守卫
|
|
25
|
-
// eslint-disable-next-line complexity
|
|
26
|
-
router.beforeEach(async (to, from) => {
|
|
27
|
-
const { getToken } = useUserStore();
|
|
28
|
-
if (router.getRoutes().length <= 2) {
|
|
29
|
-
// 路由长度小于2的时候,需要动态注册路由,说明资源文件被强制加载了
|
|
30
|
-
const { getRoutes, setMatched } = useDitariRoute();
|
|
31
|
-
const routes = await getRoutes(import.meta.glob("./**/*.route.{ts,js}"));
|
|
32
|
-
router.addRoute({
|
|
33
|
-
path: "/",
|
|
34
|
-
component: AppMain,
|
|
35
|
-
children: routes
|
|
36
|
-
});
|
|
37
|
-
setMatchedFn = setMatched;
|
|
38
|
-
// 必须传query和param 否则,强制刷新的时候会丢失参数
|
|
39
|
-
return { replace: true, path: to.path, query: to.query, params: to.params };
|
|
40
|
-
}
|
|
41
|
-
const isLoginPage = to.path.indexOf("login") === -1;
|
|
42
|
-
// 没有token
|
|
43
|
-
if (!getToken) {
|
|
44
|
-
//访问的不是登录页面
|
|
45
|
-
// if (isLoginPage) {
|
|
46
|
-
// return {
|
|
47
|
-
// path: "/login",
|
|
48
|
-
// replace: true,
|
|
49
|
-
// query: { redirect: from.fullPath }
|
|
50
|
-
// };
|
|
51
|
-
// }
|
|
52
|
-
} else {
|
|
53
|
-
if (!isLoginPage) {
|
|
54
|
-
// 如果登录了且访问的是登录页则跳转到首页
|
|
55
|
-
return "/";
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
setMatchedFn && setMatchedFn(to, from);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export default router;
|