vue 3.2.11 → 3.2.12
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.esm-browser.js +145 -444
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +145 -444
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +138 -437
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +138 -437
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +4 -4
|
@@ -1614,335 +1614,6 @@ var Vue = (function (exports) {
|
|
|
1614
1614
|
exports.devtools.emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
const deprecationData = {
|
|
1618
|
-
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
1619
|
-
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
1620
|
-
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
1621
|
-
link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`
|
|
1622
|
-
},
|
|
1623
|
-
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
1624
|
-
message: `Vue detected directives on the mount container. ` +
|
|
1625
|
-
`In Vue 3, the container is no longer considered part of the template ` +
|
|
1626
|
-
`and will not be processed/replaced.`,
|
|
1627
|
-
link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
|
|
1628
|
-
},
|
|
1629
|
-
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
1630
|
-
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
1631
|
-
`Use defineComponent() instead.`,
|
|
1632
|
-
link: `https://v3.vuejs.org/api/global-api.html#definecomponent`
|
|
1633
|
-
},
|
|
1634
|
-
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
1635
|
-
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
1636
|
-
`Use app.config.globalProperties instead.`,
|
|
1637
|
-
link: `https://v3.vuejs.org/guide/migration/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
1638
|
-
},
|
|
1639
|
-
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
1640
|
-
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
1641
|
-
`Simply use native JavaScript mutations.`
|
|
1642
|
-
},
|
|
1643
|
-
["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
|
|
1644
|
-
message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
1645
|
-
`Simply use native JavaScript mutations.`
|
|
1646
|
-
},
|
|
1647
|
-
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
1648
|
-
message: `Vue.observable() has been removed. ` +
|
|
1649
|
-
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
1650
|
-
link: `https://v3.vuejs.org/api/basic-reactivity.html`
|
|
1651
|
-
},
|
|
1652
|
-
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
1653
|
-
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
1654
|
-
`since it was an internal API even in Vue 2.`
|
|
1655
|
-
},
|
|
1656
|
-
["CONFIG_SILENT" /* CONFIG_SILENT */]: {
|
|
1657
|
-
message: `config.silent has been removed because it is not good practice to ` +
|
|
1658
|
-
`intentionally suppress warnings. You can use your browser console's ` +
|
|
1659
|
-
`filter features to focus on relevant messages.`
|
|
1660
|
-
},
|
|
1661
|
-
["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
|
|
1662
|
-
message: `config.devtools has been removed. To enable devtools for ` +
|
|
1663
|
-
`production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
|
|
1664
|
-
link: `https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags`
|
|
1665
|
-
},
|
|
1666
|
-
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
1667
|
-
message: `config.keyCodes has been removed. ` +
|
|
1668
|
-
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
1669
|
-
link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
|
|
1670
|
-
},
|
|
1671
|
-
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
1672
|
-
message: `config.productionTip has been removed.`,
|
|
1673
|
-
link: `https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed`
|
|
1674
|
-
},
|
|
1675
|
-
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
1676
|
-
message: () => {
|
|
1677
|
-
let msg = `config.ignoredElements has been removed.`;
|
|
1678
|
-
if (isRuntimeOnly()) {
|
|
1679
|
-
msg += ` Pass the "isCustomElement" option to @vue/compiler-dom instead.`;
|
|
1680
|
-
}
|
|
1681
|
-
else {
|
|
1682
|
-
msg += ` Use config.isCustomElement instead.`;
|
|
1683
|
-
}
|
|
1684
|
-
return msg;
|
|
1685
|
-
},
|
|
1686
|
-
link: `https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
1687
|
-
},
|
|
1688
|
-
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
1689
|
-
// this warning is only relevant in the full build when using runtime
|
|
1690
|
-
// compilation, so it's put in the runtime compatConfig list.
|
|
1691
|
-
message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
|
|
1692
|
-
`"preserve". To suppress this warning, provide an explicit value for ` +
|
|
1693
|
-
`\`config.compilerOptions.whitespace\`.`
|
|
1694
|
-
},
|
|
1695
|
-
["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
|
|
1696
|
-
message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
|
|
1697
|
-
`Use custom merge functions instead.`
|
|
1698
|
-
},
|
|
1699
|
-
["INSTANCE_SET" /* INSTANCE_SET */]: {
|
|
1700
|
-
message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
|
|
1701
|
-
`Simply use native JavaScript mutations.`
|
|
1702
|
-
},
|
|
1703
|
-
["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
|
|
1704
|
-
message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
1705
|
-
`Simply use native JavaScript mutations.`
|
|
1706
|
-
},
|
|
1707
|
-
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
1708
|
-
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
1709
|
-
link: `https://v3.vuejs.org/api/application-api.html#unmount`
|
|
1710
|
-
},
|
|
1711
|
-
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
1712
|
-
message: `vm.$on/$once/$off() have been removed. ` +
|
|
1713
|
-
`Use an external event emitter library instead.`,
|
|
1714
|
-
link: `https://v3.vuejs.org/guide/migration/events-api.html`
|
|
1715
|
-
},
|
|
1716
|
-
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
1717
|
-
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
1718
|
-
`use the "vnode" prefix instead of "hook:". For example, @${event} ` +
|
|
1719
|
-
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
1720
|
-
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
1721
|
-
`hooks.`,
|
|
1722
|
-
link: `https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html`
|
|
1723
|
-
},
|
|
1724
|
-
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
1725
|
-
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
1726
|
-
`to avoid relying on direct access to child components.`,
|
|
1727
|
-
link: `https://v3.vuejs.org/guide/migration/children.html`
|
|
1728
|
-
},
|
|
1729
|
-
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
1730
|
-
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
1731
|
-
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
1732
|
-
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
1733
|
-
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
1734
|
-
link: `https://v3.vuejs.org/guide/migration/listeners-removed.html`
|
|
1735
|
-
},
|
|
1736
|
-
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
1737
|
-
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
1738
|
-
link: `https://v3.vuejs.org/guide/migration/slots-unification.html`
|
|
1739
|
-
},
|
|
1740
|
-
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
1741
|
-
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
1742
|
-
`relying on class/style fallthrough from parent. In Vue 3, class/style ` +
|
|
1743
|
-
`are now included in $attrs and will no longer fallthrough when ` +
|
|
1744
|
-
`inheritAttrs is false. If you are already using v-bind="$attrs" on ` +
|
|
1745
|
-
`component root it should render the same end result. ` +
|
|
1746
|
-
`If you are binding $attrs to a non-root element and expecting ` +
|
|
1747
|
-
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
1748
|
-
`them on root via :class="$attrs.class".`,
|
|
1749
|
-
link: `https://v3.vuejs.org/guide/migration/attrs-includes-class-style.html`
|
|
1750
|
-
},
|
|
1751
|
-
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
1752
|
-
message: `The "data" option can no longer be a plain object. ` +
|
|
1753
|
-
`Always use a function.`,
|
|
1754
|
-
link: `https://v3.vuejs.org/guide/migration/data-option.html`
|
|
1755
|
-
},
|
|
1756
|
-
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
1757
|
-
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
1758
|
-
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
1759
|
-
link: `https://v3.vuejs.org/guide/migration/data-option.html#mixin-merge-behavior-change`
|
|
1760
|
-
},
|
|
1761
|
-
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
1762
|
-
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
1763
|
-
},
|
|
1764
|
-
["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
|
|
1765
|
-
message: `\`destroyed\` has been renamed to \`unmounted\`.`
|
|
1766
|
-
},
|
|
1767
|
-
["WATCH_ARRAY" /* WATCH_ARRAY */]: {
|
|
1768
|
-
message: `"watch" option or vm.$watch on an array value will no longer ` +
|
|
1769
|
-
`trigger on array mutation unless the "deep" option is specified. ` +
|
|
1770
|
-
`If current usage is intended, you can disable the compat behavior and ` +
|
|
1771
|
-
`suppress this warning with:` +
|
|
1772
|
-
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
1773
|
-
link: `https://v3.vuejs.org/guide/migration/watch.html`
|
|
1774
|
-
},
|
|
1775
|
-
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
1776
|
-
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
1777
|
-
`build only offers access to this.$options.` +
|
|
1778
|
-
`(found in prop "${key}")`,
|
|
1779
|
-
link: `https://v3.vuejs.org/guide/migration/props-default-this.html`
|
|
1780
|
-
},
|
|
1781
|
-
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
1782
|
-
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
1783
|
-
`Use "${newHook}" instead.`,
|
|
1784
|
-
link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
|
|
1785
|
-
},
|
|
1786
|
-
["V_FOR_REF" /* V_FOR_REF */]: {
|
|
1787
|
-
message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
|
|
1788
|
-
`Consider using function refs or refactor to avoid ref usage altogether.`,
|
|
1789
|
-
link: `https://v3.vuejs.org/guide/migration/array-refs.html`
|
|
1790
|
-
},
|
|
1791
|
-
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
1792
|
-
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
1793
|
-
`Use kebab-case key name modifiers instead.`,
|
|
1794
|
-
link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
|
|
1795
|
-
},
|
|
1796
|
-
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
1797
|
-
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
1798
|
-
`${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
|
|
1799
|
-
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
1800
|
-
`you can disable the compat behavior and suppress this warning with:` +
|
|
1801
|
-
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
1802
|
-
link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
|
|
1803
|
-
},
|
|
1804
|
-
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
1805
|
-
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
1806
|
-
`${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
|
|
1807
|
-
`Always use explicit "true" or "false" values for enumerated attributes. ` +
|
|
1808
|
-
`If the usage is intended, ` +
|
|
1809
|
-
`you can disable the compat behavior and suppress this warning with:` +
|
|
1810
|
-
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
1811
|
-
link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
|
|
1812
|
-
},
|
|
1813
|
-
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
1814
|
-
message: `` // this feature cannot be runtime-detected
|
|
1815
|
-
},
|
|
1816
|
-
["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
|
|
1817
|
-
message: `<TransitionGroup> no longer renders a root <span> element by ` +
|
|
1818
|
-
`default if no "tag" prop is specified. If you do not rely on the span ` +
|
|
1819
|
-
`for styling, you can disable the compat behavior and suppress this ` +
|
|
1820
|
-
`warning with:` +
|
|
1821
|
-
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
1822
|
-
link: `https://v3.vuejs.org/guide/migration/transition-group.html`
|
|
1823
|
-
},
|
|
1824
|
-
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
1825
|
-
message: (comp) => {
|
|
1826
|
-
const name = getComponentName(comp);
|
|
1827
|
-
return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
|
|
1828
|
-
`in Vue 3. Plain functions will be treated as functional components in ` +
|
|
1829
|
-
`non-compat build. If you have already migrated all async component ` +
|
|
1830
|
-
`usage and intend to use plain functions for functional components, ` +
|
|
1831
|
-
`you can disable the compat behavior and suppress this ` +
|
|
1832
|
-
`warning with:` +
|
|
1833
|
-
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
1834
|
-
},
|
|
1835
|
-
link: `https://v3.vuejs.org/guide/migration/async-components.html`
|
|
1836
|
-
},
|
|
1837
|
-
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
1838
|
-
message: (comp) => {
|
|
1839
|
-
const name = getComponentName(comp);
|
|
1840
|
-
return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
|
|
1841
|
-
`option has been removed. NOTE: Before migrating to use plain ` +
|
|
1842
|
-
`functions for functional components, first make sure that all async ` +
|
|
1843
|
-
`components usage have been migrated and its compat behavior has ` +
|
|
1844
|
-
`been disabled.`);
|
|
1845
|
-
},
|
|
1846
|
-
link: `https://v3.vuejs.org/guide/migration/functional-components.html`
|
|
1847
|
-
},
|
|
1848
|
-
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
1849
|
-
message: (comp) => {
|
|
1850
|
-
const configMsg = `opt-in to ` +
|
|
1851
|
-
`Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
|
|
1852
|
-
if (comp.props &&
|
|
1853
|
-
(isArray(comp.props)
|
|
1854
|
-
? comp.props.includes('modelValue')
|
|
1855
|
-
: hasOwn(comp.props, 'modelValue'))) {
|
|
1856
|
-
return (`Component delcares "modelValue" prop, which is Vue 3 usage, but ` +
|
|
1857
|
-
`is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
|
|
1858
|
-
}
|
|
1859
|
-
return (`v-model usage on component has changed in Vue 3. Component that expects ` +
|
|
1860
|
-
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
1861
|
-
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
1862
|
-
},
|
|
1863
|
-
link: `https://v3.vuejs.org/guide/migration/v-model.html`
|
|
1864
|
-
},
|
|
1865
|
-
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
1866
|
-
message: `Vue 3's render function API has changed. ` +
|
|
1867
|
-
`You can opt-in to the new API with:` +
|
|
1868
|
-
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
1869
|
-
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
1870
|
-
link: `https://v3.vuejs.org/guide/migration/render-function-api.html`
|
|
1871
|
-
},
|
|
1872
|
-
["FILTERS" /* FILTERS */]: {
|
|
1873
|
-
message: `filters have been removed in Vue 3. ` +
|
|
1874
|
-
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
1875
|
-
`Use method calls or computed properties instead.`,
|
|
1876
|
-
link: `https://v3.vuejs.org/guide/migration/filters.html`
|
|
1877
|
-
},
|
|
1878
|
-
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
1879
|
-
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
1880
|
-
`If you are seeing this warning only due to a dependency, you can ` +
|
|
1881
|
-
`suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
|
-
const instanceWarned = Object.create(null);
|
|
1885
|
-
const warnCount = Object.create(null);
|
|
1886
|
-
function warnDeprecation(key, instance, ...args) {
|
|
1887
|
-
instance = instance || getCurrentInstance();
|
|
1888
|
-
// check user config
|
|
1889
|
-
const config = getCompatConfigForKey(key, instance);
|
|
1890
|
-
if (config === 'suppress-warning') {
|
|
1891
|
-
return;
|
|
1892
|
-
}
|
|
1893
|
-
const dupKey = key + args.join('');
|
|
1894
|
-
let compId = instance && formatComponentName(instance, instance.type);
|
|
1895
|
-
if (compId === 'Anonymous' && instance) {
|
|
1896
|
-
compId = instance.uid;
|
|
1897
|
-
}
|
|
1898
|
-
// skip if the same warning is emitted for the same component type
|
|
1899
|
-
const componentDupKey = dupKey + compId;
|
|
1900
|
-
if (componentDupKey in instanceWarned) {
|
|
1901
|
-
return;
|
|
1902
|
-
}
|
|
1903
|
-
instanceWarned[componentDupKey] = true;
|
|
1904
|
-
// same warning, but different component. skip the long message and just
|
|
1905
|
-
// log the key and count.
|
|
1906
|
-
if (dupKey in warnCount) {
|
|
1907
|
-
warn$1(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
|
|
1908
|
-
return;
|
|
1909
|
-
}
|
|
1910
|
-
warnCount[dupKey] = 0;
|
|
1911
|
-
const { message, link } = deprecationData[key];
|
|
1912
|
-
warn$1(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`);
|
|
1913
|
-
if (!isCompatEnabled(key, instance, true)) {
|
|
1914
|
-
console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +
|
|
1915
|
-
`lead to runtime errors.`);
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
const globalCompatConfig = {
|
|
1919
|
-
MODE: 2
|
|
1920
|
-
};
|
|
1921
|
-
function getCompatConfigForKey(key, instance) {
|
|
1922
|
-
const instanceConfig = instance && instance.type.compatConfig;
|
|
1923
|
-
if (instanceConfig && key in instanceConfig) {
|
|
1924
|
-
return instanceConfig[key];
|
|
1925
|
-
}
|
|
1926
|
-
return globalCompatConfig[key];
|
|
1927
|
-
}
|
|
1928
|
-
function isCompatEnabled(key, instance, enableForBuiltIn = false) {
|
|
1929
|
-
// skip compat for built-in components
|
|
1930
|
-
if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
|
|
1931
|
-
return false;
|
|
1932
|
-
}
|
|
1933
|
-
const rawMode = getCompatConfigForKey('MODE', instance) || 2;
|
|
1934
|
-
const val = getCompatConfigForKey(key, instance);
|
|
1935
|
-
const mode = isFunction(rawMode)
|
|
1936
|
-
? rawMode(instance && instance.type)
|
|
1937
|
-
: rawMode;
|
|
1938
|
-
if (mode === 2) {
|
|
1939
|
-
return val !== false;
|
|
1940
|
-
}
|
|
1941
|
-
else {
|
|
1942
|
-
return val === true || val === 'suppress-warning';
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
1617
|
function emit(instance, event, ...rawArgs) {
|
|
1947
1618
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
1948
1619
|
{
|
|
@@ -2168,12 +1839,12 @@ var Vue = (function (exports) {
|
|
|
2168
1839
|
function renderComponentRoot(instance) {
|
|
2169
1840
|
const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;
|
|
2170
1841
|
let result;
|
|
1842
|
+
let fallthroughAttrs;
|
|
2171
1843
|
const prev = setCurrentRenderingInstance(instance);
|
|
2172
1844
|
{
|
|
2173
1845
|
accessedAttrs = false;
|
|
2174
1846
|
}
|
|
2175
1847
|
try {
|
|
2176
|
-
let fallthroughAttrs;
|
|
2177
1848
|
if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
|
|
2178
1849
|
// withProxy is a proxy with a different `has` trap only for
|
|
2179
1850
|
// runtime-compiled render functions using `with` block.
|
|
@@ -2204,97 +1875,91 @@ var Vue = (function (exports) {
|
|
|
2204
1875
|
? attrs
|
|
2205
1876
|
: getFunctionalFallthrough(attrs);
|
|
2206
1877
|
}
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
1878
|
+
}
|
|
1879
|
+
catch (err) {
|
|
1880
|
+
blockStack.length = 0;
|
|
1881
|
+
handleError(err, instance, 1 /* RENDER_FUNCTION */);
|
|
1882
|
+
result = createVNode(Comment);
|
|
1883
|
+
}
|
|
1884
|
+
// attr merging
|
|
1885
|
+
// in dev mode, comments are preserved, and it's possible for a template
|
|
1886
|
+
// to have comments along side the root element which makes it a fragment
|
|
1887
|
+
let root = result;
|
|
1888
|
+
let setRoot = undefined;
|
|
1889
|
+
if (result.patchFlag > 0 &&
|
|
1890
|
+
result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
|
|
1891
|
+
[root, setRoot] = getChildRoot(result);
|
|
1892
|
+
}
|
|
1893
|
+
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
1894
|
+
const keys = Object.keys(fallthroughAttrs);
|
|
1895
|
+
const { shapeFlag } = root;
|
|
1896
|
+
if (keys.length) {
|
|
1897
|
+
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
1898
|
+
if (propsOptions && keys.some(isModelListener)) {
|
|
1899
|
+
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
1900
|
+
// prop, it indicates this component expects to handle v-model and
|
|
1901
|
+
// it should not fallthrough.
|
|
1902
|
+
// related: #1543, #1643, #1989
|
|
1903
|
+
fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
|
|
1904
|
+
}
|
|
1905
|
+
root = cloneVNode(root, fallthroughAttrs);
|
|
1906
|
+
}
|
|
1907
|
+
else if (!accessedAttrs && root.type !== Comment) {
|
|
1908
|
+
const allAttrs = Object.keys(attrs);
|
|
1909
|
+
const eventAttrs = [];
|
|
1910
|
+
const extraAttrs = [];
|
|
1911
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
1912
|
+
const key = allAttrs[i];
|
|
1913
|
+
if (isOn(key)) {
|
|
1914
|
+
// ignore v-model handlers when they fail to fallthrough
|
|
1915
|
+
if (!isModelListener(key)) {
|
|
1916
|
+
// remove `on`, lowercase first letter to reflect event casing
|
|
1917
|
+
// accurately
|
|
1918
|
+
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
2248
1919
|
}
|
|
2249
1920
|
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
`${extraAttrs.join(', ')}) ` +
|
|
2253
|
-
`were passed to component but could not be automatically inherited ` +
|
|
2254
|
-
`because component renders fragment or text root nodes.`);
|
|
2255
|
-
}
|
|
2256
|
-
if (eventAttrs.length) {
|
|
2257
|
-
warn$1(`Extraneous non-emits event listeners (` +
|
|
2258
|
-
`${eventAttrs.join(', ')}) ` +
|
|
2259
|
-
`were passed to component but could not be automatically inherited ` +
|
|
2260
|
-
`because component renders fragment or text root nodes. ` +
|
|
2261
|
-
`If the listener is intended to be a component custom event listener only, ` +
|
|
2262
|
-
`declare it using the "emits" option.`);
|
|
1921
|
+
else {
|
|
1922
|
+
extraAttrs.push(key);
|
|
2263
1923
|
}
|
|
2264
1924
|
}
|
|
1925
|
+
if (extraAttrs.length) {
|
|
1926
|
+
warn$1(`Extraneous non-props attributes (` +
|
|
1927
|
+
`${extraAttrs.join(', ')}) ` +
|
|
1928
|
+
`were passed to component but could not be automatically inherited ` +
|
|
1929
|
+
`because component renders fragment or text root nodes.`);
|
|
1930
|
+
}
|
|
1931
|
+
if (eventAttrs.length) {
|
|
1932
|
+
warn$1(`Extraneous non-emits event listeners (` +
|
|
1933
|
+
`${eventAttrs.join(', ')}) ` +
|
|
1934
|
+
`were passed to component but could not be automatically inherited ` +
|
|
1935
|
+
`because component renders fragment or text root nodes. ` +
|
|
1936
|
+
`If the listener is intended to be a component custom event listener only, ` +
|
|
1937
|
+
`declare it using the "emits" option.`);
|
|
1938
|
+
}
|
|
2265
1939
|
}
|
|
2266
1940
|
}
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
if (true && !isElementRoot(root)) {
|
|
2274
|
-
warn$1(`Runtime directive used on component with non-element root node. ` +
|
|
2275
|
-
`The directives will not function as intended.`);
|
|
2276
|
-
}
|
|
2277
|
-
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
2278
|
-
}
|
|
2279
|
-
// inherit transition data
|
|
2280
|
-
if (vnode.transition) {
|
|
2281
|
-
if (true && !isElementRoot(root)) {
|
|
2282
|
-
warn$1(`Component inside <Transition> renders non-element root node ` +
|
|
2283
|
-
`that cannot be animated.`);
|
|
2284
|
-
}
|
|
2285
|
-
root.transition = vnode.transition;
|
|
2286
|
-
}
|
|
2287
|
-
if (true && setRoot) {
|
|
2288
|
-
setRoot(root);
|
|
1941
|
+
}
|
|
1942
|
+
// inherit directives
|
|
1943
|
+
if (vnode.dirs) {
|
|
1944
|
+
if (!isElementRoot(root)) {
|
|
1945
|
+
warn$1(`Runtime directive used on component with non-element root node. ` +
|
|
1946
|
+
`The directives will not function as intended.`);
|
|
2289
1947
|
}
|
|
2290
|
-
|
|
2291
|
-
|
|
1948
|
+
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
1949
|
+
}
|
|
1950
|
+
// inherit transition data
|
|
1951
|
+
if (vnode.transition) {
|
|
1952
|
+
if (!isElementRoot(root)) {
|
|
1953
|
+
warn$1(`Component inside <Transition> renders non-element root node ` +
|
|
1954
|
+
`that cannot be animated.`);
|
|
2292
1955
|
}
|
|
1956
|
+
root.transition = vnode.transition;
|
|
2293
1957
|
}
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
1958
|
+
if (setRoot) {
|
|
1959
|
+
setRoot(root);
|
|
1960
|
+
}
|
|
1961
|
+
else {
|
|
1962
|
+
result = root;
|
|
2298
1963
|
}
|
|
2299
1964
|
setCurrentRenderingInstance(prev);
|
|
2300
1965
|
return result;
|
|
@@ -2829,8 +2494,8 @@ var Vue = (function (exports) {
|
|
|
2829
2494
|
function normalizeSuspenseSlot(s) {
|
|
2830
2495
|
let block;
|
|
2831
2496
|
if (isFunction(s)) {
|
|
2832
|
-
const
|
|
2833
|
-
if (
|
|
2497
|
+
const trackBlock = isBlockTreeEnabled && s._c;
|
|
2498
|
+
if (trackBlock) {
|
|
2834
2499
|
// disableTracking: false
|
|
2835
2500
|
// allow block tracking for compiled slots
|
|
2836
2501
|
// (see ./componentRenderContext.ts)
|
|
@@ -2838,7 +2503,7 @@ var Vue = (function (exports) {
|
|
|
2838
2503
|
openBlock();
|
|
2839
2504
|
}
|
|
2840
2505
|
s = s();
|
|
2841
|
-
if (
|
|
2506
|
+
if (trackBlock) {
|
|
2842
2507
|
s._d = true;
|
|
2843
2508
|
block = currentBlock;
|
|
2844
2509
|
closeBlock();
|
|
@@ -6934,7 +6599,11 @@ var Vue = (function (exports) {
|
|
|
6934
6599
|
return Component;
|
|
6935
6600
|
}
|
|
6936
6601
|
if (warnMissing && !res) {
|
|
6937
|
-
|
|
6602
|
+
const extra = type === COMPONENTS
|
|
6603
|
+
? `\nIf this is a native custom element, make sure to exclude it from ` +
|
|
6604
|
+
`component resolution via compilerOptions.isCustomElement.`
|
|
6605
|
+
: ``;
|
|
6606
|
+
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
6938
6607
|
}
|
|
6939
6608
|
return res;
|
|
6940
6609
|
}
|
|
@@ -7789,17 +7458,19 @@ var Vue = (function (exports) {
|
|
|
7789
7458
|
function exposeSetupStateOnRenderContext(instance) {
|
|
7790
7459
|
const { ctx, setupState } = instance;
|
|
7791
7460
|
Object.keys(toRaw(setupState)).forEach(key => {
|
|
7792
|
-
if (!setupState.__isScriptSetup
|
|
7793
|
-
|
|
7794
|
-
`
|
|
7795
|
-
|
|
7461
|
+
if (!setupState.__isScriptSetup) {
|
|
7462
|
+
if (key[0] === '$' || key[0] === '_') {
|
|
7463
|
+
warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
|
|
7464
|
+
`which are reserved prefixes for Vue internals.`);
|
|
7465
|
+
return;
|
|
7466
|
+
}
|
|
7467
|
+
Object.defineProperty(ctx, key, {
|
|
7468
|
+
enumerable: true,
|
|
7469
|
+
configurable: true,
|
|
7470
|
+
get: () => setupState[key],
|
|
7471
|
+
set: NOOP
|
|
7472
|
+
});
|
|
7796
7473
|
}
|
|
7797
|
-
Object.defineProperty(ctx, key, {
|
|
7798
|
-
enumerable: true,
|
|
7799
|
-
configurable: true,
|
|
7800
|
-
get: () => setupState[key],
|
|
7801
|
-
set: NOOP
|
|
7802
|
-
});
|
|
7803
7474
|
});
|
|
7804
7475
|
}
|
|
7805
7476
|
|
|
@@ -8543,11 +8214,18 @@ var Vue = (function (exports) {
|
|
|
8543
8214
|
// 2. If a component is unmounted during a parent component's update,
|
|
8544
8215
|
// its update can be skipped.
|
|
8545
8216
|
queue.sort((a, b) => getId(a) - getId(b));
|
|
8217
|
+
// conditional usage of checkRecursiveUpdate must be determined out of
|
|
8218
|
+
// try ... catch block since Rollup by default de-optimizes treeshaking
|
|
8219
|
+
// inside try-catch. This can leave all warning code unshaked. Although
|
|
8220
|
+
// they would get eventually shaken by a minifier like terser, some minifiers
|
|
8221
|
+
// would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
|
|
8222
|
+
const check = (job) => checkRecursiveUpdates(seen, job)
|
|
8223
|
+
;
|
|
8546
8224
|
try {
|
|
8547
8225
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
8548
8226
|
const job = queue[flushIndex];
|
|
8549
8227
|
if (job && job.active !== false) {
|
|
8550
|
-
if (true &&
|
|
8228
|
+
if (true && check(job)) {
|
|
8551
8229
|
continue;
|
|
8552
8230
|
}
|
|
8553
8231
|
// console.log(`running:`, job.id)
|
|
@@ -9222,7 +8900,7 @@ var Vue = (function (exports) {
|
|
|
9222
8900
|
}
|
|
9223
8901
|
|
|
9224
8902
|
// Core API ------------------------------------------------------------------
|
|
9225
|
-
const version = "3.2.
|
|
8903
|
+
const version = "3.2.12";
|
|
9226
8904
|
/**
|
|
9227
8905
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9228
8906
|
* @internal
|
|
@@ -9704,6 +9382,7 @@ var Vue = (function (exports) {
|
|
|
9704
9382
|
this._instance = null;
|
|
9705
9383
|
this._connected = false;
|
|
9706
9384
|
this._resolved = false;
|
|
9385
|
+
this._numberProps = null;
|
|
9707
9386
|
if (this.shadowRoot && hydrate) {
|
|
9708
9387
|
hydrate(this._createVNode(), this.shadowRoot);
|
|
9709
9388
|
}
|
|
@@ -9719,18 +9398,17 @@ var Vue = (function (exports) {
|
|
|
9719
9398
|
this._setAttr(this.attributes[i].name);
|
|
9720
9399
|
}
|
|
9721
9400
|
// watch future attr changes
|
|
9722
|
-
|
|
9401
|
+
new MutationObserver(mutations => {
|
|
9723
9402
|
for (const m of mutations) {
|
|
9724
9403
|
this._setAttr(m.attributeName);
|
|
9725
9404
|
}
|
|
9726
|
-
});
|
|
9727
|
-
observer.observe(this, { attributes: true });
|
|
9405
|
+
}).observe(this, { attributes: true });
|
|
9728
9406
|
}
|
|
9729
9407
|
connectedCallback() {
|
|
9730
9408
|
this._connected = true;
|
|
9731
9409
|
if (!this._instance) {
|
|
9732
9410
|
this._resolveDef();
|
|
9733
|
-
|
|
9411
|
+
this._update();
|
|
9734
9412
|
}
|
|
9735
9413
|
}
|
|
9736
9414
|
disconnectedCallback() {
|
|
@@ -9751,15 +9429,31 @@ var Vue = (function (exports) {
|
|
|
9751
9429
|
}
|
|
9752
9430
|
const resolve = (def) => {
|
|
9753
9431
|
this._resolved = true;
|
|
9432
|
+
const { props, styles } = def;
|
|
9433
|
+
const hasOptions = !isArray(props);
|
|
9434
|
+
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
9435
|
+
// cast Number-type props set before resolve
|
|
9436
|
+
let numberProps;
|
|
9437
|
+
if (hasOptions) {
|
|
9438
|
+
for (const key in this._props) {
|
|
9439
|
+
const opt = props[key];
|
|
9440
|
+
if (opt === Number || (opt && opt.type === Number)) {
|
|
9441
|
+
this._props[key] = toNumber(this._props[key]);
|
|
9442
|
+
(numberProps || (numberProps = Object.create(null)))[key] = true;
|
|
9443
|
+
}
|
|
9444
|
+
}
|
|
9445
|
+
}
|
|
9446
|
+
if (numberProps) {
|
|
9447
|
+
this._numberProps = numberProps;
|
|
9448
|
+
this._update();
|
|
9449
|
+
}
|
|
9754
9450
|
// check if there are props set pre-upgrade or connect
|
|
9755
9451
|
for (const key of Object.keys(this)) {
|
|
9756
9452
|
if (key[0] !== '_') {
|
|
9757
9453
|
this._setProp(key, this[key]);
|
|
9758
9454
|
}
|
|
9759
9455
|
}
|
|
9760
|
-
const { props, styles } = def;
|
|
9761
9456
|
// defining getter/setters on prototype
|
|
9762
|
-
const rawKeys = props ? (isArray(props) ? props : Object.keys(props)) : [];
|
|
9763
9457
|
for (const key of rawKeys.map(camelize)) {
|
|
9764
9458
|
Object.defineProperty(this, key, {
|
|
9765
9459
|
get() {
|
|
@@ -9781,7 +9475,11 @@ var Vue = (function (exports) {
|
|
|
9781
9475
|
}
|
|
9782
9476
|
}
|
|
9783
9477
|
_setAttr(key) {
|
|
9784
|
-
|
|
9478
|
+
let value = this.getAttribute(key);
|
|
9479
|
+
if (this._numberProps && this._numberProps[key]) {
|
|
9480
|
+
value = toNumber(value);
|
|
9481
|
+
}
|
|
9482
|
+
this._setProp(camelize(key), value, false);
|
|
9785
9483
|
}
|
|
9786
9484
|
/**
|
|
9787
9485
|
* @internal
|
|
@@ -9796,7 +9494,7 @@ var Vue = (function (exports) {
|
|
|
9796
9494
|
if (val !== this._props[key]) {
|
|
9797
9495
|
this._props[key] = val;
|
|
9798
9496
|
if (this._instance) {
|
|
9799
|
-
|
|
9497
|
+
this._update();
|
|
9800
9498
|
}
|
|
9801
9499
|
// reflect
|
|
9802
9500
|
if (shouldReflect) {
|
|
@@ -9812,6 +9510,9 @@ var Vue = (function (exports) {
|
|
|
9812
9510
|
}
|
|
9813
9511
|
}
|
|
9814
9512
|
}
|
|
9513
|
+
_update() {
|
|
9514
|
+
render(this._createVNode(), this.shadowRoot);
|
|
9515
|
+
}
|
|
9815
9516
|
_createVNode() {
|
|
9816
9517
|
const vnode = createVNode(this._def, extend({}, this._props));
|
|
9817
9518
|
if (!this._instance) {
|
|
@@ -9832,7 +9533,7 @@ var Vue = (function (exports) {
|
|
|
9832
9533
|
if (!this._def.__asyncLoader) {
|
|
9833
9534
|
// reload
|
|
9834
9535
|
this._instance = null;
|
|
9835
|
-
|
|
9536
|
+
this._update();
|
|
9836
9537
|
}
|
|
9837
9538
|
};
|
|
9838
9539
|
}
|