UNPKG

sohelp-ele

Version:

SohelpEle Library

145 lines (144 loc) 4.15 kB
(function() { "use strict"; try { if (typeof document != "undefined") { var elementStyle = document.createElement("style"); elementStyle.appendChild(document.createTextNode("")); document.head.appendChild(elementStyle); } } catch (e) { console.error("vite-plugin-css-injected-by-js", e); } })(); var render = function() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c("div", [_c("el-select", _vm._g(_vm._b({ ref: "selectRef", attrs: { "value": _vm.value, "clearable": _vm.clearable }, on: { "update:value": function($event) { _vm.value = $event; } } }, "el-select", _vm.$attrs, false), _vm.$listeners), _vm._l(_vm.options, function(item) { return _c("el-option", { key: item.value, attrs: { "label": item.label, "value": _vm.keyValue && item[_vm.keyValue] ? item[_vm.keyValue] : item.value } }); }), 1)], 1); }; var staticRenderFns = []; var index_vue_vue_type_style_index_0_scoped_true_lang = ""; function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports; if (render2) { options.render = render2; options.staticRenderFns = staticRenderFns2; options._compiled = true; } if (functionalTemplate) { options.functional = true; } if (scopeId) { options._scopeId = "data-v-" + scopeId; } var hook; if (moduleIdentifier) { hook = function(context) { context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") { context = __VUE_SSR_CONTEXT__; } if (injectStyles) { injectStyles.call(this, context); } if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier); } }; options._ssrRegister = hook; } else if (injectStyles) { hook = shadowMode ? function() { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ); } : injectStyles; } if (hook) { if (options.functional) { options._injectStyles = hook; var originalRender = options.render; options.render = function renderWithStyleInjection(h, context) { hook.call(context); return originalRender(h, context); }; } else { var existing = options.beforeCreate; options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; } } return { exports: scriptExports, options }; } const __vue2_script = { name: "SohelpDictSelect", props: { dict: { type: String, value: "" }, clearable: { type: Boolean, default: true }, params: [String, Object], value: [String, Number, Array], keyValue: String }, data() { return { baseParams: {}, options: [] }; }, methods: { load(_params) { Object.assign(this.baseParams, this.params); Object.assign(this.baseParams, { dictName: this.dict }); Object.assign(this.baseParams, _params); SohelpHttp.get("/admin/system/dict/category/getDataList", this.baseParams).then((res) => { if (res.meta.success) { this.options = res.data; } else { this.$message.error(res.meta.message); } }); }, reload(_params) { Object.assign(this.baseParams, _params); this.load(this.baseParams); }, refresh() { this.reload({}); } }, mounted() { this.load({}); } }; const __cssModules = {}; var __component__ = /* @__PURE__ */ normalizeComponent( __vue2_script, render, staticRenderFns, false, __vue2_injectStyles, "84ced57c", null, null ); function __vue2_injectStyles(context) { for (let o in __cssModules) { this[o] = __cssModules[o]; } } var index = /* @__PURE__ */ function() { return __component__.exports; }(); export { index as default };