diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d42e529 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +/unpackage/dist/ \ No newline at end of file diff --git a/main.js b/main.js index afc6b08..1083f8e 100644 --- a/main.js +++ b/main.js @@ -1,21 +1,14 @@ +import Vue from 'vue' import App from './App' +import store from './store' +import uView from 'uview-ui'; -// #ifndef VUE3 -import Vue from 'vue' +Vue.use(uView) +Vue.prototype.$store=store Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ - ...App + ...App, + store, }) -app.$mount() -// #endif - -// #ifdef VUE3 -import { createSSRApp } from 'vue' -export function createApp() { - const app = createSSRApp(App) - return { - app - } -} -// #endif \ No newline at end of file +app.$mount() \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index d08b32c..8f40ee2 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,15 +1,32 @@ { - "name": "plant_manage_mobile", - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/uview-ui": { - "version": "2.0.35", - "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", - "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==", - "engines": { - "HBuilderX": "^3.1.0" - } - } - } + "name": "plant_manage_mobile", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/uni-pages-hot-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/uni-pages-hot-modules/-/uni-pages-hot-modules-0.1.3.tgz", + "integrity": "sha512-2nZ6XeHkLtdNLCSDl+/N9+SiXvcLbULyRBHBMyvs5sK9AUfexVlpJZT6InqKYv1DuCZm/+g7HL43f/qvTWqB9Q==", + "dependencies": { + "callsites": "^3.1.0" + } + }, + "node_modules/uview-ui": { + "version": "2.0.35", + "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", + "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==", + "engines": { + "HBuilderX": "^3.1.0" + } + } + } } diff --git a/package-lock.json b/package-lock.json index 715a5e2..193d709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,27 +1,60 @@ { - "name": "plant_manage_mobile", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "uview-ui": "^2.0.35" - } - }, - "node_modules/uview-ui": { - "version": "2.0.35", - "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", - "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==", - "engines": { - "HBuilderX": "^3.1.0" - } - } - }, - "dependencies": { - "uview-ui": { - "version": "2.0.35", - "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", - "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==" - } - } + "name": "plant_manage_mobile", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "plant_manage_mobile", + "version": "1.0.0", + "dependencies": { + "uni-pages-hot-modules": "^0.1.1", + "uview-ui": "^2.0.33" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/uni-pages-hot-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/uni-pages-hot-modules/-/uni-pages-hot-modules-0.1.3.tgz", + "integrity": "sha512-2nZ6XeHkLtdNLCSDl+/N9+SiXvcLbULyRBHBMyvs5sK9AUfexVlpJZT6InqKYv1DuCZm/+g7HL43f/qvTWqB9Q==", + "dependencies": { + "callsites": "^3.1.0" + } + }, + "node_modules/uview-ui": { + "version": "2.0.35", + "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", + "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==", + "engines": { + "HBuilderX": "^3.1.0" + } + } + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "uni-pages-hot-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/uni-pages-hot-modules/-/uni-pages-hot-modules-0.1.3.tgz", + "integrity": "sha512-2nZ6XeHkLtdNLCSDl+/N9+SiXvcLbULyRBHBMyvs5sK9AUfexVlpJZT6InqKYv1DuCZm/+g7HL43f/qvTWqB9Q==", + "requires": { + "callsites": "^3.1.0" + } + }, + "uview-ui": { + "version": "2.0.35", + "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz", + "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==" + } + } } diff --git a/package.json b/package.json index 888cf7d..ffa7d73 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,9 @@ { - "dependencies": { - "uview-ui": "^2.0.35" - } + "name":"plant_manage_mobile", + "version":"1.0.0", + "main":"main.js", + "dependencies": { + "uni-pages-hot-modules": "^0.1.1", + "uview-ui": "^2.0.33" + } } diff --git a/pages.js b/pages.js new file mode 100644 index 0000000..9291c8a --- /dev/null +++ b/pages.js @@ -0,0 +1,18 @@ +const {hot} = require('uni-pages-hot-modules') + +module.exports = hot((pagesJson)=>{ + return{ + ...pagesJson, + pages:[ + { + "path":"pages/index/index", + "style":{ + "navigationBarTitleText":"种植管理", + "app-plus":{ + "titleNView":true + } + } + } + ] + } +}) \ No newline at end of file diff --git a/pages.json b/pages.json index 869105d..49980e8 100644 --- a/pages.json +++ b/pages.json @@ -1,12 +1,7 @@ { - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "uni-app" - } - } - ], + "easycom":{ + "^u-(.*)":"uview-ui/components/u-$1/u-$1.vue" + }, "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/index/index.vue b/pages/index/index.vue index ec0ec26..3f2ba30 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,9 +1,35 @@ + @@ -15,38 +41,10 @@ } }, onLoad() { - + }, methods: { } } - - diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..d949370 --- /dev/null +++ b/store/index.js @@ -0,0 +1,10 @@ +import Vue from 'vue' +import Vuex from 'vuex' +Vue.use(Vuex) + +export default new Vuex.Store({ + state:{}, + getters:{}, + mutations:{}, + actions:{} +}) \ No newline at end of file diff --git a/uni.scss b/uni.scss index a05adb4..3bedfa4 100644 --- a/uni.scss +++ b/uni.scss @@ -74,3 +74,5 @@ $uni-color-subtitle: #555555; // 二级标题颜色 $uni-font-size-subtitle:26px; $uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-font-size-paragraph:15px; + +@import 'uview-ui/theme.scss' \ No newline at end of file