| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <div class="plate">
- <div>
- <ul>
- <li app-border dir-bottom>
- <div class="preview-con">
- <div class="preview">
- <img :src="info.logo||require('@/assets/images/default/img_logo_default.png')" alt="" />
- </div>
- <div class="upload-con">
- <button
- class="ui-button submit"
- @click="$emit('openMaterial'), (param = 'logo')"
- >
- 选择图片
- </button>
- <div class="ui-remark">
- 建议300*300px,600kb以内,支持jpg/png格式
- </div>
- </div>
- </div>
- </li>
- <li>
- <div class="title">显示设置</div>
- <div class="switch-con">
- <span class="title">显示logo</span>
- <switcher
- name="pano"
- :value="info.isLogo"
- @change="onSwitcherChange"
- ></switcher>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </template>
- <script>
- import Switcher from "@/components/shared/Switcher";
- import { mapGetters } from "vuex";
- export default {
- props: ["select"],
- components: {
- Switcher,
- },
- computed: {
- ...mapGetters({
- info: "info",
- }),
- },
- watch: {
- select(newVal) {
- if (newVal) {
- this.info[this.param] = newVal;
- this.info.logoChange = true
- this.select = "";
- }
- },
- },
- data() {
- return {
- param: "",
- };
- },
- methods: {
- onFileChange() {},
- onSwitcherChange(data) {
- this.info.isLogo = data;
- },
- },
- };
- </script>
- <style lang="less" src="./style.less"></style>
- <style lang="less" scoped>
- .preview-con {
- display: flex;
- .preview {
- width: 100px;
- height: 100px;
- overflow: hidden;
- >img{
- max-width: 100px;
- max-height: 100px;
- }
- }
- .upload-con {
- flex: 1;
- .ui-button {
- width: 100%;
- }
- .ui-remark {
- margin-top: 10px;
- width: 100%;
- word-break: keep-all;
- }
- }
- .bars {
- }
- }
- </style>
|