@morghulis/core 1.0.21 → 1.0.23
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/README.md +65 -30
- package/dist/index.css +1 -1
- package/dist/morghulis-core.es.js +3500 -3289
- package/dist/morghulis-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/usages/tree-data/DTree.vue.d.ts +5 -1
- package/dist/types/usages/tree-data/tree-table/DTreeTable.vue.d.ts +14 -0
- package/dist/types/usages/tree-data/tree-table/DTreeTablePlugin.vue.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 1. vite.config.js (dev mode)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
add server for local develop with valar
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```ts
|
|
6
|
+
import {fileURLToPath, URL} from 'node:url'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
import {defineConfig} from 'vite'
|
|
9
|
+
import vue from '@vitejs/plugin-vue'
|
|
10
|
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
// https://vite.dev/config/
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
plugins: [
|
|
15
|
+
vue(),
|
|
16
|
+
vueDevTools(),
|
|
17
|
+
],
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: {
|
|
20
|
+
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
server: {
|
|
24
|
+
host: '0.0.0.0',
|
|
25
|
+
open: false,
|
|
26
|
+
proxy: {
|
|
27
|
+
'/api': {
|
|
28
|
+
target: `http://localhost:8000`,
|
|
29
|
+
changeOrigin: true,
|
|
30
|
+
ws: true,
|
|
31
|
+
rewrite: path => path.replace(/^\/api/, '')
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
```
|
|
21
37
|
|
|
22
|
-
|
|
38
|
+
2. main.ts
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
```ts
|
|
41
|
+
import {createApp, h} from 'vue'
|
|
42
|
+
import {createMorghulis, MApp} from "@morghulis/core";
|
|
43
|
+
import ElementPlus from 'element-plus'
|
|
44
|
+
import '@morghulis/core/style'
|
|
45
|
+
import {options} from "./options";
|
|
25
46
|
|
|
26
|
-
|
|
47
|
+
import {createPinia} from "pinia";
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
const app = createApp(MApp)
|
|
50
|
+
app.use(createPinia())
|
|
51
|
+
app.use(ElementPlus)
|
|
52
|
+
app.use(createMorghulis(options))
|
|
53
|
+
app.mount('#app')
|
|
30
54
|
```
|
|
31
55
|
|
|
32
|
-
|
|
56
|
+
3. options.ts
|
|
33
57
|
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Type-Check, Compile and Minify for Production
|
|
58
|
+
```ts
|
|
59
|
+
import App from "./App.vue";
|
|
60
|
+
import type {Options} from "@morghulis/core";
|
|
39
61
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
export const options: Options = {
|
|
63
|
+
title: 'Valar Morghulis',
|
|
64
|
+
signInOnly: false,
|
|
65
|
+
account: {
|
|
66
|
+
// label: 'Phone Number'
|
|
67
|
+
},
|
|
68
|
+
routes: [
|
|
69
|
+
{
|
|
70
|
+
path: '/',
|
|
71
|
+
name: '主页',
|
|
72
|
+
component: App
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
icons: []
|
|
76
|
+
}
|
|
77
|
+
```
|