2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
@@ -0,0 +1 @@
export declare const WXS_PROP: unique symbol;
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WXS_PROP = void 0;
const compiler_core_1 = require("@vue/compiler-core");
exports.WXS_PROP = Symbol(`wxsProp`);
(0, compiler_core_1.registerRuntimeHelpers)({
[exports.WXS_PROP]: 'wp',
});
@@ -0,0 +1,2 @@
import { type NodeTransform } from '@vue/compiler-core';
export declare const transformWxsProps: NodeTransform;
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformWxsProps = void 0;
const uni_cli_shared_1 = require("@dcloudio/uni-cli-shared");
const uni_shared_1 = require("@dcloudio/uni-shared");
const compiler_core_1 = require("@vue/compiler-core");
const runtimeHelpers_1 = require("./runtimeHelpers");
const transformWxsProps = (node, context) => {
if (!(0, uni_cli_shared_1.isElementNode)(node)) {
return;
}
node.props.forEach((prop) => {
if ((0, uni_cli_shared_1.isDirectiveNode)(prop) && prop.arg && (0, uni_cli_shared_1.isSimpleExpressionNode)(prop.arg)) {
const { content } = prop.arg;
if (content.startsWith(uni_shared_1.ATTR_CHANGE_PREFIX)) {
const propName = content.substring(uni_shared_1.ATTR_CHANGE_PREFIX.length);
const wxsProp = (0, compiler_core_1.findProp)(node, propName, true);
if (wxsProp && (0, uni_cli_shared_1.isDirectiveNode)(wxsProp) && wxsProp.exp) {
wxsProp.exp = (0, compiler_core_1.createCompoundExpression)([
context.helperString(runtimeHelpers_1.WXS_PROP),
'(',
wxsProp.exp,
')',
]);
}
}
}
});
};
exports.transformWxsProps = transformWxsProps;