-
+
-
{{ item.desc }}
+
+ {{ item.cate }}
+
+
-
-
-
http://tools.ranblogs.com/timeTran
+
+ {{ item.desc }}
diff --git a/src/components/Ip/Ip.vue b/src/components/Ip/Ip.vue
index 87ae3d8..89e420f 100644
--- a/src/components/Ip/Ip.vue
+++ b/src/components/Ip/Ip.vue
@@ -1,9 +1,9 @@
+
+
+
+
+
+
+ {{ props.title }}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Floor/Floor.vue b/src/components/Layout/Floor/Floor.vue
similarity index 89%
rename from src/components/Floor/Floor.vue
rename to src/components/Layout/Floor/Floor.vue
index d851372..a167ab7 100644
--- a/src/components/Floor/Floor.vue
+++ b/src/components/Layout/Floor/Floor.vue
@@ -1,6 +1,6 @@
diff --git a/src/components/Layout/Header/Header.vue b/src/components/Layout/Header/Header.vue
new file mode 100644
index 0000000..bed34c4
--- /dev/null
+++ b/src/components/Layout/Header/Header.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Right/Right.vue b/src/components/Layout/Right/Right.vue
similarity index 77%
rename from src/components/Right/Right.vue
rename to src/components/Layout/Right/Right.vue
index 1d62290..4f56e25 100644
--- a/src/components/Right/Right.vue
+++ b/src/components/Layout/Right/Right.vue
@@ -1,9 +1,7 @@
-
-
-
- {{ info.title }}
-
+
- 保存
+ 保存
{
{
name: 'image'
},
menu: ['resize', 'crop', 'rotate', 'draw', 'shape', 'icon', 'text', 'filter'], // 底部菜单按钮列表 隐藏镜像flip和遮罩mask
- initMenu: 'draw', // 默认打开的菜单项
- menuBarPosition: 'bottom', // 菜单所在的位置
+ initMenu: 'none', // 默认打开的菜单项
+ menuBarPosition: 'left', // 菜单所在的位置
locale: locale_zh, // 本地化语言为中文
theme: customTheme // 自定义样式
},
cssMaxWidth: 400, // canvas 最大宽度
cssMaxHeight: 500 // canvas 最大高度
})
- document.getElementsByClassName('tui-image-editor-main')[0].style.top = '45px' // 调整图片显示位置
+ document.getElementsByClassName('tui-image-editor-main')[0].style.top = '0' // 调整图片显示位置
document.getElementsByClassName(
'tie-btn-reset tui-image-editor-item help'
)[0].style.display = 'none' // 隐藏顶部重置按钮
}
// 保存图片,并上传
-const save = ()=> {
- const base64String = instance.value.toDataURL() // base64 文件
- const data = window.atob(base64String.split(',')[1])
- const ia = new Uint8Array(data.length)
- for (let i = 0; i < data.length; i++) {
- ia[i] = data.charCodeAt(i)
- }
- const blob = new Blob([ia], { type: 'image/png' }) // blob 文件
- const form = new FormData()
- form.append("avatarfile", blob);
- uploadAvatar(form).then(res=>{
- emit('getNewImg',res.imgUrl);
- closeDialog()
- })
+const save = () => {
+ // base64 文件
+ const base64String = instance.value.toDataURL()
+ //转换blod
+ const url = base64ToBlod(base64String)
+ //传递给父组件
+ emit('getNewImg', url);
}
+defineExpose({
+ save
+})
diff --git a/src/components/TimeTran/TimeTran.vue b/src/components/TimeTran/TimeTran.vue
index 2c28872..987fd37 100644
--- a/src/components/TimeTran/TimeTran.vue
+++ b/src/components/TimeTran/TimeTran.vue
@@ -1,9 +1,10 @@