提交 e83c65a5 编写于 作者: D DCloud_LXH

fix: input 在给 value 赋值后输入小数点会清空输入框

上级 7a92b5a7
import { extend, hyphenate } from '@vue/shared'
import {
type ComputedRef,
type ExtractPropTypes,
type HTMLAttributes,
type Ref,
computed,
......@@ -31,38 +33,71 @@ function resolveDigitDecimalPoint(
event: InputEvent,
cache: Ref<string>,
state: State,
input: HTMLInputElement
input: HTMLInputElement,
resetCache?: ResetCache
) {
if ((event as InputEvent).data === '.') {
// 解决可重复输入小数点的问题
if (cache.value.slice(-1) === '.') {
state.value = input.value = cache.value = cache.value.slice(0, -1)
return false
} else if (cache.value.includes('.')) {
state.value = input.value = cache.value
return false
}
if (cache.value && !cache.value.includes('.')) {
cache.value += '.'
return false
}
} else if ((event as InputEvent).inputType === 'deleteContentBackward') {
// ios 16 无法删除小数
if (
(__PLATFORM__ === 'app' &&
plus.os.name === 'iOS' &&
plus.os.version &&
parseInt(plus.os.version) === 16) ||
(__PLATFORM__ === 'h5' && navigator.userAgent.includes('iPhone OS 16'))
) {
if (cache.value.slice(-2, -1) === '.') {
cache.value = state.value = input.value = cache.value.slice(0, -2)
return true
if (cache.value) {
if ((event as InputEvent).data === '.') {
// 解决可重复输入小数点的问题
if (cache.value.slice(-1) === '.') {
state.value = input.value = cache.value = cache.value.slice(0, -1)
return false
}
if (cache.value && !cache.value.includes('.')) {
cache.value += '.'
if (resetCache) {
resetCache.fn = () => {
state.value = input.value = cache.value = cache.value.slice(0, -1)
input.removeEventListener('blur', resetCache.fn!)
}
input.addEventListener('blur', resetCache.fn)
}
return false
}
} else if ((event as InputEvent).inputType === 'deleteContentBackward') {
// ios 16 无法删除小数
if (
(__PLATFORM__ === 'app' &&
plus.os.name === 'iOS' &&
plus.os.version &&
parseInt(plus.os.version) === 16) ||
(__PLATFORM__ === 'h5' && navigator.userAgent.includes('iPhone OS 16'))
) {
if (cache.value.slice(-2, -1) === '.') {
cache.value = state.value = input.value = cache.value.slice(0, -2)
return true
}
}
}
}
}
type Props = ExtractPropTypes<typeof props>
type ResetCache = { fn: (() => void) | null }
function useCache(props: Props, type: ComputedRef<string>) {
if (type.value === 'number') {
const value = props.modelValue ?? props.value
const cache = ref(
typeof value !== 'undefined' ? value.toLocaleString() : ''
)
watch(
() => props.modelValue,
(value) => {
cache.value = typeof value !== 'undefined' ? value.toLocaleString() : ''
}
)
watch(
() => props.value,
(value) => {
cache.value = typeof value !== 'undefined' ? value.toLocaleString() : ''
}
)
return cache
} else {
return ref('')
}
}
export class UniInputElement extends UniElement {
focus(options?: FocusOptions | undefined): void {
this.querySelector('input')?.focus(options)
......@@ -116,8 +151,8 @@ export default /*#__PURE__*/ defineBuiltInComponent({
: 0
return AUTOCOMPLETES[index]
})
let cache = ref('')
let resetCache: (() => void) | null
let cache = useCache(props, type)
let resetCache: ResetCache = { fn: null }
const rootRef: Ref<HTMLElement | null> = ref(null)
const { fieldRef, state, scopedAttrsState, fixDisabledColor, trigger } =
useField(props, rootRef, emit, (event, state) => {
......@@ -125,9 +160,9 @@ export default /*#__PURE__*/ defineBuiltInComponent({
if (type.value === 'number') {
// 数字类型输入错误时无法获取具体的值,自定义校验和纠正。
if (resetCache) {
input.removeEventListener('blur', resetCache)
resetCache = null
if (resetCache.fn) {
input.removeEventListener('blur', resetCache.fn)
resetCache.fn = null
}
if (input.validity && !input.validity.valid) {
if (
......@@ -138,10 +173,10 @@ export default /*#__PURE__*/ defineBuiltInComponent({
) {
cache.value = '-'
state.value = ''
resetCache = () => {
resetCache.fn = () => {
cache.value = input.value = ''
}
input.addEventListener('blur', resetCache)
input.addEventListener('blur', resetCache.fn)
return false
}
// 处理小数点
......@@ -149,7 +184,8 @@ export default /*#__PURE__*/ defineBuiltInComponent({
event as InputEvent,
cache,
state,
input
input,
resetCache
)
if (typeof res === 'boolean') return res
cache.value =
......@@ -164,7 +200,8 @@ export default /*#__PURE__*/ defineBuiltInComponent({
event as InputEvent,
cache,
state,
input
input,
resetCache
)
if (typeof res === 'boolean') return res
......
......@@ -3544,14 +3544,49 @@ const props$k = /* @__PURE__ */ shared.extend({}, props$l, {
default: ""
}
});
function resolveDigitDecimalPoint(event, cache, state, input) {
if (event.data === ".") {
if (cache.value) {
cache.value += ".";
return false;
function resolveDigitDecimalPoint(event, cache, state, input, resetCache) {
if (cache.value) {
if (event.data === ".") {
if (cache.value.slice(-1) === ".") {
state.value = input.value = cache.value = cache.value.slice(0, -1);
return false;
}
if (cache.value && !cache.value.includes(".")) {
cache.value += ".";
if (resetCache) {
resetCache.fn = () => {
state.value = input.value = cache.value = cache.value.slice(0, -1);
input.removeEventListener("blur", resetCache.fn);
};
input.addEventListener("blur", resetCache.fn);
}
return false;
}
} else if (event.inputType === "deleteContentBackward") {
if (navigator.userAgent.includes("iPhone OS 16")) {
if (cache.value.slice(-2, -1) === ".") {
cache.value = state.value = input.value = cache.value.slice(0, -2);
return true;
}
}
}
}
}
function useCache(props2, type) {
if (type.value === "number") {
const value = props2.modelValue ?? props2.value;
const cache = vue.ref(typeof value !== "undefined" ? value.toLocaleString() : "");
vue.watch(() => props2.modelValue, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
vue.watch(() => props2.value, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
return cache;
} else {
return vue.ref("");
}
}
const Input = /* @__PURE__ */ defineBuiltInComponent({
name: "Input",
props: props$k,
......@@ -3588,8 +3623,10 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
const index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0;
return AUTOCOMPLETES[index2];
});
let cache = vue.ref("");
let resetCache;
let cache = useCache(props2, type);
let resetCache = {
fn: null
};
const rootRef = vue.ref(null);
const {
fieldRef,
......@@ -3600,27 +3637,27 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
} = useField(props2, rootRef, emit2, (event, state2) => {
const input = event.target;
if (type.value === "number") {
if (resetCache) {
input.removeEventListener("blur", resetCache);
resetCache = null;
if (resetCache.fn) {
input.removeEventListener("blur", resetCache.fn);
resetCache.fn = null;
}
if (input.validity && !input.validity.valid) {
if ((!cache.value || !input.value) && event.data === "-" || cache.value[0] === "-" && event.inputType === "deleteContentBackward") {
cache.value = "-";
state2.value = "";
resetCache = () => {
resetCache.fn = () => {
cache.value = input.value = "";
};
input.addEventListener("blur", resetCache);
input.addEventListener("blur", resetCache.fn);
return false;
}
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state2, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = state2.value = input.value = cache.value === "-" ? "" : cache.value;
return false;
} else {
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state2, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = input.value;
......
......@@ -3382,6 +3382,7 @@ function useKeyboard$1(props2, elRef, trigger) {
(el) => el && initKeyboard(el)
);
}
const TEMP_PATH = "";
function findElem(vm) {
return vm.$el;
}
......@@ -5007,6 +5008,13 @@ class TextMetrics {
this.width = width;
}
}
const getTempPath = () => {
let _TEMP_PATH = TEMP_PATH;
if (!__PLUS__) {
typeof getEnv !== "undefined" && (_TEMP_PATH = getEnv().TEMP_PATH);
}
return _TEMP_PATH;
};
class CanvasContext {
constructor(id2, pageId) {
this.id = id2;
......@@ -5678,7 +5686,7 @@ const canvasToTempFilePath = /* @__PURE__ */ defineAsyncApi(
reject();
return;
}
const dirname = `${TEMP_PATH}/canvas`;
let dirname = `${getTempPath()}/canvas`;
operateCanvas(
canvasId,
pageId,
......@@ -8047,7 +8055,6 @@ function removeMediaQueryObserver({ reqId, component }, _pageId) {
delete mediaQueryObservers[reqId];
}
}
const TEMP_PATH = "";
const files = {};
function urlToFile(url, local) {
const file = files[url];
......@@ -8146,6 +8153,7 @@ function initLaunchOptions({
extend(enterOptions, launchOptions);
return extend({}, launchOptions);
}
const getEnv = () => ({ TEMP_PATH, CACHE_PATH: "", USER_DATA_PATH: "" });
var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
......@@ -9892,14 +9900,49 @@ const props$r = /* @__PURE__ */ extend({}, props$s, {
default: ""
}
});
function resolveDigitDecimalPoint(event, cache, state2, input) {
if (event.data === ".") {
if (cache.value) {
cache.value += ".";
return false;
function resolveDigitDecimalPoint(event, cache, state2, input, resetCache) {
if (cache.value) {
if (event.data === ".") {
if (cache.value.slice(-1) === ".") {
state2.value = input.value = cache.value = cache.value.slice(0, -1);
return false;
}
if (cache.value && !cache.value.includes(".")) {
cache.value += ".";
if (resetCache) {
resetCache.fn = () => {
state2.value = input.value = cache.value = cache.value.slice(0, -1);
input.removeEventListener("blur", resetCache.fn);
};
input.addEventListener("blur", resetCache.fn);
}
return false;
}
} else if (event.inputType === "deleteContentBackward") {
if (navigator.userAgent.includes("iPhone OS 16")) {
if (cache.value.slice(-2, -1) === ".") {
cache.value = state2.value = input.value = cache.value.slice(0, -2);
return true;
}
}
}
}
}
function useCache(props2, type) {
if (type.value === "number") {
const value = props2.modelValue ?? props2.value;
const cache = ref(typeof value !== "undefined" ? value.toLocaleString() : "");
watch(() => props2.modelValue, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
watch(() => props2.value, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
return cache;
} else {
return ref("");
}
}
class UniInputElement extends UniElement {
focus(options) {
var _a;
......@@ -9946,8 +9989,10 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
const index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0;
return AUTOCOMPLETES[index2];
});
let cache = ref("");
let resetCache;
let cache = useCache(props2, type);
let resetCache = {
fn: null
};
const rootRef = ref(null);
const {
fieldRef,
......@@ -9958,27 +10003,27 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
} = useField(props2, rootRef, emit2, (event, state22) => {
const input = event.target;
if (type.value === "number") {
if (resetCache) {
input.removeEventListener("blur", resetCache);
resetCache = null;
if (resetCache.fn) {
input.removeEventListener("blur", resetCache.fn);
resetCache.fn = null;
}
if (input.validity && !input.validity.valid) {
if ((!cache.value || !input.value) && event.data === "-" || cache.value[0] === "-" && event.inputType === "deleteContentBackward") {
cache.value = "-";
state22.value = "";
resetCache = () => {
resetCache.fn = () => {
cache.value = input.value = "";
};
input.addEventListener("blur", resetCache);
input.addEventListener("blur", resetCache.fn);
return false;
}
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state22, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = state22.value = input.value = cache.value === "-" ? "" : cache.value;
return false;
} else {
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state22, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = input.value;
......
......@@ -2080,9 +2080,9 @@ function useMethods(props2, canvasRef, actionsWaiting) {
if (image) {
c2d.drawImage.apply(
c2d,
// @ts-ignore
// @ts-expect-error
[image].concat(
// @ts-ignore
// @ts-expect-error
[...otherData.slice(4, 8)],
[...otherData.slice(0, 4)]
)
......@@ -2189,6 +2189,9 @@ function useMethods(props2, canvasRef, actionsWaiting) {
destWidth = Math.round(width * _pixelRatio.value);
destHeight = Math.round(height * _pixelRatio.value);
} else if (!destWidth) {
if (!destHeight) {
destHeight = Math.round(height * _pixelRatio.value);
}
destWidth = Math.round(width / height * destHeight);
} else if (!destHeight) {
destHeight = Math.round(height / width * destWidth);
......@@ -2290,7 +2293,7 @@ function useMethods(props2, canvasRef, actionsWaiting) {
type: fileType,
quality
});
if (!res.data || !res.data.length) {
if (res.errMsg) {
resolve({
errMsg: res.errMsg.replace("canvasPutImageData", "toTempFilePath")
});
......@@ -3514,14 +3517,49 @@ const props$j = /* @__PURE__ */ shared.extend({}, props$k, {
default: ""
}
});
function resolveDigitDecimalPoint(event, cache, state, input) {
if (event.data === ".") {
if (cache.value) {
cache.value += ".";
return false;
function resolveDigitDecimalPoint(event, cache, state, input, resetCache) {
if (cache.value) {
if (event.data === ".") {
if (cache.value.slice(-1) === ".") {
state.value = input.value = cache.value = cache.value.slice(0, -1);
return false;
}
if (cache.value && !cache.value.includes(".")) {
cache.value += ".";
if (resetCache) {
resetCache.fn = () => {
state.value = input.value = cache.value = cache.value.slice(0, -1);
input.removeEventListener("blur", resetCache.fn);
};
input.addEventListener("blur", resetCache.fn);
}
return false;
}
} else if (event.inputType === "deleteContentBackward") {
if (navigator.userAgent.includes("iPhone OS 16")) {
if (cache.value.slice(-2, -1) === ".") {
cache.value = state.value = input.value = cache.value.slice(0, -2);
return true;
}
}
}
}
}
function useCache(props2, type) {
if (type.value === "number") {
const value = props2.modelValue ?? props2.value;
const cache = vue.ref(typeof value !== "undefined" ? value.toLocaleString() : "");
vue.watch(() => props2.modelValue, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
vue.watch(() => props2.value, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
return cache;
} else {
return vue.ref("");
}
}
const Input = /* @__PURE__ */ defineBuiltInComponent({
name: "Input",
props: props$j,
......@@ -3558,8 +3596,10 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
const index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0;
return AUTOCOMPLETES[index2];
});
let cache = vue.ref("");
let resetCache;
let cache = useCache(props2, type);
let resetCache = {
fn: null
};
const rootRef = vue.ref(null);
const {
fieldRef,
......@@ -3570,27 +3610,27 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
} = useField(props2, rootRef, emit2, (event, state2) => {
const input = event.target;
if (type.value === "number") {
if (resetCache) {
input.removeEventListener("blur", resetCache);
resetCache = null;
if (resetCache.fn) {
input.removeEventListener("blur", resetCache.fn);
resetCache.fn = null;
}
if (input.validity && !input.validity.valid) {
if ((!cache.value || !input.value) && event.data === "-" || cache.value[0] === "-" && event.inputType === "deleteContentBackward") {
cache.value = "-";
state2.value = "";
resetCache = () => {
resetCache.fn = () => {
cache.value = input.value = "";
};
input.addEventListener("blur", resetCache);
input.addEventListener("blur", resetCache.fn);
return false;
}
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state2, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = state2.value = input.value = cache.value === "-" ? "" : cache.value;
return false;
} else {
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state2, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = input.value;
......
......@@ -2353,6 +2353,7 @@ const index$x = /* @__PURE__ */ defineBuiltInComponent({
};
}
});
const TEMP_PATH = "";
function findElem(vm) {
return vm.$el;
}
......@@ -3968,6 +3969,13 @@ class TextMetrics {
this.width = width;
}
}
const getTempPath = () => {
let _TEMP_PATH = TEMP_PATH;
if (!__PLUS__) {
typeof getEnv !== "undefined" && (_TEMP_PATH = getEnv().TEMP_PATH);
}
return _TEMP_PATH;
};
class CanvasContext {
constructor(id2, pageId) {
this.id = id2;
......@@ -4639,7 +4647,7 @@ const canvasToTempFilePath = /* @__PURE__ */ defineAsyncApi(
reject();
return;
}
const dirname = `${TEMP_PATH}/canvas`;
let dirname = `${getTempPath()}/canvas`;
operateCanvas(
canvasId,
pageId,
......@@ -7010,7 +7018,6 @@ function removeMediaQueryObserver({ reqId, component }, _pageId) {
function saveImage(base64, dirname, callback) {
callback(null, base64);
}
const TEMP_PATH = "";
const files = {};
function urlToFile(url, local) {
const file = files[url];
......@@ -7121,6 +7128,7 @@ const inflateRaw = (...args) => {
};
const deflateRaw = (...args) => {
};
const getEnv = () => ({ TEMP_PATH, CACHE_PATH: "", USER_DATA_PATH: "" });
const ResizeSensor = /* @__PURE__ */ defineBuiltInComponent({
name: "ResizeSensor",
props: {
......@@ -7607,9 +7615,9 @@ function useMethods(props2, canvasRef, actionsWaiting) {
if (image2) {
c2d.drawImage.apply(
c2d,
// @ts-ignore
// @ts-expect-error
[image2].concat(
// @ts-ignore
// @ts-expect-error
[...otherData.slice(4, 8)],
[...otherData.slice(0, 4)]
)
......@@ -7716,6 +7724,9 @@ function useMethods(props2, canvasRef, actionsWaiting) {
destWidth = Math.round(width * _pixelRatio.value);
destHeight = Math.round(height * _pixelRatio.value);
} else if (!destWidth) {
if (!destHeight) {
destHeight = Math.round(height * _pixelRatio.value);
}
destWidth = Math.round(width / height * destHeight);
} else if (!destHeight) {
destHeight = Math.round(height / width * destWidth);
......@@ -7817,7 +7828,7 @@ function useMethods(props2, canvasRef, actionsWaiting) {
type: fileType,
quality
});
if (!res.data || !res.data.length) {
if (res.errMsg) {
resolve({
errMsg: res.errMsg.replace("canvasPutImageData", "toTempFilePath")
});
......@@ -9765,14 +9776,49 @@ const props$q = /* @__PURE__ */ extend({}, props$r, {
default: ""
}
});
function resolveDigitDecimalPoint(event, cache, state2, input) {
if (event.data === ".") {
if (cache.value) {
cache.value += ".";
return false;
function resolveDigitDecimalPoint(event, cache, state2, input, resetCache) {
if (cache.value) {
if (event.data === ".") {
if (cache.value.slice(-1) === ".") {
state2.value = input.value = cache.value = cache.value.slice(0, -1);
return false;
}
if (cache.value && !cache.value.includes(".")) {
cache.value += ".";
if (resetCache) {
resetCache.fn = () => {
state2.value = input.value = cache.value = cache.value.slice(0, -1);
input.removeEventListener("blur", resetCache.fn);
};
input.addEventListener("blur", resetCache.fn);
}
return false;
}
} else if (event.inputType === "deleteContentBackward") {
if (navigator.userAgent.includes("iPhone OS 16")) {
if (cache.value.slice(-2, -1) === ".") {
cache.value = state2.value = input.value = cache.value.slice(0, -2);
return true;
}
}
}
}
}
function useCache(props2, type) {
if (type.value === "number") {
const value = props2.modelValue ?? props2.value;
const cache = ref(typeof value !== "undefined" ? value.toLocaleString() : "");
watch(() => props2.modelValue, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
watch(() => props2.value, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
});
return cache;
} else {
return ref("");
}
}
const Input = /* @__PURE__ */ defineBuiltInComponent({
name: "Input",
props: props$q,
......@@ -9809,8 +9855,10 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
const index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0;
return AUTOCOMPLETES[index2];
});
let cache = ref("");
let resetCache;
let cache = useCache(props2, type);
let resetCache = {
fn: null
};
const rootRef = ref(null);
const {
fieldRef,
......@@ -9821,27 +9869,27 @@ const Input = /* @__PURE__ */ defineBuiltInComponent({
} = useField(props2, rootRef, emit2, (event, state22) => {
const input = event.target;
if (type.value === "number") {
if (resetCache) {
input.removeEventListener("blur", resetCache);
resetCache = null;
if (resetCache.fn) {
input.removeEventListener("blur", resetCache.fn);
resetCache.fn = null;
}
if (input.validity && !input.validity.valid) {
if ((!cache.value || !input.value) && event.data === "-" || cache.value[0] === "-" && event.inputType === "deleteContentBackward") {
cache.value = "-";
state22.value = "";
resetCache = () => {
resetCache.fn = () => {
cache.value = input.value = "";
};
input.addEventListener("blur", resetCache);
input.addEventListener("blur", resetCache.fn);
return false;
}
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state22, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = state22.value = input.value = cache.value === "-" ? "" : cache.value;
return false;
} else {
const res = resolveDigitDecimalPoint(event, cache);
const res = resolveDigitDecimalPoint(event, cache, state22, input, resetCache);
if (typeof res === "boolean")
return res;
cache.value = input.value;
......
import { TEMP_PATH } from './constants'
export * from './dom'
export { getBaseSystemInfo } from '../service/api/base/getBaseSystemInfo'
export { operateVideoPlayer } from '../service/api/context/operateVideoPlayer'
......@@ -19,3 +21,13 @@ export { getEnterOptions, getLaunchOptions } from '../framework/setup/utils'
export const inflateRaw = (...args: any[]): any => {}
export const deflateRaw = (...args: any[]): any => {}
interface Env {
USER_DATA_PATH: string
TEMP_PATH: string
CACHE_PATH: string
}
export const getEnv: (() => Env) | undefined = () => ({
TEMP_PATH,
CACHE_PATH: '',
USER_DATA_PATH: '',
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册