mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
update dependencies (#1180)
This commit is contained in:
parent
ae8dcf0b28
commit
cf5922aacc
@ -2,8 +2,7 @@ import Vue from 'vue';
|
|||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import routes from './router';
|
import routes from './router';
|
||||||
import VantDoc, { progress } from 'vant-doc';
|
import VantDoc, { progress } from '@vant/doc';
|
||||||
import { syncPath } from './utils';
|
|
||||||
|
|
||||||
Vue.use(VueRouter).use(VantDoc);
|
Vue.use(VueRouter).use(VantDoc);
|
||||||
|
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
function iframeReady(iframe, callback) {
|
|
||||||
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
||||||
const interval = () => {
|
|
||||||
if (iframe.contentWindow.switchImage) {
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
setTimeout(() => {
|
|
||||||
interval();
|
|
||||||
}, 50);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (doc.readyState === 'complete') {
|
|
||||||
interval();
|
|
||||||
} else {
|
|
||||||
iframe.onload = interval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function syncPath(path) {
|
|
||||||
const iframe = document.querySelector('iframe');
|
|
||||||
iframeReady(iframe, () => {
|
|
||||||
iframe.contentWindow.switchImage(path);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
syncPath,
|
|
||||||
iframeReady
|
|
||||||
};
|
|
26
package.json
26
package.json
@ -22,16 +22,17 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/youzan/vant-weapp#readme",
|
"homepage": "https://github.com/youzan/vant-weapp#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.6",
|
"@babel/core": "^7.2.2",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/preset-env": "^7.1.6",
|
"@babel/preset-env": "^7.2.3",
|
||||||
"@babel/preset-typescript": "^7.1.0",
|
"@babel/preset-typescript": "^7.1.0",
|
||||||
"@vant/icons": "^1.0.2",
|
"@vant/doc": "^1.0.21",
|
||||||
"autoprefixer": "^9.3.1",
|
"@vant/icons": "^1.0.3",
|
||||||
|
"autoprefixer": "^9.4.3",
|
||||||
"babel-loader": "8.0.4",
|
"babel-loader": "8.0.4",
|
||||||
"cross-env": "^5.1.4",
|
"cross-env": "^5.1.4",
|
||||||
"css-loader": "^1.0.1",
|
"css-loader": "^2.1.0",
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^5.11.1",
|
||||||
"eslint-plugin-vue-libs": "^3.0.0",
|
"eslint-plugin-vue-libs": "^3.0.0",
|
||||||
"fast-vue-md-loader": "^1.0.3",
|
"fast-vue-md-loader": "^1.0.3",
|
||||||
"gh-pages": "^2.0.1",
|
"gh-pages": "^2.0.1",
|
||||||
@ -43,18 +44,17 @@
|
|||||||
"gulp-postcss": "^8.0.0",
|
"gulp-postcss": "^8.0.0",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"less": "^3.8.1",
|
"less": "^3.9.0",
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"progress-bar-webpack-plugin": "^1.11.0",
|
"progress-bar-webpack-plugin": "^1.11.0",
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^0.23.1",
|
||||||
"typescript": "^3.1.6",
|
"typescript": "^3.2.2",
|
||||||
"vant-doc": "^1.0.19",
|
"vue": "2.5.21",
|
||||||
"vue": "2.5.17",
|
|
||||||
"vue-loader": "^15.4.2",
|
"vue-loader": "^15.4.2",
|
||||||
"vue-router": "^3.0.2",
|
"vue-router": "^3.0.2",
|
||||||
"vue-template-compiler": "2.5.17",
|
"vue-template-compiler": "2.5.21",
|
||||||
"webpack": "^4.26.1",
|
"webpack": "^4.28.3",
|
||||||
"webpack-cli": "^3.1.2",
|
"webpack-cli": "^3.1.2",
|
||||||
"webpack-serve": "^2.0.3"
|
"webpack-serve": "^2.0.3"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user