Giter Site home page Giter Site logo

grapewheel / avvw Goto Github PK

View Code? Open in Web Editor NEW
153.0 153.0 56.0 3.7 MB

Apicloud + Vue2 + Vant(有赞前端)+ Webpack4打包,极速开发APP框架,将apicloud的渲染效率和vue数据绑定特性发挥极致!

JavaScript 97.80% Vue 1.57% HTML 0.61% Shell 0.02%
android apicloud app hybrid ios javascript nodejs vant vue vue2 webpack

avvw's People

Contributors

grapewheel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

avvw's Issues

调试时能否增量同步?

在调试的时候,有时候改动了一个文件,但是同步时还是需要全部同步一遍,是否有办法改进呢?

项目中使用vant的tabs出现警告

EF632328-F691-45CB-AC3C-DD38A0E3397A

tab1.vue中使用 Tabs,Tab时,会有警告产生,请问这个是怎么产生的呢?

内容 {{ item + index}}
<script> import Header from "@/components/header.vue"; import { Tab, Tabs , List ,Cell} from 'vant'; import apicloud from "@/libs/apicloud";
window.tab1Vue = {
	name: "tab1",
	components: { Header,Tab, Tabs , List,Cell },
	data() {
		return {
			dataSource: ['全部文件','待我签署','代他人签','已完成','我发起的','纸质文件'],
			active:1,
			list: [],
			loading: false,
			finished: false
		};
	},
	mounted() {
		let navHeight = apicloud.dom("#nav").offsetHeight;
		apicloud.dom(".tabContent").style.cssText="margin-top:"+navHeight+"px;";
	},
	methods: {
		onLoad() {
			// 异步更新数据
			setTimeout(() => {
				for (let i = 0; i < 10; i++) {
					this.list.push(this.list.length + 1);
				}
				// 加载状态结束
				this.loading = false;

				// 数据全部加载完成
				if (this.list.length >= 40) {
					this.finished = true;
				}
			}, 500);
		}
	}
};

export default window.tab1Vue;
</script>

<style scoped> </style>

这个项目挺好的,还有维护吗,npm i 报错

$ npm i npm WARN tarball tarball data for [email protected] (sha1-gK9cXhHCJqXIs0 8VSAmK9ACIhKQ=) seems to be corrupted. Trying one more time. npm WARN tarball tarball data for [email protected] (sha512-NSo3E99QDbYSMeJaEk9YW2lT g3qS9V0aKGlb+PlOrei1X02r1wSBHCNX/O+yeTRFSWPKPIGj6MqvvdqV4rnVGw==) seems to be co rrupted. Trying one more time. npm WARN tarball tarball data for [email protected] (sha512-ImThpeNU9HbdZL3utgMCq0oiMzA kt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==) seems to be corru pted. Trying one more time. npm WARN tarball tarball data for [email protected] (sha512-Pxm6sI2MeBD7RdD12RYsqaP 0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==) seems to be c orrupted. Trying one more time. npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\stream.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\streams.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\stricttransportsecurity.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\style-scoped.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\subresource-integrity.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-css.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-filters.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-fonts.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-fragment.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-html.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-html5.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-img.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg-smil.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\svg.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\symbols.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\tabindex-attr.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\template-literals.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\template.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\testfeat.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\text-decoration.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\text-emphasis.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\text-overflow.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\text-size-adjust.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\text-stroke.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\textcontent.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\textencoder.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\tls1-1.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\tls1-2.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\tls1-3.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\token-binding.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\touch.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\transforms2d.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\transforms3d.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\ttf.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\typedarrays.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\u2f.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\unhandledrejection.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\upgradeinsecurerequests.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\url.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\urlsearchparams.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\use-strict.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\user-select-none.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\user-timing.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\variable-fonts.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\vibration.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\video.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\videotracks.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\viewport-units.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\wai-aria.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\wasm.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\wav.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\wbr-element.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\web-animation.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\web-app-manifest.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\web-bluetooth.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\web-share.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webauthn.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webgl.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webgl2.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webm.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webp.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\websockets.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webusb.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webvr.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webvtt.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\webworkers.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\will-change.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\woff.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\woff2.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\word-break.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\wordwrap.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\x-doc-messaging.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\x-frame-options.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\xhr2.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\xhtml.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\xhtmlsmil.js' npm WARN tar ENOENT: no such file or directory, open 'E:\apps\avvw\node_modules\ .staging\caniuse-lite-f39dfc30\data\features\xml-serializer.js' npm WARN tarball tarball data for [email protected] (sha512-ZVXvGC2uLyfDNaOmr5m7VXQ7QB Ye8aCFrQhma1pajqh8UyfY82JGKLar0KlGbepBgjc+k1KErXz4qRJrPeeZfg==) seems to be corr upted. Trying one more time. npm ERR! path E:\apps\avvw\node_modules.staging\terser-e3b8d94c\lib\compress.js npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'E:\apps\avvw\node_module s.staging\terser-e3b8d94c\lib\compress.js' npm ERR! { [Error: EPERM: operation not permitted, unlink 'E:\apps\avvw\node_mo dules.staging\terser-e3b8d94c\lib\compress.js'] npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'E:\apps\avvw\node_m odules.staging\terser-e3b8d94c\lib\compress.js' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'E:\apps\avvw\node_modules\.staging\terser-e3b8d94c\lib\co mpress.js' }, npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, unlink 'E:\apps\avvw\nod e_modules\.staging\terser-e3b8d94c\lib\compress.js'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'E:\apps\avvw\node_modules\.staging\terser-e3b8d94c\lib\compr ess.js', npm ERR! parent: 'avvw' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or ant ivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check t he npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended ).

