parent
9d8e500f53
commit
5dd3fa9859
@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div class="gDict">
|
||||||
|
<!--<g-dict :options="idTypeList" :value="scope.row.labelId"></g-dict>-->
|
||||||
|
<template v-for="(item, index) in options">
|
||||||
|
<template v-if="values.includes(item.value)">
|
||||||
|
<span :key="item.value" :index="index">{{ item.label }}</span>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: [Number, String, Array],
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
values() {
|
||||||
|
if (this.value !== null && typeof this.value !== "undefined") {
|
||||||
|
return Array.isArray(this.value) ? this.value : [String(this.value)];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<div class="gUpload">
|
||||||
|
<el-upload
|
||||||
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
>
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</el-upload>
|
||||||
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
|
<img width="100%" :src="dialogImageUrl" alt="" />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogImageUrl: "",
|
||||||
|
dialogVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleRemove(file, fileList) {
|
||||||
|
console.log(file, fileList);
|
||||||
|
},
|
||||||
|
handlePictureCardPreview(file) {
|
||||||
|
this.dialogImageUrl = file.url;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,14 @@
|
|||||||
|
const install = (Vue) => {
|
||||||
|
//改变table header的背景色
|
||||||
|
Vue.prototype.$tableHeaderColor = ({
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
rowIndex,
|
||||||
|
columnIndex,
|
||||||
|
}) => {
|
||||||
|
if (rowIndex === 0) {
|
||||||
|
return "padding:10px 0;background-color: #F5F7FA; color: #303133; font-size: 14px; font-weight: 600;border-bottom:solid 1px #EAEEF6;";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export default install;
|
Loading…
Reference in new issue