@cloudbase/lowcode-builder 1.10.24 → 1.10.28
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/lib/builder/config/dependencies.js +3 -3
- package/lib/builder.web.js +6 -6
- package/package.json +2 -2
- package/template/html/index.html.ejs +3 -3
- package/template/mp/common/util.js +3 -3
- package/template/mp/packages/$wd_system/pages/login/components/input/index.wxml +1 -1
- package/template/mp/packages/$wd_system/pages/login/index.js +696 -535
- package/template/mp/packages/$wd_system/pages/login/index.wxml +38 -17
- package/template/mp/packages/$wd_system/pages/login/index.wxss +74 -61
- package/template/mp/packages/$wd_system/pages/login/methods/contants.js +3 -1
- package/template/mp/packages/$wd_system/pages/login/methods/errorHandler.js +25 -2
- package/template/mp/packages/$wd_system/pages/login/methods/loginByEmail.js +87 -0
- package/template/mp/packages/$wd_system/pages/login/methods/loginByPassword.js +22 -43
- package/template/mp/packages/$wd_system/pages/login/methods/loginBySms.js +19 -14
- package/template/mp/packages/$wd_system/pages/login/methods/utils.js +41 -0
- package/template/package.json +1 -2
- package/template/webpack/web.dev.js +6 -6
- package/template/webpack/web.prod.js +28 -5
|
@@ -100,13 +100,13 @@ module.exports = function (options) {
|
|
|
100
100
|
}),
|
|
101
101
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
|
102
102
|
new webpack.NormalModuleReplacementPlugin(
|
|
103
|
-
/@\/components\/(?!ui)(.*)|^@\/components$/, // 使用否定前瞻匹配除ui外的所有路径
|
|
103
|
+
/@\/components\/(?!ui)(.*)|^@\/(lib|hooks|configs)|^@\/components$/, // 使用否定前瞻匹配除ui外的所有路径
|
|
104
104
|
function (resource) {
|
|
105
|
-
if (/lowcode
|
|
106
|
-
if (
|
|
107
|
-
resource.request = resource.request.replace(/\@\/components\/(.*)/, '@/lowcode/components/$1');
|
|
108
|
-
} else if (resource.request === '@/components') {
|
|
105
|
+
if (/lowcode\//.test(resource.context)) {
|
|
106
|
+
if (resource.request === '@/components') {
|
|
109
107
|
resource.request = '@/lowcode/components/index';
|
|
108
|
+
} else {
|
|
109
|
+
resource.request = resource.request.replace(/\@\//, '@/lowcode/');
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
},
|
|
@@ -203,6 +203,7 @@ module.exports = function (options) {
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
let hasUtils = false;
|
|
206
207
|
return {
|
|
207
208
|
context,
|
|
208
209
|
entry: './src/index.jsx',
|
|
@@ -236,6 +237,9 @@ module.exports = function (options) {
|
|
|
236
237
|
recharts: 'window.SHADN.RECHARTS',
|
|
237
238
|
'react-hook-form': 'window.SHADN.ReactHookForm',
|
|
238
239
|
'lucide-react': 'window.SHADN.LUCIDE',
|
|
240
|
+
'date-fns': 'window.SHADN.DateFns',
|
|
241
|
+
clsx: 'window.SHADN.CLSX',
|
|
242
|
+
'tailwind-merge': 'window.SHADN.TailwindMerge',
|
|
239
243
|
};
|
|
240
244
|
|
|
241
245
|
if (/lowcode\//.test(context)) {
|
|
@@ -249,6 +253,25 @@ module.exports = function (options) {
|
|
|
249
253
|
}
|
|
250
254
|
callback();
|
|
251
255
|
},
|
|
256
|
+
function (context, request, callback) {
|
|
257
|
+
if (/lowcode\//.test(context) && request === '@/lib/utils') {
|
|
258
|
+
const fs = require('fs');
|
|
259
|
+
// 构建要检查的文件路径:项目根目录下的lowcode/lib/utils
|
|
260
|
+
const filePath = path.join(context, 'src', 'lowcode', 'lib');
|
|
261
|
+
if (
|
|
262
|
+
hasUtils ||
|
|
263
|
+
fs.existsSync(path.join(filePath, 'utils.js')) ||
|
|
264
|
+
fs.existsSync(path.join(filePath, 'utils.ts'))
|
|
265
|
+
) {
|
|
266
|
+
hasUtils = true;
|
|
267
|
+
callback();
|
|
268
|
+
} else {
|
|
269
|
+
callback(null, 'window.SHADN._LIB_UTILS');
|
|
270
|
+
}
|
|
271
|
+
} else {
|
|
272
|
+
callback();
|
|
273
|
+
}
|
|
274
|
+
},
|
|
252
275
|
],
|
|
253
276
|
cache: {
|
|
254
277
|
type: 'memory',
|