是什么原因呢

vue的入口文件是哪个?

我写了一个toast组件(类似此篇文章),现在需要全局注册此组件,避免反复注册。
但是我尝试了两种方法都没法实现,一在src目录下新建main.js,二在page.ejs中调用全局注册函数。
请指教如何处理呢?
另外请问如何不使用APICloud Studio来调用一些APICloud的模块呢?

最新版本无法访问

C:\Users\Administrator\Desktop\avvw\avvw-master\avvw>npm run dev

[email protected] dev C:\Users\Administrator\Desktop\avvw\avvw-master\avvw
webpack-dev-server --open --config webpack.dev.js

i 「wds」: Project is running at http://localhost:8080/
i 「wds」: webpack output is served from /
i 「wdm」: wait until bundle finished: /

Fatal error in , line 0

Check failed: U_SUCCESS(status).

#FailureMessage Object: 000000CF278FDA50npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! [email protected] dev: webpack-dev-server --open --config webpack.dev.js
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2019-04-29T06_35_32_769Z-debug.log

关于组件调用$attrs is readonly. $listeners is readonly.

使用组件的时候,总是会出现这些错误,但是不影响使用。想知道这些错误是怎么出来的,应该怎么解决呢?
现在使用的DatePicker组件,tab组件,DropdownMenu, DropdownItem组件等,都会出现这个问题。
引入方式
image
image

image

有问题!!

npm run dev

[Vue warn]: Do not use built-in or reserved HTML elements as component id: header
warn @ vue.js:616
validateComponentName @ vue.js:1397
Vue.extend @ vue.js:4870
createComponent @ vue.js:4305
_createElement @ vue.js:4536
createElement @ vue.js:4474
vm._c @ vue.js:4605
render @ home.vue?c09a:8
Vue._render @ vue.js:4649
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
init @ vue.js:4239
createComponent @ vue.js:5683
createElm @ vue.js:5630
createChildren @ vue.js:5758
createElm @ vue.js:5659
patch @ vue.js:6219
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
Vue._init @ vue.js:4739
Vue @ vue.js:4805
setTimeout @ home.html:37
setTimeout (async)
(anonymous) @ home.html:35
vue.js:616 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> at src/pages/home.vue

warn @ vue.js:616
createElm @ vue.js:5643
patch @ vue.js:6180
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
init @ vue.js:4239
createComponent @ vue.js:5683
createElm @ vue.js:5630
createChildren @ vue.js:5758
createElm @ vue.js:5659
patch @ vue.js:6219
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
Vue._init @ vue.js:4739
Vue @ vue.js:4805
setTimeout @ home.html:37
setTimeout (async)
(anonymous) @ home.html:35
vue.js:616 [Vue warn]: Error in mounted hook: "ReferenceError: api is not defined"

found in

--->

at src/components/header.vue
at src/pages/home.vue

