|
@@ -160,7 +160,16 @@ export default defineComponent({
|
|
{this.dataShow ? (
|
|
{this.dataShow ? (
|
|
<div>
|
|
<div>
|
|
<ColHeader
|
|
<ColHeader
|
|
- onClickRight={() => (this.isManage = !this.isManage)}
|
|
|
|
|
|
+ onClickRight={() => {
|
|
|
|
+ this.isManage = !this.isManage
|
|
|
|
+ if (!this.isManage){
|
|
|
|
+ this.cartList.forEach((n:any) => {
|
|
|
|
+ if (n.stock <= 0){
|
|
|
|
+ this.selectItems = this.selectItems.filter((item: any) => item != n.id)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }}
|
|
v-slots={{
|
|
v-slots={{
|
|
right: () => (
|
|
right: () => (
|
|
<span style={{ color: '#333', fontSize: '14px' }}>
|
|
<span style={{ color: '#333', fontSize: '14px' }}>
|
|
@@ -174,7 +183,7 @@ export default defineComponent({
|
|
<CheckboxGroup v-model={this.selectItems}>
|
|
<CheckboxGroup v-model={this.selectItems}>
|
|
{this.cartList.map((item: any) => (
|
|
{this.cartList.map((item: any) => (
|
|
<div class={styles.cartItem}>
|
|
<div class={styles.cartItem}>
|
|
- <Checkbox name={item.id} disabled={item.stock <= 0}>
|
|
|
|
|
|
+ <Checkbox name={item.id} disabled={item.stock <= 0 && !this.isManage}>
|
|
<Card
|
|
<Card
|
|
price={moneyFormat(item.price)}
|
|
price={moneyFormat(item.price)}
|
|
desc={formateAttr(item.productAttr)}
|
|
desc={formateAttr(item.productAttr)}
|