ionic-vhframeworks 8.8.1 → 8.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1869,7 +1869,7 @@ export declare class VhImage {
|
|
|
1869
1869
|
* + 'compress-screen': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi thiết bị
|
|
1870
1870
|
* + 'compress-frame': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi khung hình thiết bị
|
|
1871
1871
|
* @field resolution: {} hoặc {width, height} của màn hình hoặc {width, height} của khung hình
|
|
1872
|
-
* @returns Object => obj = {vcode, msg, data
|
|
1872
|
+
* @returns Object => obj = {vcode, msg, data} hoặc error
|
|
1873
1873
|
* vcode === 0 : upload ảnh thành công
|
|
1874
1874
|
* vcode === 1 : lỗi import file ảnh
|
|
1875
1875
|
* vcode === 2 : lỗi upload file ảnh
|
|
@@ -1968,6 +1968,47 @@ export declare class VhImage {
|
|
|
1968
1968
|
* vcode === 3 : không thể upload file ảnh lớn hơn 1Mb
|
|
1969
1969
|
*/
|
|
1970
1970
|
getImageFromURL(url: any, path: any, oldthumbnailURL?: any): Promise<any>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Lấy hình ảnh từ url đẩy lên server với kích thước hình theo options truyền vào
|
|
1973
|
+
* @example:
|
|
1974
|
+
this.vhImage.getImageFromURL_Autoweb(url,"images/design/objects")
|
|
1975
|
+
.then((rsp:any)=>{
|
|
1976
|
+
console.log('rsp', rsp);
|
|
1977
|
+
if(rsp.vcode === 0){
|
|
1978
|
+
if(options.compress_type == 'no-compress'){
|
|
1979
|
+
|
|
1980
|
+
}else if(options.compress_type == 'compress-screen'){
|
|
1981
|
+
|
|
1982
|
+
}else if(options.compress_type == 'compress-frame'){
|
|
1983
|
+
|
|
1984
|
+
}
|
|
1985
|
+
}else if(rsp.vcode === 1){
|
|
1986
|
+
|
|
1987
|
+
}else if(rsp.vcode === 2){
|
|
1988
|
+
|
|
1989
|
+
}else if(rsp.vcode === 3){
|
|
1990
|
+
|
|
1991
|
+
}
|
|
1992
|
+
},error => {
|
|
1993
|
+
|
|
1994
|
+
}
|
|
1995
|
+
);
|
|
1996
|
+
* @param url: đường link ảnh (sống) tồn tại trên mạng internet
|
|
1997
|
+
* @param path: 'images/database/categories' or 'images/database/categories/products'
|
|
1998
|
+
* @param options: {compress_type, resolution}
|
|
1999
|
+
* @field compress_type:
|
|
2000
|
+
* + 'no-compress': Không nén ảnh sau khi tải lên
|
|
2001
|
+
* + 'compress-screen': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi thiết bị
|
|
2002
|
+
* + 'compress-frame': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi khung hình thiết bị
|
|
2003
|
+
* @field resolution: {} hoặc {width, height} của màn hình hoặc {width, height} của khung hình
|
|
2004
|
+
* @returns Object => obj = {vcode, msg, data} hoặc error
|
|
2005
|
+
* vcode === 0 : upload ảnh thành công
|
|
2006
|
+
* vcode === 1 : lỗi import file ảnh
|
|
2007
|
+
* vcode === 2 : lỗi upload file ảnh
|
|
2008
|
+
* vcode === 3 : không thể upload file ảnh lớn hơn maxSize (byte)
|
|
2009
|
+
* vcode === 4 : import file ảnh không đúng định dạng
|
|
2010
|
+
*/
|
|
2011
|
+
getImageFromURL_Autoweb(url: any, path: any, options: any): Promise<any>;
|
|
1971
2012
|
/**
|
|
1972
2013
|
* @example:Lấy hình ảnh từ nút insertImange của toolbar của Ckeditor
|
|
1973
2014
|
public onReady(editor: any): void {
|
|
@@ -12986,6 +13027,18 @@ export declare class VhQueryAutoWeb {
|
|
|
12986
13027
|
*
|
|
12987
13028
|
*/
|
|
12988
13029
|
pipeDetailPage_byLink(link: any): Promise<unknown>;
|
|
13030
|
+
/**
|
|
13031
|
+
* Hàm này giúp đồng bộ giao diện người dùng khi có sự thay đổi giá trị ở database một cách tự động,
|
|
13032
|
+
* nghĩa là khi thêm, xóa, sửa các giá trị trong database thì giao diện tự động thay đổi theo
|
|
13033
|
+
* @example:
|
|
13034
|
+
this.vhQueryAutoWeb.pipeDetailPage('66bb408265449c3a4b8a8965')
|
|
13035
|
+
.then(() => {
|
|
13036
|
+
//Do something if you find it necessary.
|
|
13037
|
+
})
|
|
13038
|
+
* @param block_or_object
|
|
13039
|
+
* @returns null: chỉ là 1 tìn hiệu để biết database có sự thay đổi
|
|
13040
|
+
*/
|
|
13041
|
+
pipeDetailPage(id_page: string): Promise<unknown>;
|
|
12989
13042
|
/**
|
|
12990
13043
|
* Hàm kiểm tra block hay object có phải là nhân bản không
|
|
12991
13044
|
* @example:
|