@sdml/ui-map
v1.0.1
Published
前端地图组件库
Downloads
2
Readme
@sdml/ui-Map
文档说明
安装
npm install -S @sdml/ui-map
注册
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 }) {
Map.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>
h