Browse Source

文件修改

huangyan 9 months ago
parent
commit
17195226ca

+ 0 - 1
src/view/contents/Detail.vue

@@ -27,7 +27,6 @@
 import {onBeforeMount, reactive, ref} from 'vue';
 import {useRoute, useRouter} from 'vue-router'
 import contents from "../../api/contents.js";
-import Editor from "../editor.vue";
 import {ElMessage} from "element-plus";
 import EditorWithBinding from "../EditorWithBinding.vue";
 

+ 1 - 1
src/view/contents/contents.vue

@@ -73,7 +73,7 @@ const toggleUpload = () => {
 const searchForm = reactive({
   page: 1,
   size: 5,
-  desc: ''
+  desc: 'created_at desc'
 })
 // 获取资源列表
 const getRecruitAll = async () => {

+ 0 - 64
src/view/editor.vue

@@ -1,64 +0,0 @@
-<template>
-  <div style="border: 1px solid #ccc">
-    <Toolbar
-        style="border-bottom: 1px solid #ccc"
-        :editor="editorRef"
-        :defaultConfig="toolbarConfig"
-        :mode="mode"
-    />
-    <Editor
-        style="height: 500px; overflow-y: hidden;"
-        v-model="valueHtml"
-        :defaultConfig="editorConfig"
-        :mode="mode"
-        @onCreated="handleCreated"
-    />
-  </div>
-</template>
-<script>
-import '@wangeditor/editor/dist/css/style.css' // 引入 css
-
-import {onBeforeUnmount, ref, shallowRef, onMounted} from 'vue'
-import {Editor, Toolbar} from '@wangeditor/editor-for-vue'
-
-export default {
-  components: {Editor, Toolbar},
-  setup() {
-    // 编辑器实例,必须用 shallowRef
-    const editorRef = shallowRef()
-
-    // 内容 HTML
-    const valueHtml = ref('<p>hello</p>')
-
-    // 模拟 ajax 异步获取内容
-    onMounted(() => {
-      setTimeout(() => {
-        valueHtml.value = '<p>模拟 Ajax 异步设置内容</p>'
-      }, 1500)
-    })
-
-    const toolbarConfig = {}
-    const editorConfig = {placeholder: '请输入内容...'}
-
-    // 组件销毁时,也及时销毁编辑器
-    onBeforeUnmount(() => {
-      const editor = editorRef.value
-      if (editor == null) return
-      editor.destroy()
-    })
-
-    const handleCreated = (editor) => {
-      editorRef.value = editor // 记录 editor 实例,重要!
-    }
-
-    return {
-      editorRef,
-      valueHtml,
-      mode: 'default', // 或 'simple'
-      toolbarConfig,
-      editorConfig,
-      handleCreated
-    };
-  }
-}
-</script>

+ 0 - 3
src/view/news/add.vue

@@ -42,8 +42,6 @@
 <script setup>
 import { onBeforeMount, onMounted, reactive ,ref} from 'vue';
 import { useRoute, useRouter } from 'vue-router'
-import product from "../../api/product.js";
-import Editor from "../editor.vue";
 import { ElMessage } from "element-plus";
 import EditorWithBinding from "../EditorWithBinding.vue";
 import news from '../../api/news.js';
@@ -54,7 +52,6 @@ const router = useRouter();
 const newsDetail = reactive({
   ID: '',
   detail: '',
-  synopsis: '',
   image: '',
   is_active: '',
   is_index: '',

+ 1 - 1
src/view/news/news.vue

@@ -89,7 +89,7 @@ const toggleUpload = () => {
 const searchForm = reactive({
   page: 1,
   size: 5,
-  desc: ''
+  desc: 'created_at desc'
 })
 // 获取资源列表
 const getNewsAll = async () => {

+ 0 - 1
src/view/product/Detail.vue

@@ -46,7 +46,6 @@
 import {onBeforeMount, reactive} from 'vue';
 import {useRoute, useRouter} from 'vue-router'
 import product from "../../api/product.js";
-import Editor from "../editor.vue";
 import {ElMessage} from "element-plus";
 import EditorWithBinding from "../EditorWithBinding.vue";
 

+ 1 - 1
src/view/product/product.vue

@@ -113,7 +113,7 @@ const toggleUpload = () => {
 const searchForm = reactive({
   page: 1,
   size: 5,
-  desc: ''
+  desc: 'created_at desc'
 })
 // 获取资源列表
 const getProductAll = async () => {

+ 1 - 1
src/view/resource/Index.vue

@@ -74,7 +74,7 @@ const toggleUpload = () => {
 const searchForm = reactive({
   page: 1,
   size: 5,
-  desc: ''
+  desc: 'created_at desc'
 })
 // 获取资源列表
 const getResourceList = async () => {

+ 0 - 1
src/view/serve/add.vue

@@ -56,7 +56,6 @@
 import {onMounted, reactive, ref} from 'vue';
 import {useRoute, useRouter} from 'vue-router'
 import serve from "../../api/serve.js";
-import Editor from "../editor.vue";
 import {ElMessage} from "element-plus";
 import {Plus} from "@element-plus/icons-vue";
 import resource from "../../api/resource.js";

+ 1 - 1
src/view/serve/serves.vue

@@ -68,7 +68,7 @@ const toggleUpload = () => {
 const searchForm = reactive({
   page: 1,
   size: 5,
-  desc: ''
+  desc: 'created_at desc'
 })
 const ServeType = reactive([{}])
 // 获取资源列表