Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个从根目录中的“xvc.js”文件导出的值转换器“XyzValueConverter”类,使用“toView(值)”方法,我如何从视图访问/引用该值转换器?
答案是将转换器像自定义元素一样导入到视图中。
在视图模板的顶部
<template> <import from='xvc'></import> ... <p>${someValue | xyz}</p> ....