|
|
@@ -10,10 +10,10 @@
|
|
|
<a-form-item label="显示总数">
|
|
|
<a-checkbox v-model:checked="props.props.showTotal" :indeterminate="props.props.showTotal === undefined" />
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="列表项类型">
|
|
|
+ <a-form-item label="通用列表项类型">
|
|
|
<ItemTypeEditor v-model="props.props.itemType" />
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="详情页">
|
|
|
+ <a-form-item label="通用列表详情页">
|
|
|
<LinkPathEditor v-model="(props.props.detailsPage as string)" />
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
@@ -52,6 +52,7 @@
|
|
|
<a-form-item label="TAB宽度">
|
|
|
<a-input-number
|
|
|
v-model:value="tab.width"
|
|
|
+ placeholder="TAB宽度(像素)"
|
|
|
style="width: 100%"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
@@ -121,6 +122,7 @@ import ItemTypeEditor from '../components/ItemTypeEditor.vue';
|
|
|
import DropdownDefinesEditor from '../components/DropdownDefinesEditor.vue';
|
|
|
import { ArrowUpOutlined, ArrowDownOutlined, CopyOutlined, DeleteOutlined } from '@ant-design/icons-vue';
|
|
|
import { ArrayUtils } from '@imengyu/imengyu-utils';
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
|
type TabItem = IHomeCommonCategoryListTabItemDefine;
|
|
|
|
|
|
@@ -170,7 +172,7 @@ function copyTab(i: number) {
|
|
|
uni.setClipboardData({
|
|
|
data: JSON.stringify({ type: 'Copy:CommonListTabItem', data: tab }),
|
|
|
});
|
|
|
- uni.showToast({ title: '复制成功', icon: 'success' });
|
|
|
+ message.success('复制成功');
|
|
|
}
|
|
|
async function pasteTab() {
|
|
|
const res = await uni.getClipboardData();
|
|
|
@@ -178,8 +180,14 @@ async function pasteTab() {
|
|
|
if (typeof data === 'string') {
|
|
|
try {
|
|
|
const json = JSON.parse(data);
|
|
|
- if (json.type === 'Copy:CommonListTabItem') getTabs().push(json.data);
|
|
|
- } catch (_) {}
|
|
|
+ if (json.type === 'Copy:CommonListTabItem') {
|
|
|
+ getTabs().push(json.data);
|
|
|
+ } else {
|
|
|
+ message.error('粘贴失败,粘贴内容不是列表项');
|
|
|
+ }
|
|
|
+ } catch (_) {
|
|
|
+ message.error('粘贴失败,请检查粘贴内容是否正确');
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|