dlzn-ui 1.39.0 → 1.41.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.
@@ -2,7 +2,7 @@ import { basename, resolve } from "node:path";
2
2
  import { globSync } from "tinyglobby";
3
3
  //#region node/aliasElementPlus.ts
4
4
  var aliasElementPlus_default = (root) => {
5
- const elementPlusCss = globSync(resolve(root, "src/plugins/element-plus/theme-chalk/*.css"));
5
+ const elementPlusCss = globSync("src/plugins/element-plus/theme-chalk/*.css", { cwd: root });
6
6
  const arr = [];
7
7
  elementPlusCss.forEach((file) => {
8
8
  const _basename = basename(file);
@@ -1,10 +1,10 @@
1
1
  import { upperFirst } from "./utils/index.mjs";
2
- import { basename, resolve } from "node:path";
2
+ import { basename } from "node:path";
3
3
  import { globSync } from "tinyglobby";
4
4
  //#region node/autoImportStores.ts
5
5
  var autoImportStores_default = (root) => {
6
6
  const piniaStoreKeys = [];
7
- globSync(resolve(root, "src/store/modules/*.ts")).forEach((p) => {
7
+ globSync("src/store/modules/*.ts", { cwd: root }).forEach((p) => {
8
8
  piniaStoreKeys.push(basename(p, ".ts"));
9
9
  });
10
10
  const customerImport = {};
@@ -1,4 +1,7 @@
1
- declare const _default: (isProduction: boolean) => ({
1
+ declare const _default: (options: {
2
+ isProduction: boolean;
3
+ root: string;
4
+ }) => ({
2
5
  resolve: (name: string) => {
3
6
  from: string;
4
7
  name: string;
@@ -2,13 +2,14 @@ import path from "node:path";
2
2
  import { globSync } from "tinyglobby";
3
3
  import { TDesignResolver } from "@tdesign-vue-next/auto-import-resolver";
4
4
  //#region node/tDesignResolve.ts
5
- var tDesignResetComponentsSubFolderName = globSync("src/components/tDesignReset/*/Index.vue").map((file) => {
6
- return path.basename(path.dirname(file));
7
- });
8
- var autoImportComponentsSubFolderName = globSync("src/components/autoImport/*/Index.vue").map((file) => {
9
- return path.basename(path.dirname(file));
10
- });
11
- var tDesignResolve_default = (isProduction) => {
5
+ var tDesignResolve_default = (options) => {
6
+ const { isProduction, root } = options;
7
+ const tDesignResetComponentsSubFolderName = globSync("src/components/tDesignReset/*/Index.vue", { cwd: root }).map((file) => {
8
+ return path.basename(path.dirname(file));
9
+ });
10
+ const autoImportComponentsSubFolderName = globSync("src/components/autoImport/*/Index.vue", { cwd: root }).map((file) => {
11
+ return path.basename(path.dirname(file));
12
+ });
12
13
  return [{
13
14
  resolve: (name) => {
14
15
  if (["TCard"].includes(name)) return {
@@ -34,7 +34,7 @@ function bypass(req, res, options) {
34
34
  var vite_config_default = (_env, options) => {
35
35
  const { command, mode } = _env;
36
36
  const resolvePath = (p) => resolve(options.root, p);
37
- 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"));
37
+ 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, "env"));
38
38
  const VITE_PROXY_TARGET = Array.isArray(viteProxyTarget) ? viteProxyTarget : [viteProxyTarget];
39
39
  console.log({
40
40
  command,
@@ -109,16 +109,16 @@ var vite_config_default = (_env, options) => {
109
109
  ] },
110
110
  plugins: [
111
111
  createHtmlPlugin({
112
+ entry: `/src/main.${isProduction ? "prod" : "dev"}.ts`,
112
113
  inject: {
113
114
  data: {
114
115
  appId: VITE_APP_ID,
115
116
  mode: isProduction ? "prod" : "dev",
116
117
  title: VITE_APP_NAME
117
118
  },
118
- ejsOptions: { views: ["node_modules/dlzn-ui/build/ejs"] }
119
+ ejsOptions: { views: ["node_modules/dlzn-ui/ejs"] }
119
120
  },
120
- minify: true,
121
- template: "node_modules/dlzn-ui/build/index.html"
121
+ minify: true
122
122
  }),
123
123
  tailwindAutoReference("node_modules/dlzn-ui/assets/css/tailwindcss-entry.css"),
124
124
  tailwindcss(),
@@ -181,13 +181,19 @@ var vite_config_default = (_env, options) => {
181
181
  autoImportStores_default(options.root),
182
182
  ...options.autoImports ?? []
183
183
  ],
184
- resolvers: [...options.autoImportResolvers ?? [], ...tDesignResolve_default(isProduction)],
184
+ resolvers: [...options.autoImportResolvers ?? [], ...tDesignResolve_default({
185
+ isProduction,
186
+ root: options.root
187
+ })],
185
188
  vueTemplate: true
186
189
  }),
187
190
  Components({
188
191
  deep: false,
189
192
  dts: "types/components.d.ts",
190
- resolvers: [...options.autoImportResolvers ?? [], ...tDesignResolve_default(isProduction)]
193
+ resolvers: [...options.autoImportResolvers ?? [], ...tDesignResolve_default({
194
+ isProduction,
195
+ root: options.root
196
+ })]
191
197
  }),
192
198
  ...vitePlugins_default({
193
199
  isProduction,
@@ -32,7 +32,7 @@ var vitePlugins_default = (options) => {
32
32
  }),
33
33
  compression(),
34
34
  visualizer({
35
- filename: "build/.cache/visualizer/report.html",
35
+ filename: "node_modules/.cache/visualizer/report.html",
36
36
  open: true
37
37
  }),
38
38
  webUpdateNotice({
package/package.json CHANGED
@@ -110,6 +110,6 @@
110
110
  "**/*.css"
111
111
  ],
112
112
  "type": "module",
113
- "version": "1.39.0",
113
+ "version": "1.41.0",
114
114
  "scripts": {}
115
115
  }
package/build/index.html DELETED
@@ -1,58 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" href="/favicon.ico" />
6
- <meta
7
- name="viewport"
8
- content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
9
- />
10
- <title><%- title %></title>
11
- <style>
12
- html,
13
- body,
14
- #app {
15
- height: 100%;
16
- margin: 0;
17
- }
18
- </style>
19
- </head>
20
- <body>
21
- <div id="app" class="relative"></div>
22
- <div id="landing">
23
- <style>
24
- :root {
25
- --landing-ele-size: clamp(60px, 8vw, 240px);
26
- }
27
- body {
28
- margin: 0;
29
- }
30
- #landing {
31
- position: fixed;
32
- width: 100%;
33
- height: 100%;
34
- background: #fff;
35
- z-index: calc(Infinity);
36
- display: flex;
37
- justify-content: center;
38
- align-items: center;
39
- top: 0;
40
- left: 0;
41
- flex-direction: column;
42
- transition: opacity 1s ease-in-out;
43
- font-size: clamp(12px, 0.9vw, 24px);
44
- }
45
- #landing .landing_ele {
46
- width: var(--landing-ele-size);
47
- margin-bottom: 2vw;
48
- position: relative;
49
- }
50
- </style>
51
- <% if (appId === '1') { %> <%- include('slide-puzzle.ejs') %> <% } %>
52
- <div style="font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif">
53
- 正在加载系统资源,请耐心等待
54
- </div>
55
- </div>
56
- <script type="module" src="/src/main.<%- mode %>.ts"></script>
57
- </body>
58
- </html>
File without changes