未验证 提交 106f7b66 编写于 作者: O openharmony_ci 提交者: Gitee

!9771 UDMF接口拆分

Merge pull request !9771 from 耿凌霞/cherry-pick-1692255112
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
import dragController from "@ohos.arkui.dragController" import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF'; import UDMF from '@ohos.data.unifiedDataChannel';
import componentSnapshot from '@ohos.arkui.componentSnapshot'; import componentSnapshot from '@ohos.arkui.componentSnapshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import dragController from "@ohos.arkui.dragController" import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF' import UDMF from '@ohos.data.unifiedDataChannel';
import promptAction from '@ohos.promptAction'; import promptAction from '@ohos.promptAction';
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import udmf from '@ohos.data.UDMF'; import udmf from '@ohos.data.unifiedDataChannel';
import udmfType from '@ohos.data.uniformTypeDescriptor';
import promptAction from '@ohos.promptAction'; import promptAction from '@ohos.promptAction';
@Entry @Entry
@Component @Component
...@@ -116,7 +117,7 @@ struct Index { ...@@ -116,7 +117,7 @@ struct Index {
.draggable(true) .draggable(true)
.margin({left: 15}) .margin({left: 15})
.border({color: Color.Black, width: 1}) .border({color: Color.Black, width: 1})
.allowDrop([udmf.UnifiedDataType.IMAGE]) .allowDrop([udmfType.UniformDataType.IMAGE])
.onDrop((dragEvent: DragEvent)=> { .onDrop((dragEvent: DragEvent)=> {
this.getDataFromUdmfRetry(dragEvent, (event)=>{ this.getDataFromUdmfRetry(dragEvent, (event)=>{
let records: Array<udmf.UnifiedRecord> = event.getData().getRecords(); let records: Array<udmf.UnifiedRecord> = event.getData().getRecords();
...@@ -139,7 +140,7 @@ struct Index { ...@@ -139,7 +140,7 @@ struct Index {
.height(100) .height(100)
.border({color: Color.Black, width: 1}) .border({color: Color.Black, width: 1})
.margin(15) .margin(15)
.allowDrop([udmf.UnifiedDataType.TEXT]) .allowDrop([udmfType.UniformDataType.TEXT])
.onDrop((dragEvent: DragEvent)=>{ .onDrop((dragEvent: DragEvent)=>{
console.info("the getDisplayX " + dragEvent.getDisplayX()); console.info("the getDisplayX " + dragEvent.getDisplayX());
console.info("the getDisplayY " + dragEvent.getDisplayY()); console.info("the getDisplayY " + dragEvent.getDisplayY());
...@@ -159,13 +160,13 @@ struct Index { ...@@ -159,13 +160,13 @@ struct Index {
.width('100%') .width('100%')
.height(200) .height(200)
.controls(true) .controls(true)
.allowDrop([udmf.UnifiedDataType.VIDEO]) .allowDrop([udmfType.UniformDataType.VIDEO])
Column() { Column() {
Text(this.abstractContent).fontSize(20).width('100%') Text(this.abstractContent).fontSize(20).width('100%')
Text(this.textContent).fontSize(15).width('100%') Text(this.textContent).fontSize(15).width('100%')
}.width('100%').height(100).margin(20).border({color: Color.Black, width: 1}) }.width('100%').height(100).margin(20).border({color: Color.Black, width: 1})
.allowDrop([udmf.UnifiedDataType.PLAIN_TEXT]) .allowDrop([udmfType.UniformDataType.PLAIN_TEXT])
.onDrop((dragEvent)=>{ .onDrop((dragEvent)=>{
this.getDataFromUdmfRetry(dragEvent, event=>{ this.getDataFromUdmfRetry(dragEvent, event=>{
let records: Array<udmf.UnifiedRecord> = event.getData().getRecords(); let records: Array<udmf.UnifiedRecord> = event.getData().getRecords();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册