Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
thirdlucky
uml-demo
提交
2d93680a
U
uml-demo
项目概览
thirdlucky
/
uml-demo
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uml-demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2d93680a
编写于
11月 18, 2021
作者:
S
shenjizhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
746a674a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
227 addition
and
2 deletion
+227
-2
.gitignore
.gitignore
+2
-2
uni_modules/thirdlucky-uml-entity/changelog.md
uni_modules/thirdlucky-uml-entity/changelog.md
+0
-0
uni_modules/thirdlucky-uml-entity/components/thirdlucky-uml-entity/thirdlucky-uml-entity.vue
...omponents/thirdlucky-uml-entity/thirdlucky-uml-entity.vue
+144
-0
uni_modules/thirdlucky-uml-entity/package.json
uni_modules/thirdlucky-uml-entity/package.json
+80
-0
uni_modules/thirdlucky-uml-entity/readme.md
uni_modules/thirdlucky-uml-entity/readme.md
+1
-0
未找到文件。
.gitignore
浏览文件 @
2d93680a
...
...
@@ -14,6 +14,6 @@ unpackage/dist/dev/
# python
*.pyc
uni_modules/
!uni_modules/thirdlucky-uml-entity/**/*
uni_modules/
!thirdlucky*
!uni_modules/thirdlucky-uml-entity/**/*
*
.hbuilderx/
uni_modules/thirdlucky-uml-entity/changelog.md
0 → 100644
浏览文件 @
2d93680a
uni_modules/thirdlucky-uml-entity/components/thirdlucky-uml-entity/thirdlucky-uml-entity.vue
0 → 100644
浏览文件 @
2d93680a
<
template
>
<movable-view
class=
"active"
:style=
"
{ width: title.length * 0.75 + 'em', height: columns.length * 1.4 + 2 + 'em' }"
id="entity"
:x="x"
:y="y"
direction="all"
@touchstart="touchstart"
@touchmove.stop="touchmove"
@touchend="touchend"
>
<text
class=
"title"
>
{{
_title
}}
</text>
<text
class=
"content"
v-for=
"(col, index, key) in _columns"
:v-if=
"index
<
10"
:key=
"col.name"
>
{{
col
.
name
}}
:
{{
col
.
type
}}
</text>
</movable-view>
</
template
>
<
script
>
export
default
{
emits
:
[
'
move
'
,
'
start
'
,
'
end
'
],
props
:
{
name
:
'
uml-entity
'
,
entityName
:
{
type
:
String
,
required
:
true
},
title
:
{
type
:
String
,
required
:
false
,
default
:
'
实体
'
},
columns
:
{
type
:
Array
,
required
:
false
,
default
()
{
return
[];
}
}
},
data
()
{
return
{
x
:
0
,
y
:
0
,
scale
:
2
,
old
:
{
x
:
0
,
y
:
0
,
scale
:
2
}
};
},
computed
:
{
_title
()
{
let
text
=
this
.
$props
.
title
;
if
(
text
.
length
>
14
)
{
return
text
.
substr
(
0
,
13
)
+
'
...
'
;
}
return
this
.
$props
.
title
;
},
_entityname
()
{
return
this
.
$props
.
entityName
;
},
_columns
:
{
get
()
{
let
cols
=
this
.
$props
.
columns
;
if
(
cols
.
length
<=
10
)
{
return
this
.
$props
.
columns
;
}
else
{
return
this
.
$props
.
columns
.
slice
(
0
,
9
).
concat
({
name
:
'
忽略
'
,
info
:
''
,
type
:
'
...
'
});
}
}
}
},
methods
:
{
touchstart
(
e
)
{
this
.
touch
(
e
,
'
start
'
);
},
touchmove
(
e
)
{
this
.
touch
(
e
,
'
move
'
);
},
touchend
(
e
)
{
this
.
touch
(
e
,
'
end
'
);
},
touch
(
e
,
event
)
{
let
entityname
=
this
.
_entityname
;
let
touch
=
e
.
changedTouches
[
0
];
this
.
$emit
(
event
,
entityname
,
e
.
type
,
touch
.
clientX
,
touch
.
clientY
);
},
input
(
e
)
{
console
.
log
(
e
);
}
}
};
</
script
>
<
style
lang=
"scss"
>
$window-height
:
93vh
;
$border-width
:
5rpx
;
$control-width
:
200rpx
;
$control-height
:
200rpx
;
$max-width
:
300rpx
;
$max-height
:
500rpx
;
@function
resize
()
{
@return
0
;
}
.active
{
display
:
flex
;
flex-direction
:
column
;
min-width
:
$control-width
;
min-height
:
$control-height
;
max-width
:
$max-width
;
max-height
:
$max-height
;
background-color
:
#ffffff
;
color
:
#ffffff
;
border-color
:
#333333
;
border-radius
:
10px
;
border-style
:
solid
;
// position: absolute;
top
:
20rpx
;
left
:
20rpx
;
border-width
:
$border-width
;
}
.title
{
background-color
:
#55aaff
;
color
:
#ffffff
;
border-color
:
#2c405a
;
border-bottom-style
:
dashed
;
border-radius
:
8px
8px
0
0
;
text-align
:
center
;
border-width
:
$border-width
;
}
.content
{
margin-left
:
10rpx
;
margin-top
:
10rpx
;
color
:
#000000
;
font-size
:
0
.75em
;
}
</
style
>
uni_modules/thirdlucky-uml-entity/package.json
0 → 100644
浏览文件 @
2d93680a
{
"id"
:
"thirdlucky-uml-entity"
,
"displayName"
:
"thirdlucky-uml-entity"
,
"version"
:
"1.0.0"
,
"description"
:
"thirdlucky-uml-entity"
,
"keywords"
:
[
"thirdlucky-uml-entity"
],
"repository"
:
""
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"前端组件"
,
"通用组件"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
""
,
"data"
:
""
,
"permissions"
:
""
},
"npmurl"
:
""
},
"uni_modules"
:
{
"dependencies"
:
[],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"u"
,
"aliyun"
:
"u"
},
"client"
:
{
"Vue"
:
{
"vue2"
:
"u"
,
"vue3"
:
"u"
},
"App"
:
{
"app-vue"
:
"u"
,
"app-nvue"
:
"u"
},
"H5-mobile"
:
{
"Safari"
:
"u"
,
"Android Browser"
:
"u"
,
"微信浏览器(Android)"
:
"u"
,
"QQ浏览器(Android)"
:
"u"
},
"H5-pc"
:
{
"Chrome"
:
"u"
,
"IE"
:
"u"
,
"Edge"
:
"u"
,
"Firefox"
:
"u"
,
"Safari"
:
"u"
},
"小程序"
:
{
"微信"
:
"u"
,
"阿里"
:
"u"
,
"百度"
:
"u"
,
"字节跳动"
:
"u"
,
"QQ"
:
"u"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
}
}
}
}
}
\ No newline at end of file
uni_modules/thirdlucky-uml-entity/readme.md
0 → 100644
浏览文件 @
2d93680a
# thirdlucky-uml-entity
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录