111' : ""}
- return value.indexOf("▫️ ") !== -1 ?`${type === "ol" ? numbers[newArray.indexOf(value)] : "▫️ "}${value.replace('▫️ ','')}
`:`\t${value}
`;
+ return value.indexOf("▫️ ") !== -1
+ ? `${
+ type === "ol" ? numbers[newArray.indexOf(value)] : "▫️ "
+ }${value.replace("▫️ ", "")}
`
+ : `\t${value}
`;
})
.join("");
// return `1️⃣`
console.log("string===>", string);
-
+
return `${string}`;
};
@@ -146,22 +158,54 @@ const markTextStr = marked(
相信我
`
);
+
+
// export default class Index extends Component {
const Index = () => {
const [markText, setmarkText] = useState(null);
+
+ const editorReady = (e) => {
+ Taro.createSelectorQuery()
+ .select("#editor")
+ .context((res) => {
+ this.editorCtx = res.context;
+ })
+ .exec();
+ };
+
+ const onConfirm = (onConfirmtxt) => {
+ console.log("onConfirmtxt--->",onConfirmtxt.detail.value);
+ };
+ const onBlur = (onBlurtxt) => {
+ console.log("onBlurtxt--->", onBlurtxt.detail.value);
+ setmarkText(marked(onBlurtxt.detail.value))
+ };
+
const onBridgeReady = () => {
WeixinJSBridge.call("hideOptionMenu");
};
useEffect(() => {
// console.log("markTextStr=>", markTextStr);
- // setmarkText(markTextStr);
+ setmarkText(marked(markTextStr));
}, []);
return (
-
+
+
+
+
);
};
diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss
index da6031b..3833c11 100644
--- a/src/pages/index/index.scss
+++ b/src/pages/index/index.scss
@@ -1,18 +1,22 @@
-html,body{
- user-select: auto
+html,
+body {
+ user-select: auto;
}
.index {
-// font-size: 28px;
-user-select:auto;
-font-size: 16px;
+ // font-size: 28px;
+ user-select: auto;
+ font-size: 16px;
+ display: flex;
+ flex-direction: row;
+ padding: 30px;
-.payBtn{
- // font-size: 30px;
- margin-left: 20px;
- top: 10px;
-}
+ .left {
+ width: 50%;
+ height: 500px;
+ // background-color: yellow;
+ }
-.lastWord{
- font-size: 25px;
-}
+ .right {
+ flex: 1;
+ }
}