@varonervar/components
Version:
> 基于[Element-UI](https://element.eleme.cn/#/zh-CN/component/quickstart) 封装常用组件,部分组件参考[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
224 lines (198 loc) • 5.01 kB
JavaScript
(window["webpackJsonpELEMENT"] = window["webpackJsonpELEMENT"] || []).push([[1],{
/***/ 16:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
;
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-object-show/body/ZarrayShow.vue?vue&type=template&id=1709d26c&
var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{ staticClass: "array-show" },
[
_c("ZTable", {
attrs: {
"table-data": _vm.list,
"options-label": "操作",
"max-height": "670px",
"is-show-pagination": false,
"table-format": _vm.tableFormat,
},
scopedSlots: _vm._u([
{
key: "options",
fn: function (ref) {
var row = ref.row
return [
_c("div", { staticClass: "text-center" }, [
_c(
"span",
{
staticClass: "blue pointer",
on: {
click: function ($event) {
return _vm.checkDetail(row)
},
},
},
[_vm._v("查看详情")]
),
]),
]
},
},
]),
}),
_c(
"el-dialog",
{
attrs: {
visible: _vm.dialogVisible,
"close-on-click-modal": false,
title: _vm.dialogTitle,
"append-to-body": true,
top: "50px",
width: "80vw",
},
on: {
"update:visible": function ($event) {
_vm.dialogVisible = $event
},
},
},
[
_vm.dialogVisible
? _c("ZObjectShow", { attrs: { data: _vm.subData } })
: _vm._e(),
_c(
"footer",
{ staticClass: "dialog-footer text-right" },
[
_c(
"el-button",
{
attrs: { size: "small" },
on: {
click: function ($event) {
_vm.dialogVisible = false
},
},
},
[_vm._v("关 闭")]
),
],
1
),
],
1
),
],
1
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/z-object-show/body/ZarrayShow.vue?vue&type=template&id=1709d26c&
// EXTERNAL MODULE: ./packages/z-table/index.js + 5 modules
var z_table = __webpack_require__(2);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/z-object-show/body/ZarrayShow.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ZarrayShowvue_type_script_lang_js_ = ({
name: 'ZarrayShow',
inheritAttrs: false,
props: {
list: {
type: Array,
required: true
}
},
data() {
return {
dialogVisible: false,
// 弹窗显隐
subData: {},
// 弹窗数据
tableFormat: [],
dialogTitle: '查看详情'
};
},
methods: {
// 打开弹窗
checkDetail(row) {
this.subData = row;
this.dialogVisible = true;
}
},
created() {
const item = this.list[0];
if (item) {
Object.entries(item).forEach(_ref => {
let [key, value] = _ref;
// 第一个子项中,数据为null算它运气不好,不显示了
if (typeof value !== 'object') {
const obj = {
prop: key,
label: value
};
this.tableFormat.push(obj);
}
});
}
},
components: {
ZTable: z_table["a" /* default */],
ZObjectShow: () => Promise.resolve(/* import() */).then(__webpack_require__.bind(null, 4))
}
});
// CONCATENATED MODULE: ./packages/z-object-show/body/ZarrayShow.vue?vue&type=script&lang=js&
/* harmony default export */ var body_ZarrayShowvue_type_script_lang_js_ = (ZarrayShowvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./packages/z-object-show/body/ZarrayShow.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
body_ZarrayShowvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var ZarrayShow = __webpack_exports__["default"] = (component.exports);
/***/ })
}]);