yasuo
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -172,13 +172,11 @@ function triggerRefValue(ref, newVal) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var _a;
|
||||
class ComputedRefImpl {
|
||||
constructor(getter, _setter, isReadonly, isSSR) {
|
||||
this._setter = _setter;
|
||||
this.dep = void 0;
|
||||
this.__v_isRef = true;
|
||||
this[_a] = false;
|
||||
this._dirty = true;
|
||||
this.effect = new ReactiveEffect(getter, () => {
|
||||
if (!this._dirty) {
|
||||
@@ -203,7 +201,6 @@ class ComputedRefImpl {
|
||||
this._setter(newValue);
|
||||
}
|
||||
}
|
||||
_a = "__v_isReadonly";
|
||||
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
||||
let getter;
|
||||
let setter;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { getCurrentScope, onScopeDispose, computed, toRefs, getCurrentInstance, onMounted, nextTick, ref, unref, isRef, reactive, watch, customRef, onUpdated } from "vue";
|
||||
var _a;
|
||||
const isClient = typeof window !== "undefined";
|
||||
const toString = Object.prototype.toString;
|
||||
var _a$1;
|
||||
const isClient$1 = typeof window !== "undefined";
|
||||
const toString$1 = Object.prototype.toString;
|
||||
const isFunction = (val) => typeof val === "function";
|
||||
const isNumber = (val) => typeof val === "number";
|
||||
const isString = (val) => typeof val === "string";
|
||||
const isObject = (val) => toString.call(val) === "[object Object]";
|
||||
const isObject$1 = (val) => toString$1.call(val) === "[object Object]";
|
||||
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
||||
const noop = () => {
|
||||
};
|
||||
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
isClient$1 && ((_a$1 = window == null ? void 0 : window.navigator) == null ? void 0 : _a$1.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
function resolveUnref(r) {
|
||||
return typeof r === "function" ? r() : unref(r);
|
||||
}
|
||||
@@ -141,7 +141,7 @@ function useTimeoutFn(cb, interval, options = {}) {
|
||||
}
|
||||
if (immediate) {
|
||||
isPending.value = true;
|
||||
if (isClient)
|
||||
if (isClient$1)
|
||||
start();
|
||||
}
|
||||
tryOnScopeDispose(stop);
|
||||
@@ -156,7 +156,7 @@ function unrefElement(elRef) {
|
||||
const plain = resolveUnref(elRef);
|
||||
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
||||
}
|
||||
const defaultWindow = isClient ? window : void 0;
|
||||
const defaultWindow = isClient$1 ? window : void 0;
|
||||
function useEventListener(...args) {
|
||||
let target;
|
||||
let event;
|
||||
@@ -561,4 +561,9 @@ function useWindowSize(options = {}) {
|
||||
useEventListener("orientationchange", update, { passive: true });
|
||||
return { width, height };
|
||||
}
|
||||
export { TransitionPresets as T, useResizeObserver as a, useThrottleFn as b, useEventListener as c, useEyeDropper as d, useTransition as e, useMousePressed as f, isObject as i, onClickOutside as o, reactiveOmit as r, templateRef as t, useWindowSize as u };
|
||||
var _a;
|
||||
const isClient = typeof window !== "undefined";
|
||||
const toString = Object.prototype.toString;
|
||||
const isObject = (val) => toString.call(val) === "[object Object]";
|
||||
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
export { TransitionPresets as T, useResizeObserver as a, useThrottleFn as b, useEventListener as c, useEyeDropper as d, useTransition as e, useMousePressed as f, isObject as g, isObject$1 as i, onClickOutside as o, reactiveOmit as r, templateRef as t, useWindowSize as u };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createElementVNode, normalizeClass, unref, createVNode, createCommentVNode, toDisplayString } from "vue";
|
||||
import { _ as _sfc_main$2W } from "../_chunks/@layui/index.js";
|
||||
import { i as isObject } from "../_chunks/@vueuse/index.js";
|
||||
import { g as isObject } from "../_chunks/@vueuse/index.js";
|
||||
var index = /* @__PURE__ */ (() => ":root{--textarea-border-radius: var(--global-border-radius);--textarea-border-color: var(--global-neutral-color-3)}.layui-textarea{border-width:1px;border-style:solid;background-color:#fff;color:#000000d9;border-radius:var(--textarea-border-radius);border-color:var(--textarea-border-color);display:block;width:100%;height:auto;line-height:20px;min-height:100px;padding:6px 10px;resize:vertical;position:relative;transition:none;-webkit-transition:none}.layui-textarea-wrapper{position:relative}.layui-textarea:hover,.layui-textarea:focus{border-color:#d2d2d2!important}.layui-textarea-clear{position:absolute;color:#00000073;right:10px;top:10px}.layui-textarea::-webkit-input-placeholder{line-height:1.3}.layui-texterea-count{color:inherit;white-space:nowrap;pointer-events:none;text-align:right;margin-top:4px}.layui-textarea-disabled{cursor:not-allowed!important;opacity:.6}\n")();
|
||||
const _hoisted_1 = { class: "layui-textarea-wrapper" };
|
||||
const _hoisted_2 = ["value", "placeholder", "name", "disabled", "maxlength"];
|
||||
|
||||
@@ -54,7 +54,8 @@ const _sfc_main = defineComponent({
|
||||
dragText: null,
|
||||
modelValue: { default: null },
|
||||
auto: { type: Boolean, default: true },
|
||||
sizeOutMsg: null
|
||||
sizeOutMsg: null,
|
||||
quality: null
|
||||
},
|
||||
emits: [
|
||||
"choose",
|
||||
@@ -68,6 +69,24 @@ const _sfc_main = defineComponent({
|
||||
],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
function imgcomp(file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var options = {
|
||||
file,
|
||||
quality: 0.6,
|
||||
mimeType: "image/jpeg",
|
||||
maxWidth: 2e3,
|
||||
maxHeight: 2e3,
|
||||
convertSize: Infinity,
|
||||
loose: true,
|
||||
redressOrientation: true,
|
||||
success: function(result) {
|
||||
resolve(result);
|
||||
}
|
||||
};
|
||||
new ImageCompressor(options);
|
||||
});
|
||||
}
|
||||
const getCutDownResult = () => {
|
||||
if (_cropper) {
|
||||
const canvas = _cropper.getCroppedCanvas();
|
||||
@@ -164,7 +183,7 @@ const _sfc_main = defineComponent({
|
||||
computedCutLayerOption = computed(() => defaultCutLayerOption.value);
|
||||
}
|
||||
const innerCutVisible = ref(false);
|
||||
const localUploadTransaction = (option) => {
|
||||
const localUploadTransaction = async (option) => {
|
||||
const { url, files } = option;
|
||||
let formData = new FormData();
|
||||
if (url.length <= 5) {
|
||||
@@ -174,7 +193,8 @@ const _sfc_main = defineComponent({
|
||||
if (Array.isArray(files) && files.length > 0) {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let _file = files[i];
|
||||
formData.append(props.field + "[" + i + "]", _file);
|
||||
let f = await imgcomp(_file);
|
||||
formData.append(props.field + "[" + i + "]", f);
|
||||
}
|
||||
}
|
||||
if (props.data && props.data instanceof Object) {
|
||||
|
||||
Reference in New Issue
Block a user