提交 ad2c1f3f 编写于 作者: Q qiang

style: rename word

上级 86e1d0a3
......@@ -38,7 +38,7 @@ export function requestComponentObserver(
boundingClientRect: normalizeRect(entrie.boundingClientRect),
relativeRect: normalizeRect(entrie.rootBounds!),
time: Date.now(),
// dataset: getCostomDataset(entrie.target),
// dataset: getCustomDataset(entrie.target),
// id: entrie.target.id,
})
})
......
......@@ -2,13 +2,13 @@ import { App } from 'vue'
import { initLongPress } from './longPress'
import { initAppConfig } from './appConfig'
import { initCostomDataset } from '@dcloudio/uni-shared'
import { initCustomDataset } from '@dcloudio/uni-shared'
export function initView(app: App) {
if (__NODE_JS__) {
return
}
initCostomDataset()
initCustomDataset()
if (__UNI_FEATURE_LONGPRESS__) {
initLongPress()
}
......
import {isFunction, extend, hyphenate, isPlainObject, isString, isArray, hasOwn, isObject, capitalize, toRawType, makeMap as makeMap$1, isPromise, invokeArrayFns as invokeArrayFns$1} from "@vue/shared";
import {injectHook, withModifiers, createVNode, getCurrentInstance, inject, provide, reactive, openBlock, createBlock, mergeProps, toDisplayString, defineComponent, ref, computed, watch, onUnmounted, onBeforeUnmount, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, createTextVNode, onBeforeActivate, onBeforeDeactivate, renderList, onDeactivated, Teleport, createApp, Transition, withCtx, KeepAlive, resolveDynamicComponent, resolveComponent, createCommentVNode, renderSlot} from "vue";
import {once, passive, normalizeTarget, isBuiltInComponent, initCostomDataset, invokeArrayFns, NAVBAR_HEIGHT, parseQuery, PRIMARY_COLOR, debounce, getCostomDataset, callOptions, removeLeadingSlash, getLen, ON_REACH_BOTTOM_DISTANCE, decodedQuery, updateElementStyle, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime} from "@dcloudio/uni-shared";
import {once, passive, normalizeTarget, isBuiltInComponent, initCustomDataset, invokeArrayFns, NAVBAR_HEIGHT, parseQuery, PRIMARY_COLOR, debounce, getCustomDataset, callOptions, removeLeadingSlash, getLen, ON_REACH_BOTTOM_DISTANCE, decodedQuery, updateElementStyle, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime} from "@dcloudio/uni-shared";
import {initVueI18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT} from "@dcloudio/uni-i18n";
import {useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView} from "vue-router";
function applyOptions(options, instance2, publicThis) {
......@@ -485,7 +485,7 @@ var safeAreaInsets = {
onChange,
offChange
};
var D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out = safeAreaInsets;
var out = safeAreaInsets;
const onEventPrevent = /* @__PURE__ */ withModifiers(() => {
}, ["prevent"]);
const onEventStop = /* @__PURE__ */ withModifiers(() => {
......@@ -497,10 +497,10 @@ function getWindowOffset() {
const left = parseInt(style.getPropertyValue("--window-left"));
const right = parseInt(style.getPropertyValue("--window-right"));
return {
top: top ? top + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top : 0,
bottom: bottom ? bottom + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom : 0,
left: left ? left + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left : 0,
right: right ? right + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right : 0
top: top ? top + out.top : 0,
bottom: bottom ? bottom + out.bottom : 0,
left: left ? left + out.left : 0,
right: right ? right + out.right : 0
};
}
function updateCssVar(cssVars) {
......@@ -968,7 +968,7 @@ function initAppConfig$1(appConfig) {
}
}
function initView(app) {
initCostomDataset();
initCustomDataset();
if (__UNI_FEATURE_LONGPRESS__) {
initLongPress();
}
......@@ -1194,7 +1194,7 @@ function normalizePageMeta(pageMeta) {
let offset = rpx2px(refreshOptions.offset);
const {type} = navigationBar;
if (type !== "transparent" && type !== "none") {
offset += NAVBAR_HEIGHT + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top;
offset += NAVBAR_HEIGHT + out.top;
}
refreshOptions.offset = offset;
refreshOptions.height = rpx2px(refreshOptions.height);
......@@ -9638,7 +9638,7 @@ function getNodeInfo(el, fields2) {
info.id = el.id;
}
if (fields2.dataset) {
info.dataset = getCostomDataset(el);
info.dataset = getCustomDataset(el);
}
if (fields2.rect || fields2.size) {
const rect = el.getBoundingClientRect();
......@@ -15052,7 +15052,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight;
const language = navigator.language;
const statusBarHeight = D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top;
const statusBarHeight = out.top;
let osname;
let osversion;
let model;
......@@ -15165,12 +15165,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase();
const safeArea = {
left: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left,
right: windowWidth - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right,
top: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top,
bottom: windowHeight - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom,
width: windowWidth - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right,
height: windowHeight - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom
left: out.left,
right: windowWidth - out.right,
top: out.top,
bottom: windowHeight - out.bottom,
width: windowWidth - out.left - out.right,
height: windowHeight - out.top - out.bottom
};
const {top: windowTop, bottom: windowBottom} = getWindowOffset();
windowHeight -= windowTop;
......@@ -15190,10 +15190,10 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
model,
safeArea,
safeAreaInsets: {
top: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top,
right: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right,
bottom: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom,
left: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left
top: out.top,
right: out.right,
bottom: out.bottom,
left: out.left
}
};
});
......
import { ComponentPublicInstance } from 'vue'
import { getCostomDataset } from '@dcloudio/uni-shared'
import { getCustomDataset } from '@dcloudio/uni-shared'
import { getWindowOffset } from '@dcloudio/uni-core'
import { getContextInfo } from '@dcloudio/uni-components'
......@@ -57,7 +57,7 @@ function getNodeInfo(el: HTMLElement, fields: NodeField): NodeInfo {
info.id = el.id
}
if (fields.dataset) {
info.dataset = getCostomDataset(el)
info.dataset = getCustomDataset(el)
}
if (fields.rect || fields.size) {
const rect = el.getBoundingClientRect()
......
......@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
function formatKey(key) {
return shared.camelize(key.substring(5));
}
function initCostomDataset() {
function initCustomDataset() {
const prototype = HTMLElement.prototype;
const setAttribute = prototype.setAttribute;
prototype.setAttribute = function (key, value) {
......@@ -28,7 +28,7 @@ function initCostomDataset() {
removeAttribute.call(this, key);
};
}
function getCostomDataset(el) {
function getCustomDataset(el) {
return shared.extend({}, el.dataset, el.__uniDataset);
}
......@@ -64,7 +64,7 @@ function normalizeTarget(el) {
const { id, offsetTop, offsetLeft } = el;
return {
id,
dataset: getCostomDataset(el),
dataset: getCustomDataset(el),
offsetTop,
offsetLeft,
};
......@@ -414,10 +414,10 @@ exports.decode = decode;
exports.decodedQuery = decodedQuery;
exports.defaultRpx2Unit = defaultRpx2Unit;
exports.formatDateTime = formatDateTime;
exports.getCostomDataset = getCostomDataset;
exports.getCustomDataset = getCustomDataset;
exports.getEnvLocale = getEnvLocale;
exports.getLen = getLen;
exports.initCostomDataset = initCostomDataset;
exports.initCustomDataset = initCustomDataset;
exports.invokeArrayFns = invokeArrayFns;
exports.isBuiltInComponent = isBuiltInComponent;
exports.isCustomElement = isCustomElement;
......
......@@ -46,7 +46,7 @@ export declare function formatDateTime({ date, mode }: {
mode?: string | undefined;
}): string;
export declare function getCostomDataset(el: HTMLElement | HTMLElementWithDataset): DOMStringMap & Record<string, any>;
export declare function getCustomDataset(el: HTMLElement | HTMLElementWithDataset): DOMStringMap & Record<string, any>;
export declare function getEnvLocale(): string;
......@@ -56,7 +56,7 @@ declare interface HTMLElementWithDataset extends HTMLElement {
__uniDataset?: Record<string, any>;
}
export declare function initCostomDataset(): void;
export declare function initCustomDataset(): void;
export declare const invokeArrayFns: (fns: Function[], arg?: any) => any;
......
......@@ -3,7 +3,7 @@ import { camelize, extend, isString, isHTMLTag, isSVGTag, isPlainObject, isArray
function formatKey(key) {
return camelize(key.substring(5));
}
function initCostomDataset() {
function initCustomDataset() {
const prototype = HTMLElement.prototype;
const setAttribute = prototype.setAttribute;
prototype.setAttribute = function (key, value) {
......@@ -24,7 +24,7 @@ function initCostomDataset() {
removeAttribute.call(this, key);
};
}
function getCostomDataset(el) {
function getCustomDataset(el) {
return extend({}, el.dataset, el.__uniDataset);
}
......@@ -60,7 +60,7 @@ function normalizeTarget(el) {
const { id, offsetTop, offsetLeft } = el;
return {
id,
dataset: getCostomDataset(el),
dataset: getCustomDataset(el),
offsetTop,
offsetLeft,
};
......@@ -387,4 +387,4 @@ function getEnvLocale() {
return (lang && lang.replace(/[.:].*/, '')) || 'en';
}
export { BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, NAVBAR_HEIGHT, ON_REACH_BOTTOM_DISTANCE, PLUS_RE, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, addFont, callOptions, createRpx2Unit, debounce, decode, decodedQuery, defaultRpx2Unit, formatDateTime, getCostomDataset, getEnvLocale, getLen, initCostomDataset, invokeArrayFns, isBuiltInComponent, isCustomElement, isNativeTag, normalizeDataset, normalizeTarget, once, parseQuery, passive, plusReady, removeLeadingSlash, sanitise, scrollTo, stringifyQuery, updateElementStyle };
export { BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, NAVBAR_HEIGHT, ON_REACH_BOTTOM_DISTANCE, PLUS_RE, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, addFont, callOptions, createRpx2Unit, debounce, decode, decodedQuery, defaultRpx2Unit, formatDateTime, getCustomDataset, getEnvLocale, getLen, initCustomDataset, invokeArrayFns, isBuiltInComponent, isCustomElement, isNativeTag, normalizeDataset, normalizeTarget, once, parseQuery, passive, plusReady, removeLeadingSlash, sanitise, scrollTo, stringifyQuery, updateElementStyle };
......@@ -7,7 +7,7 @@ function formatKey(key: string) {
return camelize(key.substring(5))
}
export function initCostomDataset() {
export function initCustomDataset() {
const prototype = HTMLElement.prototype
const setAttribute = prototype.setAttribute
prototype.setAttribute = function (key, value) {
......@@ -32,6 +32,6 @@ export function initCostomDataset() {
}
}
export function getCostomDataset(el: HTMLElement | HTMLElementWithDataset) {
export function getCustomDataset(el: HTMLElement | HTMLElementWithDataset) {
return extend({}, el.dataset, (el as HTMLElementWithDataset).__uniDataset)
}
import { FontFaceDescriptors } from 'css-font-loading-module'
import { isString } from '@vue/shared'
import { getCostomDataset } from './costomDataset'
export { initCostomDataset, getCostomDataset } from './costomDataset'
import { getCustomDataset } from './CustomDataset'
export { initCustomDataset, getCustomDataset } from './CustomDataset'
export * from './style'
......@@ -18,7 +18,7 @@ export function normalizeTarget(el: HTMLElement) {
const { id, offsetTop, offsetLeft } = el
return {
id,
dataset: getCostomDataset(el),
dataset: getCustomDataset(el),
offsetTop,
offsetLeft,
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册