@vue/compat 3.4.8 → 3.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +81 -67
- package/dist/vue.cjs.prod.js +56 -51
- package/dist/vue.esm-browser.js +81 -67
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +83 -69
- package/dist/vue.global.js +81 -67
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +81 -67
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +83 -69
- package/dist/vue.runtime.global.js +81 -67
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +16 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3310,6 +3310,10 @@ const SuspenseImpl = {
|
|
|
3310
3310
|
rendererInternals
|
|
3311
3311
|
);
|
|
3312
3312
|
} else {
|
|
3313
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3314
|
+
n2.suspense = n1.suspense;
|
|
3315
|
+
return;
|
|
3316
|
+
}
|
|
3313
3317
|
patchSuspense(
|
|
3314
3318
|
n1,
|
|
3315
3319
|
n2,
|
|
@@ -5983,58 +5987,6 @@ function useSlots() {
|
|
|
5983
5987
|
function useAttrs() {
|
|
5984
5988
|
return getContext().attrs;
|
|
5985
5989
|
}
|
|
5986
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
5987
|
-
const i = getCurrentInstance();
|
|
5988
|
-
if (!i) {
|
|
5989
|
-
warn$1(`useModel() called without active instance.`);
|
|
5990
|
-
return ref();
|
|
5991
|
-
}
|
|
5992
|
-
if (!i.propsOptions[0][name]) {
|
|
5993
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
5994
|
-
return ref();
|
|
5995
|
-
}
|
|
5996
|
-
const camelizedName = camelize(name);
|
|
5997
|
-
const hyphenatedName = hyphenate(name);
|
|
5998
|
-
const res = customRef((track, trigger) => {
|
|
5999
|
-
let localValue;
|
|
6000
|
-
watchSyncEffect(() => {
|
|
6001
|
-
const propValue = props[name];
|
|
6002
|
-
if (hasChanged(localValue, propValue)) {
|
|
6003
|
-
localValue = propValue;
|
|
6004
|
-
trigger();
|
|
6005
|
-
}
|
|
6006
|
-
});
|
|
6007
|
-
return {
|
|
6008
|
-
get() {
|
|
6009
|
-
track();
|
|
6010
|
-
return options.get ? options.get(localValue) : localValue;
|
|
6011
|
-
},
|
|
6012
|
-
set(value) {
|
|
6013
|
-
const rawProps = i.vnode.props;
|
|
6014
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
6015
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
6016
|
-
localValue = value;
|
|
6017
|
-
trigger();
|
|
6018
|
-
}
|
|
6019
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
6020
|
-
}
|
|
6021
|
-
};
|
|
6022
|
-
});
|
|
6023
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
6024
|
-
res[Symbol.iterator] = () => {
|
|
6025
|
-
let i2 = 0;
|
|
6026
|
-
return {
|
|
6027
|
-
next() {
|
|
6028
|
-
if (i2 < 2) {
|
|
6029
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
6030
|
-
} else {
|
|
6031
|
-
return { done: true };
|
|
6032
|
-
}
|
|
6033
|
-
}
|
|
6034
|
-
};
|
|
6035
|
-
};
|
|
6036
|
-
return res;
|
|
6037
|
-
}
|
|
6038
5990
|
function getContext() {
|
|
6039
5991
|
const i = getCurrentInstance();
|
|
6040
5992
|
if (!i) {
|
|
@@ -6606,7 +6558,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6606
6558
|
return vm;
|
|
6607
6559
|
}
|
|
6608
6560
|
}
|
|
6609
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6561
|
+
Vue.version = `2.6.14-compat:${"3.4.9"}`;
|
|
6610
6562
|
Vue.config = singletonApp.config;
|
|
6611
6563
|
Vue.use = (p, ...options) => {
|
|
6612
6564
|
if (p && isFunction(p.install)) {
|
|
@@ -8357,8 +8309,17 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8357
8309
|
actual = el.hasAttribute(key);
|
|
8358
8310
|
expected = includeBooleanAttr(clientValue);
|
|
8359
8311
|
} else {
|
|
8360
|
-
|
|
8361
|
-
|
|
8312
|
+
if (el.hasAttribute(key)) {
|
|
8313
|
+
actual = el.getAttribute(key);
|
|
8314
|
+
} else if (key in el) {
|
|
8315
|
+
const serverValue = el[key];
|
|
8316
|
+
if (!isObject(serverValue)) {
|
|
8317
|
+
actual = serverValue == null ? "" : String(serverValue);
|
|
8318
|
+
}
|
|
8319
|
+
}
|
|
8320
|
+
if (!isObject(clientValue)) {
|
|
8321
|
+
expected = clientValue == null ? "" : String(clientValue);
|
|
8322
|
+
}
|
|
8362
8323
|
}
|
|
8363
8324
|
if (actual !== expected) {
|
|
8364
8325
|
mismatchType = `attribute`;
|
|
@@ -8367,15 +8328,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8367
8328
|
}
|
|
8368
8329
|
if (mismatchType) {
|
|
8369
8330
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
el,
|
|
8373
|
-
`
|
|
8331
|
+
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
|
8332
|
+
const postSegment = `
|
|
8374
8333
|
- rendered on server: ${format(actual)}
|
|
8375
8334
|
- expected on client: ${format(expected)}
|
|
8376
8335
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
8377
|
-
You should fix the source of the mismatch
|
|
8378
|
-
|
|
8336
|
+
You should fix the source of the mismatch.`;
|
|
8337
|
+
{
|
|
8338
|
+
warn$1(preSegment, el, postSegment);
|
|
8339
|
+
}
|
|
8379
8340
|
return true;
|
|
8380
8341
|
}
|
|
8381
8342
|
return false;
|
|
@@ -11155,6 +11116,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
11155
11116
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
11156
11117
|
};
|
|
11157
11118
|
|
|
11119
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
11120
|
+
const i = getCurrentInstance();
|
|
11121
|
+
if (!i) {
|
|
11122
|
+
warn$1(`useModel() called without active instance.`);
|
|
11123
|
+
return ref();
|
|
11124
|
+
}
|
|
11125
|
+
if (!i.propsOptions[0][name]) {
|
|
11126
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
11127
|
+
return ref();
|
|
11128
|
+
}
|
|
11129
|
+
const camelizedName = camelize(name);
|
|
11130
|
+
const hyphenatedName = hyphenate(name);
|
|
11131
|
+
const res = customRef((track, trigger) => {
|
|
11132
|
+
let localValue;
|
|
11133
|
+
watchSyncEffect(() => {
|
|
11134
|
+
const propValue = props[name];
|
|
11135
|
+
if (hasChanged(localValue, propValue)) {
|
|
11136
|
+
localValue = propValue;
|
|
11137
|
+
trigger();
|
|
11138
|
+
}
|
|
11139
|
+
});
|
|
11140
|
+
return {
|
|
11141
|
+
get() {
|
|
11142
|
+
track();
|
|
11143
|
+
return options.get ? options.get(localValue) : localValue;
|
|
11144
|
+
},
|
|
11145
|
+
set(value) {
|
|
11146
|
+
const rawProps = i.vnode.props;
|
|
11147
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
11148
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
11149
|
+
localValue = value;
|
|
11150
|
+
trigger();
|
|
11151
|
+
}
|
|
11152
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
11153
|
+
}
|
|
11154
|
+
};
|
|
11155
|
+
});
|
|
11156
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
11157
|
+
res[Symbol.iterator] = () => {
|
|
11158
|
+
let i2 = 0;
|
|
11159
|
+
return {
|
|
11160
|
+
next() {
|
|
11161
|
+
if (i2 < 2) {
|
|
11162
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
11163
|
+
} else {
|
|
11164
|
+
return { done: true };
|
|
11165
|
+
}
|
|
11166
|
+
}
|
|
11167
|
+
};
|
|
11168
|
+
};
|
|
11169
|
+
return res;
|
|
11170
|
+
}
|
|
11171
|
+
|
|
11158
11172
|
function h(type, propsOrChildren, children) {
|
|
11159
11173
|
const l = arguments.length;
|
|
11160
11174
|
if (l === 2) {
|
|
@@ -11377,7 +11391,7 @@ function isMemoSame(cached, memo) {
|
|
|
11377
11391
|
return true;
|
|
11378
11392
|
}
|
|
11379
11393
|
|
|
11380
|
-
const version = "3.4.
|
|
11394
|
+
const version = "3.4.9";
|
|
11381
11395
|
const warn = warn$1 ;
|
|
11382
11396
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11383
11397
|
const devtools = devtools$1 ;
|
|
@@ -11847,6 +11861,7 @@ function useCssVars(getter) {
|
|
|
11847
11861
|
|
|
11848
11862
|
function patchStyle(el, prev, next) {
|
|
11849
11863
|
const style = el.style;
|
|
11864
|
+
const currentDisplay = style.display;
|
|
11850
11865
|
const isCssString = isString(next);
|
|
11851
11866
|
if (next && !isCssString) {
|
|
11852
11867
|
if (prev && !isString(prev)) {
|
|
@@ -11860,7 +11875,6 @@ function patchStyle(el, prev, next) {
|
|
|
11860
11875
|
setStyle(style, key, next[key]);
|
|
11861
11876
|
}
|
|
11862
11877
|
} else {
|
|
11863
|
-
const currentDisplay = style.display;
|
|
11864
11878
|
if (isCssString) {
|
|
11865
11879
|
if (prev !== next) {
|
|
11866
11880
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -11872,9 +11886,9 @@ function patchStyle(el, prev, next) {
|
|
|
11872
11886
|
} else if (prev) {
|
|
11873
11887
|
el.removeAttribute("style");
|
|
11874
11888
|
}
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11889
|
+
}
|
|
11890
|
+
if (vShowOldKey in el) {
|
|
11891
|
+
style.display = currentDisplay;
|
|
11878
11892
|
}
|
|
11879
11893
|
}
|
|
11880
11894
|
const semicolonRE = /[^\\];\s*$/;
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2373,6 +2373,10 @@ const SuspenseImpl = {
|
|
|
2373
2373
|
rendererInternals
|
|
2374
2374
|
);
|
|
2375
2375
|
} else {
|
|
2376
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2377
|
+
n2.suspense = n1.suspense;
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2376
2380
|
patchSuspense(
|
|
2377
2381
|
n1,
|
|
2378
2382
|
n2,
|
|
@@ -4785,50 +4789,6 @@ function useSlots() {
|
|
|
4785
4789
|
function useAttrs() {
|
|
4786
4790
|
return getContext().attrs;
|
|
4787
4791
|
}
|
|
4788
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
4789
|
-
const i = getCurrentInstance();
|
|
4790
|
-
const camelizedName = camelize(name);
|
|
4791
|
-
const hyphenatedName = hyphenate(name);
|
|
4792
|
-
const res = customRef((track, trigger) => {
|
|
4793
|
-
let localValue;
|
|
4794
|
-
watchSyncEffect(() => {
|
|
4795
|
-
const propValue = props[name];
|
|
4796
|
-
if (hasChanged(localValue, propValue)) {
|
|
4797
|
-
localValue = propValue;
|
|
4798
|
-
trigger();
|
|
4799
|
-
}
|
|
4800
|
-
});
|
|
4801
|
-
return {
|
|
4802
|
-
get() {
|
|
4803
|
-
track();
|
|
4804
|
-
return options.get ? options.get(localValue) : localValue;
|
|
4805
|
-
},
|
|
4806
|
-
set(value) {
|
|
4807
|
-
const rawProps = i.vnode.props;
|
|
4808
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
4809
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
4810
|
-
localValue = value;
|
|
4811
|
-
trigger();
|
|
4812
|
-
}
|
|
4813
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
4814
|
-
}
|
|
4815
|
-
};
|
|
4816
|
-
});
|
|
4817
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
4818
|
-
res[Symbol.iterator] = () => {
|
|
4819
|
-
let i2 = 0;
|
|
4820
|
-
return {
|
|
4821
|
-
next() {
|
|
4822
|
-
if (i2 < 2) {
|
|
4823
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
4824
|
-
} else {
|
|
4825
|
-
return { done: true };
|
|
4826
|
-
}
|
|
4827
|
-
}
|
|
4828
|
-
};
|
|
4829
|
-
};
|
|
4830
|
-
return res;
|
|
4831
|
-
}
|
|
4832
4792
|
function getContext() {
|
|
4833
4793
|
const i = getCurrentInstance();
|
|
4834
4794
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
@@ -5287,7 +5247,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5287
5247
|
return vm;
|
|
5288
5248
|
}
|
|
5289
5249
|
}
|
|
5290
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5250
|
+
Vue.version = `2.6.14-compat:${"3.4.9"}`;
|
|
5291
5251
|
Vue.config = singletonApp.config;
|
|
5292
5252
|
Vue.use = (p, ...options) => {
|
|
5293
5253
|
if (p && isFunction(p.install)) {
|
|
@@ -9049,6 +9009,51 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
9049
9009
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9050
9010
|
};
|
|
9051
9011
|
|
|
9012
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
9013
|
+
const i = getCurrentInstance();
|
|
9014
|
+
const camelizedName = camelize(name);
|
|
9015
|
+
const hyphenatedName = hyphenate(name);
|
|
9016
|
+
const res = customRef((track, trigger) => {
|
|
9017
|
+
let localValue;
|
|
9018
|
+
watchSyncEffect(() => {
|
|
9019
|
+
const propValue = props[name];
|
|
9020
|
+
if (hasChanged(localValue, propValue)) {
|
|
9021
|
+
localValue = propValue;
|
|
9022
|
+
trigger();
|
|
9023
|
+
}
|
|
9024
|
+
});
|
|
9025
|
+
return {
|
|
9026
|
+
get() {
|
|
9027
|
+
track();
|
|
9028
|
+
return options.get ? options.get(localValue) : localValue;
|
|
9029
|
+
},
|
|
9030
|
+
set(value) {
|
|
9031
|
+
const rawProps = i.vnode.props;
|
|
9032
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
9033
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
9034
|
+
localValue = value;
|
|
9035
|
+
trigger();
|
|
9036
|
+
}
|
|
9037
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
9038
|
+
}
|
|
9039
|
+
};
|
|
9040
|
+
});
|
|
9041
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
9042
|
+
res[Symbol.iterator] = () => {
|
|
9043
|
+
let i2 = 0;
|
|
9044
|
+
return {
|
|
9045
|
+
next() {
|
|
9046
|
+
if (i2 < 2) {
|
|
9047
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
9048
|
+
} else {
|
|
9049
|
+
return { done: true };
|
|
9050
|
+
}
|
|
9051
|
+
}
|
|
9052
|
+
};
|
|
9053
|
+
};
|
|
9054
|
+
return res;
|
|
9055
|
+
}
|
|
9056
|
+
|
|
9052
9057
|
function h(type, propsOrChildren, children) {
|
|
9053
9058
|
const l = arguments.length;
|
|
9054
9059
|
if (l === 2) {
|
|
@@ -9101,7 +9106,7 @@ function isMemoSame(cached, memo) {
|
|
|
9101
9106
|
return true;
|
|
9102
9107
|
}
|
|
9103
9108
|
|
|
9104
|
-
const version = "3.4.
|
|
9109
|
+
const version = "3.4.9";
|
|
9105
9110
|
const warn$1 = NOOP;
|
|
9106
9111
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9107
9112
|
const devtools = void 0;
|
|
@@ -9565,6 +9570,7 @@ function useCssVars(getter) {
|
|
|
9565
9570
|
|
|
9566
9571
|
function patchStyle(el, prev, next) {
|
|
9567
9572
|
const style = el.style;
|
|
9573
|
+
const currentDisplay = style.display;
|
|
9568
9574
|
const isCssString = isString(next);
|
|
9569
9575
|
if (next && !isCssString) {
|
|
9570
9576
|
if (prev && !isString(prev)) {
|
|
@@ -9578,7 +9584,6 @@ function patchStyle(el, prev, next) {
|
|
|
9578
9584
|
setStyle(style, key, next[key]);
|
|
9579
9585
|
}
|
|
9580
9586
|
} else {
|
|
9581
|
-
const currentDisplay = style.display;
|
|
9582
9587
|
if (isCssString) {
|
|
9583
9588
|
if (prev !== next) {
|
|
9584
9589
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -9590,9 +9595,9 @@ function patchStyle(el, prev, next) {
|
|
|
9590
9595
|
} else if (prev) {
|
|
9591
9596
|
el.removeAttribute("style");
|
|
9592
9597
|
}
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9598
|
+
}
|
|
9599
|
+
if (vShowOldKey in el) {
|
|
9600
|
+
style.display = currentDisplay;
|
|
9596
9601
|
}
|
|
9597
9602
|
}
|
|
9598
9603
|
const importantRE = /\s*!important$/;
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3259,6 +3259,10 @@ const SuspenseImpl = {
|
|
|
3259
3259
|
rendererInternals
|
|
3260
3260
|
);
|
|
3261
3261
|
} else {
|
|
3262
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3263
|
+
n2.suspense = n1.suspense;
|
|
3264
|
+
return;
|
|
3265
|
+
}
|
|
3262
3266
|
patchSuspense(
|
|
3263
3267
|
n1,
|
|
3264
3268
|
n2,
|
|
@@ -5905,58 +5909,6 @@ function useSlots() {
|
|
|
5905
5909
|
function useAttrs() {
|
|
5906
5910
|
return getContext().attrs;
|
|
5907
5911
|
}
|
|
5908
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
5909
|
-
const i = getCurrentInstance();
|
|
5910
|
-
if (!i) {
|
|
5911
|
-
warn$1(`useModel() called without active instance.`);
|
|
5912
|
-
return ref();
|
|
5913
|
-
}
|
|
5914
|
-
if (!i.propsOptions[0][name]) {
|
|
5915
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
5916
|
-
return ref();
|
|
5917
|
-
}
|
|
5918
|
-
const camelizedName = camelize(name);
|
|
5919
|
-
const hyphenatedName = hyphenate(name);
|
|
5920
|
-
const res = customRef((track, trigger) => {
|
|
5921
|
-
let localValue;
|
|
5922
|
-
watchSyncEffect(() => {
|
|
5923
|
-
const propValue = props[name];
|
|
5924
|
-
if (hasChanged(localValue, propValue)) {
|
|
5925
|
-
localValue = propValue;
|
|
5926
|
-
trigger();
|
|
5927
|
-
}
|
|
5928
|
-
});
|
|
5929
|
-
return {
|
|
5930
|
-
get() {
|
|
5931
|
-
track();
|
|
5932
|
-
return options.get ? options.get(localValue) : localValue;
|
|
5933
|
-
},
|
|
5934
|
-
set(value) {
|
|
5935
|
-
const rawProps = i.vnode.props;
|
|
5936
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
5937
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
5938
|
-
localValue = value;
|
|
5939
|
-
trigger();
|
|
5940
|
-
}
|
|
5941
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
5942
|
-
}
|
|
5943
|
-
};
|
|
5944
|
-
});
|
|
5945
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
5946
|
-
res[Symbol.iterator] = () => {
|
|
5947
|
-
let i2 = 0;
|
|
5948
|
-
return {
|
|
5949
|
-
next() {
|
|
5950
|
-
if (i2 < 2) {
|
|
5951
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
5952
|
-
} else {
|
|
5953
|
-
return { done: true };
|
|
5954
|
-
}
|
|
5955
|
-
}
|
|
5956
|
-
};
|
|
5957
|
-
};
|
|
5958
|
-
return res;
|
|
5959
|
-
}
|
|
5960
5912
|
function getContext() {
|
|
5961
5913
|
const i = getCurrentInstance();
|
|
5962
5914
|
if (!i) {
|
|
@@ -6528,7 +6480,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6528
6480
|
return vm;
|
|
6529
6481
|
}
|
|
6530
6482
|
}
|
|
6531
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6483
|
+
Vue.version = `2.6.14-compat:${"3.4.9"}`;
|
|
6532
6484
|
Vue.config = singletonApp.config;
|
|
6533
6485
|
Vue.use = (p, ...options) => {
|
|
6534
6486
|
if (p && isFunction(p.install)) {
|
|
@@ -8279,8 +8231,17 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8279
8231
|
actual = el.hasAttribute(key);
|
|
8280
8232
|
expected = includeBooleanAttr(clientValue);
|
|
8281
8233
|
} else {
|
|
8282
|
-
|
|
8283
|
-
|
|
8234
|
+
if (el.hasAttribute(key)) {
|
|
8235
|
+
actual = el.getAttribute(key);
|
|
8236
|
+
} else if (key in el) {
|
|
8237
|
+
const serverValue = el[key];
|
|
8238
|
+
if (!isObject(serverValue)) {
|
|
8239
|
+
actual = serverValue == null ? "" : String(serverValue);
|
|
8240
|
+
}
|
|
8241
|
+
}
|
|
8242
|
+
if (!isObject(clientValue)) {
|
|
8243
|
+
expected = clientValue == null ? "" : String(clientValue);
|
|
8244
|
+
}
|
|
8284
8245
|
}
|
|
8285
8246
|
if (actual !== expected) {
|
|
8286
8247
|
mismatchType = `attribute`;
|
|
@@ -8289,15 +8250,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8289
8250
|
}
|
|
8290
8251
|
if (mismatchType) {
|
|
8291
8252
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
el,
|
|
8295
|
-
`
|
|
8253
|
+
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
|
8254
|
+
const postSegment = `
|
|
8296
8255
|
- rendered on server: ${format(actual)}
|
|
8297
8256
|
- expected on client: ${format(expected)}
|
|
8298
8257
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
8299
|
-
You should fix the source of the mismatch
|
|
8300
|
-
|
|
8258
|
+
You should fix the source of the mismatch.`;
|
|
8259
|
+
{
|
|
8260
|
+
warn$1(preSegment, el, postSegment);
|
|
8261
|
+
}
|
|
8301
8262
|
return true;
|
|
8302
8263
|
}
|
|
8303
8264
|
return false;
|
|
@@ -11060,6 +11021,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
11060
11021
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
11061
11022
|
};
|
|
11062
11023
|
|
|
11024
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
11025
|
+
const i = getCurrentInstance();
|
|
11026
|
+
if (!i) {
|
|
11027
|
+
warn$1(`useModel() called without active instance.`);
|
|
11028
|
+
return ref();
|
|
11029
|
+
}
|
|
11030
|
+
if (!i.propsOptions[0][name]) {
|
|
11031
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
11032
|
+
return ref();
|
|
11033
|
+
}
|
|
11034
|
+
const camelizedName = camelize(name);
|
|
11035
|
+
const hyphenatedName = hyphenate(name);
|
|
11036
|
+
const res = customRef((track, trigger) => {
|
|
11037
|
+
let localValue;
|
|
11038
|
+
watchSyncEffect(() => {
|
|
11039
|
+
const propValue = props[name];
|
|
11040
|
+
if (hasChanged(localValue, propValue)) {
|
|
11041
|
+
localValue = propValue;
|
|
11042
|
+
trigger();
|
|
11043
|
+
}
|
|
11044
|
+
});
|
|
11045
|
+
return {
|
|
11046
|
+
get() {
|
|
11047
|
+
track();
|
|
11048
|
+
return options.get ? options.get(localValue) : localValue;
|
|
11049
|
+
},
|
|
11050
|
+
set(value) {
|
|
11051
|
+
const rawProps = i.vnode.props;
|
|
11052
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
11053
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
11054
|
+
localValue = value;
|
|
11055
|
+
trigger();
|
|
11056
|
+
}
|
|
11057
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
11058
|
+
}
|
|
11059
|
+
};
|
|
11060
|
+
});
|
|
11061
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
11062
|
+
res[Symbol.iterator] = () => {
|
|
11063
|
+
let i2 = 0;
|
|
11064
|
+
return {
|
|
11065
|
+
next() {
|
|
11066
|
+
if (i2 < 2) {
|
|
11067
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
11068
|
+
} else {
|
|
11069
|
+
return { done: true };
|
|
11070
|
+
}
|
|
11071
|
+
}
|
|
11072
|
+
};
|
|
11073
|
+
};
|
|
11074
|
+
return res;
|
|
11075
|
+
}
|
|
11076
|
+
|
|
11063
11077
|
function h(type, propsOrChildren, children) {
|
|
11064
11078
|
const l = arguments.length;
|
|
11065
11079
|
if (l === 2) {
|
|
@@ -11282,7 +11296,7 @@ function isMemoSame(cached, memo) {
|
|
|
11282
11296
|
return true;
|
|
11283
11297
|
}
|
|
11284
11298
|
|
|
11285
|
-
const version = "3.4.
|
|
11299
|
+
const version = "3.4.9";
|
|
11286
11300
|
const warn = warn$1 ;
|
|
11287
11301
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11288
11302
|
const devtools = devtools$1 ;
|
|
@@ -11795,6 +11809,7 @@ function setVarsOnNode(el, vars) {
|
|
|
11795
11809
|
|
|
11796
11810
|
function patchStyle(el, prev, next) {
|
|
11797
11811
|
const style = el.style;
|
|
11812
|
+
const currentDisplay = style.display;
|
|
11798
11813
|
const isCssString = isString(next);
|
|
11799
11814
|
if (next && !isCssString) {
|
|
11800
11815
|
if (prev && !isString(prev)) {
|
|
@@ -11808,7 +11823,6 @@ function patchStyle(el, prev, next) {
|
|
|
11808
11823
|
setStyle(style, key, next[key]);
|
|
11809
11824
|
}
|
|
11810
11825
|
} else {
|
|
11811
|
-
const currentDisplay = style.display;
|
|
11812
11826
|
if (isCssString) {
|
|
11813
11827
|
if (prev !== next) {
|
|
11814
11828
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -11820,9 +11834,9 @@ function patchStyle(el, prev, next) {
|
|
|
11820
11834
|
} else if (prev) {
|
|
11821
11835
|
el.removeAttribute("style");
|
|
11822
11836
|
}
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11837
|
+
}
|
|
11838
|
+
if (vShowOldKey in el) {
|
|
11839
|
+
style.display = currentDisplay;
|
|
11826
11840
|
}
|
|
11827
11841
|
}
|
|
11828
11842
|
const semicolonRE = /[^\\];\s*$/;
|