dlzn-ui 1.35.0 → 1.38.0
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/node/stylelint-config.mjs +1 -1
- package/node/vite-config.d.ts +5 -0
- package/node/vite-config.mjs +88 -14
- package/package.json +6 -2
|
@@ -37,7 +37,7 @@ var stylelint_config_default = {
|
|
|
37
37
|
"@stylistic/selector-combinator-space-before": null,
|
|
38
38
|
"@stylistic/string-quotes": null,
|
|
39
39
|
"@stylistic/value-list-comma-newline-after": null,
|
|
40
|
-
"at-rule-no-unknown": [true, { ignoreAtRules: ["theme"] }],
|
|
40
|
+
"at-rule-no-unknown": [true, { ignoreAtRules: ["theme", "reference"] }],
|
|
41
41
|
"csstools/use-nesting": ["always", { message: "尽量使用嵌套写法" }],
|
|
42
42
|
"import-notation": "string",
|
|
43
43
|
"selector-class-pattern": ["^(t-|el-|([a-zA-Z][a-zA-Z0-9_]*[a-zA-Z0-9])$)", { message: "自定义 class 名称使用 snake_case" }],
|
package/node/vite-config.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { ConfigEnv, UserConfig } from 'vite';
|
|
2
|
+
import { default as AutoImport } from 'unplugin-auto-import/vite';
|
|
3
|
+
type Arrayable<T> = Array<T> | T;
|
|
2
4
|
interface Options {
|
|
5
|
+
autoImportResolvers: Array<UnwrapArrayable<UnwrapArrayable<NonNullable<Parameters<typeof AutoImport>[0]['resolvers']>>>>;
|
|
6
|
+
autoImports: NonNullable<UnwrapArrayable<Parameters<typeof AutoImport>[0]['imports']>>;
|
|
3
7
|
root: string;
|
|
4
8
|
}
|
|
9
|
+
type UnwrapArrayable<T> = T extends Arrayable<infer U> ? U : never;
|
|
5
10
|
export declare function commonConfig(_env: ConfigEnv): UserConfig;
|
|
6
11
|
declare const _default: (_env: ConfigEnv, options: Options) => UserConfig;
|
|
7
12
|
export default _default;
|
package/node/vite-config.mjs
CHANGED
|
@@ -2,17 +2,22 @@ import { needPort } from "./utils/index.mjs";
|
|
|
2
2
|
import { posix, resolve } from "node:path";
|
|
3
3
|
import tailwindcss from "@tailwindcss/vite";
|
|
4
4
|
import vue from "@vitejs/plugin-vue";
|
|
5
|
+
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
5
6
|
import browserslist from "browserslist";
|
|
6
7
|
import { browserslistToTargets } from "lightningcss";
|
|
8
|
+
import AutoImport from "unplugin-auto-import/vite";
|
|
9
|
+
import ElementPlus from "unplugin-element-plus/vite";
|
|
10
|
+
import Components from "unplugin-vue-components/vite";
|
|
7
11
|
import { loadEnv, mergeConfig } from "vite";
|
|
8
12
|
import { parseLoadedEnv } from "vite-plugin-env-parse";
|
|
9
13
|
import { createHtmlPlugin } from "vite-plugin-html";
|
|
10
14
|
import tailwindAutoReference from "vite-plugin-vue-tailwind-auto-reference";
|
|
15
|
+
import VueRouter from "vue-router/vite";
|
|
11
16
|
//#region node/vite-config.ts
|
|
12
17
|
function commonConfig(_env) {
|
|
13
18
|
return {
|
|
14
19
|
clearScreen: false,
|
|
15
|
-
plugins: [vue({}),
|
|
20
|
+
plugins: [vue({}), vueJsx()]
|
|
16
21
|
};
|
|
17
22
|
}
|
|
18
23
|
function bypass(req, res, options) {
|
|
@@ -24,8 +29,7 @@ function bypass(req, res, options) {
|
|
|
24
29
|
}
|
|
25
30
|
var vite_config_default = (_env, options) => {
|
|
26
31
|
const { command, mode } = _env;
|
|
27
|
-
const
|
|
28
|
-
const resolvePath = (p) => resolve(root, p);
|
|
32
|
+
const resolvePath = (p) => resolve(options.root, p);
|
|
29
33
|
const { VITE_API_PROXY_PORT_ARRAY, VITE_APP_ID, VITE_APP_NAME = "", VITE_BASE_URL = "/", VITE_FORCE_PWD_CHANGE = true, VITE_PROXY_TARGET: viteProxyTarget, VITE_USE_LOGIN_CAPTCHA = true } = parseLoadedEnv(loadEnv(mode, "build/env"));
|
|
30
34
|
const VITE_PROXY_TARGET = Array.isArray(viteProxyTarget) ? viteProxyTarget : [viteProxyTarget];
|
|
31
35
|
console.log({
|
|
@@ -99,18 +103,88 @@ var vite_config_default = (_env, options) => {
|
|
|
99
103
|
"color",
|
|
100
104
|
"dlzn-ui"
|
|
101
105
|
] },
|
|
102
|
-
plugins: [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
plugins: [
|
|
107
|
+
createHtmlPlugin({
|
|
108
|
+
inject: {
|
|
109
|
+
data: {
|
|
110
|
+
appId: VITE_APP_ID,
|
|
111
|
+
mode: isProduction ? "prod" : "dev",
|
|
112
|
+
title: VITE_APP_NAME
|
|
113
|
+
},
|
|
114
|
+
ejsOptions: { views: ["node_modules/dlzn-ui/build/ejs"] }
|
|
108
115
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
minify: true,
|
|
117
|
+
template: "node_modules/dlzn-ui/build/index.html"
|
|
118
|
+
}),
|
|
119
|
+
tailwindAutoReference("node_modules/dlzn-ui/assets/css/tailwindcss-entry.css"),
|
|
120
|
+
tailwindcss(),
|
|
121
|
+
VueRouter({ dts: "types/typed-router.d.ts" }),
|
|
122
|
+
vueJsx(),
|
|
123
|
+
ElementPlus({}),
|
|
124
|
+
AutoImport({
|
|
125
|
+
dirs: [
|
|
126
|
+
"src/plugins/autoImport",
|
|
127
|
+
"src/bus/autoImport",
|
|
128
|
+
"src/hooks"
|
|
129
|
+
],
|
|
130
|
+
dirsScanOptions: { types: false },
|
|
131
|
+
dts: "types/auto-imports.d.ts",
|
|
132
|
+
imports: [
|
|
133
|
+
"vue",
|
|
134
|
+
"vue-router",
|
|
135
|
+
"pinia",
|
|
136
|
+
"@vueuse/core",
|
|
137
|
+
{
|
|
138
|
+
from: "alova/client",
|
|
139
|
+
imports: [
|
|
140
|
+
"useRequest",
|
|
141
|
+
"useWatcher",
|
|
142
|
+
"usePagination"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
from: "@/plugins/others/directive.ts",
|
|
147
|
+
imports: ["checkPermissions"]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
from: "dlzn-ui/utils",
|
|
151
|
+
imports: [
|
|
152
|
+
"formatNumber",
|
|
153
|
+
"isFalsy",
|
|
154
|
+
"stringDisplay"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{ "@/plugins/alova/index.ts": [["default", "alovaInst"]] },
|
|
158
|
+
{
|
|
159
|
+
from: "@/components/tDesignReset/TForm/index.ts",
|
|
160
|
+
imports: [
|
|
161
|
+
"FormItem",
|
|
162
|
+
"FormInstance",
|
|
163
|
+
"FormExposed"
|
|
164
|
+
],
|
|
165
|
+
type: true
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
from: "@/components/tDesignReset/TTable/index.ts",
|
|
169
|
+
imports: ["TableCol", "CellRenderContext"],
|
|
170
|
+
type: true
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
from: "@/components/autoImport/TPageList/index.ts",
|
|
174
|
+
imports: ["PageListProps"],
|
|
175
|
+
type: true
|
|
176
|
+
},
|
|
177
|
+
options.autoImports
|
|
178
|
+
],
|
|
179
|
+
resolvers: [...options.autoImportResolvers],
|
|
180
|
+
vueTemplate: true
|
|
181
|
+
}),
|
|
182
|
+
Components({
|
|
183
|
+
deep: false,
|
|
184
|
+
dts: "types/components.d.ts",
|
|
185
|
+
resolvers: [...options.autoImportResolvers]
|
|
186
|
+
})
|
|
187
|
+
],
|
|
114
188
|
resolve: {
|
|
115
189
|
alias: [
|
|
116
190
|
{
|
package/package.json
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"types": "./index.d.ts"
|
|
12
12
|
},
|
|
13
13
|
"./assets/css/index.css": "./assets/css/index.css",
|
|
14
|
-
"./assets/css/tailwindcss-entry.css": "./assets/css/tailwindcss-entry.css",
|
|
15
14
|
"./const": {
|
|
16
15
|
"import": "./const/index.mjs",
|
|
17
16
|
"types": "./const/index.d.ts"
|
|
@@ -48,6 +47,7 @@
|
|
|
48
47
|
"@tsconfig/node-lts": "^24.0.0",
|
|
49
48
|
"@types/node": "^26.1.2",
|
|
50
49
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
50
|
+
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
|
51
51
|
"@vue/tsconfig": "^0.9.1",
|
|
52
52
|
"browserslist": "^4.28.8",
|
|
53
53
|
"eslint": "^10.8.1",
|
|
@@ -68,17 +68,21 @@
|
|
|
68
68
|
"tailwindcss": "^4.3.3",
|
|
69
69
|
"tdesign-vue-next": "^1.20.5",
|
|
70
70
|
"typescript": "^6.0.3",
|
|
71
|
+
"unplugin-auto-import": "^21.1.0",
|
|
72
|
+
"unplugin-element-plus": "^0.11.2",
|
|
73
|
+
"unplugin-vue-components": "^32.1.0",
|
|
71
74
|
"vite": "^8.2.0",
|
|
72
75
|
"vite-plugin-env-parse": "^1.0.15",
|
|
73
76
|
"vite-plugin-html": "^3.2.2",
|
|
74
77
|
"vite-plugin-vue-tailwind-auto-reference": "^2.0.2",
|
|
75
78
|
"vue": "^3.5.41",
|
|
79
|
+
"vue-router": "^5.2.0",
|
|
76
80
|
"vue-tsc": "^3.3.9"
|
|
77
81
|
},
|
|
78
82
|
"sideEffects": [
|
|
79
83
|
"**/*.css"
|
|
80
84
|
],
|
|
81
85
|
"type": "module",
|
|
82
|
-
"version": "1.
|
|
86
|
+
"version": "1.38.0",
|
|
83
87
|
"scripts": {}
|
|
84
88
|
}
|