12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <!-- 编辑器-基础 -->
- <div>
- <toolbar v-if="info"></toolbar>
- </div>
- </template>
- <script>
- import Toolbar from "./Toolbar";
- import { mapGetters } from "vuex";
- import { getWorkInfo } from "@/api";
- export default {
- name: "EditorBase",
- components: {
- Toolbar,
- },
- data() {
- return {
- isInit: false,
- };
- },
- computed: {
- ...mapGetters({
- // info: "info",
- info: "base/baseInfo",
- }),
- },
- watch: {
- // info: {
- // handler(newVal, oldVal) {
- // if (newVal && !this.isInit) {
- // this.isInit = true;
- // this.getSettingsInfo();
- // }
- // },
- // },
- },
- methods: {
- getSettingsInfo() {
- // this.$store.commit("base/setData", this.info);
- getWorkInfo(
- {},
- (res) => {
- let data = res.data;
- this.$store.commit("base/setData", data);
- },
- () => {}
- );
- },
- },
- mounted() {
- this.getSettingsInfo();
- },
- };
- </script>
- <style lang="less">
- input::placeholder,
- textarea::placeholder {
- font-size: 14px;
- color: #505050 !important;
- }
- </style>
|