warn @ vue.js:616
logError @ vue.js:1837
globalHandleError @ vue.js:1832
handleError @ vue.js:1821
callHook @ vue.js:3047
insert @ vue.js:4260
invokeInsertHook @ vue.js:6051
patch @ vue.js:6268
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
Vue._init @ vue.js:4739
Vue @ vue.js:4805
setTimeout @ home.html:37
setTimeout (async)
(anonymous) @ home.html:35
vue.js:1841 ReferenceError: api is not defined
at Object../src/libs/apicloud.js.u.fixStatusBar (apicloud.js:500)
at VueComponent.mounted (header.vue:16)
at callHook (vue.js:3045)
at Object.insert (vue.js:4260)
at invokeInsertHook (vue.js:6051)
at Vue.patch [as patch] (vue.js:6268)
at Vue._update (vue.js:2785)
at Vue.updateComponent (vue.js:2906)
at Watcher.get (vue.js:3274)
at new Watcher (vue.js:3263)
logError @ vue.js:1841
globalHandleError @ vue.js:1832
handleError @ vue.js:1821
callHook @ vue.js:3047
insert @ vue.js:4260
invokeInsertHook @ vue.js:6051
patch @ vue.js:6268
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
Vue._init @ vue.js:4739
Vue @ vue.js:4805
setTimeout @ home.html:37
setTimeout (async)
(anonymous) @ home.html:35
vue.js:616 [Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'winHeight' of undefined"

found in

---> at src/pages/home.vue

warn @ vue.js:616
logError @ vue.js:1837
globalHandleError @ vue.js:1832
handleError @ vue.js:1821
callHook @ vue.js:3047
insert @ vue.js:4260
invokeInsertHook @ vue.js:6051
patch @ vue.js:6268
Vue._update @ vue.js:2785
updateComponent @ vue.js:2906
get @ vue.js:3274
Watcher @ vue.js:3263
mountComponent @ vue.js:2913
Vue.$mount @ vue.js:8629
Vue.$mount @ vue.js:11034
Vue._init @ vue.js:4739
Vue @ vue.js:4805
setTimeout @ home.html:37
setTimeout (async)
(anonymous) @ home.html:35
vue.js:1841 TypeError: Cannot read property 'winHeight' of undefined
at VueComponent.mounted (home.vue:32)
at callHook (vue.js:3045)
at Object.insert (vue.js:4260)
at invokeInsertHook (vue.js:6051)
at Vue.patch [as patch] (vue.js:6268)
at Vue._update (vue.js:2785)
at Vue.updateComponent (vue.js:2906)
at Watcher.get (vue.js:3274)
at new Watcher (vue.js:3263)
at mountComponent (vue.js:2913)

page 目录 和 dist目录 添加 新建目录功能 引发的问题

  • 在 webpack.dev.js 有如下更改: 导致 npm run dev 后 打开浏览器无法 找到页面 ,但是 在webpack.prod.js 下 同样使用此方法是可以的 dist 目录也是有输出的 打包出来的 目录结构也是符合预期的 , 然后我这里没有看出有什么问题 ,希望能一起解决这个问题
/*
* webpack.dev.js 
*/
const merge = require('webpack-merge')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HotModuleReplacementPlugin = require('webpack').HotModuleReplacementPlugin
const CopyWebpackPlugin = require('copy-webpack-plugin')
const base = require('./webpack.base')
const fs = require('fs')
const path = require('path')

// Collect the page's names
let files = [];
function getAllVueFile(path) {
    let tempArr = fs.readdirSync(path);
    tempArr.forEach(function(ele){
    let isDirectory = fs.statSync(path + '/' + ele).isDirectory(); //当前文件是否为目录
    if(isDirectory){
        getAllVueFile(path + '/' + ele);
    } else {
        files.push({
            path: path + '/' + ele,
            name: ele.replace('.vue',""),

        })
    }
  })
}
getAllVueFile('./src/pages'); //获取指定目录内所有.vue文件

let entry = {}, htmlWebpacks = [], filePath ='', jsPath = '';
for (let file of files) {
    filePath = file.path.replace('.vue','').replace('./src/pages','');
    jsPath = retPath((filePath.split('/')).length-2); //动态获取路径, 防止页面分目录后资源无法引用的问题
    entry[file.name] = file.path;
    htmlWebpacks.push(new HtmlWebpackPlugin({
        name: file.name,
        vue: jsPath + 'js/vue.js', 
        fastclick: jsPath + 'js/fastclick.min.js',
        filename: `${filePath}.html`,
        chunks: [file.name, 'runtime'],
        template: './src/templates/page.ejs'
    }))
}

function retPath(num){ // 多层文件夹获取资源路径
    let path = './';
    for (let idx = 0; idx < num; idx++) {
        path += '../';
    }
    return path;
}  

// Modify the index html for HMR!
htmlWebpacks.push(new HtmlWebpackPlugin({
    env: 'development',
    filename: `index.html`,
    chunks: [],
    template: './src/templates/index.html'
}))

/*
*	page.ejs
*/
//如下更改
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.vue %>"></script>
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.fastclick %>"></script>
  • 如何 可以的话希望打包出来的 css 图片 等不同资源也可以分目录

如何使用VS Code去调试远程设备中WebView呢

我在#10提到变相地实现真机实时预览的功能,然后我又在想能否通过VS Code去下断点来调试呢?
于是我找到了Debugger for Chrome,基于这个插件我们可以在Chrome中调试程序,但由于没有APICloud环境,我们还是需要到真机/模拟器上去调试。
于是我又找到了一个基于Debugger for Chrome可以实现在VS Code上调试远程设备上的WebView的插件——VS Code - Android WebView Debugging
我通过该插件确实可以附加在模拟器中的程序进行调试,HTML代码可以断下来,JS代码无法中断,且提示找不到xx.js。我看了webpack的dev配置,“devtool: 'inline-source-map',”也符合Vue官方文档关于调试的要求
请作者有时间的时候可以帮我看看,一起实现更好的开发体验!

pages目录下页面太多时有些混乱

现在用框架写了不少页面了,但是pages目录下不支持再新建目录,找起来有些麻烦。
看了下webpack的配置找到了关于pages目录,但是新手不知道要怎么改好,作者有时间看下能不能支持pages下新建目录,哪怕只有一级子目录也好。
配置代码如下:

// Collect the page's names
const files = readdirSync('./src/pages')
let entry = {}, htmlWebpacks = []
for (let file of files) {
    let page = file.substr(0, file.indexOf('.'))
    entry[page] = `./src/pages/${page}.vue`
    htmlWebpacks.push(new HtmlWebpackPlugin({
        name: page,
        vuejs: 'vue.js',
        filename: `${page}.html`,
        chunks: [page, 'runtime'],
        template: './src/templates/page.ejs'
    }))
}

popup组件问题

直接调用popup组件会出现
[Vue warn]: Error in nextTick: "TypeError: Cannot set property 'zIndex' of undefined"
vue.js:1841 TypeError: Cannot set property 'zIndex' of undefined
不知道有没有解决方案。

框架为啥不用axios啊

我看框架用的是apicloud自带的网络请求啊,这个和axios有啥不同啊,axios好用啊

真机wifi同步 空白,错误提示

01-30 14:29:35.706 E/app3c (26041): Uncaught SyntaxError: Unexpected token ) at home.js : 1
01-30 14:29:35.752 E/app3c (26041): Uncaught SyntaxError: Unexpected token ) at tab1.js : 1
01-30 14:29:35.754 E/app3c (26041): Uncaught SyntaxError: Unexpected token ) at tab2.js : 1
01-30 14:29:35.756 E/app3c (26041): Uncaught SyntaxError: Unexpected identifier at tab3.js : 1
01-30 14:29:35.758 E/app3c (26041): Uncaught SyntaxError: Unexpected token ) at home.html : 35

