nutui
This commit is contained in:
6
dist/prebundle/remoteEntry.js
vendored
6
dist/prebundle/remoteEntry.js
vendored
@@ -33,6 +33,9 @@ var moduleMap = {
|
||||
"./@tarojs/plugin-platform-weapp/dist/runtime": function() {
|
||||
return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-GLEAZC6U_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")); }; });
|
||||
},
|
||||
"./@tarojs/plugin-html/dist/runtime": function() {
|
||||
return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-GLEAZC6U_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-WRSQ3V3E_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-html_dist_runtime_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js")); }; });
|
||||
},
|
||||
"./@tarojs/plugin-framework-react/dist/runtime": function() {
|
||||
return Promise.all([__webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-GLEAZC6U_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_chunk-WRSQ3V3E_js"), __webpack_require__.e("vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js")]).then(function() { return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")); }; });
|
||||
},
|
||||
@@ -95,6 +98,9 @@ var taroModuleMap = {
|
||||
"./@tarojs/plugin-platform-weapp/dist/runtime": function() {
|
||||
return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")); };
|
||||
},
|
||||
"./@tarojs/plugin-html/dist/runtime": function() {
|
||||
return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js")); };
|
||||
},
|
||||
"./@tarojs/plugin-framework-react/dist/runtime": function() {
|
||||
return function() { return (__webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js */ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")); };
|
||||
},
|
||||
|
||||
@@ -4832,7 +4832,9 @@ var init_dom_external = (0,_chunk_QRPWKJ4C_js__WEBPACK_IMPORTED_MODULE_1__.__esm
|
||||
}
|
||||
if (false) {}
|
||||
if (false) {}
|
||||
if (false) {}
|
||||
if (true) {
|
||||
TaroElement.extend("getBoundingClientRect", getBoundingClientRectImpl);
|
||||
}
|
||||
if (false) {}
|
||||
}
|
||||
}
|
||||
|
||||
524
dist/prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-html_dist_runtime_js.js
vendored
Normal file
524
dist/prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-html_dist_runtime_js.js
vendored
Normal file
@@ -0,0 +1,524 @@
|
||||
"use strict";
|
||||
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-html_dist_runtime_js"],{
|
||||
|
||||
/***/ "./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js":
|
||||
/*!********************************************************************************!*\
|
||||
!*** ./node_modules/.taro/weapp/prebundle/@tarojs_plugin-html_dist_runtime.js ***!
|
||||
\********************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-WRSQ3V3E.js */ "./node_modules/.taro/weapp/prebundle/chunk-WRSQ3V3E.js");
|
||||
/* harmony import */ var _chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-GLEAZC6U.js */ "./node_modules/.taro/weapp/prebundle/chunk-GLEAZC6U.js");
|
||||
/* harmony import */ var _chunk_QRPWKJ4C_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-QRPWKJ4C.js */ "./node_modules/.taro/weapp/prebundle/chunk-QRPWKJ4C.js");
|
||||
|
||||
|
||||
|
||||
// node_modules/.pnpm/@tarojs+plugin-html@4.0.8_@tarojs+helper@4.0.8_@tarojs+runtime@4.0.8_@tarojs+shared@4.0.8/node_modules/@tarojs/plugin-html/dist/runtime.js
|
||||
(0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.init_dist)();
|
||||
(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.init_dist)();
|
||||
function genAttrMapFnFromDir(dir) {
|
||||
const fn = function(key, value) {
|
||||
const lowerKey = key.toLowerCase();
|
||||
if (lowerKey in dir) {
|
||||
const res = dir[lowerKey];
|
||||
if ((0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(res)) {
|
||||
key = res;
|
||||
} else {
|
||||
key = res[0];
|
||||
value = res[1][value] || value;
|
||||
}
|
||||
}
|
||||
return [
|
||||
key,
|
||||
value
|
||||
];
|
||||
};
|
||||
return fn;
|
||||
}
|
||||
var inlineElements = /* @__PURE__ */ new Set([
|
||||
"i",
|
||||
"abbr",
|
||||
"select",
|
||||
"acronym",
|
||||
"small",
|
||||
"bdi",
|
||||
"kbd",
|
||||
"strong",
|
||||
"big",
|
||||
"sub",
|
||||
"sup",
|
||||
"br",
|
||||
"mark",
|
||||
"meter",
|
||||
"template",
|
||||
"cite",
|
||||
"object",
|
||||
"time",
|
||||
"code",
|
||||
"output",
|
||||
"u",
|
||||
"data",
|
||||
"picture",
|
||||
"tt",
|
||||
"datalist",
|
||||
"var",
|
||||
"dfn",
|
||||
"del",
|
||||
"q",
|
||||
"em",
|
||||
"s",
|
||||
"embed",
|
||||
"samp",
|
||||
"b"
|
||||
]);
|
||||
var blockElements = /* @__PURE__ */ new Set([
|
||||
"body",
|
||||
"svg",
|
||||
"address",
|
||||
"fieldset",
|
||||
"li",
|
||||
"span",
|
||||
"article",
|
||||
"figcaption",
|
||||
"main",
|
||||
"aside",
|
||||
"figure",
|
||||
"nav",
|
||||
"blockquote",
|
||||
"footer",
|
||||
"ol",
|
||||
"details",
|
||||
"p",
|
||||
"dialog",
|
||||
"h1",
|
||||
"h2",
|
||||
"h3",
|
||||
"h4",
|
||||
"h5",
|
||||
"h6",
|
||||
"pre",
|
||||
"dd",
|
||||
"header",
|
||||
"section",
|
||||
"div",
|
||||
"hgroup",
|
||||
"table",
|
||||
"dl",
|
||||
"hr",
|
||||
"ul",
|
||||
"dt",
|
||||
"view",
|
||||
"view-block"
|
||||
]);
|
||||
var specialElements = /* @__PURE__ */ new Map([
|
||||
[
|
||||
"slot",
|
||||
"slot"
|
||||
],
|
||||
[
|
||||
"form",
|
||||
"form"
|
||||
],
|
||||
[
|
||||
"iframe",
|
||||
"web-view"
|
||||
],
|
||||
[
|
||||
"img",
|
||||
"image"
|
||||
],
|
||||
[
|
||||
"audio",
|
||||
"audio"
|
||||
],
|
||||
[
|
||||
"video",
|
||||
"video"
|
||||
],
|
||||
[
|
||||
"canvas",
|
||||
"canvas"
|
||||
],
|
||||
[
|
||||
"a",
|
||||
{
|
||||
mapName (props) {
|
||||
if (props.as && (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(props.as)) return props.as.toLowerCase();
|
||||
return !props.href || /^javascript/.test(props.href) ? "view" : "navigator";
|
||||
},
|
||||
mapNameCondition: [
|
||||
"href"
|
||||
],
|
||||
mapAttr: genAttrMapFnFromDir({
|
||||
href: "url",
|
||||
target: [
|
||||
"openType",
|
||||
{
|
||||
_blank: "navigate",
|
||||
_self: "redirect"
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
],
|
||||
[
|
||||
"input",
|
||||
{
|
||||
mapName (props) {
|
||||
if (props.type === "checkbox") {
|
||||
return "checkbox";
|
||||
} else if (props.type === "radio") {
|
||||
return "radio";
|
||||
}
|
||||
return "input";
|
||||
},
|
||||
mapNameCondition: [
|
||||
"type"
|
||||
],
|
||||
mapAttr (key, value, props) {
|
||||
const htmlKey = key.toLowerCase();
|
||||
if (htmlKey === "autofocus") {
|
||||
key = "focus";
|
||||
} else if (htmlKey === "readonly") {
|
||||
if (props.disabled === true) {
|
||||
value = true;
|
||||
}
|
||||
key = "disabled";
|
||||
} else if (htmlKey === "type") {
|
||||
if (value === "password") {
|
||||
key = "password";
|
||||
value = true;
|
||||
} else if (value === "tel") {
|
||||
value = "number";
|
||||
}
|
||||
} else if (htmlKey === "maxlength") {
|
||||
key = "maxlength";
|
||||
}
|
||||
return [
|
||||
key,
|
||||
value
|
||||
];
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"label",
|
||||
{
|
||||
mapName: "label",
|
||||
mapAttr: genAttrMapFnFromDir({
|
||||
htmlfor: "for"
|
||||
})
|
||||
}
|
||||
],
|
||||
[
|
||||
"textarea",
|
||||
{
|
||||
mapName: "textarea",
|
||||
mapAttr: genAttrMapFnFromDir({
|
||||
autofocus: "focus",
|
||||
readonly: "disabled",
|
||||
maxlength: "maxlength"
|
||||
})
|
||||
}
|
||||
],
|
||||
[
|
||||
"progress",
|
||||
{
|
||||
mapName: "progress",
|
||||
mapAttr (key, value, props) {
|
||||
if (key === "value") {
|
||||
const max = props.max || 1;
|
||||
key = "percent";
|
||||
value = Math.round(value / max * 100);
|
||||
}
|
||||
return [
|
||||
key,
|
||||
value
|
||||
];
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"button",
|
||||
{
|
||||
mapName: "button",
|
||||
mapAttr (key, value) {
|
||||
if (key === "type" && (value === "submit" || value === "reset")) {
|
||||
key = "formType";
|
||||
}
|
||||
return [
|
||||
key,
|
||||
value
|
||||
];
|
||||
}
|
||||
}
|
||||
]
|
||||
]);
|
||||
function isHtmlTags(nodeName) {
|
||||
if (inlineElements.has(nodeName) || blockElements.has(nodeName) || specialElements.has(nodeName)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getMappedType(nodeName, rawProps, node) {
|
||||
if (inlineElements.has(nodeName)) {
|
||||
return "text";
|
||||
} else if (specialElements.has(nodeName)) {
|
||||
const mapping = specialElements.get(nodeName);
|
||||
if ((0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(mapping)) {
|
||||
return mapping;
|
||||
}
|
||||
const { mapName } = mapping;
|
||||
return (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isFunction)(mapName) ? mapName(rawProps) : mapName;
|
||||
} else {
|
||||
if (false) {}
|
||||
if (node) {
|
||||
const { props } = node;
|
||||
for(const prop in props){
|
||||
const propInCamelCase = (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.toCamelCase)(prop);
|
||||
if (propInCamelCase === "catchMove" && props[prop] !== false) {
|
||||
return "catch-view";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!node) {
|
||||
return "view";
|
||||
}
|
||||
if (node.isOnlyClickBinded()) {
|
||||
return "click-view";
|
||||
} else if (node.isAnyEventBinded()) {
|
||||
return "view";
|
||||
} else if ((0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.isHasExtractProp)(node)) {
|
||||
return "static-view";
|
||||
} else {
|
||||
return "pure-view";
|
||||
}
|
||||
}
|
||||
}
|
||||
function getAttrMapFn(nodeName) {
|
||||
const mapping = specialElements.get(nodeName);
|
||||
if (!(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(mapping)) {
|
||||
return mapping === null || mapping === void 0 ? void 0 : mapping.mapAttr;
|
||||
}
|
||||
}
|
||||
function getMapNameByCondition(nodeName, attr, props) {
|
||||
const mapping = specialElements.get(nodeName);
|
||||
if (!mapping || (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(mapping)) return;
|
||||
const { mapName, mapNameCondition } = mapping;
|
||||
if (!mapNameCondition) return;
|
||||
if (mapNameCondition.indexOf(attr) > -1 && !(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.isString)(mapName)) {
|
||||
return mapName(props);
|
||||
}
|
||||
}
|
||||
function mapNameByContion(nodeName, key, element, componentsAlias) {
|
||||
const mapName = getMapNameByCondition(nodeName, key, element.props);
|
||||
if (mapName) {
|
||||
const mapNameAlias = componentsAlias[mapName]._num;
|
||||
element.enqueueUpdate({
|
||||
path: `${element._path}.${"nn"}`,
|
||||
value: mapNameAlias
|
||||
});
|
||||
}
|
||||
}
|
||||
function ensureHtmlClass(tagName, className = "") {
|
||||
const classList = className.split(" ");
|
||||
const htmlClass = `h5-${tagName}`;
|
||||
if (classList.indexOf(htmlClass) === -1) {
|
||||
classList.unshift(htmlClass);
|
||||
}
|
||||
return classList.join(" ");
|
||||
}
|
||||
function ensureRect(props, style = "") {
|
||||
let cssText = style;
|
||||
const { width, height } = props;
|
||||
if (width) {
|
||||
cssText = `width: ${width};${cssText}`;
|
||||
}
|
||||
if (height) {
|
||||
cssText = `height: ${height};${cssText}`;
|
||||
}
|
||||
return cssText;
|
||||
}
|
||||
function defineMappedProp(obj, propName, mapName) {
|
||||
Object.defineProperty(obj, propName, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get () {
|
||||
return obj[mapName];
|
||||
},
|
||||
set (val) {
|
||||
obj[mapName] = val;
|
||||
}
|
||||
});
|
||||
}
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifyHydrateData", (data, node)=>{
|
||||
const nodeName = data["nn"];
|
||||
if (!isHtmlTags(nodeName)) return;
|
||||
(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.warn)(data["nn"] === "select", "\u8BF7\u4F7F\u7528 Picker \u7EC4\u4EF6\u4EE3\u66FF <select>");
|
||||
data["nn"] = getMappedType(nodeName, data, node);
|
||||
const attrMapFn = getAttrMapFn(nodeName);
|
||||
if (attrMapFn) {
|
||||
for(const key in data){
|
||||
const value = data[key];
|
||||
const [mapKey, mapValue] = attrMapFn(key, value, data);
|
||||
if (key !== mapKey) {
|
||||
delete data[key];
|
||||
data[mapKey] = mapValue;
|
||||
} else if (value !== mapValue) {
|
||||
data[key] = mapValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nodeName === "br") {
|
||||
data["cn"] = [
|
||||
{
|
||||
["nn"]: "#text",
|
||||
v: "\n"
|
||||
}
|
||||
];
|
||||
}
|
||||
data["cl"] = ensureHtmlClass(nodeName, data["cl"]);
|
||||
data["st"] = ensureRect(data, data["st"]);
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifySetAttrPayload", (element, key, payload, componentsAlias)=>{
|
||||
const { nodeName, _path, props } = element;
|
||||
if (!isHtmlTags(nodeName)) return;
|
||||
mapNameByContion(nodeName, key, element, componentsAlias);
|
||||
const mapName = getMappedType(nodeName, props);
|
||||
const alias = componentsAlias[mapName];
|
||||
const attrMapFn = getAttrMapFn(nodeName);
|
||||
if (attrMapFn) {
|
||||
const value = payload.value;
|
||||
const [mapKey, mapValue] = attrMapFn(key, value, props);
|
||||
payload.path = `${_path}.${alias[mapKey] || mapKey}`;
|
||||
payload.value = mapValue;
|
||||
} else if (alias[key] && alias[key] !== key) {
|
||||
payload.path = `${_path}.${(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.toCamelCase)(alias[key])}`;
|
||||
}
|
||||
if (key === "cl") {
|
||||
payload.value = ensureHtmlClass(nodeName, payload.value);
|
||||
} else if (key === "st" || key === "width" || key === "height") {
|
||||
payload.path = `${_path}.${"st"}`;
|
||||
payload.value = ensureRect(props, element.style.cssText);
|
||||
}
|
||||
if (blockElements.has(element.nodeName) && true) {
|
||||
const viewAlias = componentsAlias.view._num;
|
||||
const staticViewAlias = componentsAlias["static-view"]._num;
|
||||
const catchViewAlias = componentsAlias["catch-view"]._num;
|
||||
const clickViewAlias = componentsAlias["click-view"]._num;
|
||||
const qualifiedNameInCamelCase = (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.toCamelCase)(key);
|
||||
const dataPath = `${_path}.${"nn"}`;
|
||||
if (qualifiedNameInCamelCase === "catchMove") {
|
||||
element.enqueueUpdate({
|
||||
path: dataPath,
|
||||
value: payload.value ? catchViewAlias : element.isOnlyClickBinded() ? clickViewAlias : element.isAnyEventBinded() ? viewAlias : staticViewAlias
|
||||
});
|
||||
} else if ((0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.isHasExtractProp)(element) && !element.isAnyEventBinded()) {
|
||||
element.enqueueUpdate({
|
||||
path: dataPath,
|
||||
value: staticViewAlias
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifyRmAttrPayload", (element, key, payload, componentsAlias)=>{
|
||||
const { nodeName, _path, props } = element;
|
||||
if (!isHtmlTags(nodeName)) return;
|
||||
mapNameByContion(nodeName, key, element, componentsAlias);
|
||||
const mapName = getMappedType(nodeName, props);
|
||||
const alias = componentsAlias[mapName];
|
||||
const attrMapFn = getAttrMapFn(nodeName);
|
||||
if (attrMapFn) {
|
||||
const value = payload[key];
|
||||
const [mapKey] = attrMapFn(key, value, props);
|
||||
payload.path = `${_path}.${alias[mapKey] || mapKey}`;
|
||||
} else if (alias[key] && alias[key] !== key) {
|
||||
payload.path = `${_path}.${(0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.toCamelCase)(alias[key])}`;
|
||||
}
|
||||
if (key === "cl") {
|
||||
payload.value = ensureHtmlClass(nodeName, payload.value);
|
||||
} else if (key === "st" || key === "width" || key === "height") {
|
||||
payload.path = `${_path}.${"st"}`;
|
||||
payload.value = ensureRect(props, element.style.cssText);
|
||||
}
|
||||
if (blockElements.has(element.nodeName) && true) {
|
||||
const viewAlias = componentsAlias.view._num;
|
||||
const staticViewAlias = componentsAlias["static-view"]._num;
|
||||
const pureViewAlias = componentsAlias["pure-view"]._num;
|
||||
const clickViewAlias = componentsAlias["click-view"]._num;
|
||||
const qualifiedNameInCamelCase = (0,_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.toCamelCase)(key);
|
||||
const dataPath = `${_path}.${"nn"}`;
|
||||
if (qualifiedNameInCamelCase === "catchMove") {
|
||||
element.enqueueUpdate({
|
||||
path: dataPath,
|
||||
value: element.isOnlyClickBinded() ? clickViewAlias : element.isAnyEventBinded() ? viewAlias : (0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.isHasExtractProp)(element) ? staticViewAlias : pureViewAlias
|
||||
});
|
||||
} else if (!(0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.isHasExtractProp)(element)) {
|
||||
element.enqueueUpdate({
|
||||
path: dataPath,
|
||||
value: pureViewAlias
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("onAddEvent", (type, _handler, _options, node)=>{
|
||||
node = node;
|
||||
if (!isHtmlTags(node.nodeName)) return;
|
||||
if (type === "click") {
|
||||
defineMappedProp(node.__handlers, type, "tap");
|
||||
} else if (node.nodeName === "input") {
|
||||
if (type === "change") {
|
||||
if (node.props.type === "checkbox" || node.props.type === "radio") {
|
||||
defineMappedProp(node.__handlers, type, "tap");
|
||||
} else {
|
||||
defineMappedProp(node.__handlers, type, "input");
|
||||
}
|
||||
} else if (type === "keypress") {
|
||||
defineMappedProp(node.__handlers, type, "confirm");
|
||||
}
|
||||
}
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifyTaroEvent", (event, element)=>{
|
||||
const { nodeName, props } = element;
|
||||
if (nodeName === "input" && event.type === "tap") {
|
||||
if (props.type === "checkbox") {
|
||||
props.checked = !props.checked;
|
||||
} else if (props.type === "radio" && !props.checked) {
|
||||
props.checked = true;
|
||||
}
|
||||
if (event.mpEvent) {
|
||||
const { currentTarget, target } = event.mpEvent;
|
||||
currentTarget.checked = props.checked;
|
||||
if (target.id === currentTarget.id) {
|
||||
target.checked = props.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifyAddEventListener", (element, sideEffect, getComponentsAlias)=>{
|
||||
if (blockElements.has(element.nodeName) && sideEffect !== false && !element.isAnyEventBinded()) {
|
||||
const componentsAlias = getComponentsAlias();
|
||||
const alias = componentsAlias.view._num;
|
||||
element.enqueueUpdate({
|
||||
path: `${element._path}.${"nn"}`,
|
||||
value: alias
|
||||
});
|
||||
}
|
||||
});
|
||||
_chunk_GLEAZC6U_js__WEBPACK_IMPORTED_MODULE_1__.hooks.tap("modifyRemoveEventListener", (element, sideEffect, getComponentsAlias)=>{
|
||||
if (blockElements.has(element.nodeName) && sideEffect !== false && !element.isAnyEventBinded()) {
|
||||
const componentsAlias = getComponentsAlias();
|
||||
const value = (0,_chunk_WRSQ3V3E_js__WEBPACK_IMPORTED_MODULE_0__.isHasExtractProp)(element) ? "static-view" : "pure-view";
|
||||
const valueAlias = componentsAlias[value]._num;
|
||||
element.enqueueUpdate({
|
||||
path: `${element._path}.${"nn"}`,
|
||||
value: valueAlias
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
Reference in New Issue
Block a user