coremodular-ui-map
v1.0.3
Published
CoreModular前端地图组件库
Downloads
149
Readme
CoreModular.UI.Map
CoreModular.UI 基于 Vue2 全家桶+ElementUI 开发,仅用于测试! 模块通过 npm 私服分发与集成,极大的提高了模块的复用。
感谢大神老李(iamoldli)!
启动
npm i
npm run serve
安装
npm install -S coremodular-ui-map
注册
在模块的 callback 函数中进行注册
import './api'
import store from './store'
import routes from './routes'
import components from './components'
import module from './module'
export default {
module,
routes,
store,
components,
callback({ Vue }) {
// 附件上传地址
Vue.prototype.$attachment = {
// 上传地址
uploadUrl: $api.common.attachment.getUploadUrl(),
// 下载方法
download(id) {
$api.common.attachment.download(id)
}
}
},
callback({ Vue }) {
NetModularMap.init(Vue, { ak: '百度地图Key' })
}
}
坐标拾取组件
<nm-form-page v-bind="form">
<el-row>
<el-col :span="10" :offset="1">
<el-form-item label="坐标:" prop="point">
<nm-map-coord-picking v-model="form.model.point" />
</el-form-item>
<el-form-item label="允许手动输入坐标:" prop="point">
<nm-map-coord-picking v-model="form.model.point1" allow-input />
</el-form-item>
<el-form-item label="禁用:" prop="point">
<nm-map-coord-picking v-model="form.model.point1" disabled />
</el-form-item>
<el-form-item label="设置精度:" prop="point">
<nm-map-coord-picking v-model="form.model.point2" :precision="8" />
</el-form-item>
</el-col>
</el-row>
</nm-form-page>