How to use the unref function from vue

Find comprehensive JavaScript vue.unref code examples handpicked from public code repositorys.

2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
            'selectic--overflow-multiline': state.selectionOverflow === 'multiline',
            'selectic--overflow-collapsed': state.selectionOverflow === 'collapsed',
        }];
}
get hasGivenValue() {
    const value = vue.unref(this.value);
    return value !== null && value !== undefined;
}
get defaultValue() {
    var _a;
fork icon1
star icon7
watch icon6

+ 593 other calls in file

1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
}
return (_ctx, _cache) => {
    return (vue.openBlock(), vue.createElementBlock("div", {
        class: vue.normalizeClass(["v-code-block v-code-block--mb-5", vue.unref(codeBlockClasses)])
    }, [
        (__props.label || __props.tabs || vue.unref(slots).label || vue.unref(slots).tabs)
            ? (vue.openBlock(), vue.createElementBlock("div", {
                key: 0,
                class: "v-code-block--header",
                style: vue.normalizeStyle(vue.unref(headerStyles))
fork icon0
star icon1
watch icon1

+ 11 other calls in file

832
833
834
835
836
837
838
839
840
841
vue.createVNode(_component_Dropdown, {
  modelValue: vue.unref(model),
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(model) ? (model).value = $event : null)),
  class: "w-100",
  options: field_options.value,
  optionLabel: vue.unref(config).option_label,
  optionValue: vue.unref(config).option_id,
  onChange: vue.unref(input_event),
  onClick: vue.unref(click_event)
}, null, 8 /* PROPS */, ["modelValue", "options", "optionLabel", "optionValue", "onChange", "onClick"])
fork icon0
star icon0
watch icon7

+ 399 other calls in file

975
976
977
978
979
980
981
982
983
984
disabled: vue.unref(config).disabled,
min: Number(vue.unref(config).min),
max: Number(vue.unref(config).max),
step: vue.unref(config).step,
format: vue.unref(config).format,
minFractionDigits: vue.unref(config).minFractionDigits,
maxFractionDigits: vue.unref(config).maxFractionDigits,
currency: vue.unref(config).currency,
mode: vue.unref(config).mode,
suffix: vue.unref(config).suffix,
fork icon0
star icon0
watch icon7

+ 79 other calls in file

3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
app.component('RouterLink', RouterLink);
app.component('RouterView', RouterView);
app.config.globalProperties.$router = router;
Object.defineProperty(app.config.globalProperties, '$route', {
    enumerable: true,
    get: () => vue.unref(currentRoute),
});
// this initial navigation is only necessary on client, on server it doesn't
// make sense because it will create an extra unnecessary navigation and could
// lead to problems
fork icon0
star icon0
watch icon1

+ 11 other calls in file

2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
const routeToDisplay = vue.computed(() => props.route || injectedRoute.value);
const injectedDepth = vue.inject(viewDepthKey, 0);
// The depth changes based on empty components option, which allows passthrough routes e.g. routes with children
// that are used to reuse the `path` property
const depth = vue.computed(() => {
    let initialDepth = vue.unref(injectedDepth);
    const { matched } = routeToDisplay.value;
    let matchedRoute;
    while ((matchedRoute = matched[initialDepth]) &&
        !matchedRoute.components) {
fork icon0
star icon0
watch icon0

+ 9 other calls in file