本帖最后由 jinwyp 于 2019-11-26 16:34 编辑
项目运行 npm run watch 出现一下错误
[ERRO] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/ShortcutButton ERROR: 根节点 `div` 不能使用属性 `show` @1:1 [WARN] 您当前使用了 path 似乎是 node 原生模块, 快应用不是 node 环境不支持 node 原生模块 [WARN] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/WGList WARNING: 属性 `animation-duration` 不支持单位 `s`, 自动转换为 `ms` @160:3 [ERRO] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/Loading ERROR: 根节点 `div` 不能使用属性 `show` @1:1 [ERRO] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/VideoPoster ERROR: 根节点 `div` 不能使用属性 `show` @1:1 [WARN] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/VideoPoster WARN: 选择器 `.video-icon-wrapper` 已经存在,后者合并前者 @94:1 [ERRO] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/FeedTags ERROR: 根节点 `div` 不能使用属性 `show` @1:1 [ERRO] /Users/wangyp/Documents/lianshang/quick-app-wg/src/components/VideoIcon ERROR: 根节点 `div` 不能使用属性 `show` @1:1
问题1 : 根节点不能使用show?
例如 这种show 不行吗? 那还是有其他方法使用show吗?
- <template>
- <div
- show="{{actualVisible}}"
- class="loading {{mode === 'dark' ? 'loading-mode-dark' : ''}} {{!visible ? 'fade-out' : ''}}"
- >
- <progress type="circular"></progress>
- <text class="loading-text">{{ text }}</text>
- </div>
- </template>
复制代码
问题2 : animation-duration 不支持单位 s 文档写的支持啊 怎么还报错WARN?
https://doc.quickapp.cn/widgets/animation-styles.html 文档写的支持秒s啊
- .icon {
- width: 50px;
- height: 250px;
- resize-mode: contain;
- animation-name: guide;
- animation-duration: 1.6s;
- animation-iteration-count: infinite;
- }
复制代码
问题3 :
`.video-icon-wrapper` 已经存在,后者合并前者 @94:1
样式写成这样下面组合形式 就是报 WARN, 这个WARN 很奇怪,怎么去掉WARN ,可以设置吗?
- .video-poster-container,
- .video-poster-wrapper,
- .video-poster,
- .video-icon-wrapper {
- width: 100%;
- height: 100%;
- }
-
- .video-icon-wrapper {
- justify-content: center;
- align-items: center;
- }
复制代码
|