@zpc_npm/vue-iclient-common
Version:
KQGIS iClient for Vue.js
265 lines (240 loc) • 9.51 kB
JavaScript
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* reexport */ ToolBox; }
});
;// CONCATENATED MODULE: external "vue"
var external_vue_namespaceObject = require("vue");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/util"
var util_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/util");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-icons"
var vue_iclient_icons_namespaceObject = require("@zpc_npm/vue-iclient-icons");
;// CONCATENATED MODULE: external "@element-plus/icons-vue"
var icons_vue_namespaceObject = require("@element-plus/icons-vue");
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/common/toolbox/ToolBox.vue?vue&type=script&setup=true&lang=js
const _hoisted_1 = {
class: "title"
};
const _hoisted_2 = {
class: "childItems"
};
const _hoisted_3 = ["onClick"];
const _hoisted_4 = {
class: "tit"
};
const __default__ = {
name: "KqToolBox"
};
/* harmony default export */ var ToolBoxvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
props: {
showShadow: {
type: Boolean,
default: false
},
/**
* 例:"center", {top:'16px',left:'16px'}, {top:16,left:16}
*/
position: [String, Object],
tools: {
type: Array,
default: () => [{
label: "常用",
children: [{
label: "常用",
icon: vue_iclient_icons_namespaceObject.IconToolBox,
value: "ToolCommon"
}, {
label: "测量",
icon: vue_iclient_icons_namespaceObject.IconMeasure2D,
value: "ToolMeasure"
}, {
label: "定位",
icon: vue_iclient_icons_namespaceObject.IconLocation,
value: "ToolLocation"
}, {
label: "绘图面板",
icon: vue_iclient_icons_namespaceObject.IconEdit,
value: "ToolDrawPanel"
}, {
label: "选图",
icon: vue_iclient_icons_namespaceObject.IconSelectLayer,
value: "ToolSelectLayer"
}]
}, {
label: "对比",
children: [{
label: "滤镜",
icon: vue_iclient_icons_namespaceObject.IconFilter,
value: "ToolFilter"
}, {
label: "时间轴",
icon: vue_iclient_icons_namespaceObject.IconTimeBar,
value: "ToolTimeBar"
}]
}, {
label: "更新",
children: [{
label: "数据编辑",
icon: icons_vue_namespaceObject.Edit,
value: "ToolEdit"
}, {
label: "添加数据",
icon: vue_iclient_icons_namespaceObject.IconAddData,
value: "ToolAddData"
}]
}, {
label: "分析",
children: [{
label: "叠置分析",
icon: vue_iclient_icons_namespaceObject.IconOverlayAnalysis,
value: "ToolAnaPane"
}]
}, {
label: "出图",
children: [{
label: "截图",
icon: vue_iclient_icons_namespaceObject.IconScreenshot,
value: "ToolScreenshot"
}, {
label: "打印",
icon: vue_iclient_icons_namespaceObject.IconPrint,
value: "ToolPrint"
}, {
label: "服务端打印",
icon: vue_iclient_icons_namespaceObject.IconPrint,
value: "ToolWebPrint"
}]
}, {
label: "渲染",
children: [{
label: "行政区遮罩",
icon: vue_iclient_icons_namespaceObject.IconXzqCover,
value: "ToolXZQCover"
}]
}]
}
},
emits: ["select"],
setup(__props, {
emit
}) {
const props = __props;
/**
* @description 监听工具箱选择变化
* @param {Object} item - childItem
*/
const onSelectTools = item => {
let tool = item.value;
emit("select", tool);
}; // 组件容器Ref
let boxRef = (0,external_vue_namespaceObject.ref)(null);
(0,external_vue_namespaceObject.onMounted)(() => {
(0,util_namespaceObject.updatePosition)(boxRef.value, props);
});
return (_ctx, _cache) => {
const _component_kq_icon = (0,external_vue_namespaceObject.resolveComponent)("kq-icon");
return (0,external_vue_namespaceObject.openBlock)(), (0,external_vue_namespaceObject.createElementBlock)("section", {
class: (0,external_vue_namespaceObject.normalizeClass)(["kq-tool-box", __props.showShadow ? 'shadow' : null]),
ref_key: "boxRef",
ref: boxRef
}, [((0,external_vue_namespaceObject.openBlock)(true), (0,external_vue_namespaceObject.createElementBlock)(external_vue_namespaceObject.Fragment, null, (0,external_vue_namespaceObject.renderList)(__props.tools, item => {
return (0,external_vue_namespaceObject.openBlock)(), (0,external_vue_namespaceObject.createElementBlock)("div", {
class: "item",
key: item.label
}, [(0,external_vue_namespaceObject.createElementVNode)("h4", _hoisted_1, (0,external_vue_namespaceObject.toDisplayString)(item.label), 1
/* TEXT */
), (0,external_vue_namespaceObject.createElementVNode)("div", _hoisted_2, [((0,external_vue_namespaceObject.openBlock)(true), (0,external_vue_namespaceObject.createElementBlock)(external_vue_namespaceObject.Fragment, null, (0,external_vue_namespaceObject.renderList)(item.children, childItem => {
return (0,external_vue_namespaceObject.openBlock)(), (0,external_vue_namespaceObject.createElementBlock)("div", {
class: (0,external_vue_namespaceObject.normalizeClass)(["childItem", childItem.active ? 'active' : null]),
key: childItem.label,
onClick: $event => onSelectTools(childItem)
}, [(0,external_vue_namespaceObject.createVNode)(_component_kq_icon, {
color: "#606266",
size: 16,
class: "icon"
}, {
default: (0,external_vue_namespaceObject.withCtx)(() => [((0,external_vue_namespaceObject.openBlock)(), (0,external_vue_namespaceObject.createBlock)((0,external_vue_namespaceObject.resolveDynamicComponent)(childItem.icon)))]),
_: 2
/* DYNAMIC */
}, 1024
/* DYNAMIC_SLOTS */
), (0,external_vue_namespaceObject.createElementVNode)("h4", _hoisted_4, (0,external_vue_namespaceObject.toDisplayString)(childItem.label), 1
/* TEXT */
)], 10
/* CLASS, PROPS */
, _hoisted_3);
}), 128
/* KEYED_FRAGMENT */
))])]);
}), 128
/* KEYED_FRAGMENT */
))], 2
/* CLASS */
);
};
}
}));
;// CONCATENATED MODULE: ./src/common/toolbox/ToolBox.vue?vue&type=script&setup=true&lang=js
;// CONCATENATED MODULE: ./src/common/toolbox/ToolBox.vue
const __exports__ = ToolBoxvue_type_script_setup_true_lang_js;
/* harmony default export */ var ToolBox = (__exports__);
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/init.js"
var init_js_namespaceObject = require("@zpc_npm/vue-iclient-common/init.js");
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_namespaceObject);
;// CONCATENATED MODULE: ./src/common/toolbox/index.js
ToolBox.install = (Vue, opts) => {
init_js_default()(Vue, opts);
Vue.component(ToolBox.name, ToolBox);
};
module.exports = __webpack_exports__;
/******/ })()
;