feat: 富文本-内容CMS
This commit is contained in:
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/mountainPeak/index.js
vendored
2
dist/pages/mountainPeak/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/mountainPeak/index.js.LICENSE.txt
vendored
2
dist/pages/mountainPeak/index.js.LICENSE.txt
vendored
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
/*! ../wxs/utils */
|
/*! ../wxs/utils */
|
||||||
|
|
||||||
|
/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/sidebar */
|
/*! @antmjs/vantui/es/sidebar */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/sidebar-item */
|
/*! @antmjs/vantui/es/sidebar-item */
|
||||||
|
|||||||
1
dist/pages/mountainPeak/index.wxss
vendored
1
dist/pages/mountainPeak/index.wxss
vendored
@@ -10,7 +10,6 @@
|
|||||||
!*** css ./node_modules/cache-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[3]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[5]!./src/pages/mountainPeak/index.scss ***!
|
!*** css ./node_modules/cache-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[3]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[5]!./src/pages/mountainPeak/index.scss ***!
|
||||||
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
.peakContent {
|
.peakContent {
|
||||||
background-color: yellow;
|
|
||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ const Home = () => {
|
|||||||
console.log("res", res);
|
console.log("res", res);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
getTable(objParams)
|
|
||||||
|
|
||||||
getTableid(objParams);
|
getTableid(objParams);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.peakContent{
|
.peakContent{
|
||||||
background-color: yellow;
|
// background-color: yellow;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import { RichText, View } from "@tarojs/components";
|
import { RichText, View } from "@tarojs/components";
|
||||||
import react from "react";
|
import react, { useEffect, useState } from "react";
|
||||||
import { Sidebar, SidebarItem } from "@antmjs/vantui";
|
import { Sidebar, SidebarItem } from "@antmjs/vantui";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import {test} from '../../utils/index'
|
import { getTable } from "../../utils/index";
|
||||||
|
|
||||||
|
|
||||||
const mountainPeak = () => {
|
const mountainPeak = () => {
|
||||||
|
const [dataSource, setdataSource] = useState<any>([]);
|
||||||
const state: any = {
|
const state: any = {
|
||||||
nodes: [
|
nodes: [
|
||||||
{
|
{
|
||||||
@@ -23,9 +23,23 @@ const mountainPeak = () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let objParams2 = {
|
||||||
|
tableName: "cityNew",
|
||||||
|
id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||||
|
okFun: (res) => {
|
||||||
|
console.log("res", res);
|
||||||
|
setdataSource(res?.data ?? []);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
// getTable(objParams)
|
||||||
|
getTable(objParams2);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={`peakContent`}>
|
<View className={`peakContent`}>
|
||||||
{" "}
|
{/* 边栏 */}
|
||||||
<Sidebar activeKey={0}>
|
<Sidebar activeKey={0}>
|
||||||
<SidebarItem title="梧桐山" />
|
<SidebarItem title="梧桐山" />
|
||||||
<SidebarItem title="梧桐山" />
|
<SidebarItem title="梧桐山" />
|
||||||
@@ -35,14 +49,14 @@ const mountainPeak = () => {
|
|||||||
<SidebarItem title="梧桐山" />
|
<SidebarItem title="梧桐山" />
|
||||||
<SidebarItem title="梧桐山" />
|
<SidebarItem title="梧桐山" />
|
||||||
<SidebarItem title="梧桐山" />
|
<SidebarItem title="梧桐山" />
|
||||||
<SidebarItem title="标签名" />
|
<SidebarItem title="梧桐山" />
|
||||||
<SidebarItem title="标签名" />
|
<SidebarItem title="梧桐山" />
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
<View onClick={()=>{
|
|
||||||
test()
|
{/* 富文本 */}
|
||||||
}}>
|
<View onClick={() => {}}>
|
||||||
{" "}
|
<View>{dataSource?.[0]?.actTitle}</View>
|
||||||
<RichText nodes={state.nodes} />
|
<RichText nodes={dataSource?.[0]?.richText} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user