This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

25
uni_modules/nutui-uni/dist/index.mjs vendored Normal file
View File

@@ -0,0 +1,25 @@
import process from 'node:process';
const processShim = typeof process !== "undefined" ? process : {};
const envShim = processShim.env || {};
const platform = envShim.UNI_PLATFORM;
const isH5 = platform === "h5";
function NutResolver() {
return {
type: "component",
resolve: (name) => {
if (name.match(/^(Nut[A-Z]|nut-[a-z])/)) {
const cName = name.slice(3).replace(/([a-z])/, "$1").toLowerCase();
const component = `nutui-uniapp/components/${cName}/${cName}.vue`;
const style = `nutui-uniapp/components/${cName}/index.scss`;
return {
name,
from: component,
sideEffects: isH5 ? style : ""
};
}
}
};
}
export { NutResolver };