请问 如何给全局引入一个样式

我做页面的时候 body浏览器默认样式是margin:8px 想去掉这个默认样式,在index.html的head头里加了reset.css没有用 请问 如何解决这个问题?

vue组件调用问题

dialog组件 的组件调用 在当前页面写了Vue.use(dialog) 不能使用,想请问一下这个全局注册怎么注册。下面这种组件调用的方式只能用于函数,不能用于dialog的组件调用(就是写在页面里,因为我要自定义内容)
import { Dialog } from "vant"; export default { components: { Dialog } }
image

找到官方的解释
image

请问怎么解决呢?

热更新问题

请问下:比如需要热更新如何弄?目前如果需要实时的使用AppLoader调试的话 就得先npm run build才能更新?

下拉刷新bug

+ 搭配使用的时候, 下拉只能在展示的cell时下拉才有效果,如果cell只有一个,在空白区域下拉是没有效果的,只能在点击cell的时候下拉,请问这个有没有办法解决一下呢.?

如何真机调试?

按照说明 步骤都走完,并且自定义loader也链接到wifi,但是一直没有更新代码。。

关于头部传参的问题

home.vue自定义了一个header组件,头部组件可以动态显示当前页面名称,请问,头部下面的页面都是openFrameGroup打开的,怎么动态控制头部组件在不同页面动态显示不同的名称?

pages文件多编译卡

请问关于pages文件下vue文件过多的时候,dev编译很久都不动,有没有解决的办法呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.