“fcc0bf848abbfb46de150df3b907506c26742a11”上不存在“...api/git@gitcode.net:s920243400/PaddleDetection.git”
提交 def364da 编写于 作者: E esterzhou

update docs (9962)

Signed-off-by: Nesterzhou <ester.zhou@huawei.com>
上级 8c512bd4
...@@ -49,16 +49,18 @@ The following is an example: ...@@ -49,16 +49,18 @@ The following is an example:
```css ```css
/* xxx.css */ /* xxx.css */
.container { .container {
width: 100%;
height: 100%;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.text-container { .text-container {
margin-top: 10px; margin-top: 30px;
flex-direction: column; flex-direction: column;
width: 750px; width: 600px;
height: 50px; height: 70px;
background-color: #09ba07; background-color: #0000FF;
} }
.text-style { .text-style {
width: 100%; width: 100%;
...@@ -100,3 +102,5 @@ export default { ...@@ -100,3 +102,5 @@ export default {
}, },
} }
``` ```
![en-us_image_00000011](figures/en-us_image_00000011.gif)
\ No newline at end of file
...@@ -115,12 +115,10 @@ Add the long press event to the **&lt;canvas&gt;** component. When the event is ...@@ -115,12 +115,10 @@ Add the long press event to the **&lt;canvas&gt;** component. When the event is
```js ```js
// xxx.js // xxx.js
import prompt from '@system.prompt'; import promptAction from '@ohos.promptAction';
export default { export default {
data:{ data:{
dataURL:null, dataURL:null,
antialia: false,
porc:'open',
}, },
onShow(){ onShow(){
let el = this.$refs.canvas1; let el = this.$refs.canvas1;
...@@ -131,7 +129,7 @@ export default { ...@@ -131,7 +129,7 @@ export default {
let el = this.$refs.canvas1 let el = this.$refs.canvas1
let dataUrl = el.toDataURL() let dataUrl = el.toDataURL()
this.dataURL = dataUrl; this.dataURL = dataUrl;
prompt.showToast({duration:2000,message:"long press,get dataURL"}) promptAction.showToast({duration:2000,message:"long press,get dataURL"})
} }
} }
``` ```
......
...@@ -79,7 +79,7 @@ Set the **scrollamount**, **loop**, and **direction** attributes to define the m ...@@ -79,7 +79,7 @@ Set the **scrollamount**, **loop**, and **direction** attributes to define the m
<div class="tutorial-page"> <div class="tutorial-page">
<div class="mymarquee"> <div class="mymarquee">
<marquee loop="{{loopval}}" scrollamount="{{scroll}}" direction="{{isleft}}" class="marqueetext" id="testmarquee" onclick="makestart"> <marquee loop="{{loopval}}" scrollamount="{{scroll}}" direction="{{isleft}}" class="marqueetext" id="testmarquee" onclick="makestart">
It's a racing lamp Life is a journey, not the destination.
</marquee> </marquee>
</div> </div>
<div style="width: 600px;height: 150px;flex-direction: row;justify-content: space-around;"> <div style="width: 600px;height: 150px;flex-direction: row;justify-content: space-around;">
...@@ -128,7 +128,9 @@ button{ ...@@ -128,7 +128,9 @@ button{
// xxx.js // xxx.js
export default { export default {
private: { private: {
loopval: -1, scroll: 10, isleft: "left", loopval: -1,
scroll: 10,
isleft: "left",
}, },
onInit(){ onInit(){
}, },
...@@ -148,7 +150,7 @@ export default { ...@@ -148,7 +150,7 @@ export default {
> >
> When the value of **loop** is less than or equal to 0, the marquee scrolls continuously. If **loop** is not set, the default value **-1** is used. > When the value of **loop** is less than or equal to 0, the marquee scrolls continuously. If **loop** is not set, the default value **-1** is used.
![en-us_image_0000001276162773](figures/en-us_image_0000001276162773.gif) ![en-us_image_0000001227701867](figures/en-us_image_0000001227701867.gif)
## Example Scenario ## Example Scenario
...@@ -164,7 +166,7 @@ Set **loop** to **1**. When scrolling ends, trigger a **finish** event to increa ...@@ -164,7 +166,7 @@ Set **loop** to **1**. When scrolling ends, trigger a **finish** event to increa
<div class="mymarquee"> <div class="mymarquee">
<marquee style="color: {{color1}}" loop="{{loopval}}" scrollamount="{{scroll}}" direction="{{isleft}}" class="marqueetext" <marquee style="color: {{color1}}" loop="{{loopval}}" scrollamount="{{scroll}}" direction="{{isleft}}" class="marqueetext"
id="testmarquee" onfinish="setfinish"> id="testmarquee" onfinish="setfinish">
It's a racing lamp Life is a journey, not the destination.
</marquee> </marquee>
</div> </div>
<div style="width: 600px;height: 150px;flex-direction: row;justify-content: space-around;"> <div style="width: 600px;height: 150px;flex-direction: row;justify-content: space-around;">
...@@ -233,4 +235,4 @@ export default { ...@@ -233,4 +235,4 @@ export default {
} }
``` ```
![en-us_image_0000001276003541](figures/en-us_image_0000001276003541.gif) ![en-us_image_0000001176075554](figures/en-us_image_0000001176075554.gif)
...@@ -62,7 +62,7 @@ Set the **hint**, **icon**, and **searchbutton** to define the hint text, icon, ...@@ -62,7 +62,7 @@ Set the **hint**, **icon**, and **searchbutton** to define the hint text, icon,
## Adding Styles ## Adding Styles
Set **color**, **placeholder**, and **caret-color** to set the text color, hint text color, and cursor color of the search box. Set **color**, **placeholder-color**, and **caret-color** to set the text color, hint text color, and cursor color of the search box.
```html ```html
...@@ -84,7 +84,9 @@ Set **color**, **placeholder**, and **caret-color** to set the text color, hint ...@@ -84,7 +84,9 @@ Set **color**, **placeholder**, and **caret-color** to set the text color, hint
background-color: #F1F3F5; background-color: #F1F3F5;
} }
search{ search{
color: black; placeholder-color: black; caret-color: red; color: black;
placeholder-color: black;
caret-color: red;
} }
``` ```
...@@ -130,34 +132,34 @@ text{ ...@@ -130,34 +132,34 @@ text{
```js ```js
// index.js // index.js
import prompt from '@system.prompt' import promptAction from '@ohos.promptAction'
export default { export default {
search(e){ search(e){
prompt.showToast({ promptAction.showToast({
message: e.value, message: e.value,
duration: 3000, duration: 3000,
}); });
}, },
translate(e){ translate(e){
prompt.showToast({ promptAction.showToast({
message: e.value, message: e.value,
duration: 3000, duration: 3000,
}); });
}, },
share(e){ share(e){
prompt.showToast({ promptAction.showToast({
message: e.value, message: e.value,
duration: 3000, duration: 3000,
}); });
}, },
change(e){ change(e){
prompt.showToast({ promptAction.showToast({
message: e.value, message: e.value,
duration: 3000, duration: 3000,
}); });
}, },
submit(e){ submit(e){
prompt.showToast({ promptAction.showToast({
message: 'submit', message: 'submit',
duration: 3000, duration: 3000,
}); });
...@@ -216,7 +218,7 @@ In this example, you can select the **&lt;search&gt;**, **&lt;textarea&gt;**, or ...@@ -216,7 +218,7 @@ In this example, you can select the **&lt;search&gt;**, **&lt;textarea&gt;**, or
```js ```js
// index.js // index.js
import prompt from '@system.prompt'; import promptAction from '@ohos.promptAction';
export default { export default {
data: { data: {
showsearch: true, showsearch: true,
...@@ -241,13 +243,13 @@ export default { ...@@ -241,13 +243,13 @@ export default {
} }
}, },
submit(e) { submit(e) {
prompt.showToast({ promptAction.showToast({
message: 'Search!', message: 'Search!',
duration: 2000 duration: 2000
}) })
}, },
change(e) { change(e) {
prompt.showToast({ promptAction.showToast({
message: 'Content:'+ e.text, message: 'Content:'+ e.text,
duration: 2000 duration: 2000
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册